/* ============================================================
   NOVARA — Cart drawer + cart page
   Reuses existing tokens: ink #0E0E0E · surface #141312 · line #272728
   · bone #F7F4EE · mist #8A8A85 · faint #6E6A63 · gold #D4AF37
   Fonts: Instrument Serif · Archivo · Geist Mono. No new visual language.
   ============================================================ */

.nv-cart-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Drawer ===== */
.nv-cart-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s linear .4s; }
.nv-cart-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .4s ease; }
.nv-cart-drawer { position: fixed; top: 0; right: 0; z-index: 96; display: flex; flex-direction: column; width: 440px; max-width: 100vw; height: 100%; background: #0E0E0E; border-left: 1px solid #272728; visibility: hidden; }
.nv-cart-drawer.is-open { visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  .nv-cart-drawer { transform: translateX(100%); transition: transform .44s cubic-bezier(.16,1,.3,1), visibility 0s linear .44s; }
  .nv-cart-drawer.is-open { transform: none; transition: transform .44s cubic-bezier(.16,1,.3,1); }
}
@media (max-width: 520px) { .nv-cart-drawer { width: 100%; border-left: 0; } }

.nv-cart-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 28px; border-bottom: 1px solid #272728; }
.nv-cart-drawer-title { font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: #F7F4EE; }
.nv-cart-drawer-title .n { color: #8A8A85; }
.nv-cart-close { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #272728; background: transparent; color: #8A8A85; cursor: pointer; transition: color .25s ease, border-color .25s ease; }
.nv-cart-close:hover { color: #F7F4EE; border-color: rgba(212,175,55,.6); }
.nv-cart-close:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; }
.nv-cart-close svg { width: 18px; height: 18px; }

.nv-cart-drawer-body { flex: 1; overflow-y: auto; padding: 4px 28px; }

/* ===== Line item (shared by drawer + page) ===== */
.nv-cart-item { display: grid; grid-template-columns: 82px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid #1c1b1a; }
.nv-cart-item:last-child { border-bottom: 0; }
.nv-cart-item-media { aspect-ratio: 4 / 5; background: #141312; overflow: hidden; border: 1px solid #1c1b1a; }
.nv-cart-item-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nv-cart-item-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.nv-cart-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.nv-cart-item-title { font-family: "Instrument Serif", Georgia, serif; font-size: 19px; line-height: 1.2; color: #F7F4EE; transition: color .25s ease; }
.nv-cart-item-title:hover { color: #fff; }
.nv-cart-item-title:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; }
.nv-cart-item-variant { font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #8A8A85; }
.nv-cart-item-remove { flex: none; background: none; border: 0; cursor: pointer; color: #6E6A63; padding: 2px; line-height: 0; transition: color .25s ease; }
.nv-cart-item-remove:hover { color: #D4AF37; }
.nv-cart-item-remove:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; }
.nv-cart-item-remove svg { width: 14px; height: 14px; }
.nv-cart-item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.nv-cart-item-quantity { display: inline-flex; align-items: center; border: 1px solid #272728; }
.nv-cart-item-quantity button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; color: #8A8A85; transition: color .2s ease; }
.nv-cart-item-quantity button:hover { color: #F7F4EE; }
.nv-cart-item-quantity button:focus-visible { outline: 2px solid #D4AF37; outline-offset: -2px; }
.nv-cart-item-quantity button[disabled] { opacity: .35; cursor: not-allowed; }
.nv-cart-item-quantity button svg { width: 12px; height: 12px; }
.nv-cart-item-qty { min-width: 30px; text-align: center; font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; color: #F7F4EE; }
.nv-cart-item-price { font-family: "Geist Mono", ui-monospace, monospace; font-size: 14px; color: #D4AF37; white-space: nowrap; }
.nv-cart-item-unit { font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; color: #6E6A63; }

/* ===== Drawer summary ===== */
.nv-cart-summary { border-top: 1px solid #272728; padding: 22px 28px; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
.nv-cart-summary-row { display: flex; align-items: baseline; justify-content: space-between; }
.nv-cart-summary-label { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: #8A8A85; }
.nv-cart-summary-total { font-family: "Geist Mono", ui-monospace, monospace; font-size: 18px; color: #F7F4EE; }
.nv-cart-summary-note { margin-top: 8px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #6E6A63; }
.nv-cart-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.nv-cart-checkout { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 16px 20px; background: #F7F4EE; color: #0A0A0A; border: 0; cursor: pointer; font-family: "Archivo", system-ui, sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; transition: background-color .3s ease; }
.nv-cart-checkout:hover { background: #fff; }
.nv-cart-checkout:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; }
.nv-cart-viewcart { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 14px 20px; border: 1px solid #272728; color: #F7F4EE; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; transition: border-color .25s ease, color .25s ease; }
.nv-cart-viewcart:hover { border-color: rgba(212,175,55,.6); }
.nv-cart-viewcart:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; }
.nv-cart-continue { width: 100%; text-align: center; background: none; border: 0; cursor: pointer; margin-top: 4px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #8A8A85; text-decoration: underline; text-underline-offset: 3px; transition: color .25s ease; }
.nv-cart-continue:hover { color: #F7F4EE; }
.nv-cart-continue:focus-visible { outline: 2px solid #D4AF37; outline-offset: 3px; color: #F7F4EE; }
.nv-cart-checkout-note { margin-top: 12px; min-height: 13px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 10px; letter-spacing: 0.06em; color: #6E6A63; text-align: center; }

/* ===== Empty state ===== */
.nv-cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px 28px; gap: 22px; }
.nv-cart-empty__eyebrow { font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #D4AF37; }
.nv-cart-empty p { font-family: "Instrument Serif", Georgia, serif; font-size: 25px; line-height: 1.35; color: #cfc9bf; max-width: 22ch; }

/* ===== Cart page ===== */
.nv-cart-page { display: grid; gap: 40px; }
@media (min-width: 1024px) { .nv-cart-page { grid-template-columns: minmax(0,1fr) 380px; gap: 64px; align-items: start; } }
.nv-cart-page-items .nv-cart-item { grid-template-columns: 120px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid #272728; border-bottom: 0; }
.nv-cart-page-items .nv-cart-item:first-child { border-top: 0; padding-top: 0; }
.nv-cart-page-items .nv-cart-item-title { font-size: 24px; }
.nv-cart-page-summary { border: 1px solid #272728; padding: 28px; }
@media (min-width: 1024px) { .nv-cart-page-summary { position: sticky; top: 100px; } }
.nv-cart-page-summary .nv-cart-summary { border-top: 0; padding: 0; }
.nv-cart-page-empty { padding: 40px 0 80px; }
.nv-cart-page-empty__eyebrow { font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #D4AF37; }
.nv-cart-page-empty p { font-family: "Instrument Serif", Georgia, serif; font-size: 30px; color: #cfc9bf; margin-top: 16px; }
