/* ═══════════════════════════════════════════════════════════════
   CART PANEL STYLES — DO NOT MODIFY
   ═══════════════════════════════════════════════════════════════
   These styles control the slide-out cart panel on the shop page.
   Key specs:
     - width: min(420px, 95vw) — NEVER use 100vw or it blocks the page
     - right: -420px when closed, 0 when open
     - z-index: 200 (above overlay at 199)
     - height: 85vh
   Last verified: 2026-08-12
   ═══════════════════════════════════════════════════════════════ */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 199;
  display: none;
}
.cart-overlay.open { display: block; }

.cart-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: min(420px, 95vw);
  height: 85vh;
  background: #0f172a;
  box-shadow: -8px 0 30px rgba(0,0,0,.5);
  z-index: 200;
  transition: right .3s ease;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}
.cart-panel.open { right: 0; }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.cart-header h3 { font-size: 1.3rem; margin: 0; color: var(--ink); }

.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  padding: 4px;
}

.cart-items { flex: 1; overflow-y: auto; padding: 12px 20px; }

.cart-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cart-item-info { flex: 1; }
.cart-item-info .name { font-weight: 700; font-size: .85rem; margin-bottom: 2px; color: var(--ink); }
.cart-item-info .price { color: var(--primary); font-size: .82rem; font-weight: 600; }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cart-item-qty button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.cart-item-qty button:hover { border-color: var(--primary); color: var(--primary); }
.cart-item-qty span { font-weight: 700; font-size: .88rem; min-width: 22px; text-align: center; color: var(--ink); }

.cart-item-remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: .8rem;
  font-weight: 600;
}

.cart-footer {
  padding: 16px 20px;
  padding-bottom: 20px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
  background: #0f172a;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--ink);
}
.cart-total .amount { color: var(--primary); }

.cart-checkout {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
}
.cart-checkout:hover { opacity: .9; }

/* Mobile override */
@media (max-width: 480px) {
  .cart-panel {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}
