.product-featured-image {
  position: relative;
  overflow: hidden;
}

.product-image-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: zoom-in;
}

.product-image-open img {
  display: block;
}

.product-image-open:focus-visible,
.product-gallery-arrow:focus-visible,
.product-lightbox button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #202020;
}

.product-image-zoom-hint {
  position: absolute;
  right: .75rem;
  bottom: .75rem;
  padding: .45rem .7rem;
  border-radius: 999px;
  color: #fff;
  background: rgb(0 0 0 / 72%);
  font-size: .85rem;
  font-weight: 700;
}

.product-gallery-arrow {
  z-index: 1;
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 50%;
  color: #171717;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 2px 12px rgb(0 0 0 / 24%);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.product-featured-image > .product-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.product-gallery-arrow--previous { left: .75rem; }
.product-gallery-arrow--next { right: .75rem; }

.product-gallery-count {
  position: absolute;
  left: 50%;
  bottom: .9rem;
  transform: translateX(-50%);
  padding: .35rem .65rem;
  border-radius: 999px;
  color: #fff;
  background: rgb(0 0 0 / 72%);
  font-size: .85rem;
  font-weight: 700;
  pointer-events: none;
}

.product-lightbox {
  width: min(96vw, 1100px);
  max-width: none;
  max-height: 94dvh;
  padding: .75rem;
  overflow: hidden;
  border: 0;
  border-radius: 1rem;
  color: #fff;
  background: #111;
}

.product-lightbox::backdrop { background: rgb(0 0 0 / 88%); }

.product-lightbox-toolbar {
  display: flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 0 .25rem .5rem;
  font-size: .95rem;
}

.product-lightbox-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .75rem;
  border: 1px solid rgb(255 255 255 / 50%);
  border-radius: 999px;
  color: #fff;
  background: #292929;
  font: inherit;
  cursor: pointer;
}

.product-lightbox-toolbar button span { font-size: 1.3rem; }

.product-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(.4rem, 2vw, 1rem);
}

.product-lightbox-stage img {
  display: block;
  width: auto;
  max-width: min(78vw, 900px);
  height: auto;
  max-height: calc(88dvh - 4rem);
  aspect-ratio: auto;
  object-fit: contain;
  background: #111;
}

.product-lightbox-stage .product-gallery-arrow { flex: 0 0 auto; }

@media (max-width: 700px) {
  .product-gallery-arrow { width: 2.45rem; height: 2.45rem; font-size: 1.75rem; }
  .product-featured-image > .product-gallery-arrow--previous { left: .5rem; }
  .product-featured-image > .product-gallery-arrow--next { right: .5rem; }
  .product-lightbox { width: 100vw; max-height: 100dvh; padding: .5rem; border-radius: 0; }
  .product-lightbox-stage { gap: .35rem; }
  .product-lightbox-stage img { max-width: calc(100vw - 6.6rem); max-height: calc(90dvh - 4rem); }
}

@media (prefers-reduced-motion: reduce) {
  .product-image-open img,
  .product-gallery-arrow { transition: none; }
}
