/**
 * VTL Product Page Styles
 *
 * Stili per la pagina prodotto singolo (pacchetto viaggio VTL).
 * Palette: blu #1A1AE6, giallo-lime #C8F000, verde scuro #1A3A2A, bianco #FFFFFF.
 *
 * @author  Matteo Morreale
 * @package VTL Theme
 * @version 1.0.0
 */

/* ============================================================
   VARIABILI CSS
   ============================================================ */
:root {
  --vtl-blue:        #2127eb;
  --vtl-blue-dark:   #171dcc;
  --vtl-lime:        #d6f655;
  --vtl-lime-dark:   #c3e44a;
  --vtl-green-dark:  #2a2a2a;
  --vtl-white:       #f1f1f1;
  --vtl-gray-light:  #F4F4F4;
  --vtl-gray:        #888888;
  --vtl-text:        #1A1A1A;
  --vtl-radius:      8px;
  --vtl-radius-lg:   12px;
  --vtl-shadow:      0 4px 24px rgba(0, 0, 0, 0.10);
  --vtl-transition:  0.2s ease;
  --vtl-sidebar-w:   clamp(260px, 24vw, 320px);
  --vtl-gap:         clamp(16px, 2vw, 32px);
  --vtl-thumbs-w:    clamp(110px, 12vw, 160px);
  --vtl-main-ar:     16 / 11;
  --vtl-main-maxh:   10000px;
}

/* ============================================================
   LAYOUT PRINCIPALE
   ============================================================ */
.vtl-product-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
  background: var(--vtl-white);
  border-radius: 16px;
  overflow: visible;
}

.vtl-product-page *,
.vtl-product-page *::before,
.vtl-product-page *::after {
  box-sizing: border-box;
}

.vtl-product-breadcrumb {
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--vtl-blue);
}

.vtl-product-breadcrumb a {
  color: var(--vtl-blue);
  text-decoration: none;
}

.vtl-product-breadcrumb a:hover {
  text-decoration: underline;
}

/* Layout a due colonne: contenuto principale + sidebar */
.vtl-product-layout {
  display: flex !important;
  gap: var(--vtl-gap);
  align-items: flex-start;
  position: relative;
  overflow: visible;
}

.vtl-product-main {
  min-width: 0; /* evita overflow in grid */
  flex: 1 1 auto;
}

/* ============================================================
   GALLERIA IMMAGINI
   ============================================================ */
.vtl-gallery {
  display: grid;
  grid-template-columns: var(--vtl-thumbs-w) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 32px;
  align-items: stretch;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.vtl-gallery.vtl-gallery--single {
  grid-template-columns: 1fr;
}

/* Colonna thumbnail */
.vtl-gallery__thumbnails {
  display: grid;
  gap: 10px;
  grid-auto-rows: minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
}

.vtl-gallery__thumb {
  display: block;
  padding: 0;
  border: 3px solid var(--vtl-blue);
  border-radius: 0 !important;
  cursor: pointer;
  background: none;
  overflow: hidden;
  transition: border-color var(--vtl-transition);
  height: 100%;
}

.vtl-gallery__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
}

.vtl-gallery__thumb:hover,
.vtl-gallery__thumb:focus-visible {
  border-color: var(--vtl-lime);
  outline: none;
}

.vtl-gallery__thumb.is-active {
  border-color: var(--vtl-lime);
}

/* Immagine principale */
.vtl-gallery__main {
  display: flex;
  border-radius: 0 !important;
  overflow: hidden;
  border: 4px solid var(--vtl-blue);
  aspect-ratio: var(--vtl-main-ar);
  max-height: var(--vtl-main-maxh);
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.vtl-gallery__main-img {
  width: 100% !important;
  height: 100% !important;
  flex: 1 1 auto;
  object-fit: cover !important;
  display: block !important;
  transition: opacity var(--vtl-transition);
}

.vtl-gallery__main-img.is-loading {
  opacity: 0.5;
}

/* ============================================================
   SIDEBAR STICKY
   ============================================================ */
.vtl-sticky-sidebar {
  position: sticky !important;
  top: var(--vtl-sticky-top, 24px) !important;
  align-self: start;
  z-index: 10;
  float: right;
  width: 100% !important;
  max-width: var(--vtl-sidebar-w);
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  flex: 0 0 var(--vtl-sidebar-w);
}

.vtl-sticky-sidebar__inner {
  background: var(--vtl-blue) !important;
  color: var(--vtl-white);
  border-radius: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  padding: 24px 22px;
  box-shadow: none;
  overflow: hidden;
}

@keyframes vtl-sticky-sidebar-nudge {
  0% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-6px);
  }
  50% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

.vtl-sticky-sidebar__inner--nudge {
  animation: vtl-sticky-sidebar-nudge 320ms ease-in-out 0s 1;
}

@keyframes vtl-offerta-riepilogo-nudge {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(199, 255, 0, 0), 0 0 0 0 rgba(0, 0, 0, 0);
    filter: brightness(1);
  }
  20% {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 0 0 3px rgba(199, 255, 0, 0.65), 0 18px 38px rgba(0, 0, 0, 0.28);
    filter: brightness(1.05);
  }
  50% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 2px rgba(199, 255, 0, 0.35), 0 12px 26px rgba(0, 0, 0, 0.18);
    filter: brightness(1.02);
  }
  75% {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 0 0 3px rgba(199, 255, 0, 0.55), 0 16px 34px rgba(0, 0, 0, 0.24);
    filter: brightness(1.04);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(199, 255, 0, 0), 0 0 0 0 rgba(0, 0, 0, 0);
    filter: brightness(1);
  }
}

.vtl-offerta-riepilogo__box--nudge {
  animation: vtl-offerta-riepilogo-nudge 520ms ease-in-out 0s 1;
}

.vtl-sticky-sidebar__category {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 10px;
}

.vtl-sticky-sidebar__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--vtl-lime) !important;
  margin: 0 0 16px;
  line-height: 1.15;
}

/* DL dettagli */
.vtl-sticky-sidebar__details {
  margin: 0 0 12px;
  padding: 0;
}

.vtl-sticky-sidebar__detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 0;
  font-size: 0.95rem;
}

.vtl-sticky-sidebar__detail-row[hidden] {
  display: none !important;
}

.vtl-sticky-sidebar__detail-row dt {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  flex-shrink: 0;
}

.vtl-sticky-sidebar__detail-row dd {
  font-weight: 700;
  text-align: right;
  margin: 0;
}

.vtl-sticky-sidebar__detail-row--duration dd {
  font-size: 1.2rem;
  line-height: 1;
}

/* Riga prezzo */
.vtl-sticky-sidebar__detail-row--price dd {
  font-size: 1.6rem;
  color: var(--vtl-lime);
  line-height: 1;
}

.vtl-sticky-sidebar__price bdi {
  color: var(--vtl-lime) !important;
}

#vtl-sticky-sidebar.is-variation-selected .vtl-sticky-sidebar__price bdi {
  font-size: 0.7em;
}

.vtl-sticky-sidebar__deposit bdi {
  color: rgba(241, 241, 241, 0.9) !important;
}

.vtl-sticky-sidebar__price .woocommerce-Price-currencySymbol,
.vtl-sticky-sidebar__deposit .woocommerce-Price-currencySymbol {
  color: var(--vtl-lime) !important;
}

.vtl-sticky-sidebar__price-unit {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
}

.vtl-sticky-sidebar__detail-row--deposit dd {
  font-size: 1.6rem;
  color: var(--vtl-lime);
  line-height: 1;
}

.vtl-sticky-sidebar__deposit-note {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
}

/* Nota prezzo */
.vtl-sticky-sidebar__price-note {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(241, 241, 241, 0.9);
  margin: 10px 0 14px;
  line-height: 1.4;
}

/* Urgenza scorte */
.vtl-sticky-sidebar__urgency {
  font-size: 0.95rem;
  color: var(--vtl-lime);
  font-weight: 800;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.vtl-sticky-sidebar__urgency[hidden] {
  display: none !important;
}

.vtl-icon-urgency {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--vtl-lime);
  border-radius: 999px;
  line-height: 1;
  flex: 0 0 22px;
  font-weight: 900;
}

/* Scadenza offerta */
.vtl-sticky-sidebar__expiry {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 16px;
}

/* CTA sidebar */
.vtl-sticky-sidebar__cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
  position: relative;
}

.vtl-sticky-sidebar__cta .vtl-btn {
  border-radius: 10px;
  padding: 18px 24px;
  font-size: 1.125rem;
  border-width: 2px;
}

.vtl-sticky-sidebar__cta .vtl-btn--outline {
  border-color: rgba(255, 255, 255, 0.65);
}

.vtl-disabled-cta-overlay {
  position: absolute;
  display: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  z-index: 5;
  cursor: pointer;
}

.vtl-tooltip {
  position: absolute;
  z-index: 10000;
  min-width: 340px;
  max-width: min(460px, calc(100vw - 24px));
  background: var(--vtl-lime);
  color: var(--vtl-green-dark);
  border: 2px solid var(--vtl-green-dark);
  border-radius: 0;
  padding: 18px 22px;
  font-size: 1.125rem;
  font-weight: 900;
  line-height: 1.25;
  pointer-events: none;
  transform: skewX(-14deg);
  transform-origin: center;
}

.vtl-tooltip__text {
  display: inline-block;
  transform: skewX(14deg);
}

.vtl-tooltip__arrow {
  position: absolute;
  left: var(--vtl-tooltip-arrow-x, 20%);
  bottom: -38px;
  width: 45px;
  height: 45px;
  max-height: 45px;
  background-image: url('../images/vtl_freccia_blu.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: translateX(-50%) skewX(14deg) scaleX(-1) rotate(90deg);
  transform-origin: center;
}

.vtl-tooltip--below .vtl-tooltip__arrow {
  bottom: auto;
  top: -18px;
}

.vtl-product-page .select_container select {
  color: var(--vtl-white) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
}

.vtl-product-page .select_container select:focus,
.vtl-product-page .select_container select:active {
  color: var(--vtl-lime) !important;
}

.vtl-product-page .select_container select::-ms-expand {
  display: none;
}

.vtl-sticky-sidebar__inner .vtl-btn--outline:hover,
.vtl-sticky-sidebar__inner .vtl-btn--outline:focus {
  color: var(--vtl-lime) !important;
  border-color: var(--vtl-lime) !important;
}

.vtl-sticky-sidebar__sold-out {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-top: 16px;
}

/* ============================================================
   PULSANTI
   ============================================================ */
.vtl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  box-sizing: border-box;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--vtl-transition), color var(--vtl-transition), border-color var(--vtl-transition), opacity var(--vtl-transition);
  border: 2px solid transparent;
  line-height: 1;
  white-space: nowrap;
  position: relative;
}

.vtl-btn::before,
.vtl-btn::after {
  content: none !important;
}

.vtl-btn--full {
  width: 100%;
}

/* Primario: lime su sfondo blu */
.vtl-btn--primary {
  background: var(--vtl-lime);
  color: var(--vtl-green-dark);
  border-color: var(--vtl-lime);
}

.vtl-btn--primary:hover:not(:disabled),
.vtl-btn--primary:focus-visible:not(:disabled) {
  background: var(--vtl-lime-dark);
  border-color: var(--vtl-lime-dark);
}

.vtl-btn--primary:disabled,
.vtl-btn--primary[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Outline: bordo bianco su sfondo blu */
.vtl-btn--outline {
  background: transparent;
  color: var(--vtl-white);
  border-color: var(--vtl-white);
}

.vtl-btn--outline:hover:not(:disabled),
.vtl-btn--outline:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.vtl-offerta-riepilogo__cta .vtl-btn--outline {
  color: var(--vtl-white) !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
}

.vtl-offerta-riepilogo__cta .vtl-btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   RIEPILOGO PRODOTTO
   ============================================================ */
.vtl-product-summary {
  margin-bottom: 32px;
}

.vtl-product-summary__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--vtl-blue);
  margin: 0 0 16px;
  line-height: 1.2;
}

.vtl-product-summary__badges {
  margin-bottom: 16px;
}

.vtl-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 0 !important;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.vtl-badge--servizi {
  background: var(--vtl-green-dark);
  color: var(--vtl-lime);
  padding: 8px 32px;
}

.vtl-product-summary__short-desc {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--vtl-text);
  margin-bottom: 20px;
}

.vtl-product-summary__desc {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--vtl-text);
  margin-bottom: 24px;
}

.vtl-product-main .alignwide,
.vtl-product-main .alignfull {
  width: auto;
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.vtl-product-main .wp-block-image.alignwide img,
.vtl-product-main .wp-block-image.alignfull img {
  max-width: 100%;
  height: auto;
}

.vtl-product-summary__section {
  margin-bottom: 20px;
}

.vtl-product-summary__section-title {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--vtl-green-dark);
  color: var(--vtl-lime);
  padding: 6px 24px;
  border-radius: 0;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.vtl-product-summary__section-content {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--vtl-text);
}

/* ============================================================
   LABEL SEZIONE (badge intestazione sezione)
   ============================================================ */
.vtl-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 32px;
  border-radius: 0 !important;
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.vtl-section-label--blue {
  background: var(--vtl-green-dark);
  color: var(--vtl-lime);
}

.vtl-section-label--green {
  background: var(--vtl-green-dark);
  color: var(--vtl-lime);
}

.vtl-section-label__icon {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 18px;
}

/* ============================================================
   SELETTORI VARIAZIONI
   ============================================================ */
.vtl-variation-selectors {
  margin-bottom: 32px;
}

.vtl-variations-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vtl-variation-row {
  background: var(--vtl-blue);
  border-radius: 0 !important;
  padding: 16px 20px;
}

.vtl-variation-row__inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vtl-variation-row__label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--vtl-lime);
  cursor: pointer;
}

.vtl-variation-row__select-wrap {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 4px;
}

.vtl-variation-row__select-wrap::before,
.vtl-variation-row__select-wrap::after {
  content: none !important;
}

#vtl-variation-selectors .select_container::after,
#vtl-variation-selectors .select_container::before {
  content: none !important;
  display: none !important;
}

.vtl-variation-select {
  width: 100%;
  background: transparent !important;
  border: none;
  outline: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  padding: 4px 32px 4px 0;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background: none !important;
  background-image: none !important;
  box-shadow: none !important;
  cursor: pointer;
  font-family: inherit;
}

.vtl-variation-select.fill_inited,
.vtl-variation-select.filled {
  background: none !important;
  background-image: none !important;
}

.vtl-variation-select.has-value {
  color: #fff;
  font-weight: 600;
}

.vtl-variation-select option {
  background: var(--vtl-blue-dark);
  color: var(--vtl-white);
}

.vtl-variation-select:focus {
  color: var(--vtl-white);
}

/* Freccia custom del select */
.vtl-variation-row__arrow {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 24px;
  height: 24px;
  background: var(--vtl-lime);
  border-radius: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vtl-variation-row__arrow::after {
  content: '';
  padding-right: 9px;
  margin-right: 3px;
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--vtl-green-dark);
  border-bottom: 2px solid var(--vtl-green-dark);
  transform: rotate(45deg) translateY(-3px);
}

.vtl-toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(24px);
  background: var(--vtl-blue-dark);
  color: var(--vtl-white);
  padding: 10px 16px;
  border-radius: var(--vtl-radius);
  box-shadow: var(--vtl-shadow);
  opacity: 0;
  transition: opacity var(--vtl-transition), transform var(--vtl-transition);
  z-index: 9999;
}

.vtl-toast.vtl-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   BOX OFFERTA RIEPILOGO
   ============================================================ */
.vtl-offerta-riepilogo {
  margin-bottom: 40px;
}

/* Nascosto di default, mostrato via JS */
.vtl-offerta-riepilogo[hidden] {
  display: none !important;
}

.vtl-offerta-riepilogo__box {
  background: var(--vtl-blue);
  border-radius: 0 !important;
  padding: 28px 24px;
  color: var(--vtl-white);
}

body.single-product .vtl-product-page img {
  border-radius: 0 !important;
}

.vtl-offerta-riepilogo__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--vtl-lime);
  margin: 0 0 16px;
  line-height: 1.3;
}

.vtl-offerta-riepilogo__details {
  margin: 0 0 12px;
  padding: 0;
}

.vtl-offerta-riepilogo__detail-row {
  display: flex;
  gap: 8px;
  font-size: 0.9375rem;
  margin-bottom: 4px;
}

.vtl-offerta-riepilogo__detail-row dt {
  font-weight: 700;
  color: var(--vtl-white);
  flex-shrink: 0;
}

.vtl-offerta-riepilogo__detail-row dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.vtl-offerta-riepilogo__note {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 8px 0 16px;
}

.vtl-offerta-riepilogo__note[hidden] {
  display: none;
}

.vtl-offerta-riepilogo__price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 24px;
  flex-wrap: wrap;
}

.vtl-offerta-riepilogo__price-label {
  font-size: 0.9375rem;
  color: var(--vtl-white);
  font-weight: 600;
}

.vtl-offerta-riepilogo__price {
  font-size: 1.3em;
  font-weight: 800;
  color: var(--vtl-white);
}

.vtl-offerta-riepilogo__deposit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -12px 0 24px;
  flex-wrap: wrap;
}

.vtl-offerta-riepilogo__deposit-row[hidden] {
  display: none !important;
}

.vtl-offerta-riepilogo__deposit-label {
  font-size: 0.9375rem;
  color: var(--vtl-white);
  font-weight: 600;
}

.vtl-offerta-riepilogo__deposit {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--vtl-lime);
}

.vtl-offerta-riepilogo__deposit-note {
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
}

.vtl-offerta-riepilogo__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.vtl-offerta-riepilogo__cta .vtl-btn {
  flex: 1 1 180px;
  border-radius: 10px;
}

/* ============================================================
   OFFERTA SCADUTA
   ============================================================ */
.vtl-offerta-scaduta {
  background: var(--vtl-gray-light);
  border-radius: var(--vtl-radius);
  padding: 20px 24px;
  text-align: center;
  color: var(--vtl-gray);
  font-size: 0.9375rem;
  margin-bottom: 32px;
}

@media (max-width: 1199px) {
  :root {
    --vtl-sidebar-w: 280px;
    --vtl-gap: 24px;
    --vtl-thumbs-w: 140px;
    --vtl-main-ar: 16 / 9;
    --vtl-main-maxh: clamp(360px, 55vh, 520px);
  }
}

@media (max-width: 1099px) {
  :root {
    --vtl-sidebar-w: 260px;
    --vtl-thumbs-w: 120px;
    --vtl-main-maxh: clamp(340px, 50vh, 480px);
  }
}

/* ============================================================
   RESPONSIVE — TABLET (< 1024px)
   ============================================================ */
@media (max-width: 1023px) {
  .vtl-product-layout {
    flex-direction: column;
  }

  /* Su tablet/mobile la sidebar non è sticky e appare sopra il contenuto */
  .vtl-sticky-sidebar {
    position: static;
    order: -1; /* Mostra la sidebar prima del contenuto principale */
    top: auto;
    flex: 0 0 auto;
  }

  #vtl-sticky-sidebar.vtl-sticky-sidebar {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
  }

  .vtl-sticky-sidebar__inner {
    position: static;
    top: auto;
  }

  :root {
    --vtl-sidebar-w: 100%;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (< 768px)
   ============================================================ */
@media (max-width: 767px) {
  .vtl-product-page {
    padding: 24px 16px;
  }

  .vtl-gallery {
    grid-template-columns: 1fr;
  }

  .vtl-gallery__thumbnails {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    height: auto;
  }

  .vtl-gallery__thumb {
    flex: 0 0 80px;
    height: auto;
  }

  .vtl-gallery__main {
    aspect-ratio: 4 / 3;
  }

  .vtl-product-summary__title {
    font-size: 1.5rem;
  }

  .vtl-sticky-sidebar__title {
    font-size: 1.125rem;
  }

  .vtl-offerta-riepilogo__cta {
    flex-direction: column;
  }

  .vtl-offerta-riepilogo__cta .vtl-btn {
    flex: 1 1 auto;
  }
}

body.single-product .page_content_wrap {
  background-color: #ffffff !important;
}
