/* Zoom is limited to the standard PrestaShop product-image modal. */
@media (hover: hover) and (pointer: fine) {
  #product-modal figure.pmz-ready {
    position: relative;
  }

  #product-modal figure.pmz-ready::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: var(--pmz-top, 0);
    left: var(--pmz-left, 0);
    width: var(--pmz-width, 100%);
    height: var(--pmz-height, auto);
    pointer-events: none;
    opacity: 0;
    background-image: var(--pmz-source);
    background-repeat: no-repeat;
    background-size: 200% 200%;
    background-position: var(--pmz-x, 50%) var(--pmz-y, 50%);
    transition: opacity 120ms ease;
  }

  #product-modal figure.pmz-ready.pmz-active::before {
    opacity: 1;
  }

  #product-modal figure.pmz-ready.pmz-active .js-modal-product-cover {
    opacity: 0;
  }

  #product-modal figure.pmz-ready .js-modal-product-cover {
    cursor: zoom-in;
  }

  #product-modal figure.pmz-ready.pmz-active .js-modal-product-cover {
    cursor: crosshair;
  }

  #product-modal figure.pmz-ready figcaption {
    position: relative;
    z-index: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  #product-modal figure.pmz-ready::before {
    transition: none;
  }
}
