/* VICEGRIP — stable DualSense GTA VI galleries.
   The first source image and Splide's mounted scene share the same geometry.
   Fade switches photographs in place, without cloned loop slides or layout jumps.
   This is scoped to the two GTA VI pages; other catalogues are unaffected. */
body.product-page [data-product-gallery].reveal,
body.product-page [data-product-gallery].reveal.visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
body.product-page .product-gallery,
body.product-page .product-carousel,
body.product-page .product-carousel .gallery-main {
  min-width: 0;
  max-width: 100%;
}
body.product-page .product-carousel .gallery-main {
  position: relative !important;
  box-sizing: border-box;
  width: 100%;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
  isolation: isolate;
}
/* The gallery is never sized by a later-loading landscape or square photograph. */
body.product-page .product-carousel .gallery-main > .splide__track {
  position: absolute !important;
  inset: 0 !important;
  box-sizing: border-box;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
}
body.product-page .product-carousel .splide__list {
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.product-page .product-carousel:not(.is-initialized) .splide__list {
  /* Before JS: exactly the same first photograph, never a scrolling strip. */
  display: flex !important;
  flex-wrap: nowrap !important;
  transform: none !important;
  transition: none !important;
}
body.product-page .product-carousel:not(.is-initialized) .splide__slide {
  flex: 0 0 100% !important;
  min-width: 100% !important;
  height: 100% !important;
  scroll-snap-align: none !important;
}
body.product-page .product-carousel .splide__slide {
  box-sizing: border-box;
  min-width: 0;
  height: 100% !important;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff !important;
}
body.product-page .product-carousel .splide__slide > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
  transform: none !important;
  transition: none !important;
  background: #fff !important;
  -webkit-user-drag: none;
}
/* The thumbnail grid is laid out in the HTML, ahead of JS initialization.
   Its appearance must not change the image width mid-render. */
body.product-page .product-carousel.rockstar-thumb-ready {
  min-width: 0;
  width: 100%;
}
body.product-page .product-carousel.rockstar-thumb-ready .splide__pagination {
  min-width: 0;
}
body.product-page .product-carousel .splide__track { cursor: default; }
@media (max-width: 980px) {
  body.product-page .product-carousel .gallery-main {
    aspect-ratio: 4 / 3 !important;
    border-radius: 12px !important;
  }
}
@media (max-width: 370px) {
  body.product-page .product-carousel .gallery-main { aspect-ratio: 4 / 3 !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.product-page .product-carousel .splide__slide { transition: none !important; }
}

/* Fast, dependable tap targets, without a permanent busy or disabled visual state. */
body.product-page .product-carousel .photo-arrows:not([hidden]) {
  -webkit-tap-highlight-color: transparent;
}
body.product-page .product-carousel .photo-arrows:not([hidden]) button {
  touch-action: manipulation;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px !important;
  width: 44px !important;
  min-height: 44px !important;
  height: 44px !important;
  transition: background-color .18s ease, color .18s ease, scale .16s ease !important;
}
body.product-page .product-carousel .photo-arrows:not([hidden]) button:active {
  background: rgba(246,202,226,.25) !important;
  scale: .94;
}
body.product-page .product-carousel .splide__pagination__page {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: reduce) {
  body.product-page .product-carousel .photo-arrows:not([hidden]) button {
    transition: none !important;
  }
}
