/* SpaCart storefront design system - product page (templates/product/*).
 * Gallery and a sticky buy box above the fold, then one reading column. */

.product-page { min-width: 0; }
.product-main { display: grid; gap: var(--sf-s5); align-items: start; margin-bottom: var(--sf-s6); }
@media (min-width: 900px) { .product-main { grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr); gap: var(--sf-s6); } }
@media (min-width: 1200px) { .product-main { gap: var(--sf-s7); } }

/* Gallery (product.js, storefront-native.js) */
.product-gallery { display: grid; gap: var(--sf-s3); min-width: 0; }
@media (min-width: 900px) { .product-gallery { position: sticky; top: calc(var(--scu-header-h, 120px) + var(--sf-s4)); } }
@media (min-width: 1200px) {
	.product-gallery.has-thumbnails { grid-template-columns: 76px minmax(0, 1fr); align-items: start; }
	.product-gallery.has-thumbnails .product-gallery-main { grid-column: 2; grid-row: 1; }
	.product-gallery.has-thumbnails .product-thumbnails { grid-column: 1; grid-row: 1; flex-direction: column; overflow: visible; }
	.product-gallery.has-thumbnails .product-gallery-caption { grid-column: 2; }
}
.product-gallery-main { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; border-radius: var(--sf-r-card); background: var(--sf-surface); border: 1px solid var(--sf-line); }
.product-media-panel { position: absolute; inset: 0; display: grid; place-items: center; }
.product-media-panel[hidden] { display: none; }
.product-zoom-surface { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: var(--sf-s5); overflow: hidden; }
.product-main-image { width: 100%; height: 100%; object-fit: contain; }
.product-zoom-surface.is-zoomed { cursor: zoom-out; }
.product-zoom-surface.is-zoomed .product-main-image { transform: scale(2); transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%); }
/* Desktop hover zoom (product.js, mouse only); a click opens the fullscreen viewer. */
.product-zoom-surface .product-main-image { transition: transform var(--sf-medium) var(--sf-ease); }
.product-zoom-surface.is-hover-zoom { cursor: zoom-in; }
.product-zoom-surface.is-hover-zoom .product-main-image { transform: scale(1.9); }
.product-lightbox-open { position: absolute; right: var(--sf-s3); top: var(--sf-s3); width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--sf-line); border-radius: 50%; background: var(--sf-surface); color: var(--sf-ink); transition: background-color var(--sf-fast) var(--sf-ease), border-color var(--sf-fast) var(--sf-ease); }
.product-lightbox-open:hover, .product-zoom-toggle:hover { border-color: var(--sf-ink); }
.product-gallery-main { touch-action: pan-y; }
.product-zoom-toggle { position: absolute; right: var(--sf-s3); bottom: var(--sf-s3); width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--sf-line); border-radius: 50%; background: var(--sf-surface); color: var(--sf-ink); }
.product-zoom-toggle svg { width: 18px; height: 18px; }
.product-zoom-toggle[aria-pressed="true"] { background: var(--sf-ink); color: #fff; }
.product-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.product-spin-viewer { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: var(--sf-s5); }
.product-spin-image { max-height: 100%; object-fit: contain; user-select: none; }
.product-spin-badge { position: absolute; top: var(--sf-s3); left: var(--sf-s3); padding: 3px 9px; border-radius: var(--sf-r-pill); background: var(--sf-ink); color: #fff; font-size: var(--sf-fs-xs); font-weight: 700; }
.product-spin-control { position: absolute; left: var(--sf-s4); right: var(--sf-s4); bottom: var(--sf-s3); display: grid; gap: 4px; font-size: var(--sf-fs-xs); color: var(--sf-muted); }
.product-spin-control input { accent-color: var(--sf-brand); }
.product-gallery-main > .product-image-placeholder { padding: var(--sf-s6); background: var(--sf-subtle); width: 100%; height: 100%; place-content: center; }
.product-gallery-main > .product-image-placeholder svg { width: 48px; height: 48px; }
.product-thumbnails { display: flex; gap: var(--sf-s2); overflow-x: auto; scrollbar-width: thin; }
.product-thumbnail { position: relative; flex: none; width: 72px; height: 72px; display: grid; place-items: center; padding: 6px; border: 1px solid var(--sf-line); border-radius: var(--sf-r-media); background: var(--sf-surface); transition: border-color var(--sf-fast) var(--sf-ease), box-shadow var(--sf-fast) var(--sf-ease); }
.product-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.product-thumbnail:hover { border-color: var(--sf-line-strong); }
.product-thumbnail.is-active, .product-thumbnail[aria-current="true"] { border-color: var(--sf-ink); box-shadow: inset 0 0 0 1px var(--sf-ink); }
/* The new photo fades in instead of popping. */
.product-media-panel.is-entering { animation: sf-media-in var(--sf-medium) var(--sf-ease); }
@keyframes sf-media-in { from { opacity: 0; } to { opacity: 1; } }
.product-thumbnail-label { font-size: 11px; font-weight: 650; }
.product-thumbnail-badge { position: absolute; right: 3px; bottom: 3px; padding: 1px 5px; border-radius: 4px; background: var(--sf-ink); color: #fff; font-size: 10px; font-weight: 700; }
.product-gallery-caption { display: flex; justify-content: space-between; margin: 0; font-size: var(--sf-fs-xs); color: var(--sf-muted); }
.product-gallery-caption > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buy box */
.product-buybox { display: grid; gap: var(--sf-s4); min-width: 0; }

.product-heading { display: grid; gap: var(--sf-s2); }
.product-heading > * { margin: 0; }
.product-detail-bestseller { width: fit-content; padding: 3px 10px; border-radius: var(--sf-r-pill); background: var(--sf-brand-soft); color: var(--sf-brand-strong); font-size: var(--sf-fs-xs); font-weight: 700; }
.product-title { font-size: var(--sf-fs-xl); line-height: 1.15; }
@media (min-width: 1200px) { .product-title { font-size: 28px; } }
.product-seller { font-size: var(--sf-fs-sm); color: var(--sf-muted); }
.product-seller a { font-weight: 650; color: var(--sf-ink); }
.product-short-description { color: var(--sf-text); }
.product-rating { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sf-s2); font-size: var(--sf-fs-sm); }
.product-rating a { color: var(--sf-muted); }
.product-brand, .product-reference { font-size: var(--sf-fs-sm); color: var(--sf-muted); }
.product-reference strong { font-weight: 600; color: var(--sf-text); font-family: ui-monospace, 'Cascadia Mono', Menlo, monospace; font-size: .95em; }
/* Auctions and other extension-driven sales hide the cart form: their panel comes first. */
.product-buybox:has(.product-purchase[hidden]) .product-summary { order: 5; }
.product-summary { display: grid; gap: var(--sf-s4); padding: var(--sf-s5); background: var(--sf-surface); border: 1px solid var(--sf-line); border-radius: var(--sf-r-card); }
@media (max-width: 599px) { .product-summary { padding: var(--sf-s4); } }
.product-purchase { display: grid; gap: var(--sf-s3); margin: 0; }
.product-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sf-s2) var(--sf-s3); }
.product-details-price { font-family: var(--sf-font-display); font-weight: 800; font-size: var(--sf-fs-2xl); line-height: 1.05; letter-spacing: -.02em; color: var(--sf-ink); font-variant-numeric: tabular-nums; }
.product-details-list-price { color: var(--sf-muted); font-size: var(--sf-fs-md); }
.product-price-row:has(.product-details-list-price) .product-details-price { color: var(--sf-danger); }
.product-weight-line { margin: 0; font-size: var(--sf-fs-sm); color: var(--sf-muted); }
.product-stock { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 650; font-size: var(--sf-fs-sm); }
.product-stock::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.product-stock.is-available { color: var(--sf-positive); }
.product-stock.is-unavailable { color: var(--sf-danger); }
/* Downloadable product: the delivery promise replaces the stock line. */
.product-digital { display: grid; gap: 4px; }
.product-digital p { margin: 0; font-size: var(--sf-fs-sm); }
.product-digital-promise { display: inline-flex; align-items: center; gap: 8px; color: var(--sf-positive); font-weight: 650; }
.product-digital-promise svg { width: 18px; height: 18px; flex: none; }
.product-digital-file { color: var(--sf-muted); font-variant-numeric: tabular-nums; }
.product-digital .product-digital-owned { margin-top: var(--sf-s2); padding: var(--sf-s2) var(--sf-s3); border-radius: var(--sf-r-control); background: var(--sf-canvas); color: var(--sf-ink); }
.product-options { display: grid; gap: var(--sf-s3); padding-top: var(--sf-s3); border-top: 1px solid var(--sf-line); }
.product-options > h2 { margin: 0; font-size: var(--sf-fs-base); }
.product-option > span { display: block; margin-bottom: 6px; }
.product-variant-picker { display: grid; gap: var(--sf-s2); padding-top: var(--sf-s3); border-top: 1px solid var(--sf-line); }
.product-variant-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sf-s2); }
.product-variant-search-row button { min-height: var(--sf-control-h); padding: 0 var(--sf-s4); border: 1px solid var(--sf-line-strong); border-radius: var(--sf-r-control); background: var(--sf-surface); font-weight: 600; }
.product-variant-results { border: 1px solid var(--sf-line); border-radius: var(--sf-r-control); max-height: 260px; overflow: auto; }
.product-variant-results ul { list-style: none; margin: 0; padding: var(--sf-s1); }
.product-variant-results li { padding: 10px var(--sf-s3); border-radius: 6px; cursor: pointer; }
.product-variant-results li:hover, .product-variant-results li[aria-selected="true"] { background: var(--sf-subtle); }
[data-variant-status] { margin: 0; font-size: var(--sf-fs-sm); color: var(--sf-muted); }
.options-error { display: none; padding: var(--sf-s2) var(--sf-s3); border-radius: var(--sf-r-control); background: var(--sf-danger-soft); color: var(--sf-danger); font-weight: 600; font-size: var(--sf-fs-sm); }
.options-error.is-visible, .options-error[style*="block"] { display: block; }
.product-buy-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: var(--sf-s2); }
.product-quantity { display: grid; gap: 4px; font-size: var(--sf-fs-xs); }
.product-quantity input { text-align: center; font-weight: 650; }
/* Quantity stepper: the cart stepper, at the buy button height. */
.product-stepper { display: inline-flex; align-items: stretch; height: 48px; border: 1px solid var(--sf-line-strong); border-radius: var(--sf-r-control); background: var(--sf-surface); overflow: hidden; }
.product-stepper:focus-within { border-color: var(--sf-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sf-brand) 22%, transparent); }
.product-stepper-button { display: grid; place-items: center; width: 40px; padding: 0; border: 0; background: transparent; color: var(--sf-ink); transition: background-color var(--sf-fast) var(--sf-ease); }
.product-stepper-button svg { width: 16px; height: 16px; }
.product-stepper-button:hover:not(:disabled) { background: var(--sf-subtle); }
.product-stepper-button:disabled { color: var(--sf-line-strong); cursor: not-allowed; }
.product-stepper-button:focus-visible { outline-offset: -2px; border-radius: 0; }
.product-stepper input[name="amount"] { width: 48px; min-height: 0; height: 100%; padding: 0 2px; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-family: var(--sf-font-display); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.product-stepper input[name="amount"]::-webkit-inner-spin-button, .product-stepper input[name="amount"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.product-stepper input[name="amount"]:focus { box-shadow: none; outline: none; }
.product-stepper-button { -webkit-tap-highlight-color: transparent; }
/* Phones: stepper and wishlist share a row, the buy button takes the full width. */
@media (max-width: 479px) {
	.product-buy-row .add2cart-product { grid-column: 1 / -1; grid-row: 2; }
	.product-buy-row:has(.add2cart-product) .wishlist-toggle { grid-column: 3; grid-row: 1; justify-self: end; }
}
.add2cart-product {
	min-height: 48px; padding: 0 var(--sf-s5); border: 0; border-radius: var(--sf-r-control); background: var(--sf-brand); color: var(--sf-on-brand);
	font-weight: 700; font-size: var(--sf-fs-md);
}
.add2cart-product:hover { background: var(--sf-brand-strong); }
.add2cart-product:disabled { opacity: .45; cursor: not-allowed; }
.product-buy-row .wishlist-toggle { position: static; width: 48px; height: 48px; border: 1px solid var(--sf-line-strong); border-radius: var(--sf-r-control); box-shadow: none; background: var(--sf-surface); }
.product-buy-row:not(:has(.add2cart-product)) { grid-template-columns: auto; justify-content: start; }
.product-form-status:empty { display: none; }
.product-form-status { margin: 0; font-size: var(--sf-fs-sm); font-weight: 600; }
.product-form-status.is-error { color: var(--sf-danger); }
.product-form-status.is-success { color: var(--sf-positive); }
.product-assistance a { font-size: var(--sf-fs-sm); font-weight: 600; }
.sf-trust { list-style: none; margin: 0; padding: var(--sf-s3) 0 0; display: grid; gap: var(--sf-s3); border-top: 1px solid var(--sf-line); }
.sf-trust li { display: flex; gap: var(--sf-s3); align-items: flex-start; font-size: var(--sf-fs-sm); color: var(--sf-muted); }
.sf-trust li strong { display: block; color: var(--sf-ink); font-weight: 650; }
.sf-trust svg { width: 20px; height: 20px; margin-top: 2px; color: var(--sf-ink); }

/* Section navigation */
.product-section-nav { position: sticky; top: var(--scu-header-h, 120px); z-index: 20; display: flex; gap: var(--sf-s1); overflow-x: auto; margin: 0 0 var(--sf-s5); padding: var(--sf-s2) 0; background: var(--sf-canvas); border-bottom: 1px solid var(--sf-line); scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--sf-s6); overscroll-behavior-x: contain; }
.product-section-nav::-webkit-scrollbar { display: none; }
/* Faded edges say that more tabs scroll in (classes set by product.js). */
.product-section-nav.has-more-end { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.product-section-nav.has-more-start { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px); mask-image: linear-gradient(to right, transparent, #000 48px); }
.product-section-nav.has-more-start.has-more-end { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.product-section-nav a { flex: none; scroll-snap-align: start; min-height: 40px; display: inline-flex; align-items: center; padding: 0 var(--sf-s3); border-radius: var(--sf-r-control); color: var(--sf-text); font-weight: 600; font-size: var(--sf-fs-sm); text-decoration: none; transition: background-color var(--sf-fast) var(--sf-ease), color var(--sf-fast) var(--sf-ease); }
.product-section-nav a:hover, .product-section-nav a[aria-current] { background: var(--sf-surface); color: var(--sf-ink); }
/* Indicator sliding to the current tab (product.js). */
.product-section-indicator { position: absolute; left: 0; bottom: -1px; width: 0; height: 2px; border-radius: 2px; background: var(--sf-brand); opacity: 0; pointer-events: none; transition: transform var(--sf-medium) var(--sf-ease-out), width var(--sf-medium) var(--sf-ease-out), opacity var(--sf-fast) var(--sf-ease); }
.product-section-indicator.is-visible { opacity: 1; }

/* Details column */
.product-details { display: grid; gap: var(--sf-s4); }
.product-content-section { scroll-margin-top: calc(var(--scu-header-h, 120px) + 64px); padding: var(--sf-s5); background: var(--sf-surface); border: 1px solid var(--sf-line); border-radius: var(--sf-r-card); }
@media (max-width: 599px) { .product-content-section { padding: var(--sf-s4); } }
.product-content-section > h2, .product-section-heading h2 { font-size: var(--sf-fs-lg); margin-bottom: var(--sf-s4); }
.product-description, .product-specifications dl, .product-content-section > p:not(.product-empty-state) { max-width: 75ch; }
.product-description img { border-radius: var(--sf-r-media); }
.product-description :is(ul, ol) { padding-left: 1.2em; }
.product-specifications dl { margin: 0; display: grid; }
.product-specifications dl > div { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: var(--sf-s4); padding: 10px 0; border-bottom: 1px solid var(--sf-line); }
.product-specifications dl > div:last-child { border-bottom: 0; }
.product-specifications dt { color: var(--sf-muted); font-size: var(--sf-fs-sm); }
.product-specifications dd { margin: 0; font-weight: 600; color: var(--sf-ink); }
.product-list-section { background: transparent; border: 0; padding: var(--sf-s4) 0 0; }
.product-list-section > h2 { margin-bottom: var(--sf-s4); }
.product-list-section > .sf-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .product-list-section > .sf-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1440px) { .product-list-section > .sf-product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Sticky purchase bar (product.js): slides up once the buy box has scrolled away. */
.product-page:has([data-product-sticky]) { padding-bottom: 88px; }
.product-sticky-bar { position: fixed; z-index: 990; left: 0; right: 0; bottom: 0; padding: var(--sf-s2) 0 calc(var(--sf-s2) + env(safe-area-inset-bottom, 0px)); background: var(--sf-surface); border-top: 1px solid var(--sf-line); box-shadow: var(--sf-shadow-sticky); transform: translateY(105%); transition: transform var(--sf-medium) var(--sf-ease-out); }
.product-sticky-bar.is-visible { transform: none; }
.product-sticky-inner { width: var(--sf-container); margin-inline: auto; display: flex; align-items: center; gap: var(--sf-s3); }
.product-sticky-thumb { width: 48px; height: 48px; flex: none; object-fit: contain; border: 1px solid var(--sf-line); border-radius: var(--sf-r-control); background: #fff; }
.product-sticky-copy { display: grid; min-width: 0; flex: 1; }
.product-sticky-copy p { margin: 0; }
.product-sticky-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: var(--sf-fs-sm); color: var(--sf-ink); }
.product-sticky-price { font-family: var(--sf-font-display); font-weight: 800; font-size: var(--sf-fs-md); color: var(--sf-ink); font-variant-numeric: tabular-nums; }
.product-sticky-add { flex: none; min-height: var(--sf-control-h); padding: 0 var(--sf-s5); border: 0; border-radius: var(--sf-r-control); background: var(--sf-brand); color: var(--sf-on-brand); font-weight: 700; transition: background-color var(--sf-fast) var(--sf-ease); }
.product-sticky-add:hover { background: var(--sf-brand-strong); }
@media (max-width: 599px) { .product-sticky-thumb { display: none; } .product-sticky-add { padding: 0 var(--sf-s4); } }
body:has(.sc-compare-bar:not([hidden])) .product-sticky-bar { display: none; }

/* Fullscreen media viewer (product.js, native <dialog>). */
.product-lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 14, 18, .94); color: #fff; overflow: hidden; }
.product-lightbox[open] { display: grid; animation: sf-lightbox-in var(--sf-medium) var(--sf-ease-out); }
.product-lightbox::backdrop { background: rgba(12, 14, 18, .6); }
@keyframes sf-lightbox-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.product-lightbox-stage { display: grid; place-items: center; min-height: 0; padding: 64px var(--sf-s4) 56px; touch-action: pan-y; }
@media (min-width: 900px) { .product-lightbox-stage { padding: 56px 96px; } }
.product-lightbox-image { max-width: 100%; max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; border-radius: var(--sf-r-media); background: #fff; }
.product-lightbox-count { position: absolute; left: 50%; bottom: var(--sf-s4); translate: -50% 0; margin: 0; font-size: var(--sf-fs-sm); font-variant-numeric: tabular-nums; color: #e4e7eb; }
.product-lightbox-close, .product-lightbox-nav { position: absolute; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; transition: background-color var(--sf-fast) var(--sf-ease); }
.product-lightbox-close:hover, .product-lightbox-nav:hover { background: rgba(255, 255, 255, .26); }
.product-lightbox :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.product-lightbox-close { top: var(--sf-s3); right: var(--sf-s3); }
.product-lightbox-nav { top: 50%; translate: 0 -50%; }
.product-lightbox-prev { left: var(--sf-s3); }
.product-lightbox-next { right: var(--sf-s3); }
.product-lightbox.is-single :is(.product-lightbox-nav, .product-lightbox-count) { display: none; }
html.has-lightbox { overflow: hidden; }

/* Reviews */
.product-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sf-s2); }
.product-section-heading span { color: var(--sf-muted); font-size: var(--sf-fs-sm); }
.product-reviews-overview { display: grid; gap: var(--sf-s5); }
@media (min-width: 900px) { .product-reviews-overview { grid-template-columns: 280px minmax(0, 1fr); gap: var(--sf-s6); } }
.product-reviews-summary { display: grid; gap: var(--sf-s4); align-content: start; }
.product-reviews-score { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px var(--sf-s2); }
.product-reviews-score strong { font-family: var(--sf-font-display); font-size: 44px; line-height: 1; }
.product-reviews-score > span:nth-child(2) { color: var(--sf-muted); }
.product-reviews-score .card-stars, .product-reviews-count { grid-column: 1 / -1; }
.product-reviews-score .card-stars { font-size: 18px; }
.product-reviews-count { color: var(--sf-muted); font-size: var(--sf-fs-sm); }
.product-review-distribution { display: grid; gap: 6px; }
.product-review-distribution > p { margin: 0 0 4px; font-size: var(--sf-fs-sm); font-weight: 600; }
.product-review-bar { display: grid; grid-template-columns: 34px minmax(0, 1fr) 40px 34px; align-items: center; gap: var(--sf-s2); font-size: var(--sf-fs-xs); color: var(--sf-muted); text-decoration: none; }
a.product-review-bar:hover, .product-review-bar[aria-current] { color: var(--sf-ink); }
.product-review-bar-track { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 4px; background: var(--sf-subtle); overflow: hidden; }
.product-review-bar-track::-webkit-progress-bar { background: var(--sf-subtle); border-radius: 4px; }
.product-review-bar-track::-webkit-progress-value { background: #e1a700; border-radius: 4px; }
.product-review-bar-track::-moz-progress-bar { background: #e1a700; border-radius: 4px; }
.product-review-filters { display: flex; flex-wrap: wrap; gap: var(--sf-s2); margin-bottom: var(--sf-s3); }
.product-review-filters a, .product-review-filter-selected { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--sf-s3); border: 1px solid var(--sf-line-strong); border-radius: var(--sf-r-pill); color: var(--sf-ink); font-size: var(--sf-fs-sm); font-weight: 600; text-decoration: none; }
.product-review-filters a[aria-current] { background: var(--sf-ink); border-color: var(--sf-ink); color: #fff; }
.product-review-result-count { font-size: var(--sf-fs-sm); color: var(--sf-muted); }
.reviews-list { display: grid; }
.product-review { display: grid; gap: 6px; padding: var(--sf-s4) 0; border-top: 1px solid var(--sf-line); }
.product-review p { margin: 0; }
.product-review-verified { display: inline-flex; width: fit-content; padding: 2px 8px; border-radius: var(--sf-r-pill); background: var(--sf-positive-soft); color: var(--sf-positive); font-size: var(--sf-fs-xs); font-weight: 650; }
.product-review-rating-0::before { width: 0; } .product-review-rating-1::before { width: 20%; } .product-review-rating-2::before { width: 40%; }
.product-review-rating-3::before { width: 60%; } .product-review-rating-4::before { width: 80%; } .product-review-rating-5::before { width: 100%; }
.product-empty-state { margin: 0; padding: var(--sf-s5) var(--sf-s4); text-align: center; color: var(--sf-muted); background: var(--sf-canvas); border-radius: var(--sf-r-control); }
.product-review-pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--sf-s3); margin-top: var(--sf-s3); font-size: var(--sf-fs-sm); }
.product-auth-callout { margin: var(--sf-s4) 0 0; padding: var(--sf-s3) var(--sf-s4); border-radius: var(--sf-r-control); background: var(--sf-canvas); font-size: var(--sf-fs-sm); }
.product-auth-callout a { font-weight: 650; }
.product-inline-form { display: grid; gap: var(--sf-s3); max-width: 640px; margin-top: var(--sf-s5); padding-top: var(--sf-s5); border-top: 1px solid var(--sf-line); }
.product-inline-form button[type="submit"] { width: fit-content; min-height: var(--sf-control-h); padding: 0 var(--sf-s5); border: 0; border-radius: var(--sf-r-control); background: var(--sf-ink); color: #fff; font-weight: 650; }
.product-details .product-inline-form :is(input:not([type="radio"]):not([type="checkbox"]), textarea, select) { max-width: 640px; }
/* Disclosed forms: the button sits under the section intro, the form opens below it. */
.product-disclosure-toggle { justify-self: start; width: fit-content; margin-top: var(--sf-s3); }
.product-disclosure-toggle + .product-inline-form { margin-top: var(--sf-s4); padding-top: var(--sf-s4); }
.product-inline-form[hidden] { display: none; }
.rating-fieldset { margin: 0; }
.rating-choice { display: inline-flex; gap: 2px; }
.rating-choice label { cursor: pointer; font-size: 28px; line-height: 1; color: var(--sf-line-strong); }
.rating-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-choice label:has(input:checked), .rating-choice label:has(~ label input:checked) { color: #e1a700; }
.rating-choice:hover label { color: var(--sf-line-strong); }
.rating-choice:hover label:hover, .rating-choice:hover label:has(~ label:hover) { color: #e1a700; }
.rating-choice label:has(input:focus-visible) { outline: 2px solid var(--sf-brand); border-radius: 4px; }

/* Prices split by spacart-ui.js */
.scu-price-frac, .scu-price-cur { font-size: .6em; vertical-align: .5em; margin-left: 1px; }
.scu-price-cur { margin-left: 4px; }

/* Product questions (storefront-native.js) */
.spacart-question { display: grid; gap: 6px; padding: var(--sf-s4) 0; border-top: 1px solid var(--sf-line); }
.spacart-question-message { padding: var(--sf-s3); border-radius: var(--sf-r-control); background: var(--sf-canvas); font-size: var(--sf-fs-sm); }
.spacart-question-message.is-answer, .spacart-question-message.is-seller { background: var(--sf-brand-soft); }

/* Comparison (storefront-native.js) */
.sc-compare-toggle { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--sf-s3); border: 1px solid var(--sf-line-strong); border-radius: var(--sf-r-pill); background: var(--sf-surface); color: var(--sf-ink); font-size: var(--sf-fs-sm); font-weight: 600; }
.sc-compare-toggle:hover { border-color: var(--sf-ink); }
.sc-compare-toggle[aria-pressed="true"] { background: var(--sf-ink); border-color: var(--sf-ink); color: #fff; }
.sf-card .sc-compare-toggle { position: relative; z-index: 2; margin-top: var(--sf-s2); min-height: 32px; font-size: var(--sf-fs-xs); }
.sc-compare-bar { position: fixed; z-index: 1000; left: 50%; bottom: var(--sf-s4); transform: translateX(-50%); width: min(760px, calc(100% - 2 * var(--sf-gutter))); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sf-s3); padding: var(--sf-s3) var(--sf-s4); background: var(--sf-ink); color: #fff; border-radius: var(--sf-r-card); box-shadow: var(--sf-shadow-pop); }
.sc-compare-list { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.sc-compare-item { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: var(--sf-r-pill); background: rgba(255, 255, 255, .12); font-size: var(--sf-fs-xs); }
.sc-compare-item button { width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; }
.sc-compare-actions { display: flex; gap: var(--sf-s2); }
.sc-compare-bar .sc-command { background: #fff; color: var(--sf-ink); border-color: #fff; }
.sc-compare-status { font-size: var(--sf-fs-xs); opacity: .85; }
.sc-compare-dialog { width: min(980px, calc(100% - 32px)); max-height: 86vh; padding: var(--sf-s5); border: 0; border-radius: var(--sf-r-card); box-shadow: var(--sf-shadow-pop); }
.sc-compare-dialog::backdrop { background: rgba(20, 23, 28, .5); }
.sc-compare-table-wrap { overflow: auto; }
.sc-compare-table-wrap table { min-width: 560px; font-size: var(--sf-fs-sm); }
.sc-compare-table-wrap :is(th, td) { padding: var(--sf-s2) var(--sf-s3); border-bottom: 1px solid var(--sf-line); text-align: left; vertical-align: top; }
.sc-compare-table-wrap th { color: var(--sf-muted); font-weight: 600; }

/* ---------- Extension widgets in the buy box (plugins/*: markup and JS hooks are theirs) ---------- */
/* Shared button looks: primary = .sf-btn--primary, secondary = .sf-btn, quiet = .sf-btn--quiet. */
/* :where keeps this base at (0,1,1) so the primary and quiet variants below can override it. */
main.product-page :where(.spacart-seller-reputation button, .spacart-auction-bid button, .spacart-auction-claim, .spacart-auction-finalize, .spacart-auction-order, .spacart-auction [data-auction-refresh]) {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--sf-s2); min-height: var(--sf-control-h); margin: 0; padding: 0 var(--sf-s5);
	border: 1px solid var(--sf-line-strong); border-radius: var(--sf-r-control); background: var(--sf-surface); color: var(--sf-ink);
	font: 600 var(--sf-fs-base)/1.2 var(--sf-font-text); text-decoration: none; cursor: pointer;
	transition: background-color var(--sf-fast) var(--sf-ease), border-color var(--sf-fast) var(--sf-ease), color var(--sf-fast) var(--sf-ease);
}
.product-page :is(.spacart-seller-reputation button, .spacart-auction-order):hover { border-color: var(--sf-ink); background: var(--sf-surface); }
.product-page :is(.spacart-auction-bid button, .spacart-auction-claim, .spacart-auction-finalize) { border-color: var(--sf-brand); background: var(--sf-brand); color: var(--sf-on-brand); }
.product-page :is(.spacart-auction-bid button, .spacart-auction-claim, .spacart-auction-finalize):hover { border-color: var(--sf-brand-strong); background: var(--sf-brand-strong); }
.product-page :is(.spacart-auction-claim, .spacart-auction-finalize) { width: 100%; margin-top: var(--sf-s3); }
.product-page .spacart-auction [data-auction-refresh] { min-height: var(--sf-control-h-sm); margin-top: var(--sf-s2); padding: 0 var(--sf-s3); border: 1px solid transparent; border-radius: var(--sf-r-control); background: transparent; color: var(--sf-ink); font: 600 var(--sf-fs-sm)/1.2 var(--sf-font-text); }
.product-page .spacart-auction [data-auction-refresh]:hover { border-color: transparent; background: var(--sf-subtle); }
.product-page :is(.spacart-seller-reputation, .spacart-auction) button:disabled { opacity: .5; cursor: wait; }
.product-page .spacart-auction :focus-visible { outline: 2px solid var(--sf-brand); outline-offset: 2px; }
.product-page .spacart-auction { margin-top: 0; }
.product-page .spacart-auction-summary { margin: var(--sf-s4) 0; }
.product-page .spacart-auction-bid input { min-height: var(--sf-control-h); border: 1px solid var(--sf-line-strong); border-radius: var(--sf-r-control); }
.product-page .spacart-auction-status { min-height: 0; color: var(--sf-muted); font-size: var(--sf-fs-sm); }
.product-page .spacart-auction-status:empty, .product-page [data-auction-position]:empty { display: none; }

/* Seller reputation: a quiet panel, sentence case. */
.product-page .spacart-seller-reputation { margin: 0; padding: var(--sf-s5); background: var(--sf-surface); border: 1px solid var(--sf-line); border-radius: var(--sf-r-card); color: var(--sf-text); }
@media (max-width: 599px) { .product-page .spacart-seller-reputation { padding: var(--sf-s4); } }
.product-page .spacart-seller-reputation-heading { align-items: flex-start; flex-direction: row; }
.product-page .spacart-seller-reputation-kicker { margin-bottom: 2px; text-transform: none; letter-spacing: 0; font-size: var(--sf-fs-sm); font-weight: 600; color: var(--sf-muted); }
.product-page .spacart-seller-reputation h2 { font-size: var(--sf-fs-md); }
.product-page .spacart-seller-reputation h2 a { color: var(--sf-ink); text-decoration: none; }
.product-page .spacart-seller-reputation h2 a:hover { text-decoration: underline; }
.product-page .spacart-seller-rating { flex: none; color: var(--sf-ink); font-family: var(--sf-font-display); font-variant-numeric: tabular-nums; }
.product-page .spacart-seller-rating strong { font-size: var(--sf-fs-xl); }
.product-page .spacart-seller-rating span { color: var(--sf-muted); font-weight: 600; }
.product-page .spacart-seller-reputation-metrics { margin: var(--sf-s3) 0; gap: var(--sf-s1) var(--sf-s5); font-size: var(--sf-fs-sm); color: var(--sf-muted); }
.product-page .spacart-seller-reputation-metrics strong { font-family: var(--sf-font-display); color: var(--sf-ink); font-variant-numeric: tabular-nums; }
.product-page .spacart-seller-reputation form { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--sf-s3); }
.product-page .spacart-seller-reputation .product-auth-callout { margin: 0; }

/* Catalogue merchandising: labels as chips, size chart as .sf-table. */
.product-page .spacart-product-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sf-s4); }
.product-page .spacart-product-label {
	display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border: 1px solid var(--sf-line); border-radius: var(--sf-r-pill);
	background: var(--sf-surface); color: var(--sf-ink); font-size: var(--sf-fs-xs); font-weight: 650;
}
.product-page .spacart-product-label::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--label-color, var(--sf-brand)); }
.product-page .spacart-catalog-copy + .spacart-catalog-copy, .product-page .spacart-size-chart { margin-top: var(--sf-s4); }
.product-page .spacart-catalog-merchandising h3 { margin: 0 0 var(--sf-s2); font-size: var(--sf-fs-base); }
.product-page .spacart-catalog-copy p { margin: 0; }
.product-page .spacart-size-chart-scroll { overflow-x: auto; border: 1px solid var(--sf-line); border-radius: var(--sf-r-card); background: var(--sf-surface); }
.product-page .spacart-size-chart table { width: 100%; border-collapse: collapse; font-size: var(--sf-fs-sm); }
.product-page .spacart-size-chart :is(th, td) { padding: var(--sf-s3); border-bottom: 1px solid var(--sf-line); text-align: left; vertical-align: top; font-variant-numeric: tabular-nums; }
.product-page .spacart-size-chart th { font-weight: 650; color: var(--sf-muted); background: var(--sf-canvas); }
.product-page .spacart-size-chart tr:last-child td { border-bottom: 0; }

/* Quick view: a wider dialog holding the gallery and buy box side by side. */
.popup.product_popup { width: min(880px, calc(100% - 32px)); }
@media (min-width: 900px) { .popup.product_popup .product-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sf-s5); margin: 0; } }
.popup.product_popup :is(.product-gallery, .product-buybox) { position: static; min-width: 0; }
