/* ==========================================================================
   Product page (templates/storefront/catalog/product_detail.html)
   Ported from the approved prototype's product view. Tokens only (dark-ready).
   Shared pieces come from samudhra.css: .crumbs .chips/.chip .ribbon .marker
   .opts/.opt .lbl .note/.cnt .quick .qty .btn .sec-head .rail .field
   ========================================================================== */

.pd { padding-top: 18px; }
.pd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pd-top .crumbs { min-width: 0; }
.crumbs .sep { color: var(--muted); font-size: 1rem; line-height: 1; }
.crumbs .cur { color: var(--ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.pd-tools { display: flex; gap: 8px; flex-shrink: 0; }
.pd-ibtn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); cursor: pointer; transition: transform .3s var(--spring), color .2s; }
.pd-ibtn:hover { transform: translateY(-2px); color: var(--brand); }
.pd-ibtn svg { width: 19px; }
/* storefront.js toggles .text-primary-container on the wishlist button */
.pd-wish.text-primary-container { color: var(--hot); }
.pd-wish.text-primary-container svg { fill: currentColor; }
.pd-wish.text-primary-container svg { animation: pdHeart .45s var(--spring); }
@keyframes pdHeart { 40% { transform: scale(1.3); } }

.pd-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 3.4vw, 48px); margin-top: 16px; align-items: start; }

/* gallery */
.pd-gal { position: sticky; top: 150px; display: grid; gap: 12px; }
.pd-main { position: relative; aspect-ratio: 10 / 9; border-radius: 22px; overflow: hidden; background: var(--surface); cursor: zoom-in; box-shadow: var(--shadow); }
.pd-main.pd-noimg { cursor: default; display: grid; place-items: center; background: var(--surface-2); }
.pd-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.pd-main.zoom { cursor: zoom-out; }
.pd-main.zoom img { transform: scale(1.9); }
.pd-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); }
.pd-ph svg { width: 30%; opacity: .5; }
.pd-main .pd-ph-img { position: absolute; inset: 0; opacity: .35; filter: saturate(.6) blur(1px); }
.pd-ph-note { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; font-size: .74rem; font-weight: 800; color: var(--ink-2); background: var(--surface); padding: 5px 12px; border-radius: 99px; box-shadow: var(--shadow); }
.pd-main .ribbon { left: 20px; padding: 10px 10px 14px; font-size: .8rem; }
.pd-main .ribbon b { font-size: 1.3rem; }
.pd-expand { position: absolute; right: 14px; bottom: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: #0B110E; display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(0,0,0,.45); transition: transform .3s var(--spring); cursor: pointer; z-index: 2; }
.pd-expand:hover { transform: scale(1.1); }
.pd-expand svg { width: 18px; }
.pd-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pd-thumbs button { aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 0; padding: 0; background: var(--surface); box-shadow: 0 0 0 1.5px var(--line); transition: box-shadow .2s, transform .3s var(--ease); cursor: pointer; }
.pd-thumbs button.on { box-shadow: 0 0 0 2.5px var(--brand); }
.pd-thumbs button:hover { transform: translateY(-3px); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* info */
.pd-info { min-width: 0; }
.pd-info h1 { font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.5rem); font-weight: 800; margin-top: 12px; }
.pd-info .chip svg.c-brand { color: var(--brand); }
.pd-info .chip svg.c-cold { color: #0B79A8; }
.pd-info .chip svg.c-hot { color: var(--hot); }
.pd-info .chip svg.c-star { color: #F5A524; }
.pd-info a.chip:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
.pd-desc { color: var(--ink-2); margin-top: 8px; font-size: 1rem; }
.pd-dish { margin-top: 10px; }
.lbl-sub { color: var(--muted); font-weight: 600; }
.lbl label { cursor: pointer; }

.price-box { margin-top: 18px; background: var(--surface); border-radius: 18px; padding: 16px 20px; box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.price-box .pp { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-box .pp b { font-family: var(--f-display); font-size: 2.2rem; letter-spacing: -.05em; line-height: 1; }
.price-box .pp s { color: var(--muted); }
.price-box .save { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 800; font-size: .78rem; padding: 6px 12px; border-radius: 99px; }
.price-box small { display: block; color: var(--muted); font-size: .78rem; margin-top: 6px; }

.pd-cuts .opt small .tnum { white-space: nowrap; }
.wts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wts .opt { padding: 10px 12px; min-height: 0; }
.wts .opt::before { left: auto; right: 8px; top: 8px; translate: none; width: 16px; height: 16px; opacity: 0; }
.wts .opt[aria-checked="true"]::before { opacity: 1; background-size: 10px; }
.wts .opt .bt { position: absolute; right: 8px; top: 8px; font-size: .58rem; font-weight: 800; letter-spacing: .06em; background: var(--sun); color: var(--sun-ink); padding: 2px 5px; border-radius: 5px; }
.wts .opt[aria-checked="true"] .bt { display: none; }
.wt-hint { margin-top: 10px; display: flex; align-items: center; gap: 10px; font-size: .82rem; font-weight: 700; color: var(--ink-2); background: color-mix(in srgb, var(--sun) 22%, var(--surface)); padding: 10px 12px; border-radius: 12px; animation: fadeUp .4s var(--ease); flex-wrap: wrap; }
.wt-hint button { border: 0; background: var(--ink); color: var(--bg); font-weight: 800; font-size: .76rem; border-radius: 9px; padding: 6px 10px; margin-left: auto; cursor: pointer; }

.buy { display: flex; gap: 12px; margin-top: 20px; }
.buy .btn { flex: 1; height: 54px; font-size: 1rem; border-radius: 14px; box-shadow: var(--shadow-brand); }
.buy .btn svg { width: 20px; }
.buy .btn:hover svg { transform: none; }
.buy .pd-oos { box-shadow: none; }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.pd-min { margin-top: 8px; font-size: .8rem; color: var(--muted); }

.perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.perks > div { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px; padding: 12px 14px; font-size: .74rem; color: var(--muted); box-shadow: var(--shadow); }
.perks svg { width: 24px; color: var(--brand); flex-shrink: 0; }
.perks b { display: block; color: var(--ink); font-size: .8rem; }

/* bulk orders */
.bulk { margin-top: 14px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), var(--surface) 70%); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 28%, transparent); scroll-margin-top: 160px; }
.bulk.pulse { animation: bulkPulse 1.2s var(--ease); }
@keyframes bulkPulse { 30% { box-shadow: inset 0 0 0 2px var(--brand), 0 0 0 8px color-mix(in srgb, var(--brand) 18%, transparent); } }
.bulk-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.bulk-head > i { width: 46px; height: 46px; border-radius: 14px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; flex-shrink: 0; }
.bulk-head > i svg { width: 22px; }
.bulk-head > div { flex: 1; min-width: 200px; }
.bulk-head b { display: block; font-size: .95rem; }
.bulk-head span { font-size: .8rem; color: var(--ink-2); }
.bulk-head .btn { height: 42px; padding-inline: 16px; border-radius: 12px; flex-shrink: 0; }
.bulk-head .btn[aria-expanded="true"] { background: var(--ink); color: var(--bg); }
.bulk-body { padding: 2px 16px 16px; display: grid; gap: 14px; animation: fadeUp .45s var(--ease); }
.tiers { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.tier { border-radius: 12px; background: var(--surface); padding: 10px 12px; box-shadow: inset 0 0 0 1.5px var(--line); transition: background .3s, box-shadow .3s, transform .35s var(--spring); }
.tier b { display: block; font-family: var(--f-display); font-size: 1.1rem; color: var(--brand); letter-spacing: -.02em; }
.tier span { font-size: .74rem; color: var(--muted); font-weight: 700; }
.tier em { display: block; font-style: normal; font-size: .68rem; color: var(--muted); }
.tier.on { background: var(--brand); box-shadow: none; transform: translateY(-2px); }
.tier.on b, .tier.on span, .tier.on em { color: var(--on-brand); }
.bulk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bulk-field .flbl, .bulk-field label { display: block; font-weight: 800; font-size: .78rem; margin-bottom: 6px; }
.bulk-field small { display: block; font-size: .7rem; color: var(--muted); margin-top: 4px; }
.bulk-field small.warn { color: var(--hot); font-weight: 700; }
.kgstep { display: flex; align-items: center; height: 46px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.kgstep:focus-within { box-shadow: inset 0 0 0 2px var(--brand); }
.kgstep button { width: 42px; height: 100%; border: 0; background: none; color: var(--ink); font-size: 1.2rem; font-weight: 800; cursor: pointer; }
.kgstep button:disabled { opacity: .3; cursor: not-allowed; }
.kgstep input { flex: 1; min-width: 0; border: 0; background: none; text-align: center; font: inherit; font-weight: 800; font-size: 1rem; color: var(--ink); -moz-appearance: textfield; appearance: textfield; }
.kgstep input:focus { outline: none; }
.kgstep input::-webkit-outer-spin-button, .kgstep input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bulk select, .bulk input[type="date"], .bulk input[type="tel"] { width: 100%; height: 46px; border-radius: 12px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); color: var(--ink); padding: 0 12px; font: inherit; font-size: .88rem; font-weight: 600; }
.bulk select:focus, .bulk input[type="date"]:focus, .bulk input[type="tel"]:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.bulk input.bad { box-shadow: inset 0 0 0 2px var(--hot); }
.packs { display: flex; gap: 6px; flex-wrap: wrap; }
.packs button { border: 0; border-radius: 99px; padding: 8px 12px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; font-size: .78rem; cursor: pointer; transition: background .2s, color .2s; }
.packs button.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.bulk-sum { display: flex; justify-content: space-between; align-items: end; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.bulk-sum small { display: block; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.bulk-sum b { font-family: var(--f-display); font-size: 1.8rem; letter-spacing: -.04em; }
.bulk-sum.loading b { opacity: .55; transition: opacity .2s; }
.bulk-sum s { color: var(--muted); font-size: .88rem; margin-left: 6px; }
.bulk-sum .sv { display: block; color: var(--veg); font-weight: 800; font-size: .8rem; }
.bulk-sum .nx { display: block; color: var(--brand); font-weight: 700; font-size: .78rem; margin-top: 2px; }
.bulk-sum .nx:empty, .bulk-sum .sv:empty { display: none; }
.bulk-note { display: flex; gap: 8px; align-items: flex-start; font-size: .78rem; color: var(--ink-2); background: var(--surface); border-radius: 12px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--line); }
.bulk-note svg { width: 16px; color: var(--brand); margin-top: 1px; }
.bulk-err { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--hot) 12%, var(--surface)); color: var(--hot); font-weight: 700; font-size: .82rem; animation: fadeUp .35s var(--ease); }
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-actions .btn { height: 50px; border-radius: 13px; flex: 1; min-width: 180px; }
.bulk-actions .btn:hover svg { transform: none; }
.bulk-ok { padding: 12px 14px; border-radius: 12px; background: var(--mint); color: var(--mint-ink); font-weight: 700; font-size: .84rem; animation: fadeUp .4s var(--ease); }
.cb-form { display: flex; gap: 8px; animation: fadeUp .4s var(--ease); }
.cb-form .btn { height: 46px; border-radius: 12px; }
.bulk-more { justify-self: start; font-size: .8rem; }

/* recurring basket */
.pd-basket { margin-top: 14px; display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); }
.pd-basket > i { width: 46px; height: 46px; border-radius: 14px; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; flex-shrink: 0; }
.pd-basket > i svg { width: 22px; }
.pd-basket-in { flex: 1; min-width: 0; }
.pd-basket-in > b { display: block; font-size: .95rem; }
.pd-basket-in > span { display: block; font-size: .8rem; color: var(--ink-2); }
.pd-basket-in > .see-all { margin-top: 8px; font-size: .84rem; }
.pd-basket-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pd-basket-form select, .pd-basket-form input[type="number"] { height: 40px; border-radius: 12px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); color: var(--ink); padding: 0 10px; font: inherit; font-size: .84rem; font-weight: 600; }
.pd-basket-form select { flex: 1; min-width: 160px; }
.pd-basket-form input[type="number"] { width: 64px; text-align: center; }

/* details accordions, full width under the grid */
.acc { margin-top: 28px; display: grid; gap: 10px; }
.acc details { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); scroll-margin-top: 150px; }
.acc summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 16px; border-radius: 16px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary > svg:first-child { width: 26px; color: var(--brand); flex-shrink: 0; }
.acc summary > span { min-width: 0; }
.acc summary b { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .95rem; }
.acc summary > span > span { display: block; font-size: .82rem; color: var(--ink-2); margin-top: 2px; }
.acc summary .chev { width: 18px; margin-left: auto; transition: transform .35s var(--ease); flex-shrink: 0; }
.acc details[open] .chev { transform: rotate(180deg); }
.acc .ab { padding: 0 18px 16px 60px; color: var(--ink-2); font-size: .88rem; animation: fadeUp .4s var(--ease); }
.acc .ab p + p { margin-top: 6px; }
.cnt-pill { font-size: .7rem; font-weight: 800; background: var(--surface-2); color: var(--ink-2); padding: 2px 8px; border-radius: 99px; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 28px; margin: 0; }
.specs > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }
.certs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pin-row { display: flex; gap: 8px; max-width: 380px; }
.pin-row input { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); color: var(--ink); padding: 0 12px; font: inherit; font-weight: 700; letter-spacing: .08em; }
.pin-row input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.pin-res { margin-top: 8px; font-size: .84rem; }
.pin-res.ok { color: var(--veg); font-weight: 700; }
.pin-res.err { color: var(--hot); font-weight: 700; }

/* reviews */
.rv-grid { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
.rv-sum { background: var(--surface-2); border-radius: 16px; padding: 18px; }
.rv-score { display: flex; align-items: baseline; gap: 6px; }
.rv-score b { font-family: var(--f-display); font-size: 2.6rem; letter-spacing: -.05em; color: var(--ink); line-height: 1; }
.rv-score span { color: var(--muted); font-weight: 700; }
.stars { display: inline-flex; gap: 2px; margin-top: 6px; }
.stars svg { width: 18px; color: var(--line); }
.stars svg.on { color: #F5A524; }
.stars.sm { margin-top: 0; }
.stars.sm svg { width: 14px; }
.rv-based { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.rv-bars { display: grid; gap: 6px; margin-top: 14px; }
.rv-bars > div { display: grid; grid-template-columns: 30px 1fr 26px; gap: 8px; align-items: center; font-size: .76rem; color: var(--ink-2); }
.rv-bars > div > span:last-child { text-align: right; }
.rv-bars i { height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 25%, transparent); overflow: hidden; }
.rv-bars em { display: block; height: 100%; background: #F5A524; border-radius: 99px; }
.rv-main { display: grid; gap: 14px; min-width: 0; }
.rv-write { border-radius: 16px; padding: 18px; background: color-mix(in srgb, var(--brand) 7%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 25%, transparent); }
.rv-write h3 { font-size: 1.1rem; color: var(--ink); }
.rv-write > p { margin-top: 4px; font-size: .84rem; }
.rv-write > p b { color: var(--brand); }
.rv-write form { display: grid; gap: 12px; margin-top: 12px; }
.rate-in { border: 0; padding: 0; margin: 0; }
.rate-in legend { font-weight: 800; font-size: .8rem; color: var(--ink); padding: 0; margin-bottom: 4px; }
.rate-stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rate-stars label { cursor: pointer; color: var(--line); transition: color .15s, transform .25s var(--spring); }
.rate-stars label svg { width: 32px; }
.rate-stars input:checked ~ label, .rate-stars label:hover, .rate-stars label:hover ~ label { color: #F5A524; }
.rate-stars label:hover { transform: scale(1.12); }
.rate-stars input:focus-visible + label { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.rv-photos { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: .82rem; color: var(--ink); cursor: pointer; }
.rv-photos svg { width: 20px; color: var(--brand); }
.rv-photos input { font-size: .78rem; color: var(--ink-2); }
.rv-photos input::file-selector-button { border: 0; border-radius: 10px; padding: 6px 12px; margin-right: 8px; background: var(--surface); color: var(--brand); font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; }
.rv-submit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rv-submit small { color: var(--muted); font-size: .76rem; }
.rv-hint { padding: 14px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); font-size: .86rem; }
.rv-hint a, .rv-empty a { color: var(--brand); font-weight: 800; }
.rv-item { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rv-item:last-child { border-bottom: 0; }
.rv-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-ver { display: inline-flex; align-items: center; gap: 4px; color: var(--veg); font-size: .72rem; font-weight: 800; }
.rv-ver svg { width: 13px; }
.rv-item h4 { margin: 6px 0 0; font-size: .95rem; color: var(--ink); }
.rv-by { font-size: .76rem; color: var(--muted); margin-top: 2px; }
.rv-body { margin-top: 6px; color: var(--ink-2); }
.rv-pics { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rv-pics img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.rv-help { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--surface-2); color: var(--ink-2); font-weight: 700; font-size: .76rem; padding: 6px 10px; border-radius: 99px; cursor: pointer; }
.rv-help svg { width: 14px; }
.rv-help:hover, .rv-help.on { background: var(--mint); color: var(--mint-ink); }
.rv-empty { color: var(--muted); }
.qa { padding: 10px 0; border-bottom: 1px solid var(--line); }
.qa p { display: flex; gap: 8px; }
.qa .q { color: var(--ink); font-weight: 700; }
.qa .q b, .qa .a b { color: var(--brand); flex-shrink: 0; }
.qa .a { margin-top: 4px; }
.qa .a.staff b, .qa .a em { color: var(--veg); font-style: normal; font-weight: 800; font-size: .78rem; }
.qa .a.none { color: var(--muted); font-size: .8rem; padding-left: 22px; }
.ask { display: flex; gap: 8px; margin-top: 12px; }
.ask input { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); color: var(--ink); padding: 0 12px; font: inherit; font-size: .88rem; }
.ask input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.ask + .rv-hint, .qa + .rv-hint { margin-top: 12px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(4,12,30,.9); display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: lbIn .3s ease; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 86vh; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: lbImg .45s var(--spring); }
.lightbox button { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox button svg { width: 20px; }
@keyframes lbIn { from { opacity: 0; } }
@keyframes lbImg { from { transform: scale(.9); opacity: 0; } }

/* related rail */
.pd-rel .rail > .card { min-width: 0; }

/* sticky mini buy bar */
.sticky-buy { position: fixed; left: 50%; bottom: 18px; z-index: 35; width: min(560px, calc(100% - 32px)); background: var(--ink); color: var(--bg); border-radius: 20px; padding: 10px 10px 10px 12px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); transform: translate(-50%, calc(100% + 60px)); visibility: hidden; transition: transform .5s var(--spring), visibility 0s .5s; }
.sticky-buy.show { transform: translate(-50%, 0); visibility: visible; transition: transform .5s var(--spring); }
.sticky-buy img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.sticky-buy .sb { flex: 1; min-width: 0; }
.sticky-buy .sb b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-buy .sb span { display: block; font-size: .76rem; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-buy .btn { height: 46px; flex-shrink: 0; }

@media (max-width: 960px) {
  .pd-grid { grid-template-columns: 1fr; }
  .pd-gal { position: static; }
  .rv-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .pd { padding-top: 12px; }
  .crumbs .cur { max-width: 22ch; }
  .opts { grid-template-columns: 1fr 1fr; }
  .wts { grid-template-columns: repeat(3, 1fr); }
  .bulk-row { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
  .acc .ab { padding-left: 18px; }
  .perks { grid-template-columns: 1fr; }
  .price-box .pp b { font-size: 1.9rem; }
  .sticky-buy { bottom: var(--pd-sb-bottom, calc(76px + env(safe-area-inset-bottom, 0px))); }
  .pd-thumbs { grid-template-columns: repeat(5, 1fr); gap: 8px; }
}
@media (max-width: 400px) {
  .opts.pd-cuts { grid-template-columns: 1fr; }
  .tier { padding: 8px; }
  .tier b { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-main img, .sticky-buy, .tier { transition: none; }
  .bulk.pulse, .bulk-body, .acc .ab, .wt-hint, .lightbox, .lightbox img { animation: none; }
}

/* native selects: Tailwind preflight strips the arrow, draw our own */
.bulk select, .pd-basket-form select { -webkit-appearance: none; appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B958F' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; cursor: pointer; }
.bulk-body > div:empty { display: none; }
