/* ═══════════════════════════════════════════════════════════
   PATHURA — components/cart-drawer.css
   Moved verbatim from base.css during Phase 6 CSS split.
   No selectors, values, or comments changed.
═══════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────
   15. CART DRAWER
─────────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base) ease;
}
.overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed;
  right: -440px;
  top: 0;
  bottom: 0;
  width: 420px;

  background: var(--surface);
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;

  box-shadow: -12px 0 40px rgba(0,0,0,.25);
  transition: right .3s var(--ease-sharp);
}
.cart-drawer.open { right: 0; }

.cart-drawer-head {
  background: var(--text);
  padding: 1.3rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-drawer-head h3 {
  color: var(--text-inverse);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}
.cart-drawer-head h3 span { color: var(--text-muted); font-size: .85rem; font-weight: 400; margin-left: 4px; }
.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition-fast) ease;
}
.drawer-close:hover { color: var(--text-inverse); }

.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; }

.cart-empty { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.cart-empty span { font-size: 3rem; margin-bottom: 1rem; display: block; }
.cart-empty p { font-size: 14px; }

.cart-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.cart-row-emoji { font-size: 2rem; width: 52px; text-align: center; }
.cart-row-name { font-size: 13px; font-weight: 500; }
.cart-row-sub  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cart-row-price { font-size: 14px; font-weight: 700; text-align: right; }
.cart-row-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 4px;
  display: block;
  width: 100%;
  text-align: right;
  cursor: pointer;
  transition: color var(--transition-fast) ease;
}
.cart-row-remove:hover { color: var(--primary); }

/* Quantity controls */
.cart-row-meta { flex: 1; }
.cart-qty-ctrl { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-2);

  font-size: 15px;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: background var(--transition-fast) ease, border-color var(--transition-fast) ease;
}
.qty-btn:hover { background: var(--border); border-color: var(--border); }
.qty-val { min-width: 22px; text-align: center; font-size: 13px; font-weight: 600; }
.cart-row-right { text-align: right; flex-shrink: 0; }

.cart-drawer-foot { padding: 1.3rem 1.6rem; border-top: 1px solid var(--border); }
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}
.cart-total-row span:first-child { font-size: 13px; font-weight: 600; }
.cart-total-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }

.btn-checkout {
  width: 100%;
  background: var(--primary);
  color: var(--surface);
  border: none;
  padding: 15px;
  border-radius: var(--btn-radius);

  font-family: var(--btn-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;

  cursor: pointer;
  transition: background var(--transition-fast) ease;
}
.btn-checkout:hover { background: var(--primary-hover); }


/* ─── Responsive ───────────────────────────────
   Extracted from the consolidated Phase 5 "18. RESPONSIVE"
   block — same breakpoint and declaration, unchanged. */
@media (max-width: 600px) {
  .cart-drawer { width: 100%; right: -100%; }
}
