.product-gallery-stage {
  position: relative;
  isolation: isolate;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.96), rgba(245,245,238,.76) 58%, rgba(224,230,215,.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 18px 48px rgba(31,50,36,.08);
  transition: border-color 280ms ease, box-shadow 380ms cubic-bezier(.16,1,.3,1);
}

.product-gallery-stage:hover {
  border-color: rgba(31,96,56,.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 24px 58px rgba(31,50,36,.12);
}

.product-gallery-stage::after {
  content: "";
  position: absolute;
  z-index: 4;
  left: 18px;
  right: 18px;
  bottom: 12px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #24623a, #83ad55);
  transform: scaleX(0);
  transform-origin: left;
  opacity: .75;
  pointer-events: none;
}

.product-gallery-stage.is-playing::after {
  animation: gallery-progress 4.8s linear infinite;
}

.product-gallery-stage.is-paused::after {
  opacity: 0;
  animation: none;
}

@keyframes gallery-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.product-gallery-main-image {
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  animation: gallery-image-enter 720ms cubic-bezier(.16,1,.3,1) both;
  will-change: opacity, transform;
}

@keyframes gallery-image-enter {
  from { opacity: 0; transform: translate3d(18px,0,0) scale(.985); filter: blur(2px); }
  to { opacity: 1; transform: translate3d(0,0,0) scale(1); filter: blur(0); }
}

.product-gallery-thumbnails {
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(31,96,56,.35) transparent;
}

.product-gallery-thumbnail {
  position: relative;
  scroll-snap-align: start;
  opacity: .72;
  transform: scale(.96);
  box-shadow: 0 4px 14px rgba(34,50,39,.05);
  transition: opacity 220ms ease, transform 300ms cubic-bezier(.16,1,.3,1),
    border-color 220ms ease, box-shadow 300ms ease;
}

.product-gallery-thumbnail:hover {
  opacity: 1;
  transform: translateY(-2px) scale(1);
  box-shadow: 0 8px 22px rgba(34,50,39,.12);
}

.product-gallery-thumbnail.is-active {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 0 0 3px rgba(31,96,56,.11), 0 8px 24px rgba(34,50,39,.11);
}

.product-gallery-thumbnail.is-active::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 3px;
  height: 3px;
  border-radius: 999px;
  background: #24623a;
}

@media (prefers-reduced-motion: reduce) {
  .product-gallery-stage::after { display: none; }
  .product-gallery-main-image { animation: none; }
}
