/* artCode shop - product page: 3D stage, steps, quote. Loaded only by the product page. */

/* 3D stage of every product page (/assets/js/product3d.js): full screen, light studio backdrop as in
   the button photo, texts in the corners as in the home hero; the poster (no WebGL) is set per product */
.p3d { position: relative; height: calc(100svh - 72px); min-height: 620px; max-height: 1100px; overflow: hidden; outline: none;
  background: radial-gradient(ellipse 75% 62% at 52% 40%, #ffffff 0%, #fbf7f9 42%, #f2e8ee 78%, #ecdfe7 100%); }
.p3d:focus-visible { box-shadow: inset 0 0 0 3px var(--ac-cyan); }
.p3d__canvas, .p3d__poster { position: absolute; inset: 0; }
.p3d__canvas canvas { display: block; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity .8s var(--ease-out); touch-action: pan-y; cursor: grab; }
.p3d.is-ready .p3d__canvas canvas { opacity: 1; }
.p3d.is-dragging .p3d__canvas canvas { cursor: grabbing; }
.p3d__poster { background: #f2f2f0 url('/assets/img/artcode-button/01-foto-intro.webp') center / cover no-repeat; opacity: 0; transition: opacity .6s; }
.p3d.is-fallback .p3d__poster { opacity: 1; }
.p3d__ui { position: absolute; inset: 0; pointer-events: none; display: grid; grid-template-rows: auto 1fr auto; padding: 22px clamp(16px, 3vw, 40px) 30px; }
.p3d__ui a, .p3d__ui button, .p3d__ui label { pointer-events: auto; }
.p3d__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.p3d__row--bottom { grid-row: 3; align-items: flex-end; }   /* the photo column is out of the grid flow */
.p3d__crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: var(--muted); }
.p3d__hint { display: flex; align-items: center; gap: .5rem; color: var(--muted); transition: opacity .6s var(--ease-out); }
.p3d__hint-icon { display: inline-flex; animation: p3d-nudge 2.4s var(--ease-out) infinite; }
.p3d__hint-icon svg { width: 16px; height: 16px; }
.p3d.was-dragged .p3d__hint { opacity: 0; }
@keyframes p3d-nudge { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
.p3d__info { position: relative; max-width: 31rem; isolation: isolate; }
.p3d__info::before { content: ""; position: absolute; inset: -50px -80px -40px -60px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(255, 255, 255, .85), rgba(255, 255, 255, .55) 60%, rgba(255, 255, 255, 0)); }
.p3d__lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.55; color: #4a4450; max-width: 26rem; }
/* bottom right: the colour in its own box */
.p3d__colors { padding: 16px 18px 18px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-card); outline: 1px solid var(--line); outline-offset: -1px; }
/* right edge, middle: real photos in a column */
/* the photo column and its preview sit above everything else in the stage (2026-11-19): the text block,
   the colour box and the crumbs come later in the markup and used to paint over the preview */
.p3d__mid { position: absolute; z-index: 20; right: clamp(16px, 3vw, 40px); top: 50%; transform: translateY(-50%); }
.p3d__photos { position: relative; }
.p3d__photos-in { display: flex; flex-direction: column; gap: 10px; width: 76px; }
/* big preview to the left of the column: it never covers the thumbnails */
.p3d__preview { position: absolute; right: calc(100% + 16px); top: 50%; width: min(400px, 34vw, 52vh); aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #efefef; pointer-events: none;
  box-shadow: 0 0 0 4px #fff, 0 24px 50px -20px rgba(28, 26, 34, .5); opacity: 0; transform: translate(10px, -50%) scale(.96); transform-origin: 100% 50%;
  transition: opacity .22s var(--ease-out), transform .32s var(--ease-out); }
.p3d__preview.is-on { opacity: 1; transform: translate(0, -50%) scale(1); }
.p3d__preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* label of the colour pickers: a span (the legend is sr-only, Safari would draw it on the border) */
.pick-label { display: block; margin-bottom: .625rem; }
/* under 1024 px the hero colour is moved into the text block (shop.js): no box, a label and a row of
   boxes between price and Acquista */
.p3d__info .p3d__colors { margin-bottom: 24px; padding: 0; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; outline: 0; }
.p3d__info .p3d__colors .tones { flex-wrap: wrap; gap: 16px; }
.p3d__info .p3d__colors .tone__box { width: 48px; height: 32px; border-radius: 9px; }
/* a thumbnail grows to the left over the stage on hover, focus or tap, anchored on the right edge */
.p3d-photo { position: relative; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #efefef; cursor: zoom-in; transition: box-shadow .2s var(--ease-out), transform .2s var(--ease-out);
  box-shadow: 0 0 0 2px #fff, 0 6px 16px -8px rgba(28, 26, 34, .4); transform-origin: 100% 50%; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-radius .35s var(--ease-out); }
.p3d-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.p3d-photo[aria-current="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); transform: translateX(-3px); }
.p3d-photo:focus-visible { outline: 3px solid var(--ac-cyan); outline-offset: 4px; }

/* guided steps under the hero */
.step--light { background: var(--paper); }
.step--blush { background: var(--blush); }
/* step 1: the chosen colourway as a full-width photo, cross-faded on change; the picker sits at the top of
   the section and docks into the bar on the next step */
.shot { position: relative; height: calc(100svh - 136px); min-height: 520px; overflow: hidden; background: #d6d4cf; }
.shot::after { content: ""; position: absolute; inset: 0 0 auto; height: 45%; background: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0)); pointer-events: none; }
.shot__media { position: absolute; inset: 0; }
.shot__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; opacity: 0; transform: scale(1.04);
  transition: opacity .6s var(--ease-out), transform 1.2s var(--ease-out); }
.shot__img.is-on { opacity: 1; transform: none; }
.shot__blur { position: absolute; inset: -80px; background: center / cover no-repeat; filter: blur(50px) saturate(1.15); transform: scale(1.1); }
@media (min-width: 1024px) {   /* a square photo on a wide section: right side, full height, faded on its left edge */
  .shot__img.shot__img--sq { left: auto; right: 0; width: auto; height: 100%; object-position: 50% 50%;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 26%); mask-image: linear-gradient(to right, transparent, #000 26%); }
}
/* a dark photo (evening desk): white texts on a dark veil at the top */
.shot--dark::after { height: 60%; background: linear-gradient(rgba(16, 12, 10, .72), rgba(16, 12, 10, 0)); }
.shot--dark .shot__ui, .shot--dark .shot__ui .t-lead { color: #fff; }
.shot--dark .shot__ui .t-eyebrow { color: #f2c66b; }
.shot__ui { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding-top: clamp(28px, 5vw, 64px); padding-bottom: clamp(28px, 5vw, 56px); }
.shot.shot--nobar { height: calc(100svh - 72px); }   /* no bar over the colour step: only the header */
/* the colour picker of the step, in a light box that reads on any photo (also the dark ones) */
.shot__colors { display: inline-block; margin-top: 24px; padding: 14px 16px 16px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card); outline: 1px solid var(--line); outline-offset: -1px; color: var(--ink); }
/* Continua: from 768 px in the colour box, full width under the colours (or under the texts when the
   gadget has no colours); on phones the low button in the middle of the section */
.shot__go--in { display: none; }
@media (min-width: 768px) {
  .shot__go--low { display: none; }
  .shot__go--in { display: flex; width: 100%; margin-top: 16px; }
  .shot__go--text { display: inline-flex; width: auto; margin-top: 24px; }
  /* more than two colours (libreria, freccia): rows of two, the box grows taller, not wider */
  .shot__colors--grid .tones { display: grid; grid-template-columns: repeat(2, max-content); }
}
/* quantity: presets, slider, tiers, quote */
.qpick { display: flex; flex-wrap: wrap; gap: 10px; }
.qpick__btn { min-width: 64px; min-height: 52px; padding: 0 1rem; border-radius: 14px; border: 2px solid var(--line); background: var(--paper); font: 800 1.125rem/1 var(--font-sans); color: var(--ink); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.qpick__btn:hover { border-color: #dcc3d4; }
.qpick__btn[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: #fff; box-shadow: 0 4px 0 #000; transform: translateY(-2px); }
.qpick__btn:focus-visible { outline: 3px solid var(--ac-cyan); outline-offset: 3px; }
.qrow { display: flex; flex-wrap: wrap; gap: 10px; }
.qpick__field input { width: 112px; min-height: 52px; padding: 0 .9rem; border-radius: 14px; border: 2px solid var(--line); background: var(--paper); text-align: center;
  font: 800 1.125rem/1 var(--font-sans); color: var(--ink); transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
.qpick__field input::placeholder { color: #8d8691; font-weight: 600; }
.qpick__field input:hover { border-color: #dcc3d4; }
.qpick__field input:focus { outline: none; border-color: var(--ac-cyan); box-shadow: 0 0 0 4px rgba(35, 174, 205, .2); }
.qpick__field.is-on input { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 6px; cursor: pointer;
  background: linear-gradient(var(--ac-magenta), var(--ac-magenta)) 0 / var(--fill, 0%) 100% no-repeat, var(--blush-3); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--ac-magenta); box-shadow: 0 3px 0 var(--ac-magenta-edge); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--ac-magenta); box-shadow: 0 3px 0 var(--ac-magenta-edge); }
.range:focus-visible { outline: 3px solid var(--ac-cyan); outline-offset: 6px; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tiers li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 2px dashed var(--line); transition: border-color var(--t-base) var(--ease-out), background-color var(--t-base) var(--ease-out); }
.tiers li.is-on { border-style: solid; border-color: var(--ac-magenta); background: #fff; }
.tiers__off { font-size: .8125rem; font-weight: 600; color: var(--ac-mauve-ink); }
.quote { position: sticky; top: 152px; padding: clamp(22px, 3vw, 32px); border-radius: 28px; background: var(--paper); box-shadow: var(--shadow-card); outline: 1px solid var(--line); outline-offset: -1px; }
.quote__rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; font-size: .9375rem; }
.quote__rows > div[hidden] { display: none; }   /* the discount row only when there is one */
.quote__rows dt { color: var(--muted); font-weight: 600; }
.quote__rows dd { font-weight: 700; }
.quote__save { color: var(--ok); font-weight: 800; }
.quote__total { font: 800 clamp(2rem, 1.6rem + 1.4vw, 2.75rem)/1 var(--font-sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
/* colour boxes: each split in two, shell | keycap; selected like a pressed key */
.tones { display: flex; gap: 16px; }   /* 2026-11-20: more room between the colour boxes (the checked ring takes 4 px) */
.tone { position: relative; cursor: pointer; }
.tone input { position: absolute; opacity: 0; pointer-events: none; }
.tone__box { display: flex; width: 64px; height: 42px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--line); transition: box-shadow var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out); }
.tone__box i { flex: 1; }
.tone:hover .tone__box { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #dcc3d4; }
.tone input:checked + .tone__box { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink), 0 6px 0 2px var(--ink); transform: translateY(-2px); }
.tone input:focus-visible + .tone__box { outline: 3px solid var(--ac-cyan); outline-offset: 6px; }
.tone__box--sm { width: 34px; height: 22px; border-radius: 7px; box-shadow: 0 0 0 1px rgba(34, 33, 33, .12); flex: none; }
/* docked bar under the header, once the stage has scrolled away */
.p3d-bar { position: fixed; left: 0; right: 0; top: 72px; z-index: 39; height: 64px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line); box-shadow: 0 14px 30px -24px rgba(28, 26, 34, .5); transform: translateY(-100%); opacity: 0; visibility: hidden;
  transition: transform .4s var(--ease-out), opacity .25s var(--ease-out), visibility 0s .4s; }
.p3d-bar.is-on { transform: none; opacity: 1; visibility: visible; transition: transform .4s var(--ease-out), opacity .25s var(--ease-out), visibility 0s; }
.p3d-bar .key { min-height: 44px; }
.p3d-bar__in { position: relative; }
/* order summary in the bar, from step 1 down: colour boxes, then the NFC choice once saved */
.p3d-bar__sum { display: none; }
.p3d-bar.has-sum .p3d-bar__sum { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 16px; animation: barColours .35s var(--ease-out); }
.p3d-bar.has-sum [data-bar-tone] { display: none; }
.p3d-bar--dock.has-sum .p3d-bar__sum { animation: none; }   /* with colours the boxes dock in (shop.js dock()) */
.p3d-bar__colors { display: flex; align-items: center; gap: 14px; }
.p3d-bar__nfc { display: inline-flex; align-items: center; gap: 8px; height: 34px; max-width: 240px; padding: 0 12px; border-radius: 10px; background: var(--blush-2); font-size: .8125rem; white-space: nowrap; }
.p3d-bar__nfc[hidden] { display: none; }
/* bar summary: colours and NFC chip lead back to their step */
.p3d-bar__colors { cursor: pointer; }
.p3d-bar__nfc { border: 0; color: inherit; font-family: inherit; cursor: pointer; transition: background var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out); }
.p3d-bar__nfc:hover { background: #f1d9e7; }
.p3d-bar__nfc:active { transform: scale(.96); }
.p3d-bar__nfc:focus-visible { outline: 3px solid var(--ac-cyan); outline-offset: 3px; }
.p3d-bar__nfc b { font-weight: 800; }
.p3d-bar__nfc-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 500 .75rem/1 var(--font-mono); color: var(--ac-cyan-ink); }
.p3d-bar__nfc.is-new { animation: nfcSaved .5s var(--ease-out); }
@keyframes nfcSaved { 0% { opacity: 0; transform: scale(.8); } 60% { opacity: 1; transform: scale(1.06); } }
.p3d-bar__short { display: none; }
/* step 2: no NFC */
.optout { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out); }
.optout:hover { border-color: #dcc3d4; }
.optout:has(input:checked) { border-color: var(--ink); }
.optout input { position: absolute; opacity: 0; pointer-events: none; }
.optout__box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; border: 2px solid #cdb7c6; background: #fff; color: #fff; transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out); }
.optout__box svg { width: 14px; height: 14px; opacity: 0; transform: scale(.4); transition: opacity var(--t-fast) var(--ease-out), transform var(--t-base) var(--ease-out); }
.optout input:checked + .optout__box { background: var(--ink); border-color: var(--ink); }
.optout input:checked + .optout__box svg { opacity: 1; transform: none; }
.optout input:focus-visible + .optout__box { outline: 3px solid var(--ac-cyan); outline-offset: 3px; }
.optout__off { flex: none; margin-left: auto; padding: .35rem .5rem; border-radius: 8px; background: rgba(15, 122, 67, .1); color: var(--ok); font: 700 .8125rem/1 var(--font-mono); }
.field.is-off { opacity: .45; transition: opacity var(--t-base) var(--ease-out); }
.nfcfx.is-off { opacity: .35; filter: grayscale(1); }
.nfcfx { transition: opacity .4s var(--ease-out), filter .4s var(--ease-out); }
/* trophies: the scene follows the chosen version (one drawing per version) */
.nfcfx .fx-v--artcode, .nfcfx[data-variant="artcode"] .fx-v--oro { display: none; }
.nfcfx[data-variant="artcode"] .fx-v--artcode { display: inline; }
@media (max-width: 1023px) {
  .p3d-bar.has-sum .p3d-bar__name { display: none; }   /* no room: the summary and the action only */
  .p3d-bar.has-sum .p3d-bar__sum { position: static; transform: none; animation: none; }
  .p3d-bar__colors .tone:not(:has(input:checked)) { display: none; }   /* no room: only the chosen colour */
}
.p3d-bar__colors .tone__box { width: 54px; height: 34px; border-radius: 10px; }
@keyframes barColours { from { opacity: 0; transform: translate(-50%, -30%); } }
.p3d-panel { padding: clamp(20px, 3vw, 32px); border-radius: 28px; background: var(--blush); color: var(--ink); }
.p3d-specs { border-radius: 28px; background: var(--blush); color: var(--ink); }
.p3d-specs summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 22px clamp(20px, 3vw, 32px); font-weight: 800; font-size: 1.125rem; cursor: pointer; border-radius: 28px; }
.p3d-specs summary::-webkit-details-marker { display: none; }
.p3d-specs summary:focus-visible { outline: 3px solid var(--ac-cyan); outline-offset: 3px; }
.p3d-specs .acc__icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--blush-2); color: var(--ac-mauve-ink); font: 700 1.05rem/1 var(--font-mono); transition: transform var(--t-base) var(--ease-out); }
.p3d-specs[open] .acc__icon { transform: rotate(45deg); }
.p3d-specs__body { padding: 4px clamp(20px, 3vw, 32px) clamp(22px, 3vw, 32px); border-top: 1px solid var(--line); padding-top: 24px; }
@media (max-width: 767px) {
  .p3d { height: calc(100svh - 72px); min-height: 680px; }
  .p3d__ui { padding: 16px 16px var(--g-end, 24px); }
  /* spacing of the bottom block on phones (2026-11-20), 8 px grid, proximity: three groups (colours / name
     to price / buttons), the space between groups about twice the space inside them */
  .p3d { --g-colours: 32px; --g-title: 8px; --g-lead: 16px; --g-cta: 24px; --g-end: 24px; }
  .p3d__row--bottom { flex-direction: column; align-items: stretch; gap: 14px; }
  .p3d__info::before { inset: -40px -30px -30px -30px; }
  .p3d__info .p3d__colors { margin-bottom: 20px; }
  .p3d__info .p3d__colors .tones { gap: 14px; }   /* five still fit from 320 px */
  .p3d__info .p3d__colors .tone__box { width: 44px; height: 30px; border-radius: 9px; }   /* five fit from 320 px */
  /* phones (Ignazio, 2026-11-20): the four thumbnails in a row, top centre, under the crumbs; the model in
     the middle of the free space (product3d.js frames it between the thumbnails and the texts); a compact
     text block bottom left: code tag on the title row, price on the "a partire da" row, colour boxes
     without their label */
  .p3d__mid { left: 50%; right: auto; top: 50px; transform: translateX(-50%); }
  .p3d__photos-in { flex-direction: row; width: auto; gap: 8px; }
  .p3d-photo { width: clamp(56px, (100vw - 62px) / 4, 64px); border-radius: 10px; transform-origin: 50% 0; }   /* bigger thumbs, four always on one row */
  .p3d__preview { display: none; }   /* phones: the carousel below replaces the hover preview */
  /* photo carousel (shop.js photoCarousel): under the thumbnails, almost full width, swipe with snap,
     round arrows on the sides, close top right, dots under the photo */
  .p3d__car { position: absolute; left: 50%; top: calc(100% + 12px); width: min(340px, calc(100vw - 32px)); pointer-events: none;
    opacity: 0; transform: translate(-50%, -6px) scale(.97); transform-origin: 50% 0; transition: opacity .22s var(--ease-out), transform .3s var(--ease-out); }
  .p3d__car.is-open { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
  .p3d__car.is-open * { pointer-events: auto; }
  .p3d__car-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; aspect-ratio: 1;
    border-radius: 20px; background: #efefef; box-shadow: 0 0 0 4px #fff, 0 24px 50px -20px rgba(28, 26, 34, .5); outline: none; }
  .p3d__car-track::-webkit-scrollbar { display: none; }
  .p3d__car-track:focus-visible { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--ac-cyan); }
  .p3d__car-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
  .p3d__car-slide img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
  .p3d__car-btn { position: absolute; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 6px 16px -6px rgba(28, 26, 34, .45); transition: opacity .2s, transform .2s var(--ease-out); }
  .p3d__car-btn svg { width: 20px; height: 20px; }
  .p3d__car-btn:active { transform: scale(.92); }
  .p3d__car-btn:focus-visible { outline: 3px solid var(--ac-cyan); outline-offset: 2px; }
  .p3d__car-btn--prev, .p3d__car-btn--next { top: calc((100% - 42px) / 2 - 20px); }   /* middle of the photo (the dots row takes 42 px) */
  .p3d__car-btn--prev { left: 10px; }
  .p3d__car-btn--next { right: 10px; }
  .p3d__car-btn:disabled { opacity: 0; pointer-events: none; }
  .p3d__car-close { top: 10px; right: 10px; width: 36px; height: 36px; }
  .p3d__car-dots { display: flex; justify-content: center; gap: 2px; width: fit-content; height: 32px; margin: 10px auto 0; padding: 4px 8px; border-radius: 999px;
    background: rgba(255, 255, 255, .94); box-shadow: 0 6px 16px -8px rgba(28, 26, 34, .4); }   /* a pill: readable over the texts below */
  .p3d__car-dot { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; }   /* 24 px tap area */
  .p3d__car-dot i { display: block; width: 8px; height: 8px; border-radius: 999px; background: rgba(28, 26, 34, .25); transition: width .25s var(--ease-out), background .25s; }
  .p3d__car-dot[aria-current="true"] i { width: 22px; background: var(--ink); }
  .p3d__car-dot:focus-visible { outline: 3px solid var(--ac-cyan); outline-offset: 0; border-radius: 8px; }
  .p3d-photo[aria-current="true"] { transform: translateY(-2px); }
  .p3d__preview { left: 50%; right: auto; top: calc(100% + 12px); width: min(260px, 68vw); transform: translate(-50%, -6px) scale(.96); transform-origin: 50% 0; }
  .p3d__preview.is-on { transform: translate(-50%, 0) scale(1); }
  .p3d__info { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; max-width: none; }
  .p3d__info > * { grid-column: 1 / -1; }
  .p3d__info > #p3d-title { grid-column: 1; margin: 0 0 var(--g-title); font-size: clamp(1.875rem, 1.2rem + 3vw, 2.375rem); line-height: 1.05; }
  .p3d__info > .code-tag { grid-column: 2; justify-self: end; max-width: 40vw; margin: .4rem 0 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* one line: shop.js fitCode() */
  /* fixed rows: the badges (hidden under 481 px) would leave row 1 free for the next item */
  /* colour boxes first, centred right under the model (2026-11-20), then the texts */
  .p3d__info > .p3d__colors { grid-row: 1; justify-self: center; }
  .p3d__info > .p3d__badges { grid-row: 2; }
  .p3d__info > #p3d-title, .p3d__info > .code-tag { grid-row: 3; }
  .p3d__info > .p3d__lead { grid-row: 4; }
  .p3d__info > .p3d__price { grid-row: 5; }
  .p3d__info > [data-buy-row] { grid-row: 6; }
  .p3d__info .p3d__lead { margin-bottom: var(--g-lead); font-size: .9375rem; line-height: 1.45; }
  .p3d__info .p3d__price { display: flex; align-items: center; gap: 10px; margin-bottom: var(--g-cta); }   /* the price right after "a partire da" */
  .p3d__info .p3d__price > span:first-child { margin: 0; line-height: 1; }   /* "a partire da" on the middle line of the price */
  .p3d__info .p3d__price > span:last-child { line-height: 1; }
  .p3d__info .p3d__price > span:last-child { font-size: 1.75rem; }
  .p3d__info .p3d__colors .pick-label { display: none; }   /* the boxes only; the legend stays for screen readers */
  .p3d__info .p3d__colors { margin-bottom: var(--g-colours); }
  .p3d__info .p3d__colors .tones { justify-content: center; }
  .p3d__info [data-buy-row] { flex-wrap: nowrap; gap: 10px; }
  .p3d__info [data-buy-row] .key { flex: 1 1 0; justify-content: center; min-width: 0; }
  /* drag hint: shows for 3 s once the model is ready (product3d.js), above the text block */
  .p3d__toast { display: flex; position: absolute; left: 50%; top: var(--hint-y, 62%); z-index: 15; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
    background: rgba(28, 24, 34, .84); color: #fff; font: 500 .8125rem/1.2 var(--font-mono); white-space: nowrap; pointer-events: none;
    opacity: 0; transform: translate(-50%, calc(-100% + 8px)); transition: opacity .35s var(--ease-out), transform .45s var(--ease-out); }
  .p3d__toast svg { width: 18px; height: 18px; flex: none; animation: p3d-nudge 1.6s var(--ease-out) infinite; }
  .p3d.show-hint .p3d__toast { opacity: 1; transform: translate(-50%, -100%); }
  .quote { position: static; }
  /* phones: the photo is zoomed out (wider than the screen, not cropped to its height) and fades top
     and bottom into a backdrop of its own edge colours, so the product has room around it. The 16:9
     photos keep the product right of centre (top left is for the text): shifted so it sits centred */
  .shot { height: calc(100svh - 136px); min-height: 500px; background: linear-gradient(#d7d2cd, #d3cfca); }
  .shot__img { inset: auto; left: 50%; top: 58%; width: 180%; max-width: none; height: auto; object-fit: fill; transform: translate(-59%, -50%) scale(1.04);
    -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent); }
  .shot__img.is-on { transform: translate(-59%, -50%); }
  /* a square photo: full width at the bottom, faded into its blurred copy, the texts above it */
  .shot__img.shot__img--sq { inset: auto 0 0 0; left: 0; top: auto; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transform: scale(1.04); transform-origin: 50% 100%;
    -webkit-mask-image: linear-gradient(transparent, #000 24%); mask-image: linear-gradient(transparent, #000 24%); }
  .shot__img.shot__img--sq.is-on { transform: none; }
  /* every product (2026-11-19, from the prototype): white section, texts and colours, then the photo of
     the colour in a square card with the product in the middle (--card-pos, from the product), then
     Continua; no blurred backdrop, no gradients. .shot__ui is flattened (display: contents) so the card
     sits between the texts and the button. The rules above for phones stay for a section without the card */
  .shot.shot--card { height: auto; min-height: 0; display: flex; flex-direction: column; background: #fff; padding: 28px 16px 36px; }
  .shot--card::after { display: none; }
  .shot--card .shot__ui { display: contents; }
  .shot--card .shot__ui > div:first-child { order: 0; }
  .shot--card .shot__media { position: relative; inset: auto; order: 1; width: 100%; aspect-ratio: 1; margin-top: 24px; border-radius: 24px; overflow: hidden;
    background: #e9e7e3; box-shadow: var(--shadow-card); outline: 1px solid var(--line); outline-offset: -1px; }
  .shot--card .shot__blur { display: none; }
  .shot--card .shot__img, .shot--card .shot__img.shot__img--sq { inset: 0; left: 0; top: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: var(--card-pos);
    transform: scale(1.04); transform-origin: 50% 50%; -webkit-mask-image: none; mask-image: none; }
  .shot--card .shot__img.is-on { transform: none; }
  .shot--card .shot__go--low { order: 2; margin-top: 24px; }
  .shot--card.shot--dark .shot__ui { color: var(--ink); }   /* a dark photo sits in the card: dark texts on white */
  .shot--card.shot--dark .shot__ui .t-lead { color: var(--muted); }
  .shot--card.shot--dark .shot__ui .t-eyebrow { color: var(--ac-cyan-ink); }
  .shot__colors { margin-top: 18px; padding: 8px 10px 8px 14px; border-radius: 16px; display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 12px; }
  .shot__colors .pick-label { margin: 0; }   /* label and boxes on one line */
  .shot__colors .tone__box { width: 40px; height: 28px; border-radius: 8px; }
  .p3d-bar.has-sum .p3d-bar__sum, .p3d-bar__colors { gap: 10px; }   /* phones: boxes, a short NFC chip, a short action */
  .p3d-bar__colors > span, .p3d-bar__nfc-v, .p3d-bar__long { display: none; }
  .p3d-bar__short { display: inline; }
  .p3d-bar__nfc { padding: 0 10px; }
  .p3d-bar__colors .tone__box { width: 44px; height: 30px; border-radius: 9px; }
  .tone__box.tone__box--sm { width: 30px; height: 20px; border-radius: 6px; }   /* keep the small chip small */
  .qpick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; flex: 1 1 100%; }
  .qrow { gap: 8px; }
  .qpick__field { flex: 1 1 100%; }
  .qpick__field input { width: 100%; }
  .qpick__btn { min-width: 0; padding: 0; }
  .tones { gap: 14px; }
  .tone__box { width: 44px; height: 34px; border-radius: 10px; }
  .p3d__hint { display: none; }
}
@media (min-width: 768px) { .p3d__toast, .p3d__car { display: none; } }
@media (prefers-reduced-motion: reduce) { .p3d__car, .p3d__car-dot i { transition: none; } }
@media (prefers-reduced-motion: reduce) { .p3d__toast, .p3d__toast svg { transition: none; animation: none; } }
@media (max-width: 480px) { .p3d__badges { display: none !important; } }

/* ---------- layout of the page ---------- */
[hidden]:where(:not([hidden="until-found"])) { display: none; }   /* as in shop.css: hidden wins over the styles above */
.legend-gap { margin-bottom: .625rem; }
.crumbs { padding-top: 1.5rem; padding-bottom: .5rem; }
.crumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.crumbs__current { color: var(--ink); font-weight: 600; }
.product-wrap { padding-top: 1.5rem; padding-bottom: 5rem; }
.related { padding-top: 5rem; padding-bottom: 5rem; }
.related__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.legend-sm { font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.variant-grid { display: grid; gap: .75rem; }
.variant__label { display: block; font-weight: 700; line-height: 1.25; }
.as-block { display: block; }
.product-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: flex-start; }
.thumbs-row { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .25rem; }
.price-lg { font-size: 1.875rem; line-height: 2.25rem; font-weight: 800; letter-spacing: -.025em; }
.buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.prose > * + * { margin-top: 1rem; }
.prose { font-size: 1.0625rem; line-height: 1.625; }
.feature { display: flex; gap: .75rem; }
.price-xl { font-size: 2.25rem; line-height: 2.5rem; font-weight: 800; letter-spacing: -.025em; }
.lead--narrow { max-width: 28rem; }
.align-center { align-self: center; }
.p3d-specs--gap { margin-top: 2.5rem; }
.p3d-specs__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.prose--tight > * + * { margin-top: .75rem; }
.prose--tight { font-size: 1.0625rem; line-height: 1.625; }
.nfc-step__lead { font-size: 1.0625rem; line-height: 1.625; }
.optout__title { display: block; font-weight: 700; }
/* minmax(0, ...): a long link for the tag must be cut with the dots, not widen the page */
.quote-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: flex-start; }
.qty-out { font-weight: 600; }
.range-ends { display: flex; justify-content: space-between; }
.quote__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.quote__item { display: flex; align-items: center; gap: .75rem; padding-bottom: 1.25rem; border-bottom-width: 1px; border-color: var(--line); }
.quote__name { font-weight: 800; line-height: 1.25; }
.quote__full { margin-right: .5rem; }
.quote__nudge { color: var(--ac-mauve-ink); font-weight: 600; }
.quote__total-row { display: flex; align-items: baseline; justify-content: space-between; padding-top: 1.25rem; border-top-width: 1px; border-color: var(--line); }
.p3d-bar__row { height: 100%; display: flex; align-items: center; gap: .75rem; }
.p3d-bar__id { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.p3d-bar__title { display: block; font-weight: 800; line-height: 1.25; }
.push-right { margin-left: auto; }
@media (min-width: 640px) {
  .product-wrap { padding-bottom: 6rem; }
  .related { padding-top: 6rem; padding-bottom: 6rem; }
  .variant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p3d-bar__row { gap: 1rem; }
}
@media (min-width: 1024px) {
  .product-cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3.5rem; }
  .p3d-specs--gap { margin-top: 3.5rem; }
  .p3d-specs__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; }
  .quote-cols { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4rem; }
}

.buy-row__main { flex: 1 1 0%; min-width: 14rem; }   /* the add-to-cart key takes the row */

/* set by shop.js on the steps: where a step stops when scrolled to (under the header, or under header and product bar) */
.under-header { scroll-margin-top: 72px; }
.under-bars { scroll-margin-top: 136px; }
.clip { overflow: hidden; }

/* the product written by the server, before shop.js builds the stage in its place: invisible while the script is
   expected, so the page does not flash; it shows by itself if the script never arrives */
.js .product-plain { animation: product-plain-in 0s 3s both; }
/* while the script is expected the block takes the whole screen, as the stage will: what follows stays below
   the fold and does not jump when the stage arrives */
.js [data-product] { min-height: 100vh; }
@keyframes product-plain-in { from { visibility: hidden; } to { visibility: visible; } }
