/* The horizontal strip remains swipeable even before JavaScript starts. */
.photo-gallery {
  position: relative;
  min-width: 0;
  isolation: isolate;
}
.photo-gallery.product-image { aspect-ratio: auto; }
.photo-gallery .gallery-slide-list {
  display: flex;
  width: 100%;
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
  position: relative;
  background: var(--stone, #eff0f3);
}
.photo-gallery .gallery-slide-list::-webkit-scrollbar { display: none; }
.photo-gallery .gallery-slide {
  display: block;
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: transparent;
  -webkit-user-drag: none;
}
.photo-gallery .gallery-slide > img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.photo-gallery .gallery-slide:focus-visible {
  outline: 2px solid var(--olive, #6a7081);
  outline-offset: -4px;
}
.photo-gallery:focus-visible {
  outline: 2px solid var(--olive, #6a7081);
  outline-offset: 4px;
}
.photo-gallery [data-gallery-prev],
.photo-gallery [data-gallery-next] {
  display: none;
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  min-width: 40px;
  width: 40px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffffb3;
  border-radius: 2px;
  background: #fffffff0;
  color: var(--ink, #25262a);
  box-shadow: 0 2px 10px #00000009;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.photo-gallery.gallery-ready [data-gallery-prev],
.photo-gallery.gallery-ready [data-gallery-next] { display: inline-flex; }
.photo-gallery [data-gallery-prev] { left: 10px; }
.photo-gallery [data-gallery-next] { right: 10px; }
.photo-gallery [data-gallery-prev]:hover,
.photo-gallery [data-gallery-next]:hover { background: #ffffff; }
.photo-gallery [data-gallery-prev] svg,
.photo-gallery [data-gallery-next] svg { width: 18px; height: 18px; }
.photo-gallery [data-gallery-count] {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 2px;
  background: #ffffffed;
  color: var(--ink, #25262a);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .07em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.photo-gallery .product-tag { pointer-events: none; }
.photo-gallery .product-quick-link { pointer-events: none; padding-right: 70px; }
.photo-gallery .gallery-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 2px 2px;
  scrollbar-width: thin;
  background: var(--paper, #ffffff);
}
.photo-gallery .gallery-thumbnails [data-gallery-index] {
  flex: 0 0 68px;
  min-width: 44px;
  width: 68px;
  height: 84px;
  padding: 3px;
  background: var(--stone, #eff0f3);
  border: 1px solid transparent;
  cursor: pointer;
}
.photo-gallery .gallery-thumbnails [data-gallery-index][aria-pressed=true] {
  border-color: var(--ink, #25262a);
}
.photo-gallery .gallery-thumbnails img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}
.photo-gallery:has(.gallery-thumbnails) [data-gallery-count] { bottom: 110px; }
.photo-gallery:has(.gallery-thumbnails) [data-gallery-prev],
.photo-gallery:has(.gallery-thumbnails) [data-gallery-next] { top: calc(50% - 49px); }
.photo-gallery [hidden] { display: none !important; }
@media (max-width: 760px) {
  .product-card .photo-gallery [data-gallery-prev],
  .product-card .photo-gallery [data-gallery-next] {
    min-width: 28px;
    width: 28px;
    height: 44px;
    font-size: 20px;
    background: #ffffffd9;
  }
  .product-card .photo-gallery [data-gallery-prev] { left: 4px; }
  .product-card .photo-gallery [data-gallery-next] { right: 4px; }
  .photo-gallery [data-gallery-count] { font-size: 9px; right: 8px; bottom: 8px; padding: 5px 7px; }
  .photo-gallery .gallery-thumbnails { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .photo-gallery *, .photo-gallery *::before, .photo-gallery *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
