/* Show the entire selected photo in every product gallery.
   An absolutely sized image cannot enlarge an implicit grid row beyond the
   frame's viewport-based height (especially for portrait photos on iPad). */
.gallery {
  min-width: 0;
}

.gallery .main-image > img,
.gallery .main > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center !important;
}

.gallery .main-image > img[hidden],
.gallery .main > img[hidden] {
  display: none !important;
}

.gallery-status {
  margin: 10px 0 0;
  color: #c7a665;
  font-size: .85rem;
  line-height: 1.6;
}
.gallery .main-image>img,.gallery .main>img{cursor:zoom-in}
.photo-expand{position:absolute;inset:auto 14px 14px auto;z-index:4;background:#0b2825e8;color:#fff;border:1px solid #54bdb2;border-radius:24px;padding:10px 16px;font:inherit;font-size:13px;cursor:pointer}
.video-active .photo-expand{display:none}
body.photo-viewer-open{overflow:hidden}
dialog.photo-viewer{position:fixed;inset:0;margin:0;padding:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;background:#061714f7;color:#fff;overflow:hidden;font-family:inherit;direction:ltr}
.photo-viewer::backdrop{background:#041210ed}
.photo-viewer button{min-width:44px;min-height:44px;border:1px solid #73948c;background:#14342f;color:#fff;border-radius:50%;font:inherit;font-size:24px;cursor:pointer;touch-action:manipulation}
.photo-viewer button:focus-visible,.photo-expand:focus-visible{outline:3px solid #47e1cd;outline-offset:3px}
.photo-viewer button:disabled{opacity:.4;cursor:default}
.photo-toolbar{position:absolute;inset:max(12px,env(safe-area-inset-top)) 18px auto;display:flex;align-items:center;gap:10px;z-index:3}
.photo-count{margin-right:auto;font:16px Arial,sans-serif}
.photo-toolbar [data-action="reset"]{border-radius:24px;min-width:70px;font:15px Arial,sans-serif}
.photo-stage{position:absolute;inset:80px 65px 65px;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none;user-select:none}
.photo-stage img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;flex:none;transform-origin:center;cursor:zoom-in}
.photo-stage.zoomed img{cursor:grab}.photo-stage.zoomed:active img{cursor:grabbing}
.photo-prev,.photo-next{position:absolute;top:50%;z-index:3}.photo-prev{left:12px}.photo-next{right:12px}
.photo-viewer [hidden]{display:none!important}
.photo-help{position:absolute;bottom:max(10px,env(safe-area-inset-bottom));left:16px;right:16px;text-align:center;font-size:13px;line-height:1.7;color:#c7ded7;margin:0;pointer-events:none}
@media(max-width:600px){.photo-stage{inset:78px 8px 90px}.photo-prev,.photo-next{top:auto;bottom:40px}.photo-toolbar{left:12px;right:12px;gap:7px}.photo-help{font-size:11px}.photo-expand{font-size:12px;padding:9px 13px}}
