/* PDP (Figma "pdp" 10904:50300) — layout from Figma at 1440, type from the other
   pages. The interactive "Scheda tecnica" follows the flow slides; chips, swatch
   grid and drawer are in materials.css. */

.pdp main {
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* warm wash behind the top of the page */
.pdp main::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 1170px;
  background: linear-gradient(#fff6eb 40.9%, rgb(255 246 235 / 0));
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.pdph {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  height: 100vh;
  height: 100svh;
  min-height: 560px;
}
.pdph__media {
  min-height: 0;
  overflow: hidden;
}
.pdph__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 80px;
  padding: 0 16px;
  text-align: center;
}
.pdph__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pdph__name {
  font-size: var(--dv-statement);
  line-height: 1;
  margin-bottom: 8px;
}
.pdph__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

/* ---------- Product + statement ---------- */
.pdp-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 68px 10px 120px;
}
.pdp-intro__shot {
  height: calc(463px * var(--pdp-shot, 1)); /* panel: Product cut-out size */
  max-width: 100%;
  object-fit: contain;
}
.pdp-intro__quote {
  max-width: var(--st-max, 1292px);
  margin-top: 48px;
  font-family: var(--font-davinci);
  font-weight: var(--dv-weight, 500);
  font-size: var(--dv-statement);
  line-height: var(--dv-st-leading, 0.95);
  letter-spacing: var(--dv-st-tracking, -0.02em);
  text-align: center;
  text-wrap: balance;
}

/* ---------- Scheda tecnica ---------- */
.scheda {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 60px;
  scroll-margin-top: 60px;
}
.scheda__panel {
  display: flex;
  gap: 16px;
  min-height: 480px;
  padding: 16px;
  background: rgb(0 0 0 / 0.02);
  animation: scheda-in 400ms ease both;
}
.scheda__panel[hidden] {
  display: none;
}
@keyframes scheda-in {
  from {
    opacity: 0;
  }
}
.scheda__panel--wide {
  flex-direction: column;
  gap: 24px;
}
.scheda__panel--media {
  padding: 0 0 0 16px;
}
.scheda__panel--media .scheda__col {
  padding: 16px 0;
}
.scheda__col {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 50%;
  min-width: 0;
}
.scheda__col--grow {
  flex: 1;
  width: auto;
}
.scheda__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 560px;
}
.scheda__head .t-26 {
  margin-bottom: 4px;
}
.scheda__head .muted-50 {
  margin-top: 10px;
}
.scheda__side {
  width: 26%;
  max-width: 378px;
  align-self: stretch;
  object-fit: cover;
}
.specs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 533px;
  margin: 0;
}
.specs dt {
  opacity: 0.5;
}
.specs dd {
  margin: 0;
}
.downloads {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: auto;
}
.downloads a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}
.downloads span,
.downloads img {
  opacity: 0.5;
}
.downloads a:hover img {
  opacity: 1;
}

/* Panoramica: product + swatches */
.configurator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 50%;
  padding-bottom: 16px;
}
.configurator__stage {
  position: relative;
  height: 260px;
}
.configurator__img {
  height: 100%;
  transition: opacity 180ms ease;
}
.is-swapping .configurator__img {
  opacity: 0;
}
/* stand-in recolour: the swatch texture, masked by the shot, blended in "color" */
.configurator__tint {
  position: absolute;
  inset: 0;
  background: var(--tint-img) center / 120px;
  -webkit-mask: var(--shot) center / contain no-repeat;
  mask: var(--shot) center / contain no-repeat;
  mix-blend-mode: color;
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}
.is-tinted .configurator__tint {
  opacity: 0.85;
}
.configurator__swatches {
  display: flex;
  gap: 8px;
}
.pswatch {
  position: relative;
}
.pswatch button {
  display: block;
  width: var(--sw-product, 24px);
  height: var(--sw-product, 24px);
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  cursor: pointer;
}
.pswatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pswatch.is-on button {
  border-color: var(--black);
}
/* tooltip (10904:50193) */
.ptip {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 4px;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.8);
  box-shadow: 0 0 17px rgb(0 0 0 / 0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: calc(var(--ft-size, 14px) * 12 / 14);
  white-space: nowrap;
  opacity: 0;
  translate: 0 4px;
  pointer-events: none;
  transition:
    opacity 200ms ease,
    translate 200ms ease;
}
.ptip a {
  margin-top: 4px;
  opacity: 0.5;
}
.ptip a:hover {
  opacity: 1;
  text-decoration: underline;
}
.pswatch:hover .ptip,
.pswatch:focus-within .ptip {
  opacity: 1;
  translate: 0 0;
  pointer-events: auto;
}
/* keep the tooltip reachable while moving the cursor down to it */
.pswatch::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 8px;
}

/* Units (cm / in) */
.units {
  display: flex;
  gap: 16px;
  font-size: calc(var(--ft-size, 14px) * 12 / 14);
}
.units button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  opacity: 0.5;
  cursor: pointer;
}
.units button.is-on {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dimensioni */
.dims {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dims__label {
  margin-top: 18px;
  font-size: calc(var(--ft-size, 14px) * 11 / 14);
}
.dims__label:first-child {
  margin-top: 0;
}
.dims__table {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 4px 16px;
  margin: 0;
}
.dims__table dd {
  margin: 0;
}
.dims__drawing {
  width: 50%;
  aspect-ratio: 680 / 465;
  object-fit: contain;
  align-self: flex-start;
}

/* Materiali */
.mats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.mat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 160px;
}
.mat img {
  width: 100%;
  aspect-ratio: 207 / 292;
  object-fit: cover;
}
.mat small {
  font-size: calc(var(--ft-size, 14px) * 12 / 14);
  opacity: 0.5;
}

/* Composizioni */
.comps {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.comps::-webkit-scrollbar {
  display: none;
}
.comps__track {
  display: flex;
  gap: 100px;
  width: max-content;
  padding-right: 16px; /* the column lost its own (it runs up to the video) */
}
.comp {
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-snap-align: start;
}
.comp__drawing {
  position: relative;
  overflow: hidden;
}
.comp__drawing img {
  position: absolute;
  max-width: none;
}
.comp__info {
  margin-top: 20px;
  font-size: calc(var(--ft-size, 14px) * 12 / 14);
}
.comps__nav {
  display: flex;
  gap: 16px;
  margin-top: auto;
}
.comps__nav button {
  display: grid;
  place-items: center;
  width: 43px;
  height: 25px;
  border: 0;
  border-radius: 2px;
  background: rgb(0 0 0 / 0.05);
  cursor: pointer;
}
.comps__nav button:hover {
  background: rgb(0 0 0 / 0.1);
}

/* ---------- Gallery, combinations, designer, related ---------- */
.pdp-gallery {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 100px;
}
.pdp-gallery__big {
  width: 50%;
  aspect-ratio: 720 / 810;
  object-fit: cover;
}
.pdp-gallery__small {
  width: 25%;
  aspect-ratio: 360 / 405;
  object-fit: cover;
}
/* Combinations (Figma 10971:42818): photos 490 wide at 1440 (34vw), 80px + arrow + 80px
   apart; the current one centered (pdp.js sets --i); arrows in the middle of the gaps;
   the caption under the current photo, from the page's middle + 8px */
.pdp-combos {
  --w: calc(490 / 1440 * 100vw);
  --gap: calc(80 / 1440 * 100vw * 2 + 45px); /* 80 each side of the arrow */
  position: relative;
  margin-top: 142px;
  overflow: hidden;
}
.pdp-combos__track {
  display: flex;
  gap: var(--gap);
  translate: calc(50vw - var(--w) / 2 - var(--i, 1) * (var(--w) + var(--gap))) 0;
  transition: translate 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pdp-combos figure {
  flex: 0 0 var(--w);
  margin: 0;
  padding: 10px;
  cursor: pointer;
}
.pdp-combos figure.is-on {
  cursor: default;
}
.pdp-combos img {
  display: block;
  width: 100%;
  aspect-ratio: 1240 / 827;
  object-fit: cover;
}
.pdp-combos__arrow {
  position: absolute;
  top: calc((var(--w) - 20px) * 827 / 1240 / 2 + 10px);
  translate: -50% -50%;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 2px;
  background: rgb(0 0 0 / 0.05);
  -webkit-backdrop-filter: blur(17px);
  backdrop-filter: blur(17px);
  cursor: pointer;
  transition: background-color var(--cta-duration, 400ms) ease;
}
.pdp-combos__arrow:hover {
  background: rgb(0 0 0 / 0.1);
}
.pdp-combos__arrow svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}
.pdp-combos__arrow--prev {
  left: calc(50% - var(--w) / 2 - var(--gap) / 2);
}
.pdp-combos__arrow--next {
  left: calc(50% + var(--w) / 2 + var(--gap) / 2);
}
.pdp-combos__caption {
  display: flex;
  flex-direction: column;
  margin: 16px 0 0 calc(50% + 8px);
  max-width: 282px;
  color: rgb(0 0 0 / 0.8);
  transition: opacity 300ms ease;
}
.pdp-combos__desc {
  color: rgb(0 0 0 / 0.4);
}
.pdp-wide {
  width: 100%;
  aspect-ratio: 1440 / 959;
  margin-top: 142px;
  object-fit: cover;
}
.pdp-designer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 565px;
  margin-top: 60px;
  padding: 0 16px;
}
.pdp-related {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 100px 0 120px;
}
/* the stacks' shared "extra space above" adds to its own margin (it replaced it, and the
   block ran into the designer's text) */
main > .pdp-related.home-products {
  margin-top: max(
    60px,
    calc(100px + var(--stack-before, 0px))
  ); /* never closer than 60px */
}
.pdp-related > .text-block {
  padding-block: 0;
}

@media (max-width: 900px) {
  .pdph,
  .scheda__panel {
    grid-template-columns: 1fr;
    flex-direction: column;
    height: auto;
  }
  .scheda__col,
  .configurator,
  .dims__drawing,
  .scheda__side {
    width: 100%;
    max-width: none;
  }
}

/* chips keep their own width inside the panel columns */
.scheda__col > .pchip {
  align-self: flex-start;
}

/* ---------- Layout: tabs or modals (options panel, body[data-layout]) ---------- */
.scheda__open {
  display: none;
  flex-wrap: wrap;
  gap: 12px;
}
[data-layout="modals"] .scheda__tabs {
  display: none;
}
[data-layout="modals"] .scheda__open {
  display: flex;
}
.scheda__tabs .cta {
  font: inherit;
  cursor: pointer;
}
.scheda__open .cta {
  font: inherit;
  cursor: pointer;
}

/* downloads: chips (10905:54472) */
.downloads {
  gap: 2px;
  margin-left: -6px;
}

/* ---------- Dimensioni: one drawing, or one image per group ---------- */
.dimgroups {
  display: none;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}
[data-dims="groups"] .dimgroups {
  display: flex;
}
[data-dims="groups"] .dims-single {
  display: none;
}
.dimgroup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.dimgroup .dims__label {
  margin: 0 0 6px;
}
.dimgroup img {
  max-width: 100%;
  object-fit: contain;
  object-position: left top;
}

/* ---------- Modal (one section at a time, on the right) ---------- */
.smodal {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.smodal__scrim {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.1);
  cursor: pointer;
  opacity: 0;
  transition: opacity 350ms ease;
}
.smodal__panel {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  width: min(696px, calc(100vw - 24px));
  overflow: hidden;
  background: var(--white);
  translate: calc(100% + 24px) 0;
  transition: translate 450ms cubic-bezier(0.22, 1, 0.36, 1);
}
.smodal.is-open .smodal__scrim {
  opacity: 1;
}
.smodal.is-open .smodal__panel {
  translate: 0 0;
}
.smodal__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 12px 0;
}
.smodal__crumbs button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  opacity: 0.5;
  cursor: pointer;
}
.smodal__crumbs span {
  margin: 0 4px;
  opacity: 0.5;
}
.smodal__close {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  opacity: 0.5;
  cursor: pointer;
}
.smodal__close:hover {
  opacity: 1;
}
.smodal__body,
.smodal__detail {
  flex: 1;
  overflow-y: auto;
}
.smodal__body[hidden],
.smodal__detail[hidden] {
  display: none;
}
/* panels inside the modal: one column, no box */
.smodal .scheda__panel {
  flex-direction: column;
  min-height: 0;
  padding: 12px;
  background: none;
  animation: none;
}
.smodal .scheda__col,
.smodal .dims__drawing,
.smodal .scheda__side {
  width: 100%;
  max-width: none;
}
.smodal .scheda__side {
  aspect-ratio: 4 / 5;
}
.smodal .dimgroup {
  grid-template-columns: 1fr;
}
.smodal .filters {
  margin-bottom: 8px;
}
.smodal__detail {
  padding: 12px 12px 0;
}
.smodal__detail .mdetail__img {
  width: 360px;
  max-width: 100%;
}
.smodal__detail .mdetail__body {
  padding: 16px 0;
}
.smodal__detail .mdetail__foot {
  padding: 16px 0;
}

/* Composizioni: video on the right, 4:5, flush with the carousel */
.scheda__panel--video {
  gap: 0;
  padding: 0 0 0 16px;
}
.scheda__video {
  align-self: flex-start;
  height: -webkit-fill-available;
  aspect-ratio: 4 / 5;
}

/* ---------- CTAs as on the rest of the site ----------
   hero CTAs, tabs and the modal openers: the grey CTA (cursor light on hover), even
   padding on both sides whatever the site's CTA width mode; the active tab deeper */
.pdp :is(.pdph, .scheda__tabs, .scheda__open) .cta.cta {
  width: auto;
  justify-content: center;
  padding-inline: var(--cta-pad-l);
}
.scheda__tabs .cta.is-on {
  background-color: rgb(0 0 0 / 0.14);
}

/* Product cut-out in the hero (option): in the left column's flex, under the title and
   the CTAs, the whole group centered (panel: Product cut-out size) */
[data-shot="hero"] .pdph__text {
  gap: 40px;
}
[data-shot="hero"] .pdph__text > .pdp-intro__shot {
  height: calc(36vh * var(--pdp-shot, 1));
  max-width: 100%;
  min-height: 0;
  object-fit: contain;
  /* panel: Cut-out padding top / bottom (negative: closer to the title or CTAs) */
  margin-block: var(--pdp-shot-pt, 0px) var(--pdp-shot-pb, 0px);
}
