/* Product detail magnifier: lens on the image and a larger desktop preview. */
@media (hover: hover) and (pointer: fine) {
  .product-gallery {
    position: relative;
  }

  .product-main-img {
    position: relative;
    cursor: crosshair;
  }

  .product-image-zoom-lens {
    position: absolute;
    z-index: 4;
    display: none;
    width: 124px;
    height: 124px;
    pointer-events: none;
    border: 1px solid rgba(15, 118, 110, 0.9);
    border-radius: 4px;
    background-color: #fff;
    background-repeat: no-repeat;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.24);
  }

  .product-image-zoom-result {
    position: absolute;
    z-index: 12;
    top: 0;
    left: calc(100% + 18px);
    display: none;
    width: min(360px, 32vw);
    aspect-ratio: 1;
    pointer-events: none;
    border: 1px solid var(--line, #d1d5db);
    border-radius: 8px;
    background-color: #fff;
    background-repeat: no-repeat;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
  }

  .product-main-img.is-magnifying .product-image-zoom-lens,
  .product-gallery.is-magnifying .product-image-zoom-result {
    display: block;
  }
}

@media (max-width: 1180px) and (hover: hover) and (pointer: fine) {
  .product-image-zoom-result {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-image-zoom-lens,
  .product-image-zoom-result {
    transition: none;
  }
}
