/* ============================================================
   SIGNAL PACK — CART COMPONENTS (frontend only, no checkout logic)
   ============================================================ */

/* ---------- Mini cart drawer ---------- */
.sp-drawer-overlay{ position:fixed; inset:0; background:rgba(23,22,46,0.5); z-index:var(--z-drawer); display:none; }
.sp-drawer-overlay.is-open{ display:block; }
.sp-mini-cart{
  position:fixed; top:0; right:0; bottom:0; width:400px; max-width:92vw; background:var(--paper);
  z-index:calc(var(--z-drawer) + 1); display:flex; flex-direction:column; transform:translateX(100%);
  transition:transform var(--duration-slow) var(--ease); box-shadow:var(--shadow-lg);
}
.sp-mini-cart.is-open{ transform:translateX(0); }
.sp-mini-cart-head{ display:flex; align-items:center; justify-content:space-between; padding:20px; border-bottom:1px solid var(--line); }
.sp-mini-cart-head h3{ font-size:17px; }
.sp-mini-cart-body{ flex:1; overflow-y:auto; padding:20px; }
.sp-mini-cart-foot{ padding:20px; border-top:1px solid var(--line); }

.sp-cart-item{ display:flex; gap:14px; padding:14px 0; border-bottom:1px solid var(--line); }
.sp-cart-item:last-child{ border-bottom:none; }
.sp-cart-item img{ width:64px; height:64px; border-radius:var(--radius-sm); object-fit:cover; background:var(--grey-alt); flex-shrink:0; }
.sp-cart-item-info{ flex:1; min-width:0; }
.sp-cart-item-info h5{ font-size:13.5px; margin-bottom:3px; }
.sp-cart-item-options{ font-size:11.5px; color:var(--grey-text); margin-bottom:8px; }
.sp-cart-item-bottom{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.sp-cart-item-price{ font-family:var(--font-display); font-weight:700; color:var(--navy); font-size:13.5px; }
.sp-cart-item-remove{ font-size:11.5px; color:var(--grey-text); }
.sp-cart-item-remove:hover{ color:var(--color-error); }

.sp-cart-subtotal-row{ display:flex; justify-content:space-between; align-items:center; font-family:var(--font-display); font-weight:700; font-size:16px; color:var(--ink); margin-bottom:16px; }
.sp-cart-shipping-note{ font-size:11.5px; color:var(--grey-text); margin-bottom:16px; }
.sp-cart-cta-stack{ display:flex; flex-direction:column; gap:10px; }

/* ---------- Full cart page ---------- */
.sp-cart-page-grid{ display:grid; grid-template-columns:1fr 340px; gap:32px; align-items:start; }
@media (max-width:900px){ .sp-cart-page-grid{ grid-template-columns:1fr; } }

.sp-cart-table-row{ display:grid; grid-template-columns:80px 1fr auto auto auto; gap:16px; align-items:center; padding:18px 0; border-bottom:1px solid var(--line); }
.sp-cart-table-row img{ width:80px; height:80px; border-radius:var(--radius-sm); object-fit:cover; background:var(--grey-alt); }
.sp-cart-table-row h5{ font-size:14.5px; margin-bottom:4px; }
@media (max-width:700px){
  .sp-cart-table-row{ grid-template-columns:64px 1fr; grid-template-areas:"img info" "img actions"; }
  .sp-cart-table-row img{ grid-area:img; width:64px; height:64px; }
}

.sp-cart-summary-card{ background:var(--grey-bg); border-radius:var(--radius-2xl); padding:26px; }
.sp-cart-summary-card h4{ margin-bottom:16px; }
.sp-cart-summary-row{ display:flex; justify-content:space-between; font-size:13.5px; color:var(--grey-text); margin-bottom:10px; }
.sp-cart-summary-row.total{ font-family:var(--font-display); font-weight:800; font-size:16px; color:var(--ink); border-top:1px solid var(--line); padding-top:14px; margin-top:14px; }

/* ---------- Cart states ---------- */
.sp-cart-empty{ text-align:center; padding:60px 20px; }
.sp-cart-empty svg{ width:44px; height:44px; stroke:var(--grey-text); margin:0 auto 14px; }
.sp-cart-empty h4{ margin-bottom:8px; }
.sp-cart-empty p{ color:var(--grey-text); font-size:13.5px; margin-bottom:20px; }

.sp-cart-item.is-updating{ opacity:0.5; pointer-events:none; }
.sp-cart-item.is-removed{ opacity:0; max-height:0; overflow:hidden; padding:0; margin:0; transition:all var(--duration-slow) var(--ease); }

.sp-cart-qty-error{ font-size:11.5px; color:var(--color-error); margin-top:6px; display:none; }
.sp-cart-qty-error.is-visible{ display:block; }
.sp-cart-oos-warning{ background:var(--color-warning-bg); color:var(--color-warning); font-size:12px; padding:8px 12px; border-radius:var(--radius-sm); margin-top:8px; }

.sp-cart-badge-count{ /* reuses .sp-badge on header icon */ }
