/* IXXO Cart 8 storefront: the product page and the compare page (Phase 10a Task 11, ruling R40).
   Tokens from tokens.css and /theme.css only; logical properties, so the page reads right to left. */

/* The product page: pictures beside the buy box, one column on a tablet or phone. */
.sf-pdp{ display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; margin-block-start: 20px; align-items: start; }

/* The pictures: thumbnails in a column at the start, the main picture beside them. */
.sf-pdp-gallery{ display: grid; grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: "thumbs stage"; gap: 14px; position: sticky; inset-block-start: 20px; }
.sf-pdp-gallery:not(:has(.sf-pdp-thumbs)){ grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage"; }
.sf-pdp-stage{ grid-area: stage; aspect-ratio: 1; background: var(--tile); border-radius: calc(var(--r) * 2); display: grid; place-items: center; overflow: hidden; cursor: zoom-in; }
.sf-pdp-stage img{ inline-size: 76%; block-size: auto; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.sf-pdp-stage:hover img{ transform: scale(1.1); }
.sf-pdp-thumbs{ grid-area: thumbs; display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.sf-pdp-thumb{ display: grid; place-items: center; inline-size: 76px; block-size: 76px; border-radius: var(--r); background: var(--tile); overflow: hidden; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 0.2s; }
.sf-pdp-thumb[aria-current="true"]{ box-shadow: inset 0 0 0 2px var(--ink); }
.sf-pdp-thumb img{ inline-size: 80%; block-size: auto; }

/* The buy box. */
.sf-pdp-buy{ display: flex; flex-direction: column; gap: 20px; }
.sf-pdp-brand{ font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.sf-pdp-title{ font-family: var(--font-heading); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 720; margin: 8px 0 0; text-wrap: balance; }
.sf-pdp-price{ display: flex; flex-direction: column; gap: 6px; padding-block: 20px; border-block: 1px solid var(--line); }
.sf-pdp-price .sf-price{ align-items: center; gap: 12px; }
.sf-pdp-price .sf-price-now{ font-size: 42px; font-weight: 720; letter-spacing: -0.03em; line-height: 1; }
.sf-pdp-price .sf-price-was{ font-size: 18px; }
.sf-pdp-note{ font-size: 13px; color: var(--muted); margin: 0; }

/* Option pickers: each value is a link to the variant that has it. */
.sf-pdp-option{ display: flex; flex-direction: column; gap: 10px; }
.sf-pdp-option-name{ font-size: 14.5px; margin: 0; }
.sf-pdp-option-name b{ font-weight: 650; }
.sf-pdp-values{ display: flex; gap: 10px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.sf-pdp-value{ display: inline-grid; place-items: center; min-inline-size: 52px; min-block-size: 44px; padding-inline: 14px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 600; transition: box-shadow 0.2s; }
.sf-pdp-value:hover{ box-shadow: inset 0 0 0 1px var(--ink); }
.sf-pdp-value[aria-current="true"]{ box-shadow: inset 0 0 0 2px var(--ink); }
.sf-pdp-value.is-unavailable{ color: var(--muted); text-decoration: line-through; cursor: not-allowed; }

/* The action: quantity, the button and the heart on one line. */
.sf-pdp-act{ display: flex; gap: 10px; align-items: flex-start; }
.sf-pdp-act > :first-child{ flex: 1; }
.sf-pdp-form{ display: flex; gap: 10px; flex-wrap: wrap; }
.sf-pdp-submit{ flex: 1; min-block-size: 52px; }
.sf-pdp-qty{ display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); block-size: 52px; flex: none; }
.sf-pdp-qty button{ inline-size: 44px; block-size: 50px; border: 0; background: none; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.sf-pdp-qty input{ inline-size: 56px; block-size: 50px; border: 0; background: none; text-align: center; font: inherit; font-weight: 650; }
.sf-pdp-plans{ display: flex; flex-direction: column; gap: 8px; inline-size: 100%; border: 0; margin: 0; padding: 0; }
.sf-pdp-plans legend{ font-size: 14.5px; font-weight: 650; margin-block-end: 4px; }
.sf-pdp-wish{ inline-size: 52px; block-size: 52px; border-radius: var(--r); border: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--paper); display: grid; place-items: center; cursor: pointer; color: var(--ink); flex: none; }
.sf-pdp-wish[aria-pressed="true"] .sf-ico{ fill: var(--accent); stroke: var(--accent); }
.sf-pdp-reason{ margin: 0; padding: 14px 16px; border-radius: var(--r); background: var(--tile); font-size: 14.5px; }
.sf-pdp-reason p{ margin: 0; }
.sf-pdp-reason ul{ margin: 6px 0; padding-inline-start: 20px; }
.sf-pdp-stock{ margin: 0; font-size: 14px; font-weight: 600; }
.sf-pdp-compare{ display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0; font-size: 14px; }
.sf-pdp-compare a{ color: var(--ink-2); }

/* Delivery and returns, then the seller box (a marketplace only). */
.sf-pdp-facts ul{ list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: calc(var(--r) * 1.5); }
.sf-pdp-facts li{ display: flex; gap: 14px; padding: 16px 18px; align-items: flex-start; font-size: 14.5px; }
.sf-pdp-facts li + li{ border-block-start: 1px solid var(--line); }
.sf-pdp-seller{ display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: calc(var(--r) * 1.5); }
.sf-pdp-seller p{ margin: 0; }
.sf-pdp-seller-label{ font-size: 12.5px; color: var(--muted); }
.sf-pdp-seller-name{ font-size: 16px; font-weight: 650; }
.sf-pdp-seller a{ font-size: 13.5px; color: var(--ink); }

/* Below the fold: the section links, the description, the specs and the related products. */
.sf-pdp-tabs{ display: flex; gap: 4px; border-block-end: 1px solid var(--line); margin-block-start: 80px; overflow-x: auto; scrollbar-width: none; }
.sf-pdp-tabs a{ padding: 14px 16px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; }
.sf-pdp-tabs a:hover{ color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.sf-pdp-sec{ margin-block-start: 40px; scroll-margin-block-start: 20px; }
.sf-pdp-sec h2{ font-family: var(--font-heading); font-size: 22px; letter-spacing: -0.02em; margin: 0 0 16px; }
/* The first section right under the tabs: its heading is the tab's word again, so it is kept for screen readers only. */
.sf-pdp-tabs + .sf-pdp-sec > h2{ position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sf-pdp-text{ color: var(--ink-2); font-size: 16px; max-inline-size: 68ch; text-wrap: pretty; }
.sf-pdp-specs{ display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; margin: 0; }
.sf-pdp-specs div{ display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding-block: 14px; border-block-end: 1px solid var(--line); font-size: 14.5px; }
.sf-pdp-specs dt{ color: var(--muted); }
.sf-pdp-specs dd{ margin: 0; overflow-wrap: anywhere; }

/* The compare page: one column per product, the labels in the first. */
.sf-cmp-title{ font-family: var(--font-heading); font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -0.025em; margin: 24px 0 16px; }
.sf-cmp-bar{ display: flex; gap: 10px 20px; align-items: center; flex-wrap: wrap; margin-block-end: 16px; font-size: 14.5px; }
.sf-cmp-diff{ inline-size: 18px; block-size: 18px; accent-color: var(--ink); margin: 0; }
.sf-cmp-clear-form{ margin-inline-start: auto; }
.sf-cmp-clear{ background: none; border: 0; padding: 0; min-block-size: 44px; color: var(--ink-2); text-decoration: underline; cursor: pointer; font: inherit; }
.sf-cmp-scroll{ overflow-x: auto; }
.sf-cmp-table{ inline-size: 100%; border-collapse: collapse; table-layout: fixed; min-inline-size: 560px; }
.sf-cmp-table th, .sf-cmp-table td{ padding: 14px 12px; border-block-end: 1px solid var(--line); text-align: start; vertical-align: top; font-size: 14.5px; overflow-wrap: anywhere; }
.sf-cmp-table tbody th{ inline-size: 160px; color: var(--muted); font-weight: 500; }
.sf-cmp-table thead th{ font-weight: 400; }
.sf-cmp-table .is-missing{ color: var(--muted); }
.sf-cmp-table .is-different td{ font-weight: 600; }
.sf-cmp-head{ position: relative; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sf-cmp-head img, .sf-cmp-head .sf-card-noimg{ inline-size: 100%; max-inline-size: 160px; block-size: auto; aspect-ratio: 1; background: var(--tile); border-radius: var(--r); }
.sf-cmp-name{ font-weight: 600; color: var(--ink); text-decoration: none; }
.sf-cmp-name:hover{ text-decoration: underline; }
.sf-cmp-remove-form{ position: absolute; inset-block-start: 0; inset-inline-end: 0; margin: 0; }
.sf-cmp-remove{ display: grid; place-items: center; inline-size: 44px; block-size: 44px; border: 0; padding: 0; border-radius: 50%; background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px var(--shadow); cursor: pointer; }

/* "Only show differences": while the box is ticked, rows where every product agrees hide. */
.sf-cmp:has(#sf-cmp-diff:checked) .is-same{ display: none; }

@media (max-width: 1100px){
	.sf-pdp{ gap: 36px; }
}

@media (max-width: 900px){
	.sf-pdp{ grid-template-columns: 1fr; }
	.sf-pdp-gallery{ position: static; }
	.sf-pdp-specs{ grid-template-columns: 1fr; }
}

/* On a phone the thumbnails sit under the main picture and scroll sideways. */
@media (max-width: 560px){
	.sf-pdp-gallery{ grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "thumbs"; }
	.sf-pdp-thumbs{ flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; }
	.sf-pdp-thumbs li{ scroll-snap-align: start; flex: none; }
	.sf-pdp-thumb{ inline-size: 64px; block-size: 64px; }
	.sf-pdp-specs div{ grid-template-columns: 120px minmax(0, 1fr); }
	.sf-pdp-act{ flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce){
	.sf-pdp-stage img, .sf-pdp-thumb, .sf-pdp-value{ transition: none; }
	.sf-pdp-stage:hover img{ transform: none; }
}
