/* Bennet V086 — APENAS PDP, sobrepor V078–V085 sem alterar outros templates.
 * Inspirado em Shopify V88 assets/theme.js:initGallery:
 * slides absolutos + transform; altura e foto escolhida mudam NO MESMO render,
 * em touchend/clique da miniatura, não 200ms depois de scrollend.
 */
body.template-product .product-gallery__main {
  display: block !important;
  position: relative !important;
  overflow: hidden !important;
  overflow-x: hidden !important;
  scroll-snap-type: none !important;
  touch-action: pan-y pinch-zoom !important;
  aspect-ratio: var(--bj-gallery-ratio, 9 / 16) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  transition: none !important;
  background: transparent !important;
}
body.template-product .product-gallery__main [data-gallery-slide] {
  position: absolute !important;
  inset: 0 !important;
  flex: none !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  scroll-snap-align: none !important;
  background: transparent !important;
  transform: translate3d(var(--bj-slide-offset, 0%), 0, 0) !important;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1) !important;
}
body.template-product .product-gallery__main [data-gallery-slide] > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  background: transparent !important;
}
/* Safari iOS arredonda a altura do header em pixels fracionários. O Shopify
 * original sobrepõe o main 1px além do header; os fixes Headless posteriores
 * eliminaram o pixel e criaram uma linha branca. 2px cobrem o arredondamento
 * e a borda sem mover o anúncio superior nem afetar desktop/home. */
@media (max-width: 1023.98px) {
  body.template-product.header-overlay #MainContent {
    margin-top: calc(-1 * var(--header-height) - 2px) !important;
  }
  body.template-product.header-overlay #site-top-bar:not(.is-scrolled) .site-header {
    border-bottom: 0 !important;
    box-shadow: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.template-product .product-gallery__main [data-gallery-slide] {
    transition: none !important;
  }
}
