.product-media__open {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-media__open:focus-visible {
  outline: 3px solid var(--accent, currentColor);
  outline-offset: -5px;
}

.product-media__frame .product-media__nav {
  z-index: 1;
}

.product-image-viewer {
  position: fixed;
  inset: 0;
  width: fit-content;
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 3rem 1rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #171717;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  color: #fff;
}

.product-image-viewer::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.product-image-viewer__img {
  display: block;
  width: auto;
  max-width: min(calc(100vw - 4rem), 1200px);
  max-height: calc(100dvh - 7rem);
  margin: auto;
  object-fit: contain;
}

.product-image-viewer__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: 2rem/1 sans-serif;
  cursor: pointer;
}

.product-image-viewer__close:focus-visible {
  outline: 2px solid currentColor;
}
