/* ==========================================================================
   VESPER — store components (bag, product page, checkout, account, forms…)
   Builds on the tokens in vesper.css.
   ========================================================================== */

.announce.is-wholesale { background: var(--marigold); color: #1E1A19; }

/* ---------- Buttons & helpers ---------- */
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; animation: spin .8s linear infinite; }
.btn--line.is-busy::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-btn { font-size: var(--t-14); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; color: var(--stone); }
.text-btn:hover { color: var(--vesper-red); }
.small { font-size: var(--t-14); }
.stack { display: grid; gap: var(--s-4); }
.narrow { max-width: 560px; }
.page-head { padding-top: var(--s-10); padding-bottom: var(--s-8); }
.page-title { font-size: clamp(2.75rem, 10vw, 6rem); }
.empty-state { display: grid; gap: var(--s-3); justify-items: start; padding: var(--s-10) 0; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field label, .check { font-size: var(--t-14); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 0; border-radius: var(--radius);
  background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--t-16);
  transition: box-shadow var(--dur) var(--ease);
}
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--stone) 50%), linear-gradient(135deg, var(--stone) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--vesper-red); }
.field input:disabled { color: var(--stone); background: var(--mist); }
.field [aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--vesper-red); }
.hint { margin: 0; font-size: var(--t-12); color: var(--stone); }
.field-error, .form-error { margin: 0; font-size: var(--t-14); color: var(--vesper-red); }
.form-error { padding: var(--s-3) var(--s-4); background: color-mix(in srgb, var(--vesper-red) 8%, var(--paper)); border-radius: var(--radius); margin-bottom: var(--s-4); }
.form-note { padding: var(--s-4); background: var(--lilac-soft); border-radius: var(--radius); margin: 0 0 var(--s-4); }
.test-note { padding: var(--s-4); border: 1px dashed var(--gold); border-radius: var(--radius); background: color-mix(in srgb, var(--marigold) 10%, var(--paper)); font-size: var(--t-14); }
.check { display: flex; align-items: flex-start; gap: var(--s-3); min-height: 44px; padding-top: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--vesper-red); margin-top: 2px; }
.grid-form { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .grid-form { grid-template-columns: 1fr 1fr; } .grid-form .span-2 { grid-column: 1 / -1; } }
.radio-cards { display: grid; gap: var(--s-2); }
.radio-card { display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: var(--s-3) var(--s-4); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow var(--dur); }
.radio-card > span:nth-of-type(1) { flex: 1; display: grid; gap: 2px; }
.radio-card input { width: 18px; height: 18px; accent-color: var(--vesper-red); flex: none; }
.radio-card:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--vesper-red); background: color-mix(in srgb, var(--vesper-red) 4%, var(--paper)); }
.radio-card:hover { box-shadow: inset 0 0 0 1px var(--ink); }

/* ---------- Bag drawer ---------- */
.drawer {
  position: fixed; z-index: 80; top: 0; right: 0; bottom: 0; width: min(100%, 440px);
  display: flex; flex-direction: column; background: var(--paper);
  box-shadow: -1px 0 0 var(--line); transform: translateX(100%); visibility: hidden;
  transition: transform 340ms var(--ease), visibility 0s linear 340ms;
}
.drawer.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-2) var(--s-2) var(--s-2) var(--s-6); border-bottom: 1px solid var(--line); min-height: var(--header-h); }
.drawer-title { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: var(--t-20); }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-6); }
.drawer-foot { padding: var(--s-4) var(--s-6) calc(var(--s-4) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.drawer-foot:empty { display: none; }
.drawer-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.backdrop { z-index: 70; }

.bline { display: grid; grid-template-columns: 84px 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.line-img { display: block; aspect-ratio: 4 / 5; background: var(--mist); border-radius: var(--radius); overflow: hidden; }
.line-img img { width: 100%; height: 100%; object-fit: cover; }
.line-info { display: grid; gap: 4px; align-content: start; }
.line-top { display: flex; justify-content: space-between; gap: var(--s-3); }
.line-name { font-weight: 500; font-size: var(--t-14); }
.line-name:hover { color: var(--vesper-red); }
.line-price { font-size: var(--t-14); white-space: nowrap; }
.line-meta { font-size: var(--t-12); color: var(--stone); }
.line-error { margin: 0; font-size: var(--t-12); color: var(--vesper-red); }
.bline.has-error .line-img { outline: 1.5px solid var(--vesper-red); }
.line-actions { display: flex; align-items: center; justify-content: space-between; margin-top: var(--s-2); }
.qty { display: inline-flex; align-items: center; box-shadow: inset 0 0 0 1px var(--line); border-radius: 22px; }
.qty button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.qty button:hover:not(:disabled) { color: var(--vesper-red); }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.qty .icon { width: 14px; height: 14px; }
.qty span { min-width: 24px; text-align: center; font-size: var(--t-14); }
.freeship { padding: var(--s-3) 0 var(--s-4); border-bottom: 1px solid var(--line); }
.freeship p { margin: 0 0 var(--s-2); font-size: var(--t-14); }
.bar { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--emerald); transition: width 400ms var(--ease); }
.ws-notes { padding-top: var(--s-3); display: grid; gap: var(--s-2); }
.sum-row { display: flex; justify-content: space-between; gap: var(--s-4); padding: 6px 0; font-size: var(--t-14); }
.sum-total { border-top: 1px solid var(--line); margin-top: var(--s-2); padding-top: var(--s-3); font-size: var(--t-16); }
.sum-total strong { font-family: var(--f-display); font-size: var(--t-20); font-weight: 500; }
.skeleton-lines { height: 220px; border-radius: var(--radius); background: linear-gradient(90deg, var(--mist), var(--paper), var(--mist)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--s-6) + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: var(--s-2); width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-4); background: var(--ink); color: var(--paper); border-radius: var(--radius); font-size: var(--t-14); box-shadow: 0 10px 30px rgba(0,0,0,.2); opacity: 0; transform: translateY(8px); transition: opacity 240ms var(--ease), transform 240ms var(--ease); }
.toast.is-in { opacity: 1; transform: none; }
.toast a { color: var(--marigold); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; display: inline-flex; align-items: center; }
.toast--warn { background: var(--vesper-red); color: #fff; }

/* ---------- Product page ---------- */
.pdp { display: grid; gap: var(--s-6); padding-top: var(--s-4); }
.pdp-gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); }
.pdp-gallery::-webkit-scrollbar { display: none; }
.pdp-shot { margin: 0; scroll-snap-align: start; aspect-ratio: 4 / 5; background: var(--mist); overflow: hidden; }
.pdp-shot img { width: 100%; height: 100%; object-fit: cover; }
.pdp-dots { display: flex; justify-content: center; gap: 6px; margin-top: calc(var(--s-4) * -1); }
.pdp-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background var(--dur); }
.pdp-dots i.on { background: var(--vesper-red); }
.pdp-info { min-width: 0; }
.pdp-sticky { display: grid; gap: var(--s-4); }
.pdp-title { font-size: clamp(2.25rem, 8vw, 3.75rem); text-transform: none; line-height: 1.02; }
.pdp-price { font-size: var(--t-16); }
.price-lg { font-family: var(--f-display); font-size: var(--t-28); font-weight: 500; color: var(--vesper-red); }
.pdp-short { margin: 0; color: var(--stone); max-width: 52ch; }
.pdp-color { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-14); }
.sizes-pick { border: 0; padding: 0; margin: 0; min-width: 0; }
.sizes-pick legend { width: 100%; display: flex; justify-content: space-between; align-items: baseline; padding: 0; margin-bottom: var(--s-3); color: var(--gold-ink); }
.size-guide-link { font-family: var(--f-body); font-weight: 500; font-size: var(--t-12); letter-spacing: .04em; text-transform: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.size-grid--pdp { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.size-grid--pdp span { position: relative; }
.size-grid--pdp .is-out span { color: var(--stone); background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--line) 70%, transparent) 6px 7px); cursor: not-allowed; text-decoration: line-through; }
.size-grid--pdp input:checked + span { background: var(--vesper-red); color: #fff; }
.size-grid .dot { position: absolute; top: 6px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }
.size-hint { min-height: 1.4em; margin: var(--s-2) 0 0; }
.pdp-trust { list-style: none; margin: 0; padding: var(--s-4) 0 0; display: grid; gap: var(--s-2); border-top: 1px solid var(--line); font-size: var(--t-14); }
.pdp-trust li { display: flex; align-items: center; gap: var(--s-3); }
.pdp-trust .icon { width: 18px; height: 18px; color: var(--gold); flex: none; }
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { list-style: none; cursor: pointer; min-height: 52px; display: flex; align-items: center; justify-content: space-between; font-weight: 500; font-size: var(--t-14); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-family: var(--f-display); font-size: var(--t-20); color: var(--gold-ink); transition: transform var(--dur) var(--ease); }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion details > div { padding-bottom: var(--s-4); font-size: var(--t-14); color: var(--stone); }
.accordion ul { margin: 0; padding-left: 1.1em; }
.ws-grid { display: grid; gap: 0; border-top: 1px solid var(--line); }
.ws-head, .ws-row { display: grid; grid-template-columns: 1fr 1fr 96px; gap: var(--s-3); align-items: center; padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
.ws-head .cap { font-size: 11px; color: var(--gold-ink); }
.ws-row input { width: 100%; min-height: 40px; border: 0; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); text-align: center; background: var(--paper); font-size: var(--t-16); }
.ws-row input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--vesper-red); }
.ws-row.is-out { color: var(--stone); }
.ws-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); padding: var(--s-3) 0 var(--s-2); font-size: var(--t-14); }
.sticky-buy { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform 280ms var(--ease); }
.sticky-buy.is-on { transform: none; }
.sticky-buy > div { display: grid; min-width: 0; }
.sticky-buy strong { font-size: var(--t-14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related { padding-block: var(--s-16); }
@media (min-width: 1024px) {
  .pdp { grid-template-columns: 7fr 5fr; gap: var(--s-12); align-items: start; }
  .pdp-gallery { grid-auto-flow: row; grid-template-columns: 1fr 1fr; grid-auto-columns: auto; overflow: visible; margin: 0; gap: var(--s-2); }
  .pdp-gallery .pdp-shot:first-child { grid-column: 1 / -1; }
  .pdp-gallery .pdp-shot:only-child { grid-column: 1 / -1; }
  .pdp-dots { display: none; }
  .pdp-info { grid-column: 2; grid-row: 1 / span 2; }
  .pdp-sticky { position: sticky; top: calc(var(--header-h) + var(--s-6)); }
  .sticky-buy { display: none; }
}

/* ---------- Bag page & checkout layout ---------- */
.cart { display: grid; gap: var(--s-10); padding-bottom: var(--s-16); }
.cart-summary, .co-summary { align-self: start; padding: var(--s-6); background: var(--mist); border-radius: var(--radius); display: grid; gap: var(--s-1); }
.cart-summary .cap, .co-summary .cap { margin: 0 0 var(--s-3); }
.cart-summary .btn { margin-top: var(--s-4); }
.co-summary .bline { grid-template-columns: 64px 1fr; }
@media (min-width: 1024px) {
  .cart { grid-template-columns: 1fr 380px; gap: var(--s-12); }
  .cart-summary, .co-summary { position: sticky; top: calc(var(--header-h) + var(--s-6)); }
}
.co { display: grid; gap: var(--s-10); padding-bottom: var(--s-16); }
.co-form { display: grid; gap: var(--s-8); }
.co-step { display: grid; gap: var(--s-4); padding-bottom: var(--s-8); border-bottom: 1px solid var(--line); }
.co-h { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: var(--t-28); display: flex; align-items: baseline; gap: var(--s-3); }
.co-h .n { font-style: italic; color: var(--gold-ink); font-size: var(--t-20); min-width: 28px; }
.co-summary { order: -1; }
@media (min-width: 1024px) { .co { grid-template-columns: 1fr 400px; gap: var(--s-16); } .co-summary { order: 0; } }
.sim { max-width: 640px; display: grid; gap: var(--s-6); padding: var(--s-10) 0 var(--s-16); }
.sim-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- Order page ---------- */
.order-hero { display: grid; gap: var(--s-4); padding: var(--s-10) 0 var(--s-8); justify-items: start; }
.order-title { font-size: clamp(2.75rem, 10vw, 6rem); text-transform: none; }
.steps { list-style: none; margin: 0 0 var(--s-10); padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; counter-reset: s; }
.steps li { position: relative; padding-top: var(--s-6); font-size: var(--t-12); color: var(--stone); text-align: center; }
.steps li::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--line); }
.steps li::after { content: ""; position: absolute; top: 1px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line); }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--emerald); }
.steps li.done::after { background: var(--emerald); box-shadow: none; }
.order-grid { display: grid; gap: var(--s-10); padding-bottom: var(--s-16); }
.order-grid h2 { margin: 0 0 var(--s-3); }
.order-grid .btn { margin-top: var(--s-4); }
@media (min-width: 1024px) { .order-grid { grid-template-columns: 3fr 2fr; gap: var(--s-16); } }
.pill-status { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px; font-size: var(--t-12); font-weight: 500; background: var(--mist); white-space: nowrap; }
.s-paid, .s-delivered, .s-invoiced { background: color-mix(in srgb, var(--emerald) 14%, var(--paper)); color: var(--ok-ink); }
.s-shipped, .s-processing, .s-confirmed { background: color-mix(in srgb, var(--cobalt) 12%, var(--paper)); color: var(--info-ink); }
.s-requested, .s-pending_payment { background: color-mix(in srgb, var(--marigold) 22%, var(--paper)); color: var(--warn-ink); }
.s-cancelled, .s-declined, .s-refunded { background: color-mix(in srgb, var(--vesper-red) 10%, var(--paper)); color: var(--vesper-red); }

/* ---------- Auth & account ---------- */
.auth { display: grid; gap: var(--s-10); padding: var(--s-10) 0 var(--s-16); }
.auth-title { font-size: clamp(2.75rem, 10vw, 5.5rem); text-transform: none; margin: var(--s-2) 0 var(--s-4); }
.auth-panel { padding: var(--s-6); background: var(--mist); border-radius: var(--radius); align-self: start; }
.tabs-row { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: var(--s-6); box-shadow: inset 0 -1px 0 var(--line); }
.tabs-row button { min-height: 48px; font-weight: 500; color: var(--stone); box-shadow: inset 0 -2px 0 transparent; }
.tabs-row button[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--vesper-red); }
@media (min-width: 1024px) { .auth { grid-template-columns: 1fr 440px; gap: var(--s-16); align-items: center; min-height: 60vh; } .auth-panel { padding: var(--s-8); } }
.acct-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-4); padding: var(--s-10) 0 var(--s-6); }
.acct-title { font-size: clamp(2.5rem, 9vw, 5rem); text-transform: none; }
.acct-actions { display: flex; gap: var(--s-2); }
.acct-tabs { display: flex; gap: var(--s-6); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: var(--s-8); }
.acct-tabs a { min-height: 48px; display: inline-flex; align-items: center; white-space: nowrap; font-size: var(--t-14); font-weight: 500; color: var(--stone); box-shadow: inset 0 -2px 0 transparent; }
.acct-tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--vesper-red); }
.acct-panel { padding-bottom: var(--s-16); }
.order-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.order-list a { display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "img main total" "img pill pill"; gap: 4px var(--s-4); align-items: center; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.order-list a:hover .ol-main strong { color: var(--vesper-red); }
.ol-img { grid-area: img; aspect-ratio: 4/5; background: var(--mist); border-radius: var(--radius); overflow: hidden; }
.ol-img img { width: 100%; height: 100%; object-fit: cover; }
.ol-main { grid-area: main; display: grid; }
.order-list .pill-status { grid-area: pill; justify-self: start; }
.ol-total { grid-area: total; font-size: var(--t-14); }
@media (min-width: 768px) { .order-list a { grid-template-columns: 56px 1fr auto 120px; grid-template-areas: "img main pill total"; } .ol-total { text-align: right; } }
.ws-cards { display: grid; gap: var(--s-3); }
.ws-card { display: grid; gap: var(--s-2); padding: var(--s-6); border-radius: var(--radius); background: var(--mist); transition: transform var(--dur) var(--ease), box-shadow var(--dur); }
.ws-card strong { font-family: var(--f-display); font-weight: 500; font-size: var(--t-20); }
.ws-card:hover { box-shadow: inset 0 0 0 1px var(--vesper-red); }
@media (min-width: 768px) { .ws-cards { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Wholesale landing ---------- */
.ws-hero { display: grid; gap: var(--s-8); padding-top: var(--s-10); padding-bottom: var(--s-12); }
.ws-hero .display { font-size: clamp(3.25rem, 14vw, 9rem); }
.ws-hero img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; border-radius: var(--radius); }
@media (min-width: 1024px) { .ws-hero { grid-template-columns: 7fr 5fr; align-items: end; gap: var(--s-12); } }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6); counter-reset: how; }
.how li { display: grid; gap: var(--s-2); padding-top: var(--s-5); border-top: 1px solid var(--gold); }
.how .n { font-family: var(--f-display); font-style: italic; font-size: var(--t-40); color: var(--vesper-red); line-height: 1; }
.how strong { font-family: var(--f-display); font-weight: 500; font-size: var(--t-20); }
@media (min-width: 768px) { .how { grid-template-columns: repeat(4, 1fr); } }
.apply-wrap { display: grid; gap: var(--s-10); }
@media (min-width: 1024px) { .apply-wrap { grid-template-columns: 4fr 7fr; gap: var(--s-16); } }
.sent { display: grid; gap: var(--s-4); padding: var(--s-10) 0; }
.faq-mini { border-top: 1px solid var(--line); }

/* ---------- Catalog builder ---------- */
.cat-builder { display: grid; gap: var(--s-8); padding-bottom: var(--s-16); max-width: 860px; }
.cb-step { display: grid; gap: var(--s-4); padding-bottom: var(--s-8); border-bottom: 1px solid var(--line); }
.cb-cats { display: grid; gap: var(--s-2); }
@media (min-width: 640px) { .cb-cats { grid-template-columns: repeat(3, 1fr); } }
.cb-pick summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: var(--s-2); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.cb-list { display: grid; gap: var(--s-6); max-height: 520px; overflow-y: auto; padding-right: var(--s-2); }
.cb-group { border: 0; margin: 0; padding: 0; display: grid; gap: 2px; min-width: 0; }
.cb-group legend { margin-bottom: var(--s-2); }
.cb-item { display: grid; grid-template-columns: 20px 44px 1fr; align-items: center; gap: var(--s-3); min-height: 60px; padding: 4px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: var(--t-14); }
.cb-item input { width: 18px; height: 18px; accent-color: var(--vesper-red); }
.cb-item img { width: 44px; height: 55px; object-fit: cover; border-radius: var(--radius); background: var(--mist); }
.cb-item span { display: grid; }
.cb-go { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-4) 0 calc(var(--s-4) + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--gold); }
.cb-go p { margin: 0; }

/* ---------- Track ---------- */
.track-card { display: grid; gap: var(--s-4); padding: var(--s-6); background: var(--mist); border-radius: var(--radius); margin: var(--s-8) 0 var(--s-16); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 var(--s-4); border-left: 2px solid var(--emerald); display: grid; gap: var(--s-3); }
.timeline li { position: relative; display: grid; font-size: var(--t-14); }
.timeline li::before { content: ""; position: absolute; left: calc(var(--s-4) * -1 - 6px); top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--emerald); }
.track-items { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.track-items img { width: 56px; height: 70px; object-fit: cover; border-radius: var(--radius); }

/* ---------- Help / prose pages ---------- */
.help { display: grid; gap: var(--s-10); padding-bottom: var(--s-16); }
.help-nav { display: flex; gap: var(--s-2); flex-wrap: wrap; align-content: start; }
.help-nav a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 var(--s-4); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); font-size: var(--t-14); }
.help-nav a[aria-current="page"] { background: var(--vesper-red); color: #fff; box-shadow: none; }
.prose { max-width: 70ch; display: grid; gap: var(--s-4); }
.prose h2 { margin: var(--s-6) 0 0; font-family: var(--f-display); font-weight: 500; font-size: var(--t-28); }
.prose p, .prose li { color: var(--ink); }
.prose a { color: var(--vesper-red); text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-14); }
.prose th, .prose td { padding: var(--s-3) var(--s-2); border-bottom: 1px solid var(--line); text-align: left; }
.prose th { font-family: var(--f-accent); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); font-size: 12px; }
.table-scroll { overflow-x: auto; }
.draft-note { padding: var(--s-3) var(--s-4); border: 1px dashed var(--gold); border-radius: var(--radius); font-size: var(--t-14); color: var(--gold-ink); }
@media (min-width: 1024px) { .help { grid-template-columns: 240px 1fr; gap: var(--s-16); } .help-nav { flex-direction: column; } .help-nav a { box-shadow: none; padding: 0; border-radius: 0; } .help-nav a[aria-current="page"] { background: none; color: var(--vesper-red); } }

.stub { min-height: 50vh; display: grid; align-content: center; gap: var(--s-4); padding-block: var(--s-16); justify-items: start; }
.stub .display { font-size: clamp(3rem, 12vw, 7rem); }

/* The hidden attribute always wins over component display rules */
[hidden] { display: none !important; }

/* ---------- Category navigation (owner's category map) ---------- */
.card-brand { margin: 0 0 -2px; font-family: var(--f-accent); font-weight: 600; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); }
.nav-desktop { gap: var(--s-5); }
/* Item spans the full header height so the pointer never crosses a dead gap on its way down to the panel */
.nav-item { display: flex; align-items: center; height: var(--header-h); }
.mega {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 45; display: none;
  background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--gold);
  box-shadow: 0 24px 40px -24px rgba(30, 26, 25, .25); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto;
}
/* Short grace period on close: a slightly diagonal path toward the panel doesn't snap it shut */
.nav-item.has-mega .mega { display: block; visibility: hidden; opacity: 0; transition: opacity 150ms var(--ease), visibility 0s linear 200ms; }
.nav-item.has-mega:hover .mega, .nav-item.has-mega:focus-within .mega { visibility: visible; opacity: 1; z-index: 46; transition-delay: 0s; }
.mega-inner { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s-6) var(--s-8); padding-block: var(--s-8); }
.mega-col ul { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; gap: 2px; }
.mega-col li a { display: inline-flex; min-height: 30px; align-items: center; font-size: var(--t-14); }
.mega-col li a:hover { color: var(--vesper-red); }
.mega-h { font-size: 12px; }
.mega-h:hover { color: var(--vesper-red); }
.mega-all { grid-column: 1 / -1; justify-self: start; color: var(--vesper-red); }
@media (min-width: 1024px) and (max-width: 1199px) { .nav-desktop { display: none; } .menu-toggle { display: inline-grid; } .hide-sm { display: none; } }
@media (max-width: 1439px) { .nav-desktop a .n { display: none; } }
.m-cat summary { list-style: none; display: flex; align-items: baseline; gap: var(--s-4); padding: var(--s-4) 0; cursor: pointer; }
.m-cat summary::-webkit-details-marker { display: none; }
.m-cat summary::after { content: "+"; margin-left: auto; font-family: var(--f-display); font-size: var(--t-28); color: var(--gold-ink); transition: transform var(--dur) var(--ease); }
.m-cat[open] summary::after { transform: rotate(45deg); }
.m-sub { display: grid; gap: var(--s-6); padding: 0 0 var(--s-6) 48px; }
.m-group ul { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-4); }
.m-group li a { display: flex; min-height: 40px; align-items: center; font-size: var(--t-16); }
.gender-row { display: flex; gap: var(--s-2); margin-top: var(--s-6); }
.gender-row .chip { font-weight: 500; }
.menu-list .display { font-size: clamp(1.6rem, 7.5vw, 2.5rem); }
.brand-list { display: grid; max-height: 320px; overflow-y: auto; }
.brand-list .count { font-size: 11px; color: var(--stone); }

/* ---------- Members-only prices ---------- */
.card-locked, .price-locked { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-12); color: var(--gold-ink); letter-spacing: .02em; }
.card-locked .icon, .price-locked .icon { width: 13px; height: 13px; }
.price-locked { min-height: 44px; font-size: var(--t-14); text-decoration: underline; text-underline-offset: 3px; }
.members-price { display: grid; gap: var(--s-2); padding: var(--s-4); border: 1px dashed var(--gold); border-radius: var(--radius); background: color-mix(in srgb, var(--marigold) 8%, var(--paper)); }
.members-price p { margin: 0; font-size: var(--t-14); }
.members-price .links { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.members-price a { color: var(--vesper-red); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; display: inline-flex; align-items: center; }
.gate { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: var(--gutter); background: var(--scrim); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.gate[hidden] { display: none !important; }
.gate-card { position: relative; width: min(100%, 460px); display: grid; gap: var(--s-4); padding: var(--s-10) var(--s-8) var(--s-8); background: var(--paper); border-top: 3px solid var(--vesper-red); border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); animation: gate-in 240ms var(--ease); }
.gate-card p { margin: 0; }
.gate-title { font-size: clamp(2rem, 7vw, 2.75rem); text-transform: none; }
.gate-x { position: absolute; top: var(--s-2); right: var(--s-2); }
.gate-ctas { display: grid; gap: var(--s-2); margin-top: var(--s-2); }
@media (min-width: 480px) { .gate-ctas { grid-template-columns: 1fr 1fr; } }
@keyframes gate-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#bag-body .empty-state .btn { width: 100%; }
.pay-note { display: flex; gap: var(--s-2); align-items: flex-start; margin: 0; }
.pay-note .icon { flex: none; margin-top: 3px; }
.cb-types { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.cb-types label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s-3); border: 1px solid var(--line); border-radius: 22px; font-size: var(--t-14); cursor: pointer; }
.cb-types label:has(input:checked) { border-color: var(--ink); background: var(--mist); }
.cb-types input { width: 16px; height: 16px; accent-color: var(--vesper-red); }
.cb-types .count { color: var(--stone); font-size: var(--t-12); }
.cb-group-h { margin: var(--s-4) 0 0; }
