/* Container */
.nl-sidecart {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.nl-sidecart.is-active {
  display: block;
}

/* Overlay */
.nl-sidecart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

/* Panel */
.nl-sidecart-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 360px;
  max-width: 92vw;
  background: #ffffff;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.nl-sidecart.is-active .nl-sidecart-panel {
  transform: translateX(0);
}

/* Header */
.nl-sidecart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #eee;
}

.nl-sidecart-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.nl-sidecart-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* Body */
.nl-sidecart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
}

.nl-sidecart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nl-sidecart-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.nl-sidecart-item-thumb {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
}

.nl-sidecart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nl-sidecart-item-details {
  flex: 1;
}

.nl-sidecart-item-title {
  font-size: 14px;
  margin: 0 0 4px;
}

.nl-sidecart-item-meta {
  font-size: 13px;
  color: #777;
}

.nl-sidecart-item-qty {
  font-size: 13px;
  margin-top: 4px;
}

.nl-sidecart-remove {
  font-size: 12px;
  color: #c0392b;
  text-decoration: none;
  margin-top: 4px;
  display: inline-block;
}

/* Footer */
.nl-sidecart-footer {
  border-top: 1px solid #eee;
  padding: 14px 18px 16px;
}

.nl-sidecart-totals {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 12px;
}

.nl-sidecart-totals .label {
  color: #555;
}

.nl-sidecart-totals .value {
  font-weight: 600;
}

.nl-sidecart-actions {
  display: flex;
  gap: 8px;
}

.nl-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  flex: 1;
  transition: all 0.2s ease;
}

/* Container */
.nl-sidecart {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.nl-sidecart.is-active {
  display: block;
}

/* Overlay */
.nl-sidecart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

/* Panel */
.nl-sidecart-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 360px;
  max-width: 92vw;
  background: #ffffff;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.nl-sidecart.is-active .nl-sidecart-panel {
  transform: translateX(0);
}

/* Header */
.nl-sidecart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #eee;
}

.nl-sidecart-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.nl-sidecart-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* Body */
.nl-sidecart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
}

.nl-sidecart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nl-sidecart-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.nl-sidecart-item-thumb {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
}

.nl-sidecart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nl-sidecart-item-details {
  flex: 1;
}

.nl-sidecart-item-title {
  font-size: 14px;
  margin: 0 0 4px;
}

.nl-sidecart-item-meta {
  font-size: 13px;
  color: #777;
}

.nl-sidecart-item-qty {
  font-size: 13px;
  margin-top: 4px;
}

.nl-sidecart-remove {
  font-size: 12px;
  color: #c0392b;
  text-decoration: none;
  margin-top: 4px;
  display: inline-block;
}

/* Footer */
.nl-sidecart-footer {
  border-top: 1px solid #eee;
  padding: 14px 18px 16px;
}

.nl-sidecart-totals {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 12px;
}

.nl-sidecart-totals .label {
  color: #555;
}

.nl-sidecart-totals .value {
  font-weight: 600;
}

.nl-sidecart-actions {
  display: flex;
  gap: 8px;
}

.nl-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  flex: 1;
  transition: all 0.2s ease;
}

.nl-btn-primary {
  background: #000;
  color: #fff;
}

.nl-btn-primary:hover {
  background: #222;
}

.nl-btn-outline {
  border: 1px solid #000;
  color: #000;
  background: #fff;
}

.nl-btn-outline:hover {
  background: #000;
  color: #fff;
}

/* Fly-to-cart clone */
.fly-cart-wrapper {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  will-change: transform;
}

.fly-cart-inner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  will-change: transform, opacity;
}

/* Floating Cart Icon */
.nl-floating-cart {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99998;
}

.nl-floating-cart-inner {
  position: relative;
  background: #000;
  color: #fff;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform .2s ease;
}

.nl-floating-cart-inner:hover {
  transform: scale(1.1);
}

.nl-floating-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff4444;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loader */
.nl-sidecart-loader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.nl-sidecart.is-loading .nl-sidecart-loader {
  opacity: 1;
  pointer-events: all;
}

.nl-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #eee;
  border-top-color: #000;
  border-radius: 50%;
  animation: nl-spin 0.8s linear infinite;
}

@keyframes nl-spin {
  to {
    transform: rotate(360deg);
  }
}