/* CART DRAWER & SLIDE-OUT PANEL */

.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: var(--z-drawer);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease-normal), visibility var(--ease-normal);
}

.cart-drawer-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  z-index: calc(var(--z-drawer) + 1);
  transform: translateX(100%);
  transition: transform var(--ease-smooth);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.8);
}

.cart-drawer.is-active {
  transform: translateX(0);
}

/* Drawer Header */
.cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-count-badge {
  font-size: 0.75rem;
  background: var(--gold-gradient);
  color: #000;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.cart-close-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: all var(--ease-fast);
}

.cart-close-btn:hover {
  background: var(--bg-card);
  color: #ffffff;
}

/* Free Delivery Meter */
.free-shipping-meter {
  padding: 14px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
}

.meter-notice {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meter-notice strong {
  color: var(--gold-light);
}

.meter-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.meter-bar-fill {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: 3px;
  transition: width 400ms ease;
}

/* Cart Items Container */
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Single Cart Item */
.cart-item-card {
  display: grid;
  grid-template-columns: 75px 1fr;
  gap: 14px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  position: relative;
}

.cart-item-img {
  width: 75px;
  height: 95px;
  object-fit: cover;
  border-radius: 3px;
  background: #000;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 4px;
  padding-right: 20px;
}

.cart-item-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cart-item-price {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold-light);
}

.cart-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  overflow: hidden;
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background var(--ease-fast);
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold-light);
}

.qty-input {
  width: 32px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.cart-item-remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 3px;
  transition: color var(--ease-fast);
}

.cart-item-remove-btn:hover {
  color: var(--accent-crimson);
}

.cart-item-remove-btn svg {
  width: 16px;
  height: 16px;
}

/* Empty Cart View */
.cart-empty-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 40px 20px;
}

.empty-cart-icon {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  margin-bottom: 20px;
}

.empty-cart-icon svg {
  width: 32px;
  height: 32px;
}

.cart-empty-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
}

/* Cart Footer */
.cart-footer {
  padding: 20px 24px 28px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.cart-subtotal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 700;
}

.cart-subtotal-val {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold-light);
}

.cart-shipping-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cart-checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
