@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Syne&display=swap');

/* ============================================================
   PDP NEW LAYOUT — visibile solo per utente: acracchiolo
   ============================================================ */

/* ── Reset & base ──────────────────────────────────────────── */
.pdp-product *,
.pdp-product *::before,
.pdp-product *::after {
  box-sizing: border-box;
}

.woocommerce-variation-add-to-cart-disabled.pdp-add-to-cart {
  display: none !important;
}

/* Nasconde il div nativo di WooCommerce con prezzo/stock variante:
   viene sostituito dall'aggiornamento diretto su .pdp-price via JS */
.pdp-product .woocommerce-variation,
.pdp-product .reset_variations_alert {
  display: none !important;
}

.pt-header {
    background: white;
}

/* ── Wrapper principale ─────────────────────────────────────── */
.pdp-wrapper {
  display: flex;
  max-width: 90rem;
  margin: 0 auto;
  padding: 2.5rem 5rem;
  align-items: flex-start;
  gap: 2rem;
}

/* ============================================================
   GALLERIA
   ============================================================ */

.pdp-gallery {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  height: 38.25rem;
  flex: 1 0 0;
  min-width: 0;

  /* sticky */
  position: sticky;
  top: 2.5rem; /* uguale al padding-top del wrapper, aggiusta in base all'altezza dell'header */
  align-self: flex-start; /* fondamentale: senza questo il flex item si estende e lo sticky non funziona */
}

/* ── Miniature (colonna sinistra) ───────────────────────────── */
.pdp-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  flex-shrink: 0;
  width: 5rem;
  scrollbar-width: thin;
  scrollbar-color: #c8c8c8 transparent;
}

.pdp-thumbnails::-webkit-scrollbar {
  width: 4px;
}
.pdp-thumbnails::-webkit-scrollbar-thumb {
  background-color: #c8c8c8;
  border-radius: 2px;
}

.pdp-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.25rem;
  border: 1px solid #c8c8c8;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.pdp-thumb:hover,
.pdp-thumb--active {
  border-color: #1c1e1e;
}

/* ── Immagine principale ────────────────────────────────────── */
.pdp-main-image {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c8c8c8;
}

.pdp-main-img {
  width: 100%;
  max-width: 28.3125rem;
  height: 28.25rem;
  aspect-ratio: 451 / 451;
  object-fit: cover;
  border-radius: 0.25rem;
  display: block;
}

/* Badge Offerta */
.pdp-sale-badge {
  position: absolute;
  top: 0.37rem;
  left: 0.37rem;
  z-index: 2;
  background: #fcc626;
  color: #1c1e1e;
  font-family: "Work Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03rem;
}

/* Slider mobile (nascosto su desktop) */
.pdp-slider {
  display: none;
}

/* ── Cursore zoom sull'immagine principale ───────────────────── */
.pdp-main-img--zoomable {
  cursor: zoom-in;
}

/* ── Lightbox ────────────────────────────────────────────────── */
.pdp-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Nascosto di default (dialog non aperto) */
.pdp-lightbox:not([open]) {
  display: none;
}

/* Backdrop nativo del <dialog> */
.pdp-lightbox::backdrop {
  background: transparent; /* già gestito dal background sopra */
}

.pdp-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.25rem;
}

.pdp-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.pdp-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.pdp-lightbox-next, .pdp-lightbox-prev {
  position: absolute;
  top: 50%;
  /* right: 1rem; */
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.pdp-lightbox-next {
  right: 1rem;
}

.pdp-lightbox-prev {
  left: 1rem;
}

.pdp-lightbox-next:hover, .pdp-lightbox-prev:hover {
  background: rgba(255, 255, 255, 0.3);
}



/* ============================================================
   INFO PRODOTTO (colonna destra)
   ============================================================ */

.pdp-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  flex: 1 0 0;
  min-width: 0;
}

/* ── Titolo ─────────────────────────────────────────────────── */
.pdp-title {
  color: var(--Text2, #000);
  font-family: "Work Sans", sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.8125rem;
  letter-spacing: 0.0525rem;
  text-transform: uppercase;
  margin: 0;
}

/* ── Meta: Cod | Tag | In Stock ─────────────────────────────── */
.pdp-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pdp-meta-item {
  display: flex;
  gap: 0.25rem;
}

.pdp-meta-label {
  font-family: "Work Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.3125rem;
  color: #000;
}

.pdp-meta-value {
  font-family: "Work Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3125rem;
  color: #000;
  opacity: 0.5;
}

.pdp-meta-value-stock {
  /* Title/14PX Regular */
  font-family: "Poppins", sans-serif;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3125rem; /* 150% */
}

.pdp-meta-sep {
  color: #000;
  opacity: 0.3;
  font-size: 0.875rem;
  line-height: 1.3125rem;
  user-select: none;
}

/* ── Prezzo ─────────────────────────────────────────────────── */
.pdp-price {
  width: 100%;
}

.pdp-price .price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0;
}

/* Prezzo barrato (vecchio) */
.pdp-price .price del {
  color: #6f6f6f;
  font-family: "Work Sans", sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.3125rem;
  text-decoration-line: line-through;
}

/* Prezzo barrato generato via JS (varianti) */
.pdp-price-old {
  color: #6f6f6f;
  font-family: "Work Sans", sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.3125rem;
  text-decoration-line: line-through;
}

.pdp-price:has(.pdp-price-current) {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Prezzo attuale (con sconto) */
.pdp-price .price ins {
  color: var(--Text2, #000);
  font-family: "Work Sans", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.5rem;
  letter-spacing: 0.0525rem;
  text-decoration: none;
}

/* Fallback: prodotto NON in offerta → niente <del>/<ins>, solo l'importo diretto */
.pdp-price .price > .woocommerce-Price-amount {
  color: var(--Text2, #000);
  font-family: "Work Sans", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.5rem;
  letter-spacing: 0.0525rem;
}

.pdp-price-current{
  color: var(--Text2, #000);
  font-family: "Work Sans", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.5rem;
  letter-spacing: 0.0525rem;
}

/* Reset del tag <bdi>/.woocommerce-Price-amount generato da wc_price() dentro del/ins */
.pdp-price .price del bdi,
.pdp-price .price del .woocommerce-Price-amount,
.pdp-price .price ins bdi,
.pdp-price .price ins .woocommerce-Price-amount {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: inherit;
}

/* Suffisso "I.C." */
.pdp-price .woocommerce-price-suffix {
  color: #6f6f6f;
  font-family: "Work Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1rem;
}

/* Testo per screen reader ("Il prezzo originale era...") — va nascosto visivamente */
.pdp-price .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.woocommerce-price-suffix{display: none !important;} /* disabilita il suffisso nativo di WooCommerce */


/* ── Descrizione ────────────────────────────────────────────── */
.pdp-description {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pdp-description-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #000;
  font-family: "Work Sans", sans-serif;
  width: 100%;
}

.pdp-description-label {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3125rem;
}

.pdp-description-arrow {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.pdp-description-toggle[aria-expanded="false"] .pdp-description-arrow {
  transform: rotate(-90deg);
}

/* Animazione height auto con grid trick */
.pdp-description-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.25s ease;
  overflow: hidden;
}

.pdp-description-body.is-closed {
  grid-template-rows: 0fr;
}

.pdp-description-inner {
  min-height: 0;
}

.pdp-description-text {
  color: #000;
  font-family: "Work Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.3125rem;
  padding-top: 0.25rem;
}

.pdp-description-text p {
  margin: 0;
}


/* ── Separatore ─────────────────────────────────────────────── */
.pdp-divider {
  width: 100%;
  border: none;
  border-top: 1px solid #000;
  margin: 0;
}

.pdp-cart-form{
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

/* WooCommerce form reset dentro pdp-cart-form */
.pdp-cart-form .cart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

/* Varianti: trasforma la <table> WC in flex column */
.pdp-cart-form table.variations,
.pdp-cart-form table.variations tbody {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
}

.pdp-cart-form table.variations tr {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pdp-cart-form table.variations th.label,
.pdp-cart-form table.variations td.label {
  display: none;
}

.pdp-cart-form table.variations td.value {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0;
}

.pdp-cart-form .reset_variations {
  display: none;
}

/* Nasconde l'etichetta "Quantità" generata da WooCommerce */
.pdp-cart-form .qty-label{
  display: none !important;
}

/* Area variazione singola (prezzo aggiornato da WC) */
.pdp-cart-form .single_variation_wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pdp-cart-form .woocommerce-variation-add-to-cart {
  display: flex;
  gap: 1rem;
}

/* ============================================================
   VARIANTI
   ============================================================ */

.pdp-variations {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.pdp-variations-label {
  color: #000;
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.pdp-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: #fff;
  color: #1c1e1e;
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231C1E1E' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  cursor: pointer;
}

.pdp-select:focus {
  outline: 2px solid #fcc626;
  outline-offset: 1px;
}

/* ============================================================
   ADD TO CART (stepper + CTA)
   ============================================================ */

.pdp-add-to-cart {
  display: flex;
  align-items: stretch;
  gap: 0.625rem;
  width: 100%;
}

/* Stepper */
.pdp-stepper {
  display: flex;
  align-items: stretch;
  border-radius: 0.25rem;
  border: 1px solid rgba(0, 0, 0, 0.3);
  overflow: hidden;
  flex-shrink: 0;
}

.pdp-stepper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  padding: 0.625rem 0;
  border: none;
  cursor: pointer;
  color: #1c1e1e;
  font-family: "Work Sans", sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.5rem;
  background: #fff;
  transition: background 0.15s ease;
}

.pdp-stepper-btn:hover {
  background: #f5f5f5;
}

.pdp-stepper-plus {
  background: #fcc626;
}

.pdp-stepper-plus:hover {
  background: #f0bb1f;
}

.pdp-stepper-input {
  width: 3rem;
  text-align: center;
  border: none;
  border-left: 1px solid rgba(0, 0, 0, 0.15);
  border-right: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  color: #1c1e1e;
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5rem;
  -moz-appearance: textfield;
}

.pdp-stepper-input::-webkit-outer-spin-button,
.pdp-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* CTA */
.pdp-cta {
  width: 100% !important; 
}

.pdp-cta:hover {
  background: #f0bb1f;
}

.pdp-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   INFO SPEDIZIONE
   ============================================================ */

.pdp-shipping {
  display: flex;
  padding: 0.9375rem 1.5rem 0.9375rem 1rem;
  align-items: center;
  align-self: stretch;
  gap: 0.75rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(0, 0, 0, 0.5);
}

.pdp-shipping-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.pdp-shipping-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pdp-shipping-title {
  color: #000;
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5rem;
}

.pdp-shipping-sub {
  color: #000;
  font-family: "Work Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.125rem;
}

/* ============================================================
   CARATTERISTICHE / PESO / DIMENSIONI
   ============================================================ */

.pdp-section-label {
  display: block;
  color: #000;
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25rem;
  margin-bottom: 0.375rem;
}

.pdp-features{
  width: 100%;
}

.pdp-features-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
}

.pdp-features-list li,
.pdp-section-value,
.pdp-features-link {
  color: #1c1e1e;
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5rem;
  margin: 0;
}

.pdp-features-link {
  font-weight: 500 !important;
}

.pdp-features-link, .pdp-meta-value {
  text-decoration: none; /* disabilita quello nativo */
  
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 50% 100%;    /* ancorato in basso */
  background-size: 0% 1.5px;      /* larghezza 0, altezza = spessore */
  
  transition: background-size 0.25s ease;
}

.pdp-features-link:hover, .pdp-meta-value:hover {
  background-size: 100% 1.5px;
}


/* ============================================================
   PRODOTTI CORRELATI
   ============================================================ */

.pdp-related {
  max-width: 90rem;
  margin: 3rem auto 0;
  padding: 0 5rem 3rem;
}

.pdp-related-title {
  color: #000;
  font-family: "Work Sans", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 3.5rem;
  text-transform: capitalize;
  margin: 0 0 1.5rem;
}

.pdp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ── Card correlata ─────────────────────────────────────────── */
.pdp-related-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 0.25rem;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.pdp-related-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.pdp-related-card__img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 0.25rem;
  border: 1px solid #c8c8c8;
  background: #fff;
}

.pdp-related-card__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.pdp-related-card:hover .pdp-related-card__img {
  transform: scale(1.03);
}

.pdp-related-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.75rem 0.25rem 0.5rem;
}

.pdp-related-card__title {
  color: #000;
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.375rem;
  text-transform: uppercase;
  letter-spacing: 0.03rem;
}

.pdp-related-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ============================================================
   MOBILE  (max-width: 768px)
   ============================================================ */

@media (max-width: 768px) {

  /* Wrapper */
  .pdp-wrapper {
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    gap: 1.5rem;
  }

  /* Galleria */
  .pdp-gallery {
    position: static; /* disabilita sticky su mobile */
    height: auto;
    flex-direction: column;
    width: 100%;
  }

  /* Nascondi miniature */
  .pdp-thumbnails {
    display: none;
  }

  /* Immagine principale desktop → nascosta */
  .pdp-main-img {
    display: none;
  }

  /* Slider mobile → visibile */
  .pdp-main-image {
    width: 100%;
    border: none;
  }

  .pdp-slider {
    display: block;
    width: 100%;
  }

  .pdp-slide img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.25rem;
    border: 1px solid #c8c8c8;
    display: block;
  }

  /* Frecce Slick */
  .pdp-slide-prev,
  .pdp-slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: #FCC626;
    border: none;
    border-radius: 50%;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  }

  .pdp-slide-prev { left: -1rem; }
  .pdp-slide-next { right: -1rem; }

  /* Slick container */
  .pdp-main-image .slick-slider {
    position: relative;
  }

  .pdp-lightbox {
    touch-action: pan-y;
  }

  /* Immagine sopra, frecce in una fascia dedicata sotto: mai sovrapposte */
  .pdp-lightbox-img {
    max-height: calc(100dvh - 7rem);
    margin-bottom: 4.5rem;
  }

  .pdp-lightbox-next,
  .pdp-lightbox-prev {
    z-index: 10;
    top: auto;
    bottom: 1.25rem;
    width: 3rem;
    height: 3rem;
    font-size: 1.75rem;
    transform: none;
    background: rgba(255, 255, 255, 0.3);
  }

  .pdp-lightbox-next { right: calc(50% - 3.5rem); left: auto; }
  .pdp-lightbox-prev { left: calc(50% - 3.5rem); right: auto; }

  .pdp-lightbox-close {
    z-index: 10;
    width: 2.5rem;
    height: 2.5rem;
  }

  /* Info prodotto */
  .pdp-info {
    width: 100%;
    gap: 0.875rem;
  }

  /* Titolo */
  .pdp-title {
    font-size: 1.375rem;
    line-height: 1.625rem;
  }

  .pdp-meta-sep{display: none;}

  /* Stepper + CTA impilati */
  .pdp-add-to-cart {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .pdp-cta {
    padding: 0.625rem 1.5rem;
  }

  /* Shipping: rimuovi padding right fisso */
  .pdp-shipping {
    padding: 0.875rem 1rem;
  }

  /* Prodotti correlati */
  .pdp-related {
    padding: 0 1.25rem 2rem;
  }

  .pdp-related-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .pdp-wrapper {
    padding: 2rem 2.5rem;
  }

  .pdp-related {
    padding: 0 2.5rem 2.5rem;
  }

  .pdp-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pdp-cta {
    padding: 0.625rem 1.5rem;
  }
}
