/* ==========================================================================
   VENTURI STUFE - SCHEDA PRODOTTO (prodotto.css)
   Layout Hero 2 Colonne, Specifiche Tecniche con Icone, Galleria,
   Colori e Decori, CTA Contatti, Slider Modelli Simili Responsive
   ========================================================================== */

/* 1. HERO PRODOTTO: 2 COLONNE SU DESKTOP, INCOLONNATE SU MOBILE */
.prodotto-hero-section {
  padding: 40px 0 70px;
  background-color: var(--bg-porcelain, #FBF9F5);
}

.prodotto-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: start;
}

/* Colonna Sinistra: Card Stile Catalogo */
.prodotto-card-wrap {
  display: flex;
  flex-direction: column;
}

.prodotto-card-wrap .modello-card {
  margin: 0;
  box-shadow: 0 10px 30px rgba(50, 40, 30, 0.08);
}

.prodotto-card-wrap .modello-details-box {
  padding: 16px 20px;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prodotto-card-wrap .modello-dispo-tag {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-main, #272320);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  text-align: center;
}

.prodotto-card-wrap .modello-dispo-dot {
  width: 9px;
  height: 9px;
  background-color: #2e7d32;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.18);
}

/* Colonna Destra: Pannello Specifiche Tecniche */
.prodotto-specs-panel {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: var(--radius-xxl, 28px);
  padding: 26px 32px;
  box-shadow: 0 10px 30px rgba(50, 40, 30, 0.08);
  border: 1px solid var(--border-soft, rgba(138, 123, 106, 0.16));
  display: flex;
  flex-direction: column;
}

/* Texture Vena Ceramica / Marmo Naturale nel pannello specifiche */
.prodotto-specs-panel::before {
  content: '';
  position: absolute;
  inset: -10px;
  background-image: url('images/ceramic-vein-tile.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.18;
  filter: contrast(0.88);
  pointer-events: none;
  z-index: 0;
}

.prodotto-specs-panel > * {
  position: relative;
  z-index: 1;
}

.prodotto-panel-header {
  border-bottom: 1px solid rgba(138, 123, 106, 0.18);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.prodotto-panel-kicker {
  display: inline-block;
  font-size: 0.80rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #C7141E;
  margin-bottom: 4px;
}

.prodotto-panel-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.85rem;
  color: var(--text-main, #272320);
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
}

/* Griglia Specifiche Tecniche con Caratteri Grandi e Leggibili */
.prodotto-specs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}

.spec-row-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  background-color: rgba(239, 232, 222, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 14px;
  border: 1px solid rgba(138, 123, 106, 0.18);
}

.spec-label-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spec-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5E4B3C;
  border: 1px solid rgba(138, 123, 106, 0.22);
  font-size: 1.15rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.spec-icon-box svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.spec-icon-box svg[fill="none"] {
  fill: none;
}

.spec-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main, #272320);
  letter-spacing: 0.01em;
}

.spec-value-group {
  text-align: right;
}

.spec-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #C7141E;
  letter-spacing: 0.02em;
}

.spec-subvalue {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted, #6B6259);
  font-weight: 500;
}

/* Gruppo Dimensioni Speciale con Cubi 3D e Frecce Ingranditi */
.spec-row-dimensions {
  flex-wrap: wrap;
  gap: 12px;
}

.dim-triplet-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dim-single-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(138, 123, 106, 0.22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dim-cube-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
  color: #5E4B3C;
}

.dim-num-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #C7141E;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.dim-sep-char {
  color: var(--primary-tortora, #736555);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  user-select: none;
}

/* 2. SEZIONE GALLERIA FOTOGRAFICA */
.prodotto-gallery-section {
  padding: 50px 0 60px;
  background-color: #ffffff;
  border-top: 1px solid var(--border-soft, rgba(138, 123, 106, 0.14));
}

.prodotto-section-header {
  text-align: center;
  margin-bottom: 32px;
}

.prodotto-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.1rem;
  color: var(--text-main, #272320);
  margin: 0;
  font-weight: 700;
}

.prodotto-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
  max-width: 1080px;
  margin: 0 auto;
}

.prodotto-gallery-slot {
  position: relative;
  border-radius: var(--radius-xxl, 28px);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-tortora-soft, #EFE8DE);
  border: 1px solid var(--border-soft, rgba(138, 123, 106, 0.16));
  box-shadow: var(--shadow-gentle, 0 10px 30px rgba(50, 40, 30, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.prodotto-gallery-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Centratura ottica su misura per le viste della Furetta */
.prodotto-gallery-slot img.focus-furetta-vista1 {
  object-position: center 35%;
}

.prodotto-gallery-slot img.focus-furetta-vista2 {
  object-position: center center;
}

/* Ingrandimento ottico +22% per eliminare il bordo bianco in eccesso del Furetto Piano Cottura e Forno */
.prodotto-gallery-slot img.zoom-furetto-forno {
  transform: scale(1.22);
  transform-origin: center center;
}

/* Ingrandimento ottico +10% per le prime 2 viste della Furetta 3 Giri Pellet con Basamento */
.prodotto-gallery-slot img.zoom-furetta-basamento {
  transform: scale(1.10);
  transform-origin: center center;
}

/* Ingrandimento ottico +15% per la seconda vista di Cesira Pellet a Convezione Naturale */
.prodotto-gallery-slot img.zoom-cesira-convezione {
  transform: scale(1.15);
  transform-origin: center center;
}

.prodotto-gallery-slot img.focus-furetto-forno-vista4 {
  object-position: center 38%;
}

/* Sfondo bianco pulito per gli slot con immagini prodotto */
.prodotto-gallery-slot.has-image {
  background-color: #ffffff;
}

/* Quando la galleria ha un elemento dispari finale (es. 3 foto), l'ultimo slot viene centrato elegantemente su desktop */
@media (min-width: 769px) {
  .prodotto-gallery-grid > .prodotto-gallery-slot:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 18px);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

/* Layout dedicato galleria a sviluppo verticale (es. modello Colonna - proporzione ~1200x2200) */
.prodotto-gallery-grid.gallery-vertical {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1140px;
  gap: 28px;
}

.prodotto-gallery-grid.gallery-vertical .prodotto-gallery-slot {
  aspect-ratio: 1200 / 2200;
  background-color: #ffffff;
}

.prodotto-gallery-grid.gallery-vertical .prodotto-gallery-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

@media (min-width: 992px) {
  .prodotto-gallery-grid.gallery-vertical > .prodotto-gallery-slot:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
    margin: 0;
    width: 100%;
  }
}

@media (max-width: 991px) and (min-width: 641px) {
  .prodotto-gallery-grid.gallery-vertical {
    grid-template-columns: repeat(2, 1fr);
    max-width: 680px;
    gap: 24px;
  }
  .prodotto-gallery-grid.gallery-vertical > .prodotto-gallery-slot:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 12px);
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .prodotto-gallery-grid.gallery-vertical {
    grid-template-columns: 1fr;
    max-width: 360px;
    gap: 24px;
    margin: 0 auto;
  }
  .prodotto-gallery-grid.gallery-vertical > .prodotto-gallery-slot:last-child:nth-child(odd) {
    max-width: 100%;
    margin: 0;
  }
}

/* Layout galleria a 3 colonne per stufe con foto a sviluppo verticale armonioso (es. Furetta ~1200x1680) */
.prodotto-gallery-grid.gallery-3col {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1140px;
  gap: 28px;
}

.prodotto-gallery-grid.gallery-3col .prodotto-gallery-slot {
  aspect-ratio: 1200 / 1680;
  background-color: #ffffff;
}

.prodotto-gallery-grid.gallery-3col .prodotto-gallery-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

@media (min-width: 992px) {
  .prodotto-gallery-grid.gallery-3col > .prodotto-gallery-slot:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
    margin: 0;
    width: 100%;
  }
}

@media (max-width: 991px) and (min-width: 641px) {
  .prodotto-gallery-grid.gallery-3col {
    grid-template-columns: repeat(2, 1fr);
    max-width: 680px;
    gap: 24px;
  }
  .prodotto-gallery-grid.gallery-3col > .prodotto-gallery-slot:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 12px);
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .prodotto-gallery-grid.gallery-3col {
    grid-template-columns: 1fr;
    max-width: 360px;
    gap: 24px;
    margin: 0 auto;
  }
  .prodotto-gallery-grid.gallery-3col > .prodotto-gallery-slot:last-child:nth-child(odd) {
    max-width: 100%;
    margin: 0;
  }
}

/* Layout galleria a 2 colonne bilanciate (es. Cesira Convezione Naturale - 2 foto verticali) */
.prodotto-gallery-grid.gallery-2col {
  grid-template-columns: repeat(2, 1fr);
  max-width: 880px;
  gap: 28px;
  margin: 0 auto;
}

.prodotto-gallery-grid.gallery-2col .prodotto-gallery-slot {
  aspect-ratio: 1200 / 1680;
  background-color: #ffffff;
}

.prodotto-gallery-grid.gallery-2col .prodotto-gallery-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 640px) {
  .prodotto-gallery-grid.gallery-2col {
    grid-template-columns: 1fr;
    max-width: 380px;
    gap: 20px;
  }
}

/* Layout galleria mista (2 verticali + 1 orizzontale full-width, es. Furetta 3 Giri Pellet) */
.prodotto-gallery-grid.gallery-mixed {
  grid-template-columns: repeat(2, 1fr);
  max-width: 880px;
  gap: 28px;
  margin: 0 auto;
}

.prodotto-gallery-grid.gallery-mixed .prodotto-gallery-slot {
  aspect-ratio: 1200 / 1629;
  background-color: #ffffff;
}

.prodotto-gallery-grid.gallery-mixed .prodotto-gallery-slot.gallery-slot-wide {
  grid-column: 1 / -1;
  aspect-ratio: 1200 / 798;
}

.prodotto-gallery-grid.gallery-mixed .prodotto-gallery-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 640px) {
  .prodotto-gallery-grid.gallery-mixed {
    grid-template-columns: 1fr;
    max-width: 380px;
    gap: 20px;
  }
  .prodotto-gallery-grid.gallery-mixed .prodotto-gallery-slot.gallery-slot-wide {
    grid-column: auto;
  }
}

/* Variante allargata a 1040px per modelli con 4 foto miste (es. Furetto Piano Cottura) */
.prodotto-gallery-grid.gallery-mixed.gallery-wide {
  max-width: 1040px;
  gap: 32px;
}

/* Layout galleria asimmetrica armoniosa (1 verticale + 1 orizzontale di altezza identica, es. Graziosa Legna) */
.prodotto-gallery-grid.gallery-asymmetric {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 28px;
  max-width: 1060px;
  margin: 0 auto;
}

.prodotto-gallery-grid.gallery-asymmetric .prodotto-gallery-slot {
  position: relative;
  border-radius: var(--radius-xxl, 28px);
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid var(--border-soft, rgba(138, 123, 106, 0.16));
  box-shadow: var(--shadow-gentle, 0 10px 30px rgba(50, 40, 30, 0.08));
}

.prodotto-gallery-grid.gallery-asymmetric .gallery-slot-portrait {
  flex: 0.7366;
  aspect-ratio: 1200 / 1629;
}

.prodotto-gallery-grid.gallery-asymmetric .gallery-slot-landscape {
  flex: 1.503;
  aspect-ratio: 1500 / 998;
}

.prodotto-gallery-grid.gallery-asymmetric .prodotto-gallery-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 768px) {
  .prodotto-gallery-grid.gallery-asymmetric {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 520px;
  }
  .prodotto-gallery-grid.gallery-asymmetric .gallery-slot-portrait {
    width: 100%;
    max-width: 380px;
    flex: none;
  }
  .prodotto-gallery-grid.gallery-asymmetric .gallery-slot-landscape {
    width: 100%;
    max-width: 100%;
    flex: none;
  }
}

/* Griglia e Card Galleria con Didascalia Marmorea (es. modello Cesira a legna) */
.prodotto-gallery-grid.gallery-captioned {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1140px;
  gap: 28px;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius-xxl, 24px);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border-soft, rgba(138, 123, 106, 0.18));
  box-shadow: var(--shadow-gentle, 0 10px 30px rgba(50, 40, 30, 0.08));
  display: flex;
  flex-direction: column;
  cursor: default;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.gallery-card.gallery-card-placeholder {
  background: var(--bg-tortora-soft, #f7f4ee);
  border: 1.5px dashed var(--border-soft, rgba(138, 123, 106, 0.35));
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.gallery-card-image {
  width: 100%;
  aspect-ratio: 1200 / 1629;
  overflow: hidden;
  background-color: #ffffff;
  position: relative;
}

.gallery-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Allineamento ottico armonioso per Cesira versione Griglia e Piedini con le versioni a cupola */
.gallery-card-image img.focus-cesira-griglia {
  object-fit: cover;
  object-position: center 88%;
  transform: scale(1.08);
  transform-origin: center 88%;
}

/* Estensione sotto con venatura marmorea e scritta */
.gallery-card-details {
  padding: 16px 14px;
  position: relative;
  background-color: #ffffff;
  overflow: hidden;
  border-top: 1px solid var(--border-soft, rgba(138, 123, 106, 0.16));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 56px;
}

.gallery-card-details::before {
  content: '';
  position: absolute;
  inset: -6px;
  background-image: url('images/ceramic-vein-tile.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.22;
  filter: contrast(0.88);
  pointer-events: none;
  z-index: 0;
}

.gallery-card:nth-child(even) .gallery-card-details::before {
  transform: scaleX(-1) rotate(180deg);
}

.gallery-card-label {
  position: relative;
  z-index: 1;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main, #272320);
  letter-spacing: 0.01em;
}

@media (min-width: 992px) {
  .prodotto-gallery-grid.gallery-captioned > .gallery-card:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
    margin: 0;
    width: 100%;
  }
}

@media (max-width: 991px) and (min-width: 641px) {
  .prodotto-gallery-grid.gallery-captioned {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    gap: 24px;
  }
  .prodotto-gallery-grid.gallery-captioned > .gallery-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 12px);
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .prodotto-gallery-grid.gallery-captioned {
    grid-template-columns: 1fr;
    max-width: 360px;
    gap: 24px;
    margin: 0 auto;
  }
  .prodotto-gallery-grid.gallery-captioned > .gallery-card:last-child:nth-child(odd) {
    max-width: 100%;
    margin: 0;
  }
}

/* Variante a 2 colonne (2x2 bilanciata) per gallerie con didascalie a 4 versioni (es. modello Diavola con Forno) */
.prodotto-gallery-grid.gallery-captioned.gallery-2x2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 1040px;
  gap: 32px;
}

@media (max-width: 640px) {
  .prodotto-gallery-grid.gallery-captioned.gallery-2x2 {
    grid-template-columns: 1fr;
    max-width: 380px;
    gap: 24px;
  }
}

/* Variante a 2 colonne centrata per gallerie a 2 foto (es. modelli Cortina) */
.prodotto-gallery-grid.gallery-captioned.gallery-2col,
.prodotto-gallery-grid.gallery-captioned:has(> .gallery-card:nth-child(2):last-child) {
  grid-template-columns: repeat(2, 1fr);
  max-width: 780px;
  gap: 28px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .prodotto-gallery-grid.gallery-captioned.gallery-2col,
  .prodotto-gallery-grid.gallery-captioned:has(> .gallery-card:nth-child(2):last-child) {
    grid-template-columns: 1fr;
    max-width: 360px;
    gap: 24px;
  }
}

/* Variante mista con didascalie marmoree (2 card verticali sopra + 1 panoramica orizzontale sotto, es. Cortina Idro Pellet con vano tecnico) */
.prodotto-gallery-grid.gallery-captioned.gallery-mixed-cards {
  grid-template-columns: repeat(2, 1fr);
  max-width: 880px;
  gap: 28px;
  margin-left: auto;
  margin-right: auto;
}

.prodotto-gallery-grid.gallery-captioned.gallery-mixed-cards > .gallery-card.gallery-card-wide {
  grid-column: 1 / -1;
}

.prodotto-gallery-grid.gallery-captioned.gallery-mixed-cards > .gallery-card.gallery-card-wide .gallery-card-image {
  aspect-ratio: 1937 / 1000;
  background-color: #ffffff;
}

.prodotto-gallery-grid.gallery-captioned.gallery-mixed-cards > .gallery-card.gallery-card-wide .gallery-card-image img {
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 640px) {
  .prodotto-gallery-grid.gallery-captioned.gallery-mixed-cards {
    grid-template-columns: 1fr;
    max-width: 380px;
    gap: 24px;
  }
  .prodotto-gallery-grid.gallery-captioned.gallery-mixed-cards > .gallery-card.gallery-card-wide {
    grid-column: auto;
  }
}

/* Variante centrata per galleria a 1 foto singola */
.prodotto-gallery-grid.gallery-captioned.gallery-single,
.prodotto-gallery-grid.gallery-captioned:has(> .gallery-card:only-child) {
  display: flex;
  justify-content: center;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.prodotto-gallery-grid.gallery-captioned.gallery-single > .gallery-card,
.prodotto-gallery-grid.gallery-captioned:has(> .gallery-card:only-child) > .gallery-card {
  width: 100%;
  max-width: 420px;
}

.gallery-slot-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--primary-tortora, #736555);
  opacity: 0.65;
}

.gallery-slot-content svg {
  width: 40px;
  height: 40px;
}

.gallery-slot-content span {
  font-size: 0.90rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* 3. SEZIONE COLORI E DECORI (SWIPABILE CON CARD MARMOREE) */
.prodotto-decori-section {
  padding: 50px 0 60px;
  background-color: var(--bg-porcelain, #FBF9F5);
  border-top: 1px solid var(--border-soft, rgba(138, 123, 106, 0.14));
}

.colori-carousel-wrapper,
.decori-carousel-wrapper {
  position: relative;
  width: 100%;
}

.colori-track,
.decori-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 22px;
  padding: 12px 4px 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.colori-track::-webkit-scrollbar,
.decori-track::-webkit-scrollbar {
  display: none;
}

/* Card singolo colore / decoro: 4 visibili intere, la quinta tagliata a filo per mostrare che è swippabile */
.colore-card,
.decoro-card {
  flex: 0 0 calc((100% - 66px) / 4.45);
  min-width: calc((100% - 66px) / 4.45);
  max-width: calc((100% - 66px) / 4.45);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  background: #ffffff;
  border-radius: var(--radius-xl, 20px);
  overflow: hidden;
  border: 1px solid var(--border-soft, rgba(138, 123, 106, 0.18));
  box-shadow: 0 6px 20px rgba(40, 30, 20, 0.06);
  display: flex;
  flex-direction: column;
  cursor: default;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.colore-image-box,
.decoro-image-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #f7f4ee;
  position: relative;
}

.colore-image-box img,
.decoro-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Piastrelle verticali/sagomate (P1 e P2): allontanate/intere senza tagli sopra e sotto */
.decoro-image-box img.decoro-verticale {
  object-fit: contain;
  padding: 10px;
}

/* Estensione sotto bianca con texture marmo venato e nome */
.colore-details-box,
.decoro-details-box {
  padding: 16px 14px;
  position: relative;
  background-color: #ffffff;
  overflow: hidden;
  border-top: 1px solid var(--border-soft, rgba(138, 123, 106, 0.14));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.colore-details-box::before,
.decoro-details-box::before {
  content: '';
  position: absolute;
  inset: -6px;
  background-image: url('images/ceramic-vein-tile.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.22;
  filter: contrast(0.88);
  pointer-events: none;
  z-index: 0;
}

.colore-card:nth-child(even) .colore-details-box::before,
.decoro-card:nth-child(even) .decoro-details-box::before {
  transform: scaleX(-1) rotate(180deg);
}

.colore-name,
.decoro-name {
  position: relative;
  z-index: 1;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main, #272320);
  letter-spacing: -0.01em;
}

/* Card Colore Personalizzato su Misura (Statica, identica al resto) */
.colore-card.colore-card-custom {
  background: #ffffff;
  border: 1px solid var(--border-soft, rgba(138, 123, 106, 0.18));
  box-shadow: 0 6px 20px rgba(40, 30, 20, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px 20px;
  cursor: default;
}

.colore-custom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.colore-custom-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-porcelain, #FBF9F5);
  border: 1px solid rgba(138, 123, 106, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #C7141E;
  box-shadow: 0 4px 14px rgba(40, 30, 20, 0.05);
}

.colore-custom-icon-wrap svg {
  width: 32px;
  height: 32px;
}

.colore-custom-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main, #272320);
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.colore-custom-desc {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.88rem;
  color: var(--text-muted, #6E655F);
  line-height: 1.45;
  margin: 0 0 18px 0;
}

.colore-custom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff !important;
  background: #C7141E;
  border-radius: var(--radius-pill, 9999px);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(199, 20, 30, 0.25);
  transition: background-color 0.2s ease;
}

.colore-custom-btn:hover {
  background-color: #A20D14;
}

/* 4. SEZIONE CTA CONTATTI */
.prodotto-cta-section {
  padding: 50px 0;
  background-color: #ffffff;
}

.prodotto-cta-banner {
  background: linear-gradient(135deg, #272320 0%, #171412 100%);
  border-radius: var(--radius-xxl, 28px);
  padding: 44px 50px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
}

.prodotto-cta-text h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.95rem;
  margin: 0 0 10px 0;
  color: #ffffff;
}

.prodotto-cta-text p {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.btn-prodotto-cta-light {
  background: #C7141E linear-gradient(135deg, #C7141E 0%, #A20D14 100%);
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: var(--radius-pill, 9999px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(199, 20, 30, 0.35);
  transition: all 0.25s ease;
}

.btn-prodotto-cta-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(199, 20, 30, 0.45);
}

/* 5. SEZIONE MODELLI SIMILI */
.modelli-simili-section {
  padding: 70px 0 90px;
  background-color: var(--bg-porcelain, #FBF9F5);
  border-top: 1px solid var(--border-soft, rgba(138, 123, 106, 0.14));
}

.modelli-simili-subtitle {
  display: block;
  color: #C7141E;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 8px;
}

/* 5. SEZIONE MODELLI SIMILI - SLIDER DESKTOP (A COPPIE) E MOBILE */
.modelli-simili-carousel-wrapper {
  position: relative;
  width: 100%;
}

.modelli-simili-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 28px;
  padding: 12px 4px 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.modelli-simili-grid::-webkit-scrollbar {
  display: none;
}

/* Desktop: 2 card per schermata */
.modelli-simili-grid .modello-card {
  flex: 0 0 calc((100% - 28px) / 2);
  min-width: calc((100% - 28px) / 2);
  max-width: calc((100% - 28px) / 2);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  margin: 0;
  box-shadow: 0 8px 24px rgba(40, 30, 20, 0.08);
}

/* Layout per categoria con un solo modello simile (es. Termostufe) */
.modelli-simili-grid:has(.modello-card:only-child),
.modelli-simili-carousel-wrapper.single-model .modelli-simili-grid {
  justify-content: center;
}

.modelli-simili-grid .modello-card:only-child,
.modelli-simili-carousel-wrapper.single-model .modello-card {
  flex: 0 1 540px !important;
  min-width: 0 !important;
  max-width: 540px !important;
  width: 100% !important;
}

.modelli-simili-carousel-wrapper:has(.modello-card:only-child) .carousel-arrow,
.modelli-simili-carousel-wrapper.single-model .carousel-arrow {
  display: none !important;
}

/* Ottimizzazione INP: Disattivazione hover pesanti su card */
.modelli-simili-grid .modello-card,
.modelli-simili-grid .modello-card:hover {
  transform: none !important;
}

.modelli-simili-grid .modello-card:hover .modello-image-box img {
  transform: none !important;
}

.modelli-simili-grid .modello-card .modello-image-box img.focus-stove-basamento,
.modelli-simili-grid .modello-card:hover .modello-image-box img.focus-stove-basamento {
  transform: scale(1.18) !important;
}

.modelli-simili-grid .modello-card:hover .modello-details-box::before {
  opacity: 0.18 !important;
}


/* Frecce di Scorrimento Desktop */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #5E4B3C;
  border: 1px solid rgba(138, 123, 106, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.carousel-arrow:hover {
  background-color: #C7141E;
  color: #ffffff;
  border-color: #C7141E;
}

.carousel-arrow-prev {
  left: -16px;
}

.carousel-arrow-next {
  right: -16px;
}

.carousel-arrow svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
  .prodotto-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .prodotto-gallery-grid,
  .prodotto-decori-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .prodotto-cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 36px 28px;
  }
}

@media (max-width: 768px) {
  .prodotto-specs-panel {
    padding: 22px 18px;
  }

  .prodotto-panel-title {
    font-size: 1.55rem;
  }

  .spec-row-item {
    padding: 10px 14px;
  }

  .spec-name {
    font-size: 0.95rem;
  }

  .spec-value {
    font-size: 1.02rem;
  }

  .spec-row-dimensions {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .dim-triplet-wrap {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .dim-single-chip {
    padding: 6px 10px;
    gap: 8px;
  }

  .dim-cube-icon {
    width: 26px;
    height: 26px;
  }

  .dim-num-val {
    font-size: 1.05rem;
  }

  .prodotto-gallery-grid,
  .prodotto-decori-grid {
    grid-template-columns: 1fr;
  }

  /* Su mobile le frecce spariscono e rimane il gesto naturale dello swipe */
  .carousel-arrow {
    display: none;
  }

  .modelli-simili-grid {
    scroll-padding: 0 10vw;
    padding: 10px 10vw 30px 10vw;
    margin: 0 -20px;
    gap: 18px;
    scrollbar-width: thin;
    scrollbar-color: #C7141E var(--bg-tortora-soft);
  }

  /* La card si ferma perfettamente centrata a schermo dopo lo swipe */
  .modelli-simili-grid .modello-card {
    flex: 0 0 80vw;
    min-width: 80vw;
    max-width: 80vw;
    scroll-snap-align: center;
    scroll-snap-stop: normal;
    box-shadow: 0 8px 24px rgba(40, 30, 20, 0.12);
  }
  .colori-track,
  .decori-track {
    scroll-padding: 0 16px;
    gap: 16px;
    padding-bottom: 20px;
  }

  /* Su smartphone: 1 card visibile per intero, con la seconda tagliata sul bordo */
  .colore-card,
  .decoro-card {
    flex: 0 0 calc(100% - 64px);
    min-width: calc(100% - 64px);
    max-width: calc(100% - 64px);
    scroll-snap-align: start;
  }
}
