/**
 * Product Single - Layout e stili
 * Da aggiungere in: s4w/assets/css/pages/product-single.css
 * e registrare in inc/enqueue.php (vedi nota in fondo al file)
 */

/* ============================================================
   RESET PAGINA
   ============================================================ */
.s4w-product-correlati.s4w-product-contains {
  margin-top: 0;
}
.s4w-product-correlati__slider-arrows,
.s4w-product-contains__slider-arrows {
  display: none;
}
.product-single {
  margin: 0;
  padding: 0;
}

/* WooCommerce aggiunge un <div class="product"> dentro al <main>.
   Lo resettiamo per non interferire col nostro layout. */
.product-single div.product {
  margin: 0;
  padding: 0;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */

.s4w-breadcrumbs {
  width: 100%;
  border-top: 1px solid var(--stroke-soft-200);
  border-bottom: 1px solid var(--stroke-soft-200);
  background-color: var(--bg-white-0);
}

.s4w-breadcrumbs__container {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  height: 36px;
  gap: 0 !important;
}

.s4w-breadcrumbs__item {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.s4w-breadcrumbs__link,
.s4w-breadcrumbs__current {
  display: flex;
  align-items: center;
  padding: 10px;
  font-family: var(--font-secondary);
  font-size: var(--paragraph-xsmall);
  font-weight: var(--weight-regular);
  line-height: 16px;
  color: var(--text-soft-400);
  border-right: 1px solid var(--stroke-soft-200);
  transition: color 0.2s ease;
}

.s4w-breadcrumbs__item:first-child .s4w-breadcrumbs__link,
.s4w-breadcrumbs__item:first-child .s4w-breadcrumbs__current {
  border-left: 1px solid var(--stroke-soft-200);
}

.s4w-breadcrumbs__link:hover {
  color: var(--text-main-900);
}

.s4w-breadcrumbs__current {
  color: var(--text-main-900);
  font-weight: var(--weight-regular);
}

.s4w-breadcrumbs__separator {
  display: none;
}


@media (max-width: 768px) {
  .s4w-breadcrumbs__container {
    padding-left: 0;
    padding-right: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .s4w-breadcrumbs__item:first-child .s4w-breadcrumbs__link,
  .s4w-breadcrumbs__item:first-child .s4w-breadcrumbs__current {
    padding-left: 20px;
  }

  .s4w-breadcrumbs__link,
  .s4w-breadcrumbs__current {
    white-space: nowrap;
  }
}
/* ============================================================
   HERO PRODOTTO
   Layout: colonna sinistra gallery / colonna destra info
   ============================================================ */

.product-hero {
  padding: 0 0 var(--spacing-5xl);
}

.product-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 0 80px;
  max-width: 1920px;
  margin: 0 auto;

}

/* ============================================================
   GALLERY
   WooCommerce inietta .woocommerce-product-gallery dentro
   product-hero__gallery — resettiamo i float del default
   ============================================================ */

.product-hero__gallery {
  position: sticky;
  top: var(--spacing-3xl);
  align-self: start;
}

.product-hero__gallery .woocommerce-product-gallery {
  float: none;
  width: 100%;
}

.product-hero__gallery .woocommerce-product-gallery__wrapper {
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

/* Hover image: pseudo-elemento ::after sul link della prima immagine gallery */
.product-hero__gallery .woocommerce-product-gallery__image.is-active-slide > a,
.product-hero__gallery .woocommerce-product-gallery__image:first-child > a {
  position: relative;
  display: block;
}

.product-hero__gallery .woocommerce-product-gallery__image.is-active-slide > a::after,
.product-hero__gallery .woocommerce-product-gallery__image:first-child > a::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hover-img);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.product-hero__gallery .woocommerce-product-gallery__image.is-active-slide > a:hover::after,
.product-hero__gallery .woocommerce-product-gallery__image:first-child > a:hover::after {
  opacity: 1;
}

/* Immagine principale */
.product-hero__gallery .woocommerce-product-gallery__image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Miniature */
.product-hero__gallery .flex-control-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2xs);
  margin: var(--spacing-sm) 0 0;
  padding: 0;
  list-style: none;
}

.product-hero__gallery .flex-control-thumbs li {
  width: calc(25% - 6px);
  float: none;
}

.product-hero__gallery .flex-control-thumbs li img {
  border-radius: 2px;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
  cursor: pointer;
}

.product-hero__gallery .flex-control-thumbs li img.flex-active,
.product-hero__gallery .flex-control-thumbs li img:hover {
  opacity: 1;
}

/* ============================================================
   SUMMARY (colonna destra)
   ============================================================ */

.product-hero__summary {
  display: flex;
  flex-direction: column;
  padding-top: 60px;
}

/* --- Badge --- */

.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2xs);
  margin-bottom: 5px;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-3xs) var(--spacing-sm);
  border-radius: 2px;
  font-family: var(--font-primary);
  font-size: var(--paragraph-xsmall);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-main-900) !important;
  background-color: var(--neutral-900); /* fallback se colore non impostato */
  line-height: 1;
}

.product-badge--light-text {
  color: var(--text-white-0);
}

/* --- Titolo e sottotitolo --- */

.product-title {
  font-family: var(--font-primary);
  font-size: var(--title-large);
  font-weight: var(--weight-book);
  line-height: var(--title-large-lh);
  letter-spacing: var(--title-large-ls);
  color: var(--text-main-900);
  margin: 0 0 12px;
}

.product-subtitle {
  font-family: var(--font-secondary);
  font-size: var(--paragraph-large);
  font-weight: var(--weight-regular);
  line-height: var(--paragraph-large-lh);
  letter-spacing: var(--paragraph-large-ls);
  color: var(--text-sub-500);
  margin: 0 0 24px;
}

.product-tenuta {
  font-family: var(--font-primary);
  font-size: var(--label-medium);
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sub-500);
  margin: 0;
}

/* ============================================================
   ACQUISTO / VARIANTI / PREZZO
   ============================================================ */

.product-purchase {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* ----------------------------------------------------------------
   FORM VARIABILE
   ---------------------------------------------------------------- */

.product-purchase--variable {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.product-purchase--variable form.variations_form {
  display: flex;
  flex-direction: column;
  gap: 0px;
  margin: 0;
}

.product-purchase--variable .variations {
  width: 100%;
  border: 0;
  margin: 0;
}

.product-purchase--variable .variations tbody {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3xs);
}

.product-purchase--variable .variations tr {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.product-purchase--variable .variations th,
.product-purchase--variable .variations td {
  display: block;
  padding: 0;
  border: 0;
  text-align: left;
}

.product-purchase--variable .variations label {
  display: block;
  margin: 0 0 8px 0;
  font-family: var(--font-primary);
  font-size: var(--label-large);
  font-weight: var(--weight-regular);
  letter-spacing: 0.04em;

  color: var(--text-sub-500);
}

/* ----------------------------------------------------------------
   BOX INFORMAZIONI SOTTO IL PREZZO
     (metodi di pagamento, info spedizione, ecc.)
   ---------------------------------------------------------------- */

.s4w-product-info-box {
  background: var(--bg-weak-100);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: var(--spacing-lg)
}

/* Riga metodi di pagamento */
.s4w-product-info-box__payments {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.s4w-product-info-box__payments_icons {
  display: flex;
  align-items: center;
  flex-wrap: wrap; 
  gap:8px;
}

.s4w-product-info-box__payments img {
  height: 24px;
  width: auto;
  display: block;
}

.s4w-product-info-box__payments svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  color: var(--text-main-900, #0a0d14);
}

/* Riga spedizione */
.s4w-product-info-box__shipping {
  display: flex;
  align-items: flex-start;
}

.s4w-product-info-box__shipping svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  margin-top: 2px;
  color: var(--text-main-900, #0a0d14);
}

.s4w-product-info-box__shipping-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.s4w-product-info-box__delivery {
  margin: 0;
}

.s4w-product-info-box__store {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--text-soft-400, #7b818e);
}

.s4w-product-info-box__store a {
  text-decoration: underline;
  color: inherit;
}

/* ----------------------------------------------------------------
   PREZZO / QUANTITÀ / BOTTONE del variabile
   ---------------------------------------------------------------- */

.product-purchase--variable .single_variation_wrap {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);

}

.product-purchase--variable .woocommerce-variation-price,
.product-purchase--variable .single_variation .price,
.product-purchase--variable .woocommerce-variation .price {
  margin: 0;
}

.product-purchase--variable .woocommerce-variation-price .price,
.product-purchase--variable .single_variation .price,
.product-purchase--variable .woocommerce-variation .price {
  font-family: var(--font-primary);
  font-size: var(--title-xsmall);
  font-weight: var(--weight-book);
  line-height: 1;
  color: var(--text-main-900);
}

.product-purchase--variable .woocommerce-variation-price .price del,
.product-purchase--variable .woocommerce-variation .price del {
  color: var(--text-soft-400);
  font-size: var(--label-large);
  margin-right: var(--spacing-xs);
}

.product-purchase--variable .woocommerce-variation-availability {
  display: none;
}

.product-purchase--variable .variations_form.is-out-of-stock .single_variation_wrap {
  display: none !important;
}

/* cwginstock nasconde tutti i .cwginstock-subscribe-form su show_variation:
   forziamo la visibilità quando il wrapper out-of-stock è attivo */
.s4w_out-of-stock--variation .cwginstock-subscribe-form {
  display: block !important;
}

.product-purchase--variable .woocommerce-variation-add-to-cart {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  width: 100%;
}

.product-purchase--variable .quantity {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
}

.product-purchase--variable .qty {
  width: 64px;
  height: 52px;
  border: 1px solid var(--stroke-sub-300);
  border-radius: 2px;
  padding: 0 var(--spacing-sm);
  background: var(--bg-white-0);
  font-family: var(--font-primary);
  font-size: var(--label-large);
  text-align: center;
  color: var(--text-main-900);
}

.product-purchase--variable .single_add_to_cart_button {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 var(--spacing-2xl);
  border: none;
  border-radius: 2px;
  background-color: var(--color-yellow) !important;
  color: var(--text-main-900) !important;
  font-family: var(--font-primary);
  font-size: var(--label-large);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.product-purchase--variable .single_add_to_cart_button:hover {
  background-color: var(--neutral-700);
}

.product-purchase--variable .single_add_to_cart_button.disabled,
.product-purchase--variable .single_add_to_cart_button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ----------------------------------------------------------------
   PRODOTTO SEMPLICE
   ---------------------------------------------------------------- */

.product-price-cart .price {
  font-family: var(--font-primary);
  font-size: var(--title-xsmall);
  font-weight: var(--weight-book);
  color: var(--text-main-900);
  line-height: 1;
}

.product-price-cart .price del {
  color: var(--text-soft-400);
  font-size: var(--label-large);
  margin-right: var(--spacing-xs);
}

.product-price-cart .cart {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.product-price-cart .quantity {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.product-price-cart .qty {
  width: 64px;
  height: 52px;
  border: 1px solid var(--stroke-sub-300);
  border-radius: 2px;
  padding: 0 var(--spacing-sm);
  font-family: var(--font-primary);
  font-size: var(--label-large);
  text-align: center;
  color: var(--text-main-900);
}

.product-price-cart .single_add_to_cart_button,
.product-price-cart button[type="submit"] {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  padding: 0 var(--spacing-2xl);
  background-color: var(--neutral-900);
  color: var(--text-white-0);
  font-family: var(--font-primary);
  font-size: var(--label-large);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.product-price-cart .single_add_to_cart_button:hover {
  background-color: var(--neutral-700);
}

/* ----------------------------------------------------------------
   ARCHIVIO ANNATE
   ---------------------------------------------------------------- */

.variations tr:first-child {
  position: relative;
}

.product-archive-annate {
  position: absolute;
  right: 0;
  bottom: 0;
  margin: 0;
}

.product-archive-annate__label {
  font-family: var(--font-primary);
  font-size: var(--label-large);
  font-weight: var(--weight-book);
  letter-spacing: 0.04em;
  color: var(--text-sub-500);
  cursor: pointer;
  white-space: nowrap;

}

table.variations .product-archive-annate a.product-archive-annate__label {
  text-decoration: underline !important;
}

/* ----------------------------------------------------------------
   DESCRIZIONE BREVE IN HERO
   ---------------------------------------------------------------- */

.product-short-description {
  font-family: var(--font-secondary);
  font-size: var(--paragraph-large);
  font-weight: var(--weight-regular);
  line-height: var(--paragraph-large-lh);
  letter-spacing: var(--paragraph-large-ls);
  color: var(--text-main-900);
}

.product-short-description p {
  margin: 0;
  color: var(--text-soft-400, #7b818e);
}
.product-meta-inline__link,
.product-meta-inline__separator {
  font-family: var(--font-primary);
  font-size: var(--paragraph-small);
  letter-spacing: 0.02em;
}
.product-meta-inline__link {
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
  text-decoration-thickness: 1px !important;
}
.product-meta-inline__separator {
  text-decoration: none !important;
}
/* ----------------------------------------------------------------
   STATO PRODOTTO
   ---------------------------------------------------------------- */

.product-on-request__label {
  font-family: var(--font-primary);
  font-size: var(--label-medium);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-sub-500);
  margin: 0 0 var(--spacing-sm);
}

.product-out-of-stock__label {
  font-family: var(--font-primary);
  font-size: var(--label-medium);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin: 0 0 var(--spacing-sm);
}

/* Stile generico per i form CF7 nell'area acquisto */
.product-on-request .wpcf7-form,
.product-out-of-stock .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.product-on-request .wpcf7-form input[type="text"],
.product-on-request .wpcf7-form input[type="email"],
.product-out-of-stock .wpcf7-form input[type="text"],
.product-out-of-stock .wpcf7-form input[type="email"] {
  width: 100%;
  height: 48px;
  border: 1px solid var(--stroke-sub-300);
  border-radius: 2px;
  padding: 0 var(--spacing-sm);
  font-family: var(--font-primary);
  font-size: var(--label-large);
  color: var(--text-main-900);
}

.product-on-request .wpcf7-form input[type="submit"],
.product-out-of-stock .wpcf7-form input[type="submit"] {
  height: 52px;
  background-color: var(--neutral-900);
  color: var(--text-white-0);
  font-family: var(--font-primary);
  font-size: var(--label-large);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.product-on-request .wpcf7-form input[type="submit"]:hover,
.product-out-of-stock .wpcf7-form input[type="submit"]:hover {
  background-color: var(--neutral-700);
}
/* --- Info spedizione --- */

.product-shipping-info {
  border-top: 1px solid var(--stroke-soft-200);
  padding-top: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3xs);
}

.product-shipping-info p {
  margin: 0;
  font-family: var(--font-primary);
  font-size: var(--label-small);
  color: var(--text-sub-500);
  line-height: var(--label-small-lh);
}

.product-shipping-info a {
  color: var(--text-main-900);
  text-decoration: underline;
}

.product-shipping-info__delivery::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-green);
  margin-right: var(--spacing-2xs);
  vertical-align: middle;
}

/* ============================================================
   DESCRIZIONE EMOZIONALE
   ============================================================ */

.product-description {
  padding: 0 0 var(--spacing-5xl) 0;
}



.product-description__text {
  font-family: var(--font-secondary);
  font-size: 36px;
  font-weight: var(--weight-regular);
  line-height: var(--paragraph-xlarge-lh);
  letter-spacing: var(--paragraph-xlarge-ls);
  color: var(--text-main-900);
  margin-bottom: 40px;
}

.product-description__text p {
  margin: 0 0 var(--spacing-md);
}

.product-description__text p:last-child {
  margin-bottom: 0;
}

.product-description__download {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-family: var(--font-primary);
  font-size: var(--label-medium);
  font-weight: var(--weight-book);
  letter-spacing: 0.04em;
  color: var(--text-main-900);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.product-description__download:hover {
  color: var(--text-sub-500);
}

/* Icona download opzionale via pseudo-elemento */
.product-description__download::before {
  content: "↓";
  font-size: var(--paragraph-small);
}

.s4w-product-contains__header {
  margin-bottom: 48px;
}

.s4w-product-contains__wrapper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.s4w-product-contains__wrapper--cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* bordi gestiti in product-card.css per contesto s4w-product-contains__wrapper */

.s4w-product-contains-card__media {
  margin: 20px;
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: var(--bg-weak-100, #f8f7f6);
}

.s4w-product-contains-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.s4w-product-contains-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 20px;
}

.s4w-product-contains-card__separator {
  color: var(--text-sub-500);
}

.s4w-product-contains-card__body .s4w-product-card__desc {
  padding-bottom: 24px;
}
.product-blocks {
display: flex;
flex-flow: column;
}
/* ============================================================
   SCHEDA TECNICA
   ============================================================ */
.product-scheda {
  margin: 0;
  padding: 0 0 var(--spacing-5xl) 0;
}

.product-scheda__list {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.product-scheda__row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0 var(--spacing-3xl);
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--stroke-soft-200);
}

.product-scheda__row:first-child {
  border-top: 1px solid var(--stroke-soft-200);
}

.product-scheda__label {
  font-family: var(--font-primary);
  font-size: var(--label-medium);
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sub-500);
  line-height: var(--label-medium-lh);
  padding: 0;
  margin: 0;
}

.product-scheda__value {
  font-family: var(--font-secondary);
  font-size: var(--paragraph-medium);
  font-weight: var(--weight-regular);
  line-height: var(--paragraph-medium-lh);
  letter-spacing: var(--paragraph-medium-ls);
  color: var(--text-main-900);
  margin: 0;
  padding: 0;
}

.product-scheda__value p {
  margin: 0 0 var(--spacing-xs);
}

.product-scheda__value p:last-child {
  margin-bottom: 0;
}

#product-scheda .product-scheda__value a,
.s4w-scheda-link {
  color: var(--text-main-900) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

.product-scheda__value table {
  width: 100%;
  max-width: 500px;
  border-collapse: collapse;
  margin-top: var(--spacing-md);
  font-family: var(--font-secondary);
  font-size: var(--paragraph-small);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  color: var(--text-sub-500);
}

.product-scheda__value table th {
  font-family: var(--font-primary);
  font-size: var(--label-small);
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sub-500);
  background-color: var(--bg-weak-100);
  padding: var(--spacing-sm) var(--spacing-sm);
  text-align: left;
  border-bottom: 1px solid var(--stroke-soft-200);
}

.product-scheda__value table td {
  padding: var(--spacing-md) var(--spacing-sm);
  text-align: left;
  border-bottom: 1px solid var(--stroke-soft-200);
}

.product-scheda__value table td:last-child {
  text-align: right;
  white-space: nowrap;
}

.product-scheda__value table td[style*="padding-left"] {
  padding-left: 24px;
}

.product-scheda__value table tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   DESCRIZIONE + META dentro il form variabile
   ============================================================ */

.product-purchase--variable .variations_form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.product-purchase--variable .product-short-description--inside-form,
.product-purchase--simple .product-short-description--inside-form {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-top: 1px solid var(--stroke-soft-200);
  font-family: var(--font-secondary);
  font-size: var(--paragraph-large);
  font-weight: var(--weight-regular);
  line-height: var(--paragraph-large-lh);
  letter-spacing: var(--paragraph-large-ls);
  color: var(--text-sub-500);
}
.product-short-description.product-short-description--inside-form  {
  margin-top: 0;
}

.product-short-description.product-short-description--inside-form * {
  font-size: 14px;
}

table + .product-short-description.product-short-description--inside-form {
  margin-top: 20px;
}

.product-purchase--variable .product-short-description--inside-form p,
.product-purchase--simple .product-short-description--inside-form p {
  margin: 0 0 var(--spacing-sm);
}

.product-purchase--variable .product-short-description--inside-form br,
.product-purchase--simple .product-short-description--inside-form br {
  display: block;
  content: "";
  margin-bottom: var(--spacing-2xs);
}

.product-purchase--variable
  .product-short-description--inside-form
  > *:first-child,
.product-purchase--simple
  .product-short-description--inside-form
  > *:first-child {
  margin-top: 0;
}

.product-purchase--variable
  .product-short-description--inside-form
  > *:last-child,
.product-purchase--simple
  .product-short-description--inside-form
  > *:last-child {
  margin-bottom: 0;
}

.product-descrizione-aggiuntiva {
  display: none;
  margin-bottom: var(--spacing-lg);
  font-family: var(--font-primary);
  font-size: var(--paragraph-medium);
  line-height: var(--paragraph-medium-lh);
  color: var(--text-sub-500);
}

.product-descrizione-aggiuntiva > *:first-child {
  margin-top: 0;
}

.product-descrizione-aggiuntiva > *:last-child {
  margin-bottom: 0;
}

.product-meta-inline {
  padding-top: 16px;
}

.product-purchase--variable .product-meta-inline,
.product-purchase--simple .product-meta-inline {
  padding: 16px 0 var(--spacing-lg);
  border-bottom: 1px solid var(--stroke-soft-200);
}

.product-purchase--variable
  .product-meta-inline.product-meta-inline--no-separator,
.product-purchase--simple
  .product-meta-inline.product-meta-inline--no-separator {
  padding-bottom: 16px;
  margin-bottom: 0;
  border-bottom: none;
}

.product-purchase--variable .product-meta-inline__inner,
.product-purchase--simple .product-meta-inline__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.product-purchase--variable .product-meta-inline__link,
.product-purchase--variable .product-meta-inline__separator,
.product-purchase--simple .product-meta-inline__link,
.product-purchase--simple .product-meta-inline__separator {
  font-family: var(--font-primary);
  font-size: var(--paragraph-large);
  font-weight: var(--weight-regular);
  line-height: var(--paragraph-large-lh);
  color: var(--neutral-500);
}

.product-purchase--variable .product-meta-inline__link:hover,
.product-purchase--simple .product-meta-inline__link:hover {
  color: var(--text-main-900);
}

.product-purchase--variable .product-meta-inline,
.product-purchase--simple .product-meta-inline {
  margin-bottom: 30px;
}

.product-additional-description {
  margin-top: var(--spacing-lg);
  margin-bottom: 30px;
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--stroke-soft-200);
}

.product-additional-description__content {
  font-family: var(--font-secondary);
  font-size: var(--paragraph-large);
  font-weight: var(--weight-regular);
  line-height: var(--paragraph-large-lh);
  letter-spacing: var(--paragraph-large-ls);
  color: var(--text-soft-400, #7b818e);
}

.product-additional-description__content p {
  margin: 0 0 var(--spacing-sm);
}

.product-additional-description__content > *:first-child {
  margin-top: 0;
}

.product-additional-description__content > *:last-child {
  margin-bottom: 0;
}

.product-purchase--simple .product-price-cart {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.product-purchase--simple .price {
  display: block;
  margin: 0;
  font-family: var(--font-primary);
  font-size: var(--title-xsmall);
  font-weight: var(--weight-book);
  line-height: 1;
  color: var(--text-main-900);
}

.product-purchase--simple form.cart {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  width: 100%;
  margin: 0;
}

.product-purchase--simple .quantity {
  display: flex;
  align-items: center;
  margin: 0;
}

.product-purchase--simple .qty {
  width: 64px;
  height: 52px;
  border: 1px solid var(--stroke-sub-300);
  border-radius: 2px;
  padding: 0 var(--spacing-sm);
  background: var(--bg-white-0);
  font-family: var(--font-primary);
  font-size: var(--label-large);
  text-align: center;
  color: var(--text-main-900);
}

.product-purchase--simple .single_add_to_cart_button {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 var(--spacing-2xl);
  border: none;
  border-radius: 2px;
  background-color: var(--color-yellow) !important;
  color: var(--text-main-900) !important;
  font-family: var(--font-primary);
  font-size: var(--label-large);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.product-purchase--simple .single_add_to_cart_button:hover {
  background-color: var(--neutral-700);
}

/* ============================================================
   PREZZO / CTA variabile
   ============================================================ */

.product-purchase--variable .single_variation_wrap {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.product-purchase--variable .woocommerce-variation {
  display: flex;
  flex-direction: column;

}

.product-purchase--variable .woocommerce-variation-price {
  display: block;
  margin: 0;
}

.product-purchase--variable .woocommerce-variation-price .price,
.product-purchase--variable .woocommerce-variation .price {
  display: block;
  margin: 0;
  font-family: var(--font-primary);
  font-size: var(--title-xsmall);
  font-weight: var(--weight-book);
  line-height: 1;
  color: var(--text-main-900);
}

.product-purchase--variable .woocommerce-variation-price .price del,
.product-purchase--variable .woocommerce-variation .price del {
  color: var(--text-soft-400);
  margin-right: var(--spacing-xs);
}

.product-purchase--variable .woocommerce-variation-availability {
  display: none;
}

.product-purchase--variable .woocommerce-variation-add-to-cart {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  width: 100%;
}

.product-purchase--variable .quantity {
  display: flex;
  align-items: center;
  margin: 0;
}

.product-purchase--variable .qty {
  width: 64px;
  height: 52px;
  border: 1px solid var(--stroke-sub-300);
  border-radius: 2px;
  padding: 0 var(--spacing-sm);
  background: var(--bg-white-0);
  font-family: var(--font-primary);
  font-size: var(--label-large);
  text-align: center;
  color: var(--text-main-900);
}

.product-purchase--variable .single_add_to_cart_button {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 var(--spacing-2xl);
  border: none;
  border-radius: 2px;
  background-color: var(--color-yellow) !important;
  color: var(--text-main-900) !important;
  font-family: var(--font-primary);
  font-size: var(--label-large);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.product-purchase--variable .single_add_to_cart_button:hover {
  background-color: var(--neutral-700);
}

.product-purchase--variable .woocommerce-variation-price,
.product-purchase--variable .woocommerce-variation-price .price,
.product-purchase--variable .woocommerce-variation .price {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
  color: var(--text-main-900) !important;
}

/* ==========================================================================
   PRODOTTO SU RICHIESTA
   ========================================================================== */

.product-on-request {
  margin-top: 24px;
}

/* Banner ocra */
.product-on-request__banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: var(--color-yellow);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.product-on-request__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-style: normal;
  font-size: 13px;
  font-weight: var(--weight-bold);
  line-height: 1;
  margin-top: 2px;
}

.product-on-request__text {
  font-family: var(--font-primary);
  font-size: var(--label-large);
  font-weight: var(--weight-regular);
  line-height: 1.5;
  color: #1a1a1a;
  margin: 0;
}

/* Form CF7 overrides */
.product-on-request .wpcf7 {
  width: 100%;
}

.product-on-request .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-on-request .wpcf7-form label {
  font-family: var(--font-primary);
  font-size: var(--label-large);
  font-weight: var(--weight-medium);
  color: var(--text-main-900);
  display: block;
  margin-bottom: 8px;
}

.product-on-request .wpcf7-form input[type="email"] {
  width: 100%;
  border: 1px solid #e2e4e9;
  padding: 14px 16px;
  font-family: var(--font-primary);
  font-size: var(--label-large);
  color: var(--text-main-900);
  background: var(--bg-white-0);
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease;
}

.product-on-request .wpcf7-form input[type="email"]:focus {
  border-color: var(--text-main-900);
}

.product-on-request .wpcf7-form input[type="email"]::placeholder {
  color: #aaa;
}

.variations_form.is-on-request .single_variation .woocommerce-variation-price,
.variations_form.is-on-request
  .single_variation_wrap
  .woocommerce-variation-add-to-cart {
  display: none !important;
}

.reset_variations {
  display: none !important;
}

.swatchly-text {
  font-family: var(--font-primary);
  font-weight: var(--weight-medium);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.56px;
}

.swatchly-swatch {
  border: 1px solid #ccc;
  margin: 0;
  position: relative; /* necessario per z-index */
}

span.swatchly-content {
  min-width: 50px;
}

.swatchly-swatch + .swatchly-swatch {
  margin-left: -1px;
}

/* Porta in primo piano quello hover/selected per far vedere il bordo intero */
.swatchly-swatch:hover {
  border-color: var(--text-main-900);
  z-index: 1;
}

.swatchly-swatch.swatchly-selected {
  border-color: var(--text-main-900);
  background: var(--bg-weak-100);
  z-index: 1;
}

/* Varianti non disponibili: cliccabili ma visivamente attenuate */
.swatchly-swatch.swatchly-disabled {
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 1 !important;
}
.swatchly-disabled .swatchly-content .swatchly-text {
    color: var(--text-main-900) !important;
}
/* ============================================================
   GALLERY CONTROLS PERSONALIZZATI
     (da implementare via JS per sostituire le thumbnails native)
     Si applicano solo se .s4w-gallery-controls è presente dentro product-hero__gallery
   ============================================================ */

/* Nascondi thumbnails native */
.woocommerce-product-gallery .flex-control-thumbs {
  display: none !important;
}

/* Nascondi icona lente */
.woocommerce-product-gallery__trigger {
  display: none !important;
}

/* Rimuovi zoom hover */
.woocommerce-product-gallery__image img.zoomImg {
  display: none !important;
}
.woocommerce-product-gallery__image a img {
  transform: none !important;
  transition: none !important;
}

/* Riferimento posizionamento */
.woocommerce-product-gallery {
  position: relative;
  cursor: pointer;
}

/* Frecce */
.s4w-gallery-prev,
.s4w-gallery-next {
  position: absolute;
  top: calc(50% - 16px); /* 16px = metà altezza paginazione circa */
  transform: translateY(-50%);
  z-index: 10;
  background: var(--bg-white-0);
  border: none;
  border-radius: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--text-main-900, #0a0d14);
}

.s4w-gallery-prev {
  left: 8px;
}
.s4w-gallery-next {
  right: 8px;
}

/* Paginazione */
.s4w-gallery-pagination {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  align-items: center;
  z-index: 10;
  pointer-events: none; /* evita interferenze col click immagine */
}

.s4w-gallery-bullet {
  flex: 1;
  height: 2px;
  background: rgba(10, 13, 20, 0.2);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.25s;
  pointer-events: all;
}

.s4w-gallery-bullet.active {
  background: var(--text-main-900, #0a0d14);
}

/* ============================================================
   RESPONSIVE — TABLET (max 1024px)
   ============================================================ */

@media (max-width: 1024px) {
  .product-hero__inner {
    gap: 0 40px;
  }

  .s4w-product-contains__wrapper {
    grid-template-columns: repeat(
      min(2, var(--s4w-product-contains-columns, 2)),
      minmax(0, 1fr)
    );
  }

  .s4w-product-contains-card:nth-child(2n) {
    border-right: 1px solid #e2e4e9;
  }

  .s4w-product-contains-card:last-child {
    border-right: 1px solid #e2e4e9;
  }

  .product-scheda__row {
    grid-template-columns: 160px 1fr;
    gap: 0 var(--spacing-lg);
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================================ */

@media (max-width: 768px) {
  .s4w-product-contains__slider-viewport {
    overflow: hidden;
  }

  .s4w-product-contains__wrapper[data-contains-slider] {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    grid-template-columns: unset !important;
    transition: transform 0.35s ease;
  }

  .s4w-product-contains__wrapper[data-contains-slider] .s4w-product-card {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .s4w-product-correlati {
    padding-top: 64px;
  }

  /* Slider controls condivisi (contains + correlati) */
  .s4w-product-contains__slider-controls,
  .s4w-product-correlati__slider-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--spacing-lg);
  }

  .s4w-product-contains__slider-dots,
  .s4w-product-correlati__slider-dots {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .s4w-mobile-slider__dot {
    width: 40px;
    height: 2px;
    background: rgba(10, 13, 20, 0.2);
    border-radius: 0;
    transition: background 0.25s;
  }

  .s4w-mobile-slider__dot.is-active {
    background: var(--text-main-900);
  }

  .s4w-product-contains__slider-arrows,
  .s4w-product-correlati__slider-arrows {
    display: flex;
    gap: 8px;
  }

  .s4w-product-contains__slider-arrow,
  .s4w-product-correlati__slider-arrow {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-main-900);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .s4w-product-contains__slider-arrow:disabled,
  .s4w-product-correlati__slider-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }

  /* Viewport e wrapper correlati */
  .s4w-product-correlati__slider-viewport {
    overflow: hidden;
  }

  .s4w-product-correlati__wrapper[data-correlati-slider] {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    grid-template-columns: unset !important;
    transition: transform 0.35s ease;
  }

  .s4w-product-correlati__wrapper[data-correlati-slider] .s4w-product-card {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .product-archive-annate {
    bottom: auto;
    top: 0;
  }

  .product-description__text {
    font-size: 26px;
  }

  .s4w-gallery-prev,
  .s4w-gallery-next {
    top: auto;
    bottom: 12px;
    transform: none;
    background: transparent;
    padding: 4px;
    background-color: var(--bg-white-0);
  }

  .s4w-gallery-prev {
    left: auto;
    right: 44px;
  }

  .s4w-gallery-next {
    right: 8px;
  }
  
.product-description{
    padding-bottom: 64px;
  }

  .product-description__text {
        margin-bottom: 30px;
  }

  .s4w-product-contains__wrapper {
    gap: 0;
  }
.s4w-product-contains__header {
    margin-bottom: 30px;
  }
  .product-purchase--variable .product-short-description--inside-form,
  .product-purchase--simple .product-short-description--inside-form {
    border-top: none;
  }

  .product-purchase--variable .product-short-description--inside-form p,
  .product-purchase--simple .product-short-description--inside-form p {
    font-size: var(--paragraph-small);
  }

  .product-purchase--variable .single_variation_wrap {
    border-top: none;
  }

  /* Hero: stack verticale */
  .product-hero__inner {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
  }
  .product-purchase--variable .woocommerce-variation-add-to-cart,
  .product-price-cart .cart {
    flex-direction: column;
    align-items: stretch;
  }

  .product-purchase--variable .quantity,
  .product-price-cart .quantity {
    width: 100%;
  }

  .product-purchase--variable .qty,
  .product-price-cart .qty {
    width: 100%;
  }

  .product-hero__gallery {
    position: static;
    padding: var(--spacing-md);
  }

  .product-hero__summary {
    padding: var(--spacing-lg) var(--spacing-sm) 0;
  }

  .product-title {
    font-size: var(--title-medium);
  }

  .s4w-product-contains__wrapper {
    grid-template-columns: 1fr;

  }

  .s4w-product-contains-card {
    border-right: 1px solid #e2e4e9;
  }

  /* Scheda tecnica: stack verticale */
  .product-scheda__row {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xs);
    padding: var(--spacing-md) 0;
  }

  .product-hero {
    padding: 0 0 64px;
  }
}


/* ============================================================
   SEZIONE APPROFONDIMENTI
   ============================================================ */

.s4w-product-approfondimenti {
  background-color: var(--bg-weak-100);
  padding: 96px 0;
}

.s4w-product-approfondimenti .s4w-twomain__header {
  margin-bottom: 48px;
}

.s4w-product-approfondimenti .s4w-twomain__wrapper {
  display: flex;
  justify-content: space-between;
}

.s4w-product-approfondimenti .s4w-twomain__col {
  flex: 0 0 50%;
  max-width: 50%;
  display: flex;
  flex-direction: column;
}

.s4w-product-approfondimenti .s4w-col__inner {
  border: 1px solid var(--stroke-soft-200);
  padding: 20px;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.s4w-product-approfondimenti .s4w-twomain__media {
  width: 100%;
  overflow: hidden;
  margin-bottom: 16px;
}

.s4w-product-approfondimenti .s4w-twomain__image {
  width: 100%;
  aspect-ratio: 632 / 421;
  object-fit: cover;
  object-position: center;
  display: block;
}

.s4w-product-approfondimenti .s4w-twomain__content {
  flex-grow: 1;
  margin-bottom: 16px;
}

.s4w-product-approfondimenti .s4w-twomain__label {
  display: block;
  margin-bottom: 12px;
}

/* Blocco intro dentro sezione tenuta: rimuovi padding bottom */
.product-tenuta-content .wp-block-s4w-intro.s4w-intro {
  padding-bottom: 0;
}

@media (max-width: 768px) {
  .s4w-product-approfondimenti .s4w-twomain__header {
    margin-bottom: 30px;
  }

  .s4w-product-approfondimenti .s4w-title.heading-medium {
    font-size: var(--title-medium);
    line-height: var(--title-medium-lh);
    letter-spacing: var(--title-medium-ls);
  }

  .s4w-product-approfondimenti .s4w-twomain__wrapper {
    flex-direction: column;
  }

  .s4w-product-approfondimenti .s4w-twomain__col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
