.merch-card,
.product-media-container:has(> merch-magnifier) {
  position: relative;
}
merch-magnifier {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  --lens-paper: #e9e7dc;
  --lens-size: clamp(86px, 35%, 180px);
}
.merch-card > merch-magnifier {
  bottom: auto;
  aspect-ratio: 1 / 1.03;
}
.product-media-container > merch-magnifier {
  --lens-paper: white;
}
merch-magnifier[active] {
  pointer-events: auto;
  touch-action: none;
  cursor: crosshair;
}
.merch-zoom-button {
  position: absolute;
  right: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  pointer-events: auto;
  touch-action: manipulation;
  border: 1px solid #14282752;
  background: #faf8eff2;
  color: #152927;
  border-radius: 4px;
  width: 40px;
  height: 40px;
  padding: 9px;
  cursor: zoom-in;
  z-index: 1;
}
.merch-zoom-button svg {
  width: 20px;
  height: 20px;
}
.merch-zoom-button[aria-pressed="true"] {
  background: #152927;
  color: white;
  cursor: zoom-out;
}
.merch-zoom-button[aria-pressed="true"] .zoom-plus {
  display: none;
}
.merch-zoom-button:focus-visible {
  outline: 3px solid #e97035;
  outline-offset: 2px;
}
.merch-lens {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: min(var(--lens-size), 90%);
  aspect-ratio: 1;
  border-radius: 2px;
  outline: 2px solid #fff;
  outline-offset: -2px;
  box-shadow:
    0 0 0 1px #15292780,
    0 3px 12px #0005;
  background-color: var(--lens-paper);
  background-repeat: no-repeat;
  background-blend-mode: multiply;
  pointer-events: none;
}
.merch-lens[hidden] {
  display: none;
}
@media (pointer: coarse) {
  .merch-zoom-button {
    width: 44px;
    height: 44px;
  }
}
