/* ═══════════════════════════════════════
   CART SIDEBAR — PREMIUM
═══════════════════════════════════════ */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  animation: overlayIn 0.25s ease;
}
.cart-overlay.active { display: block; }
@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 96vw;
  background: white;
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}
.cart-sidebar.open { transform: translateX(0); }

.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border-light);
  background: white;
}
.cart-sidebar-header h3 {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-count-label {
  font-size: 12px;
  font-weight: 700;
  background: var(--green-light);
  color: var(--green);
  padding: 2px 8px;
  border-radius: 20px;
  font-family: var(--font);
}
.cart-close {
  background: var(--bg);
  border: 1.5px solid var(--border);
  font-size: 18px;
  color: var(--text-sec);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  font-weight: 700;
}
.cart-close:hover { background: var(--red-light); border-color: var(--red); color: var(--red); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-track { background: transparent; }
.cart-items::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.cart-empty {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cart-empty-icon { font-size: 48px; opacity: 0.5; }

.cart-item {
  background: var(--bg);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: cartItemIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: border-color var(--t);
}
.cart-item:hover { border-color: var(--green); }
@keyframes cartItemIn {
  from { transform: translateX(24px) scale(0.95); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}
.cart-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-item-num {
  width: 24px;
  height: 24px;
  background: var(--green-gradient);
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.cart-item-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.cart-item-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--green);
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 14px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
  transition: all var(--t);
  font-weight: 700;
}
.cart-item-remove:hover { color: var(--red); background: var(--red-light); }
.cart-item-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cart-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--green-gradient);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-display);
  box-shadow: 0 2px 8px var(--green-glow);
}

/* Cart Footer */
.cart-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: white;
}
.cart-nudge-box {
  background: linear-gradient(135deg, #EBF5FF, #EEF2FF);
  border: 1px solid rgba(26,86,219,0.15);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--blue-dark);
  font-weight: 500;
  text-align: center;
  animation: nudgeSlide 0.3s ease;
}
@keyframes nudgeSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
}
.cart-total span { font-size: 14px; color: var(--text-sec); font-weight: 500; }
.cart-total strong { font-size: 24px; font-family: var(--font-display); font-weight: 900; color: var(--green); }

.btn-checkout {
  background: linear-gradient(135deg, #1A56DB, #2563EB);
  color: white;
  padding: 15px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 800;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  box-shadow: var(--shadow-blue);
  position: relative;
  overflow: hidden;
}
.btn-checkout::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s;
}
.btn-checkout:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(26,86,219,0.40);
}
.btn-checkout:hover:not(:disabled)::before { left: 100%; }
.btn-checkout:disabled { background: var(--border); color: var(--text-light); box-shadow: none; cursor: not-allowed; }

.btn-add-more {
  background: white;
  color: var(--green);
  border: 2px solid var(--green);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: all var(--t);
  text-align: center;
}
.btn-add-more:hover { background: var(--green-light); transform: translateY(-1px); }
