/**
 * Wildheart product photo viewer styles — full-screen photograph mode.
 */
.po-piv {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  max-height: 100dvh;
  z-index: 200;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  box-sizing: border-box;
  color: #f4eee6;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-callout: none;
  user-select: none;
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.po-piv[hidden] {
  display: none !important;
}

.po-piv.is-visible {
  opacity: 1;
}

.po-piv__backdrop {
  position: absolute;
  inset: 0;
  background: #0a0807;
  opacity: 1;
  transition: opacity 160ms linear;
}

.po-piv__chrome {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding:
    calc(0.55rem + env(safe-area-inset-top, 0px))
    calc(0.75rem + env(safe-area-inset-right, 0px))
    0.35rem
    calc(0.75rem + env(safe-area-inset-left, 0px));
  pointer-events: none;
}

.po-piv__chrome > * {
  pointer-events: auto;
}

.po-piv__close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.08);
  color: #f7f1e8;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.po-piv__close:hover,
.po-piv__close:focus-visible {
  background: rgba(197, 122, 67, 0.28);
  outline: none;
}

.po-piv__caption {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 238, 230, 0.72);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.po-piv__sides {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.08);
}

.po-piv__side {
  min-width: 4.25rem;
  min-height: 36px;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(244, 238, 230, 0.72);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.po-piv__side.is-active {
  background: rgba(197, 122, 67, 0.92);
  color: #1a100a;
}

.po-piv__side:focus-visible {
  outline: 2px solid #c57a43;
  outline-offset: 2px;
}

.po-piv__stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  padding:
    0.35rem
    calc(0.5rem + env(safe-area-inset-right, 0px))
    calc(0.75rem + env(safe-area-inset-bottom, 0px))
    calc(0.5rem + env(safe-area-inset-left, 0px));
  touch-action: none;
  cursor: grab;
}

.po-piv__stage:active {
  cursor: grabbing;
}

.po-piv__frame {
  will-change: transform;
  transform-origin: center center;
  display: grid;
  place-items: center;
  max-width: 100%;
  max-height: 100%;
}

.po-piv__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  --wh-img-scale: 1;
  --wh-img-tx: 0%;
  --wh-img-ty: 0%;
  transform: translate3d(var(--wh-img-tx), var(--wh-img-ty), 0) scale(var(--wh-img-scale));
  transform-origin: center center;
  pointer-events: none;
  -webkit-user-drag: none;
  border-radius: 2px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* Card / modal hit targets */
.po-photo-hit {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  border-radius: inherit;
  overflow: hidden;
}

@media (hover: none), (pointer: coarse) {
  .po-photo-hit {
    cursor: zoom-in;
  }
}

.po-photo-hit:focus-visible {
  outline: 2px solid var(--po-accent);
  outline-offset: 3px;
}

.po-photo-hit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.po-gallery__main .po-photo-hit {
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.po-gallery__main .po-photo-hit img {
  object-fit: contain;
  background: var(--po-surface);
}

html.po-piv-active,
html.po-piv-active body {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
  height: 100%;
}

body.po-piv-active {
  /* Keep layout stable; viewer is fixed to the viewport via <html> attachment */
}

@media (prefers-reduced-motion: reduce) {
  .po-piv,
  .po-piv__backdrop,
  .po-piv__frame {
    transition: none !important;
  }
}

/* Shared card media hover — Homepage / Store / Preorder */
.wh-gallery-media img {
  will-change: transform, opacity;
  transform: translateZ(0) scale(1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .wh-gallery-media:hover img:not(.is-fading):not(.is-swapping) {
    transform: translateZ(0) scale(1.035);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wh-gallery-media img {
    transition-duration: 0.01ms !important;
  }
  .wh-gallery-media:hover img:not(.is-fading):not(.is-swapping) {
    transform: none;
  }
}

