/* PDP zoom dialog — large, hugs photo, nav above stage. */

.pdp-zoom {
  width: max-content;
  max-width: min(92vw, 48rem);
  max-height: min(90vh, 56rem);
  max-height: min(90dvh, 56rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 1rem;
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: 0 1.5rem 3rem rgba(43, 29, 20, 0.28);
  overscroll-behavior: contain;
}

.pdp-zoom::backdrop {
  background: rgba(43, 29, 20, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.pdp-zoom__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem 0.45rem 0.85rem;
  border-bottom: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent);
}

.pdp-zoom__hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--color-muted);
  line-height: 1.3;
}

.pdp-zoom__close {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--color-ink);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pdp-zoom__close:hover,
.pdp-zoom__close:focus-visible {
  color: var(--color-accent-solid);
}

.pdp-zoom__body {
  position: relative;
  isolation: isolate;
}

.pdp-zoom__nav {
  position: absolute;
  z-index: 6;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-ink);
  box-shadow: 0 4px 14px rgba(61, 42, 50, 0.16);
  cursor: pointer;
  transform: translateY(-50%);
  touch-action: manipulation;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.pdp-zoom__nav svg {
  pointer-events: none;
}

.pdp-zoom__nav--prev {
  left: 0.7rem;
}

.pdp-zoom__nav--next {
  right: 0.7rem;
}

.pdp-zoom__nav:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent-start) 28%, transparent);
}

.pdp-zoom__stage {
  position: relative;
  z-index: 1;
  width: min(48rem, 92vw);
  height: min(42rem, 78vh);
  height: min(42rem, 78dvh);
  overflow: hidden;
  touch-action: none;
  cursor: zoom-in;
  background: color-mix(in srgb, var(--color-ink) 18%, #2b1d14);
  -webkit-user-select: none;
  user-select: none;
}

.pdp-zoom__stage.is-zoomed {
  cursor: grab;
}

.pdp-zoom__stage.is-panning {
  cursor: grabbing;
}

.pdp-zoom__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .pdp-zoom__img {
    transition: none;
  }
}

@media (max-width: 767px) {
  .pdp-zoom {
    max-width: 94vw;
    max-height: min(88vh, 40rem);
    max-height: min(88dvh, 40rem);
  }

  .pdp-zoom__hint {
    font-size: 0.68rem;
  }

  .pdp-zoom__stage {
    width: 94vw;
    height: min(34rem, 72vh);
    height: min(34rem, 72dvh);
  }

  .pdp-zoom__nav--prev {
    left: 0.45rem;
  }

  .pdp-zoom__nav--next {
    right: 0.45rem;
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  .pdp-zoom {
    max-width: 92vw;
    max-height: min(92vh, 24rem);
    max-height: min(92dvh, 24rem);
  }

  .pdp-zoom__stage {
    width: min(42rem, 92vw);
    height: min(18rem, 78vh);
    height: min(18rem, 78dvh);
  }
}
