/* Product photographs keep their ratio in both the lens and the full viewer. */
.product-image-zoom__container:not(.product-detail__visual) { position: relative; }
.product-image-zoom__open { position: absolute; z-index: 3; top: 20px; right: 20px; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #a7bdb3; border-radius: 50%; background: rgba(255,255,255,.97); color: #274f3d; box-shadow: 0 2px 9px rgba(24,57,58,.1); font: 700 2rem/1 system-ui, sans-serif; cursor: zoom-in; }
.product-image-zoom__open:hover { background: #edf5ef; border-color: #365749; }
.product-image-zoom__open:focus-visible, .product-image-viewer button:focus-visible, .product-image-viewer__viewport:focus-visible { outline: 3px solid var(--orange-2, #c77736); outline-offset: 3px; }
.product-image-zoom__open[hidden], .product-image-zoom__preview[hidden], .product-image-zoom__lens[hidden] { display: none !important; }
.product-image-zoom__preview, .product-image-zoom__lens { position: fixed; box-sizing: border-box; pointer-events: none; }
.product-image-zoom__preview { z-index: 132; overflow: hidden; border: 2px solid #365749; border-radius: 14px; background: #fff; box-shadow: 0 12px 36px rgba(18,57,42,.18); }
.product-image-zoom__preview.is-inline { border-radius: 12px; box-shadow: none; }
.product-image-zoom__preview img { position: absolute; display: block; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; object-fit: fill; }
.product-image-zoom__lens { z-index: 133; border: 1px solid #365749; border-radius: 3px; background: repeating-linear-gradient(135deg, rgba(54,87,73,.12) 0, rgba(54,87,73,.12) 2px, rgba(54,87,73,.02) 2px, rgba(54,87,73,.02) 5px); }
@media (hover: hover) and (pointer: fine) { .product-image-zoom__target { cursor: zoom-in; } }
.product-image-viewer { box-sizing: border-box; width: min(1100px, calc(100vw - 32px)); height: min(880px, calc(100dvh - 32px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; border: 1px solid #c4d6cc; border-radius: 18px; background: #fff; color: #203b2e; box-shadow: 0 24px 80px rgba(8,20,30,.28); }
.product-image-viewer[open] { display: flex; flex-direction: column; }
.product-image-viewer::backdrop { background: rgba(10,27,22,.62); }
.product-image-viewer__bar { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; min-height: 68px; padding: 8px 14px 8px 20px; border-bottom: 1px solid #dce6e1; background: #fff; }
.product-image-viewer__bar h2 { flex: 1; min-width: 0; margin: 0; font: 650 clamp(1rem, 2vw, 1.2rem)/1.3 var(--font-body, system-ui, sans-serif); overflow-wrap: anywhere; }
.product-image-viewer button { flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid #a7bdb3; border-radius: 10px; background: #fff; color: #274f3d; font: 650 .95rem/1.3 var(--font-body, system-ui, sans-serif); cursor: pointer; }
.product-image-viewer button:hover { background: #edf5ef; }
.product-image-viewer .product-image-viewer__close { padding: 0; font-size: 1.7rem; }
.product-image-viewer__viewport { flex: 1 1 0; min-height: 0; width: 100%; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; background: #fff; }
.product-image-viewer__viewport.is-magnified { cursor: grab; }
.product-image-viewer__viewport.is-magnified:active { cursor: grabbing; }
.product-image-viewer__canvas { display: grid; place-items: center; min-width: 100%; min-height: 100%; }
.product-image-viewer__canvas img { display: block; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; object-fit: contain; user-select: none; }
@media (max-width: 560px) {
  .product-image-viewer { width: calc(100vw - 12px); height: calc(100dvh - 12px); border-radius: 12px; }
  .product-image-viewer__bar { flex-wrap: wrap; gap: 8px; padding: 10px; }
  .product-image-viewer__bar h2 { flex-basis: calc(100% - 54px); order: 0; }
  .product-image-viewer__close { order: 1; }
  .product-image-viewer__toggle { order: 2; }
  .product-image-zoom__open { top: 18px; right: 18px; }
}
