/* Listing pages only (products.html, collections.html): banner, chips, multi-buy band, filter bar and sheet, load more,
   trust band. Split from listing.css 2026-10-23 so the home page and the PDP do not download it. Phones first;
   the desktop row starts at 900 px. Tokens come from site.css. No inline styles (CSP style-src 'self'). */

/* ---------- Head: banner, title, chips ---------- */
.list-hero { position: relative; }
.list-hero img { width: 100%; aspect-ratio: 5 / 2; max-height: 170px; object-fit: cover; object-position: center 30%; }
@media (min-width: 900px) { .list-hero img { aspect-ratio: 4 / 1; max-height: 300px; } }
.list-head { text-align: center; padding: 22px 0 14px; }
.list-head h1 { font-family: var(--head); font-size: clamp(1.8rem, 4.5vw, 2.7rem); font-weight: 500; letter-spacing: -0.02em; margin: 0 0 6px; }
.list-head p { margin: 0 auto; max-width: 52ch; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
@media (min-width: 900px) { .list-head { padding: 40px 0 18px; } .list-head p { font-size: 1rem; } }

.lst-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 2px var(--gutter) 4px;
  scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); -webkit-overflow-scrolling: touch; }
.lst-chips::-webkit-scrollbar { display: none; }
.lst-chips a { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--border); color: var(--text);
  text-decoration: none; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; white-space: nowrap; scroll-snap-align: start;
  transition: border-color 0.15s ease, background 0.15s ease; }
.lst-chips a:hover { border-color: var(--text); }
.lst-chips a[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.lst-chips-row { display: contents; }
.lst-chips-k { display: none; }
@media (min-width: 900px) {
  .lst-chips { display: grid; gap: 10px; justify-items: center; overflow: visible; margin: 0 auto 26px; padding: 0; max-width: 1200px; }
  .lst-chips-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 22px; }
  .lst-chips a { min-height: 30px; padding: 0 0 2px; border: 0; border-bottom: 1px solid transparent; font-size: 0.68rem; letter-spacing: 0.1em; }
  .lst-chips a:hover { border-color: var(--text); }
  .lst-chips a[aria-current="page"] { background: none; color: var(--text); border-color: var(--text); }
  .lst-chips-edits a { color: var(--muted); font-weight: 500; }
  .lst-chips-k { display: inline; font-family: var(--head); font-style: italic; font-size: 0.95rem; color: var(--wine); letter-spacing: 0; }
}

/* ---------- Multi-buy band (_offer_box.html): one slim wine band, not a box ---------- */
.offer-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 16px; margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter) 11px;
  background: var(--wine); color: var(--bg); text-align: center; }
.offer-box-title { margin: 0; color: var(--gold); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em; }
.offer-tiers { display: flex; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.offer-tier { padding: 0 10px; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.offer-tier + .offer-tier { border-left: 1px solid rgba(201, 164, 106, 0.55); }
.offer-tier-badge { font-weight: 400; opacity: 0.85; }
.offer-tier-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.offer-note { flex-basis: 100%; margin: 0; font-size: 0.66rem; letter-spacing: 0.04em; opacity: 0.75; }
@media (max-width: 899px) {
  .offer-box { padding-block: 10px 9px; gap: 6px 0; }
  .offer-box-title { flex-basis: 100%; }
  .offer-tiers { flex-basis: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .offer-tier { display: grid; gap: 1px; padding: 0 4px; line-height: 1.25; }
  .offer-tier-badge { font-size: 0.64rem; letter-spacing: 0.12em; }
  .offer-tier-pct { font-size: 0.84rem; }
  .offer-note { font-size: 0.62rem; }
}
@media (min-width: 900px) {
  .offer-box { margin: 0 0 4px; padding: 11px 20px; gap: 6px 22px; }
  .offer-note { flex-basis: auto; }
}

/* ---------- Filter bar and sheet ---------- */
/* Phones: a sticky bar under the header opens the form as a bottom sheet (listing.js). Without JS, nojs.css shows the
   form inline instead. Desktop: the form itself is the sticky row, each filter a small drop-down. Every section
   starts closed (owner rule). */
.lst-bar { position: sticky; top: 61px; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 calc(-1 * var(--gutter)) 16px; padding: 0 var(--gutter); min-height: 50px; background: var(--bg); border-bottom: 1px solid var(--line); }
.lst-bar-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer;
  font: 600 0.72rem var(--body); text-transform: uppercase; letter-spacing: 0.14em; }
.lst-bar-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.lst-bar-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--wine); color: var(--bg); font-size: 0.64rem; letter-spacing: 0; }
.lst-bar-count { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.16em; }

.fx { border-bottom: 1px solid var(--line); }
.fx > summary { display: flex; align-items: center; gap: 10px; min-height: 54px; cursor: pointer; list-style: none; user-select: none;
  font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; }
.fx > summary::-webkit-details-marker { display: none; }
.fx > summary::after { content: ""; width: 7px; height: 7px; margin: -4px 4px 0 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); transition: transform 0.15s ease; }
.fx[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.fx-label { flex: 1; }
.fx-val { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }

.fx-panel { border: 0; margin: 0; padding: 0 0 18px; min-width: 0; }
.fx-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fx-chip { position: relative; cursor: pointer; }
.fx-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fx-chip span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px 6px; border: 1px solid var(--border); font-size: 0.74rem; text-align: center; line-height: 1.2; transition: border-color 0.15s ease; }
.fx-chip:hover span { border-color: var(--text); }
.fx-chip input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.fx-chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.fx-list { display: grid; gap: 0; }
.fx-colours { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
.fx-row { display: flex; align-items: center; gap: 10px; min-height: 42px; cursor: pointer; font-size: 0.88rem; min-width: 0; }
.fx-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-row input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1px solid var(--soft); border-radius: 50%; background: var(--bg); cursor: pointer; }
.fx-row input:checked { border-color: var(--text); background: var(--text); box-shadow: inset 0 0 0 4px var(--bg); }
.fx-row input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fx-row .swatch-dot { flex: none; width: 14px; height: 14px; }
.filter-count { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.16em; white-space: nowrap; }
.filter-clear { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text); white-space: nowrap; }
.filter-apply { min-height: 48px; }
.fsheet-title { margin: 0; font-family: var(--head); font-size: 1.3rem; font-weight: 500; }
.fsheet-title:focus { outline: none; }

@media (max-width: 899px) {
  .fsheet-backdrop { position: fixed; inset: 0; z-index: 94; background: rgba(23, 19, 26, 0.45); opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s; }
  .fsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: flex; flex-direction: column; max-height: 88vh; max-height: 88dvh; background: var(--bg);
    box-shadow: 0 -12px 40px -20px rgba(23, 19, 26, 0.45); transform: translateY(100%); visibility: hidden; transition: transform 0.25s ease, visibility 0.25s; }
  .fsheet-open .fsheet { transform: none; visibility: visible; }
  .fsheet-open .fsheet-backdrop { opacity: 1; visibility: visible; }
  html.fsheet-open body { overflow: hidden; }   /* body only: it passes to the viewport, so the sticky header stays put */
  .fsheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 6px 8px 20px; border-bottom: 1px solid var(--line); }
  .fsheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px; }
  .fsheet-body .filter-count { display: none; }
  .fsheet-foot { display: flex; align-items: center; gap: 18px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .fsheet-foot .filter-apply { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .fsheet, .fsheet-backdrop { transition: none; } }

@media (min-width: 900px) {
  .lst-bar, .fsheet-backdrop, .fsheet-head { display: none; }
  .fsheet { position: sticky; top: 69px; z-index: 40; display: flex; align-items: center; gap: 20px; margin: 0 0 30px; background: var(--bg); border-block: 1px solid var(--line); }
  .fsheet-body { flex: 1; display: flex; align-items: center; gap: 0 30px; min-width: 0; }
  .fx { position: relative; border: 0; }
  .fx > summary { min-height: 54px; gap: 8px; font-size: 0.7rem; }
  .fx > summary::after { margin-left: 4px; }
  .fx-label { flex: none; }
  .fx-val { max-width: 160px; font-size: 0.78rem; }
  .fx-panel { position: absolute; top: calc(100% - 4px); left: -18px; z-index: 45; min-width: 240px; max-height: 380px; overflow-y: auto; padding: 14px 18px; background: var(--bg);
    border: 1px solid var(--line); box-shadow: var(--shadow); }
  .fx-chips { width: 330px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fx-colours { width: 380px; }
  .filter-count { margin-left: auto; }
  .fx-sort .fx-panel { left: auto; right: -18px; }
  .fsheet-foot { display: flex; align-items: center; gap: 18px; }
  .fsheet-foot .filter-apply { display: none; }   /* listing.js applies on change; nojs.css shows the button */
}


/* ---------- Load more ---------- */
.lst-more { display: grid; justify-items: center; gap: 12px; padding: 40px 0 8px; text-align: center; }
.lst-more-text { margin: 0; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.16em; }
.lst-more-bar { -webkit-appearance: none; appearance: none; width: 200px; height: 2px; border: 0; background: var(--line); color: var(--text); }
.lst-more-bar::-webkit-progress-bar { background: var(--line); }
.lst-more-bar::-webkit-progress-value { background: var(--text); }
.lst-more-bar::-moz-progress-bar { background: var(--text); }
.lst-more-btn { min-width: 230px; margin-top: 6px; }
.lst-more-btn[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.empty-list { text-align: center; padding: 48px 0; }

/* ---------- Trust band and about text ---------- */
.lst-trust { margin-top: 48px; background: var(--panel); border-block: 1px solid var(--line); }
.lst-trust-list { list-style: none; margin: 0 auto; padding-block: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.lst-trust-list li { display: flex; align-items: center; gap: 10px; font-size: 0.7rem; font-weight: 500; line-height: 1.35; text-transform: uppercase; letter-spacing: 0.1em; }
.lst-trust-list svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--text); stroke-width: 1.2; stroke-linejoin: round; }
@media (min-width: 900px) {
  .lst-trust { margin-top: 72px; }
  .lst-trust-list { grid-template-columns: repeat(4, auto); justify-content: space-between; max-width: 1100px; padding-block: 26px; }
  .lst-trust-list li { font-size: 0.74rem; }
}
.lst-about-wrap { padding-block: 8px 40px; }
.lst-about { max-width: 760px; margin: 0 auto; border-bottom: 1px solid var(--line); }
.lst-about > summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; cursor: pointer; list-style: none;
  font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; }
.lst-about > summary::-webkit-details-marker { display: none; }
.lst-about > summary::after { content: "+"; font-weight: 400; font-size: 1.1rem; }
.lst-about[open] > summary::after { content: "\2212"; }
.lst-about p { margin: 0 0 14px; color: var(--muted); font-size: 0.9rem; }
