/* Quory - pagina prodotto: galleria a colonna + dettagli fissi a fianco (impostazione B) */

.single-product .product-page {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
  align-items: start; min-height: 0; overflow: visible;
  padding-left: clamp(16px, 2.5vw, 40px); gap: clamp(24px, 4vw, 72px);
}

/* sinistra: le foto una sotto l'altra, intere, mai più alte dello schermo */
.single-product .product-left { position: static; height: auto; display: block; overflow: visible; padding: 24px 0 60px; }
.product-gallery { display: flex; flex-direction: column; gap: 14px; }
.product-gallery-item { margin: 0; display: flex; justify-content: center; }
.product-gallery-item img {
  display: block; width: auto; max-width: 100%; height: auto;
  max-height: calc(100vh - 140px); object-fit: contain; cursor: zoom-in;
  user-select: none;
}
.product-gallery-counter { display: none; }

/* destra: titolo, prezzo, taglie e carrello restano visibili mentre si scorrono le foto */
.single-product .product-right {
  position: sticky; top: 100px; align-self: start;
  display: block; padding: 24px clamp(16px, 2.5vw, 40px) 40px 0;
  max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin;
}
.single-product .product-summary { max-width: 440px; margin: 0; }

/* vista a schermo intero */
.pg-lightbox {
  position: fixed; inset: 0; z-index: 100000; background: rgba(255, 255, 255, .97);
  display: flex; align-items: center; justify-content: center; padding: 40px 70px;
}
.pg-lightbox[hidden] { display: none; }
.pg-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-out; }
.pg-lightbox button {
  position: absolute; background: none; border: 0; cursor: pointer; color: #111;
  font-size: 44px; line-height: 1; padding: 12px; font-weight: 300;
}
.pg-close { top: 14px; right: 18px; }
.pg-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.pg-next { right: 12px; top: 50%; transform: translateY(-50%); }
.pg-lightbox button:focus-visible { outline: 1px solid #111; }
html.pg-noscroll, html.pg-noscroll body { overflow: hidden; }

/* telefono: foto a scorrimento orizzontale, dettagli sotto */
@media (max-width: 768px) {
  .single-product .product-page { grid-template-columns: 1fr; padding-left: 0; gap: 0; }
  .single-product .product-left { position: relative; padding: 0; }
  .product-gallery {
    flex-direction: row; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .product-gallery::-webkit-scrollbar { display: none; }
  .product-gallery-item { flex: 0 0 100%; scroll-snap-align: start; }
  .product-gallery-item img { width: 100%; max-height: 72vh; object-fit: contain; }
  .product-gallery-counter {
    display: block; position: absolute; right: 14px; bottom: 12px;
    background: rgba(255, 255, 255, .85); padding: 3px 10px; border-radius: 999px;
    font-size: 11px; letter-spacing: .08em;
  }
  .single-product .product-right { position: static; max-height: none; overflow: visible; padding: 28px 20px 80px; }
  .single-product .product-summary { max-width: none; }
  .pg-lightbox { padding: 50px 0; }
  .pg-prev, .pg-next { display: none; }
}
