/* Product page, shops pages, intent landing pages and guide extras. Uses the tokens from site.css. */

/* ---- hero: price and CTA stay above the fold on phones ---- */
.model__verified{display:block;font-size:.8rem;color:var(--muted);margin-top:4px}
.model__duty{display:block;margin-top:6px;font-size:.8rem;color:var(--warn,#9a5b00);font-weight:600;max-width:34ch}
.model__duty[hidden]{display:none}
@media (max-width:760px){
  .model__hero{gap:10px;margin-bottom:12px}
  .model__media{min-height:0;padding:8px;max-height:min(300px,40vh);overflow:hidden;grid-template-columns:minmax(0,1fr)}
  .model__media img{max-height:min(230px,30vh);width:auto;max-width:100%}
  .model__media #gallery{margin:6px 0 0;flex-wrap:nowrap;overflow-x:auto;gap:6px;padding-bottom:2px;scrollbar-width:none}
  .model__media #gallery::-webkit-scrollbar{display:none}
  .model__media #gallery .chip{min-height:0;padding:2px;flex:none}
  .model__media #gallery .chip img{width:32px;height:42px;object-fit:contain}
  .model__info h1{font-size:1.5rem;line-height:1.15;margin:0 0 6px}
  .model__best{display:flex;margin:8px 0;padding:10px 14px}
  .model__best .card__amount{font-size:2.2rem}
  .model__cta .btn{flex:1 1 auto}
  .model__facts{margin:12px 0 16px}
  body.page-model{padding-bottom:0}
  body.page-model.has-stickybar{padding-bottom:76px}
}

/* ---- sticky bottom bar (phones only; JS un-hides it after the main CTA scrolls away) ---- */
.stickybar{display:none}
@media (max-width:760px){
  .stickybar:not([hidden]){display:block;position:fixed;left:0;right:0;bottom:0;z-index:70;background:var(--surface);border-top:1px solid var(--line-strong);box-shadow:0 -6px 20px rgba(0,0,0,.12);padding:10px var(--gutter) calc(10px + env(safe-area-inset-bottom))}
  .stickybar__in{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:640px;margin:0 auto}
  .stickybar__p{font:700 1.35rem/1.1 var(--font-display);color:var(--signal-text);white-space:nowrap}
  .stickybar .btn{flex:1 1 auto;max-width:260px;min-height:46px}
}

/* ---- size-first offer list ---- */
.view-switch{display:inline-flex;padding:3px;border-radius:999px;background:var(--surface-2);gap:2px;align-self:flex-start}
.offers{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.offer{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px 14px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface)}
.offer[hidden]{display:none}
.offer--best{border:2px solid var(--signal);background:var(--signal-soft)}
.offer__shop{min-width:0;font-weight:600}
.offer__shop a{color:var(--text)}
.offer__meta{display:flex;flex-wrap:wrap;gap:2px 8px;margin-top:2px;font-size:.78rem;font-weight:500;color:var(--muted)}
.offer__free{color:var(--ship-ok,#17803d);font-weight:700}
.offer__duty{color:var(--warn,#9a5b00);font-weight:600}
.offer__price{text-align:right;font:700 1.4rem/1.1 var(--font-display);white-space:nowrap}
.offer--best .offer__price{color:var(--signal-text)}
.offer__price small{display:block;font:500 .7rem var(--font-text);color:var(--muted)}
@media (max-width:560px){
  .offer{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"shop price" "go go"}
  .offer__shop{grid-area:shop}.offer__price{grid-area:price}.offer .btn{grid-area:go;width:100%}
}
#offers-box,#table-box{display:grid;gap:10px;grid-template-columns:minmax(0,1fr)}
#table-box>*,.matrix-shell,#matrix{min-width:0}
.is-view-sizes #table-box,.is-view-table #offers-box{display:none}

/* ---- matrix: scroll hint + edge fades + shadow under the sticky shop column ---- */
.matrix-shell{position:relative}
.matrix-shell::before,.matrix-shell::after{content:"";position:absolute;top:0;bottom:0;width:28px;pointer-events:none;z-index:3;opacity:0;transition:opacity .15s}
.matrix-shell::before{left:150px;background:linear-gradient(90deg,rgba(0,0,0,.16),transparent)}
.matrix-shell::after{right:0;background:linear-gradient(270deg,var(--surface) 15%,transparent)}
.matrix-shell.has-left::before,.matrix-shell.has-right::after{opacity:1}
.matrix-shell.has-left .matrix th[scope=row],.matrix-shell.has-left .matrix thead th:first-child{box-shadow:4px 0 8px -4px rgba(0,0,0,.25)}
.matrix-hint{font-size:.8rem;margin:0}
/* horizontal scroll only, no visible scrollbars: arrows, size chips, drag and swipe move the table.
   The page scrolls vertically; a cloned header (.matrix-pin) is pinned under the nav bar while the real one is off-screen. */
.matrix-shell .matrix-wrap{overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;-ms-overflow-style:none;cursor:grab}
.matrix-shell .matrix-wrap::-webkit-scrollbar{display:none}
.matrix-shell .matrix-wrap.is-dragging{cursor:grabbing;user-select:none;-webkit-user-select:none}
.matrix-shell .matrix-wrap.is-dragging a{pointer-events:none}
.matrix-shell .matrix{width:max-content;min-width:100%}
.matrix-shell .matrix thead th:not(:first-child){position:static}
.matrix-shell .matrix thead th:first-child{z-index:5}
.matrix-shell .matrix th[scope=row]{z-index:2}
.matrix-shell .matrix .is-sel-col:not(.matrix__best){background:var(--accent-soft)}
.matrix-shell .matrix thead .is-sel-col{background:var(--accent);color:var(--accent-ink)}
.matrix-top{position:sticky;top:calc(var(--header-h) + 14px);z-index:7;background:var(--bg);padding-bottom:6px}
.has-admin-bar .matrix-top{top:calc(var(--header-h) + 38px)}
.matrix-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;height:36px}
.matrix-nav__pos{flex:1;text-align:center;font-size:.8rem;font-weight:600;color:var(--text-2)}
.matrix-nav__btn{display:inline-grid;place-items:center;width:44px;height:34px;padding:0;border:1.5px solid var(--line-strong);border-radius:999px;background:var(--surface);color:var(--text);cursor:pointer}
.matrix-nav__btn:hover:not(:disabled){border-color:var(--text-2)}
.matrix-nav__btn:disabled{opacity:.35;cursor:default}
.matrix-nav__btn--prev .icon{transform:scaleX(-1)}
.matrix-pin{position:absolute;left:0;right:0;top:100%;overflow:hidden;border:1px solid var(--line);border-radius:var(--r-sm) var(--r-sm) 0 0;background:var(--surface-2);box-shadow:0 6px 10px -8px rgba(0,0,0,.35);z-index:6}
.matrix-shell::before,.matrix-shell::after{top:42px}
.matrix-shell .matrix tbody td,.matrix-shell .matrix thead th:not(:first-child){min-width:84px}
.matrix__row--dim>th>*,.matrix__row--dim>td>*{opacity:.55}
.matrix__row--dim:hover>th>*,.matrix__row--dim:hover>td>*{opacity:.9}
.matrix__na{display:block;margin-top:2px;font-size:.72rem;font-weight:600;color:var(--muted);font-style:italic}
/* tag pills on the spec line: links to the filtered category, styled as tags rather than buttons */
a.tag{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border:1px solid var(--line);border-radius:6px;background:var(--surface-2);color:var(--text-2);font-size:.8rem;font-weight:600;text-decoration:none}
a.tag:hover{border-color:var(--text-2);color:var(--text);text-decoration:none}
span.tag{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border:1px solid var(--line);border-radius:6px;background:var(--surface-2);color:var(--text-2);font-size:.8rem;font-weight:600}
/* the product title keeps the brand casing (CAPiTA, K2, ...) */
.model__info h1{text-transform:none}
@media (max-width:760px){.matrix-shell::before{left:112px}.matrix-shell .matrix tbody td,.matrix-shell .matrix thead th:not(:first-child){min-width:84px;max-width:100px;padding-inline:6px;white-space:normal}}

/* ---- related cards: fixed media ratio so nothing jumps while images load ---- */
/* Same light photo tile as listing cards: card images use mix-blend-mode:multiply, which turns
   them almost black on the dark-theme surface. The tile spans the full card width. */
.related .card__media{aspect-ratio:4/5;background:#F3F5F8;width:100%;justify-self:stretch}
.related .card__media img{width:100%;height:100%;object-fit:contain}

/* ---- profile illustration + guide diagrams ---- */
.profile-svg{display:inline-block;vertical-align:middle;color:var(--text-2)}
.profile-svg--sm{width:72px;height:24px}
.profile-svg__ground{stroke:var(--line-strong);stroke-width:1;stroke-dasharray:3 3}
.profile-svg__board{fill:none;stroke:var(--signal-text);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.diagram{margin:1.4em 0;padding:14px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}
.diagram figcaption{margin-top:8px;font-size:.82rem;color:var(--muted)}
.diagram__svg{display:block;width:100%;max-width:520px;height:auto;margin:0 auto}
.diagram__t{fill:var(--text-2);font:600 9px var(--font-text)}
.diagram__fill{fill:var(--signal-soft);stroke-width:2.5}
.diagram__body{fill:none;stroke:var(--text-2);stroke-width:3;stroke-linecap:round}
.diagram__guide{stroke:var(--muted);stroke-width:1;fill:none;stroke-dasharray:4 3}
.diagram__bind{fill:var(--surface-2);stroke:var(--text-2);stroke-width:2}
.diagram__cell{fill:var(--signal)}

/* ---- guides ---- */
.guide-meta{display:flex;flex-wrap:wrap;gap:4px 14px;margin:0 0 12px;font-size:.85rem;color:var(--muted)}
.toc{margin:16px 0 24px;padding:14px 18px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}
.toc strong{display:block;margin-bottom:6px}
.toc ol{margin:0;padding-left:1.2em}
.toc li{margin:2px 0}
.picks{margin:28px 0}
.picks__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin:12px 0}
.pick{display:grid;gap:4px;padding:10px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);color:var(--text);text-decoration:none}
.pick:hover{border-color:var(--signal)}
.pick__img{aspect-ratio:4/5;display:grid;place-items:center;background:#F3F5F8;border-radius:var(--r-sm);overflow:hidden}
.pick__img img{width:100%;height:100%;object-fit:contain}
.pick__brand{font-size:.72rem;font-weight:700;letter-spacing:.02em;text-transform:none;color:var(--muted)}
.pick__name{font-weight:600;font-size:.9rem;line-height:1.25}
.pick__price{font:700 1.2rem var(--font-display);color:var(--signal-text)}

/* ---- shops pages ---- */
.shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;margin:18px 0}
.shop-card{display:grid;gap:6px;align-content:start;padding:16px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);color:var(--text);text-decoration:none}
.shop-card:hover{border-color:var(--signal)}
.shop-card h2,.shop-card h3{margin:0;font-size:1.1rem}
.shop-card__cc{font-size:.8rem;font-weight:700;color:var(--muted);letter-spacing:.06em}
.shop-card__meta{font-size:.85rem;color:var(--text-2)}
.shop-top{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.intent-nav{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--ship-ok:#4ade80;--warn:#fbbf24}}
:root[data-theme="dark"]{--ship-ok:#4ade80;--warn:#fbbf24}
.matrix__total{display:block;margin-top:2px;font-size:.7rem;font-weight:500;color:var(--muted)}

.catalog-intent{padding-block:24px}
/* sticky shop column: opaque background (scrolled cells must not show through) and a fixed width so the
   edge shadow starts exactly at its right border */
.matrix-shell .matrix th[scope=row],.matrix-shell .matrix thead th:first-child{background:var(--surface);background-clip:padding-box;width:190px;min-width:190px;max-width:190px}
.matrix-shell .matrix thead th:first-child{z-index:4}
.matrix-shell::before{left:190px}
@media (max-width:760px){
  .matrix-shell .matrix th[scope=row],.matrix-shell .matrix thead th:first-child{width:112px;min-width:112px;max-width:112px}
  .matrix-shell::before{left:112px}
}
.matrix-shell .matrix thead th:first-child{background:var(--surface-2)}
/* product photo box: same light tile as the cards (images are white-canvas tiles blended with multiply) */
.model__media{background:#F3F5F8}
:root[data-theme="dark"] .model__media{background:#EEF2F7}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .model__media{background:#EEF2F7}}
.model__media img{mix-blend-mode:multiply}

/* ---- comparison pages ---- */
.cmp{width:100%;border-collapse:collapse;font-size:.9rem}
.cmp th,.cmp td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;background:var(--surface)}
.cmp thead th{background:var(--surface-2)}
.cmp thead th a{display:grid;gap:6px;justify-items:start;color:var(--text);font-weight:700;text-decoration:none}
.cmp thead th img{width:80px;height:100px;object-fit:contain;background:var(--surface);border-radius:var(--r-sm)}
.cmp tbody th{width:28%;color:var(--text-2);font-weight:600}
.compare-links{display:flex;flex-wrap:wrap;gap:8px 16px;margin:8px 0 0;font-size:.9rem}
/* ship-to select must never push the page wider than the viewport on phones */
.model .toolbar__sort{max-width:100%;min-width:0}
.model #ship-to{min-width:0;max-width:100%}
@media (max-width:560px){.model .toolbar{flex-wrap:wrap}.model .toolbar__sort{flex:1 1 100%}.model #ship-to{flex:1 1 auto;width:100%}}

/* ---- E7/G2: matrix best-price row, stronger selected column, sold-out cells (grey + label, never struck through) ---- */
.matrix-shell .matrix thead .matrix__bestrow>*{background:var(--signal-soft);color:var(--text);font-weight:700;border-bottom:2px solid var(--signal)}
.matrix-shell .matrix thead .matrix__bestrow th{font-size:.8rem}
.matrix-shell .matrix thead .matrix__bestrow td a{color:var(--signal-text);font-size:.95rem}
.matrix-shell .matrix thead .matrix__bestrow .matrix__total{max-width:96px;margin-inline:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.matrix-shell .matrix .is-sel-col{box-shadow:inset 3px 0 0 var(--accent),inset -3px 0 0 var(--accent);font-weight:700}
.matrix-shell .matrix thead tr:first-child .is-sel-col{box-shadow:none}
.matrix-shell .matrix tbody .is-sel-col:not(.matrix__best){background:color-mix(in srgb,var(--accent) 16%,var(--surface))}
.matrix-shell .matrix thead .matrix__bestrow .is-sel-col{background:var(--signal-soft)}
.matrix td.matrix__oos{text-decoration:none}

/* ---- G2a: hero deal row (best box + top 3 offers) and ship-to next to the CTA ---- */
.model__deal{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}
.model__deal .model__best{margin:12px 0 0}
.top3{margin-top:12px;min-width:0}
.top3__h{margin:0 0 6px;font:700 .8rem var(--font-text);text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.top3 table{width:100%;border-collapse:collapse;font-size:.82rem;font-variant-numeric:tabular-nums}
.top3 th{padding:4px 8px;text-align:right;font-weight:600;color:var(--muted);border-bottom:1px solid var(--line)}
.top3 th:first-child,.top3 td:first-child{text-align:left}
.top3 td{padding:7px 8px;text-align:right;border-bottom:1px solid var(--line);white-space:nowrap}
.top3 tr:last-child td{border-bottom:0}
.top3 td:first-child{white-space:normal}
.top3 td:first-child a{font-weight:600;color:var(--text)}
.top3 .cc{min-width:28px;height:20px;margin-left:4px;font-size:.68rem}
.top3__total a{font-weight:700;color:var(--signal-text)}
.top3__free{color:var(--ship-ok,#17803d);font-weight:700}
@media (min-width:1000px){
  .model__deal{grid-template-columns:auto minmax(0,1fr);gap:20px}
  .top3{margin-top:12px}
}
@media (max-width:760px){.top3{display:none}}
.model__cta{align-items:center}
.model__ship{display:flex;align-items:center;gap:8px;flex:1 1 220px;min-width:0;font-size:.85rem}
.model__ship .select{min-width:0;max-width:100%;flex:1 1 auto}
.model__ship-l{white-space:nowrap}

/* ---- G2c: gallery thumbs, zoom button and lightbox ---- */
@media (min-width:761px){
  .model__media #gallery{margin:12px 0 0;justify-content:center}
  .model__media #gallery .chip{padding:3px;min-height:0}
  .model__media #gallery .chip img{width:56px;height:72px;object-fit:contain}
}
.model__media>img[data-zoom]{cursor:zoom-in}
.model__zoom{position:absolute;top:10px;right:10px;display:inline-grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid var(--line-strong);border-radius:50%;background:var(--surface);color:var(--text);cursor:pointer;z-index:2}
.model__zoom:hover{border-color:var(--text-2)}
.lightbox{border:0;padding:0;background:transparent;max-width:100vw;max-height:100vh;width:100%;height:100%;color:#fff}
.lightbox::backdrop{background:rgba(8,12,20,.88)}
.lightbox__in{position:relative;display:grid;grid-template-rows:minmax(0,1fr) auto;place-items:center;width:100%;height:100%;padding:56px 64px 20px}
.lightbox__img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;background:#F3F5F8;border-radius:var(--r-sm)}
.lightbox__cap{margin-top:10px;font-size:.85rem;color:#dbe3ee}
.lightbox__btn{position:absolute;display:inline-grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid rgba(255,255,255,.4);border-radius:50%;background:rgba(0,0,0,.45);color:#fff;cursor:pointer}
.lightbox__btn:hover{background:rgba(0,0,0,.7)}
.lightbox__btn:focus-visible{outline:3px solid #fff;outline-offset:2px}
.lightbox__btn--close{top:10px;right:10px}
.lightbox__btn--prev{left:10px;top:50%;margin-top:-22px}
.lightbox__btn--next{right:10px;top:50%;margin-top:-22px}
.lightbox__btn--prev .icon{transform:scaleX(-1)}
@media (max-width:560px){.lightbox__in{padding:56px 8px 16px}.lightbox__btn--prev{left:4px;top:auto;bottom:10px;margin:0}.lightbox__btn--next{right:4px;top:auto;bottom:10px;margin:0}}

/* ---- E9: price-alert quick chips ---- */
.alert-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.alert-chips .chip{min-height:30px;padding:0 10px;font-size:.8rem}
@media (max-width:560px){.matrix-shell .matrix thead .matrix__bestrow th{font-size:.72rem}}
#hist-section[hidden],#top3[hidden]{display:none!important}
.top3__season{display:inline-block;margin-left:4px;font-size:.7rem;font-weight:600;color:var(--muted)}
#best-season{align-self:flex-start}
.matrix-shell .matrix thead tr:first-child .is-sel-col{background:var(--accent);color:var(--accent-ink)}
