/* ========================================
   CART SIDEBAR
======================================== */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000; opacity: 0; visibility: hidden;
  transition: all var(--transition);
}
.cart-overlay.active { opacity: 1; visibility: visible; }
.cart-sidebar {
  position: fixed; top: 0; right: 0;
  width: 420px; max-width: 92vw; height: 100vh;
  background: #fff; z-index: 2001;
  transform: translateX(100%);
  transition: transform 0.4s ease;
  display: flex; flex-direction: column;
}
.cart-sidebar.active { transform: translateX(0); }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid #f0f0f0;
}
.cart-header h3 {
  font-family: var(--font-body);
  font-size: 18px; font-weight: 600;
  color: var(--color-text);
}
.cart-header h3 span {
  font-weight: 400; color: var(--color-text-muted);
}
.cart-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--color-text-muted);
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}
.cart-close:hover { background: #f5f5f5; color: var(--color-text); }
.cart-body { flex: 1; overflow-y: auto; padding: 0 24px 20px; }

/* Exclusive Offers banner */
.cart-offers-banner {
  display: flex; align-items: center; gap: 14px;
  margin: 20px 0;
  padding: 14px 16px;
  border: 1.5px dashed var(--gold);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s ease;
}
.cart-offers-banner:hover { background: var(--color-gold-bg); }
.cart-offers-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-gold-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--gold);
  flex-shrink: 0;
}
.cart-offers-text { flex: 1; }
.cart-offers-text strong {
  font-size: 14px; font-weight: 700;
  color: var(--color-text);
}
.cart-offers-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--gold);
  color: #fff;
  font-size: 11px; font-weight: 700;
}
.cart-offers-sub {
  font-size: 12px; color: var(--color-text-muted);
  margin-top: 2px;
}
.cart-offers-arrow {
  color: var(--color-text-muted);
  font-size: 14px; flex-shrink: 0;
}

/* Cart items */
.cart-item {
  display: flex; gap: 14px; padding: 18px 0;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}
.cart-item-img {
  width: 80px; height: 95px; border-radius: var(--radius-sm);
  background: var(--color-bg-ivory);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: rgba(201,168,76,0.3);
  overflow: hidden;
}
.cart-item-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.cart-item-info { flex: 1; }
.cart-item-name {
  font-weight: 700; font-size: 14px;
  color: var(--color-text);
  margin-bottom: 4px;
  padding-right: 30px;
}
.cart-item-variant {
  font-size: 11px; font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.cart-item-price {
  font-weight: 700;
  color: var(--gold);
  font-size: 15px;
  font-family: var(--font-heading);
}
.cart-item-delete {
  position: absolute; top: 18px; right: 0;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}
.cart-item-delete:hover {
  color: var(--color-sale);
  background: rgba(255,92,122,0.08);
}
.cart-qty {
  display: flex; align-items: center; gap: 0;
  margin-top: 10px;
}
.cart-qty button {
  width: 30px; height: 30px;
  border: 1.5px solid #e0e0e0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--color-text);
  transition: all 0.2s ease;
  background: transparent;
}
.cart-qty button:hover {
  border-color: var(--gold); color: var(--gold);
}
.cart-qty span {
  width: 36px; text-align: center;
  font-size: 14px; font-weight: 600;
}

/* Delivery progress bar */
.cart-delivery {
  margin: 12px 0 4px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0faf0 0%, #e8f5e9 100%);
  border-radius: var(--radius-md);
  border: 1px solid rgba(76,175,80,0.15);
}
.cart-delivery.not-free {
  background: linear-gradient(135deg, #fff9f0 0%, #fff3e0 100%);
  border-color: rgba(201,168,76,0.2);
}
.cart-delivery-top {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.cart-delivery-icon {
  width: 28px; height: 28px; border-radius: 50%;
  background: #4CAF50; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.cart-delivery.not-free .cart-delivery-icon { background: var(--color-gold); }
.cart-delivery-text {
  font-size: 13px; color: var(--color-text-secondary);
  line-height: 1.4;
}
.cart-delivery-text strong { color: #4CAF50; font-weight: 700; }
.cart-delivery.not-free .cart-delivery-text strong { color: var(--color-gold); }
.cart-delivery-text .delivery-remaining { color: var(--gold); font-weight: 700; }
.cart-delivery-bar {
  position: relative;
  height: 5px;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
  overflow: visible;
}
.cart-delivery-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #4CAF50);
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.cart-delivery.not-free .cart-delivery-progress {
  background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold-light));
}
.cart-delivery-check {
  position: absolute; right: -2px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: color 0.3s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.cart-delivery-check.reached { color: #4CAF50; }
.cart-delivery-check.not-reached { color: #ccc; }

/* Cart footer */
.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fdf8f5;
}
.cart-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 18px;
}
.cart-total-label {
  font-size: 16px; font-weight: 700;
  color: var(--color-text);
}
.cart-total-label span {
  font-size: 12px; font-weight: 400;
  color: var(--color-text-muted);
  margin-left: 4px;
}
.cart-total .total-price {
  font-size: 20px; font-weight: 700;
  color: var(--color-text);
  font-family: var(--font-heading);
}
.cart-footer-btns { display: flex; gap: 10px; }
.cart-btn-view {
  flex: 1; padding: 13px;
  border-radius: 30px;
  background: var(--gold);
  color: #fff;
  font-size: 13px; font-weight: 700;
  text-align: center;
  transition: all 0.3s ease;
  border: 1.5px solid var(--gold);
  cursor: pointer;
}
.cart-btn-view:hover {
  background: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
}
.cart-btn-continue {
  flex: 1; padding: 13px;
  border-radius: 30px;
  background: transparent;
  color: var(--gold);
  font-size: 13px; font-weight: 700;
  text-align: center;
  border: 1.5px solid var(--gold);
  transition: all 0.3s ease;
  cursor: pointer;
}
.cart-btn-continue:hover { background: var(--color-gold-bg); }

/* ── Mobile ── */
@media (max-width: 639px) {
  .cart-sidebar { width: 100vw; max-width: 100vw; border-radius: 0; }
  .cart-item-img { width: 70px; height: 82px; }
  .cart-item-name { font-size: 13px; }
  .cart-item { gap: 10px; }
  .cart-header { padding: 16px; }
  .cart-items { padding: 0 16px; }
  .cart-footer { padding: 16px; }
}
