/* StormChase shop storefront. Mobile-first; brand colors live in :root for easy re-skinning. */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #141414;
  --muted: #676560;
  --line: #e2dfd8;
  --accent: #d9480f;
  --accent-ink: #ffffff;
  --storm: #1c2026;
  --ok: #1d7a3a;
  --err: #b42318;
  --warn: #8a5a00;
  --radius: 10px;
  --wrap: 1180px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: 1.4rem; }
h3, .h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.section { padding: 28px 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lede { font-size: 1.075rem; color: var(--muted); max-width: 60ch; }
.empty { padding: 40px 0; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 16px; height: 60px; }
.wordmark { font-weight: 900; text-transform: uppercase; letter-spacing: .14em; text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.wordmark-sm { font-size: .9rem; margin-bottom: .4em; }
.nav { display: flex; gap: 18px; margin-left: auto; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 0; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }
.cart-link { position: relative; display: inline-flex; padding: 8px; text-decoration: none; }
.cart-count { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
@media (max-width: 520px) {
  .nav { gap: 12px; font-size: .875rem; }
  .wordmark { font-size: .9rem; letter-spacing: .1em; }
}

/* Hero */
.hero { background: radial-gradient(120% 140% at 85% 0%, #4a5260 0%, var(--storm) 55%, #0e1013 100%); color: #f3f1ec; }
.hero-inner { padding: 64px 16px 72px; }
.hero h1 { font-size: clamp(2.4rem, 8vw, 4.5rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; max-width: 12ch; }
.hero-sub { color: #c9c6be; max-width: 46ch; font-size: 1.1rem; margin-bottom: 1.6em; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; font-weight: 700; color: #ff9a6b; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-primary:disabled { background: #b9b6af; cursor: not-allowed; }
.btn-light { background: #f3f1ec; color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-small { min-height: 34px; padding: 0 12px; font-size: .85rem; background: var(--surface); border-color: var(--line); }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--muted); cursor: pointer; font-size: .875rem; }

/* Sections, chips, grid */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h1, .section-head h2 { margin: 0; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 20px; }
.chip { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  text-decoration: none; font-size: .9rem; }
.chip[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card a { text-decoration: none; display: block; }
.card-img { aspect-ratio: 1; background: #ebe9e4; border-radius: var(--radius); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card a:hover .card-img img { transform: scale(1.03); }
.card-title { font-size: .98rem; font-weight: 600; margin: 10px 0 2px; }
.card-meta { display: flex; gap: 10px; font-size: .92rem; margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.pager { display: flex; justify-content: center; gap: 18px; align-items: center; margin-top: 32px; }
.promise { display: grid; gap: 18px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 32px; }
@media (min-width: 760px) { .promise { grid-template-columns: repeat(3, 1fr); } }

/* Product page */
.product-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.buy, .gallery { min-width: 0; }
@media (min-width: 880px) { .product-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; } }
.gallery-main { background: #ebe9e4; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 880px) { .gallery { position: sticky; top: 80px; } }
.thumbs { list-style: none; padding: 0; margin: 10px 0 0; display: flex; gap: 8px; overflow-x: auto; }
.thumb { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #ebe9e4; cursor: pointer; width: 72px; flex: none; }
.thumb[aria-current] { border-color: var(--ink); }
.buy h1 { margin-bottom: .25em; }
.price { font-size: 1.4rem; font-weight: 700; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price .small { font-weight: 400; }
.opt { border: 0; padding: 0; margin: 0 0 18px; }
.opt legend { font-size: .9rem; margin-bottom: 8px; padding: 0; }
.swatches, .sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch input, .size input { position: absolute; opacity: 0; pointer-events: none; }
.swatch svg { display: block; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch input:checked + svg { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.swatch input:focus-visible + svg { outline: 3px solid var(--accent); outline-offset: 3px; }
.size span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: .92rem; }
.size input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.size input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.size input:disabled + span { color: #aaa6a0; text-decoration: line-through; cursor: not-allowed; background: transparent; }
.qty-row { display: flex; gap: 10px; align-items: center; margin: 6px 0 8px; }
.qty-row label { font-size: .9rem; }
.qty-row input { width: 64px; height: 46px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.qty-row .btn { flex: 1; }
.size-guide { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 18px 0; }
.size-guide summary { cursor: pointer; font-weight: 600; }
.table-scroll { overflow-x: auto; margin-bottom: 10px; }
table { border-collapse: collapse; font-size: .875rem; width: 100%; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
tbody th { text-align: left; font-weight: 600; }
.description { margin-top: 18px; }
.assurances { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 4px; }

/* Notices */
.notice { padding: 10px 14px; border-radius: 8px; border: 1px solid; margin: 0 0 14px; }
.notice-ok { color: var(--ok); background: #eef8f1; border-color: #bfe3cb; }
.notice-err { color: var(--err); background: #fdf0ef; border-color: #f4c7c3; }
.notice-warn { color: var(--warn); background: #fdf6e7; border-color: #f0d9a7; }
.notice.small { padding: 4px 8px; margin: 4px 0; }

/* Cart */
.cart-lines { list-style: none; padding: 0; margin: 0 0 24px; border-top: 1px solid var(--line); }
.cart-line { display: grid; grid-template-columns: 80px 1fr; gap: 12px 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { border-radius: 8px; overflow: hidden; background: #ebe9e4; aspect-ratio: 1; }
.cart-info p { margin: 2px 0; }
.cart-actions { grid-column: 2; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cart-actions form { margin: 0; }
.qty-form input { width: 60px; height: 38px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.line-total { margin: 0 0 0 auto; font-weight: 700; }
.is-unavailable .cart-thumb { opacity: .45; }
@media (min-width: 640px) {
  .cart-line { grid-template-columns: 96px 1fr auto; }
  .cart-actions { grid-column: 3; flex-direction: column; align-items: flex-end; gap: 8px; }
  .line-total { margin: 0; }
}
.js .js-hide { display: none; }
.cart-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cart-summary .row { display: flex; justify-content: space-between; font-size: 1.1rem; }

/* Forms, panels, prose */
.stack { display: grid; gap: 14px; max-width: 420px; }
.stack label { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.stack input { height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 400; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.status-line { font-size: 1.3rem; font-weight: 700; }
.plain { padding-left: 18px; }
.prose h2 { margin-top: 1.4em; font-size: 1.2rem; }
.prose ul { padding-left: 20px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 48px; padding: 28px 0 24px; }
.footer-grid { display: grid; gap: 18px; margin-bottom: 16px; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .92rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1fr auto; align-items: start; } }

/* Checkout */
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 18px; font-size: .85rem; color: var(--muted); counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step) ". "; }
.steps li + li::after { content: none; }
.steps li:not(:last-child)::after { content: " ›"; margin-left: 8px; }
.steps [aria-current] { color: var(--ink); font-weight: 700; }
.checkout-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .checkout-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; } }
.stack-form { max-width: none; }
.stack select { height: 46px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 400; }
.row-2 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 520px) { .row-2 { grid-template-columns: 1fr 1fr; } }
.field-err { color: var(--err); font-weight: 500; font-size: .85rem; }
[aria-invalid="true"] { border-color: var(--err) !important; }
.order-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
@media (min-width: 900px) { .order-summary { position: sticky; top: 80px; } }
.summary-lines { list-style: none; padding: 0; margin: 0 0 12px; }
.summary-lines li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }
.summary-thumb { position: relative; width: 56px; height: 56px; border-radius: 8px; background: #ebe9e4; }
.summary-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.qty-badge { position: absolute; top: -6px; right: -6px; background: var(--muted); color: #fff; border-radius: 9px; min-width: 18px; height: 18px; font-size: .7rem; text-align: center; line-height: 18px; padding: 0 4px; }
.summary-name { font-size: .92rem; }
.row { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0; }
.row-total { font-weight: 800; font-size: 1.15rem; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.rates { margin: 18px 0; }
.rate { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 8px; cursor: pointer; }
.rate:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.rate input { width: 18px; height: 18px; }
.center { text-align: center; }
.eyebrow-dark { color: var(--accent); }
.mock-banner { background: #fff4d6; border: 1px dashed #c99a1a; color: #6b4e00; padding: 10px 14px; border-radius: 8px; font-weight: 700; margin-bottom: 18px; font-size: .9rem; }
.mock-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0; }

/* Brands */
.card-brand { margin: 10px 0 0; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card-brand + .card-title { margin-top: 2px; }
.brand-line { margin: 0 0 4px; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.brand-line a { color: var(--muted); text-decoration: none; }
.brand-line a:hover { color: var(--ink); }
.chip-lg { padding: 10px 18px; font-weight: 600; }

/* Photo zoom (shop.js): hover on desktop, tap and drag on touch. Scrolling stays native until zoomed. */
.is-zoomable { cursor: zoom-in; touch-action: manipulation; }
.is-zoomable img { transition: transform .18s ease-out; will-change: transform; }
.is-zoomable.is-zoomed { cursor: zoom-out; touch-action: none; }
.is-zoomable.is-zoomed img { transition: transform .12s ease-out; }
.zoom-hint { display: none; }
@media (hover: none) {
  .zoom-hint { display: block; position: absolute; left: 50%; bottom: 12px; z-index: 4; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: .72rem; letter-spacing: .04em; pointer-events: none; transition: opacity .2s; }
  .is-zoomed .zoom-hint { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .is-zoomable img { transition: none; } }
.gallery-main.is-zoomable { position: relative; }
.thumbs li[hidden], .thumbs[hidden] { display: none !important; }

/* Listing filters: one compact row (filterbar.php) */
.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 20px; }
.fbar ul { list-style: none; margin: 0; padding: 0; }
.fbar-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.fbar-seg li + li a { border-left: 1px solid var(--line); }
.fbar-seg a, .fbar-menu summary { display: block; padding: 6px 13px; font-size: .85rem; line-height: 1.3; color: var(--muted); text-decoration: none; white-space: nowrap; }
.fbar-seg a:hover, .fbar-menu summary:hover { color: var(--ink); }
.fbar-seg a[aria-current] { background: var(--ink); color: var(--surface); }
.fbar-menu { position: relative; }
.fbar-menu summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); }
.fbar-menu summary::-webkit-details-marker { display: none; }
.fbar-menu summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 2px 2px 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); opacity: .6; }
.fbar-menu[open] summary::after { transform: rotate(-135deg); margin-bottom: -2px; }
.fbar-k { color: var(--muted); margin-right: 2px; }
.fbar-menu ul { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 100%; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.fbar-menu ul a { display: block; padding: 7px 12px; border-radius: 6px; font-size: .88rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.fbar-menu ul a:hover { background: rgba(127,127,127,.12); }
.fbar-menu ul a[aria-current] { font-weight: 700; }
.fbar-end { margin-left: auto; }
.fbar-end ul { left: auto; right: 0; }

/* Contact form */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-hint { margin: -4px 0 4px; padding: 10px 14px; border-left: 3px solid var(--accent, #d9480f); background: rgba(127,127,127,.08); border-radius: 4px; font-size: .95rem; }
.contact textarea { width: 100%; resize: vertical; }
.cf-turnstile { min-height: 65px; }

/* Email sign-up band, above the footer */
.signup-band { margin-top: 56px; background: var(--ink, #1c1b19); color: #fff; padding: 40px 0; }
.signup-inner { display: grid; gap: 20px; align-items: center; }
@media (min-width: 860px) { .signup-inner { grid-template-columns: 1fr minmax(360px, 520px); gap: 40px; } }
.signup-copy h2 { margin: 0 0 6px; font-size: clamp(1.6rem, 3.5vw, 2.2rem); color: #fff; }
.signup-copy p { margin: 0; color: rgba(255,255,255,.78); }
.signup { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.signup-email { flex: 1 1 220px; }
.signup-email input { width: 100%; height: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 6px; font: inherit; }
.signup-band .btn-primary { background: var(--accent); color: var(--accent-ink); }
.signup-band .btn-primary:hover { filter: brightness(1.1); background: var(--accent); }
.signup-consent { margin: 0; flex-basis: 100%; font-size: .85rem; color: rgba(255,255,255,.78); }
.signup-band + .site-footer { margin-top: 0; }
.field-note { margin: -6px 0 4px; }

/* Sale and clearance: regular price small, grey and struck out; the price paid now at full size. */
.price-was { font-size: .72em; font-weight: 400; color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.price-was + .price-now { color: var(--accent); }
.promo-tag { display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1;
  padding: 3px 6px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); vertical-align: middle; }
.price .promo-tag { font-size: .7rem; }
.state-field [hidden] { display: none; }
.free-ship { color: var(--accent); font-weight: 700; font-size: .85rem; }
.free-ship-where { font-size: .72em; font-weight: 400; color: var(--muted); }
p.free-ship { margin: -4px 0 12px; }
.card-price { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }

/* Product photos: no long-press save sheet on iPhone, no drag ghost. */
img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

/* Products sold elsewhere (affiliate) */
.partner-buy { margin: 1rem 0; }
.partner-buy [hidden] { display: none; }

/* Discount code (cart) */
.code-box { margin: .5rem 0 1rem; }
.code-box summary { cursor: pointer; }
.code-form { margin-top: .5rem; }
.code-form input { text-transform: uppercase; }
