/* Detail-only native image viewer. Closed/unsupported dialogs never enter layout. */
.product-image-viewer:not([open]){display:none}
.product-image-viewer{position:fixed;inset:0;margin:auto;width:calc(100% - 32px);max-width:1440px;height:calc(100vh - 32px);height:calc(100dvh - 32px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);padding:20px 24px;border:1px solid var(--line,#d9dcd6);border-radius:24px;background:var(--canvas,#fff);color:var(--ink,#222822);overflow:auto;overscroll-behavior:contain}
.product-image-viewer[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:16px}
.product-image-viewer::backdrop{background:rgb(19 25 23 / .72)}
.product-image-viewer-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;min-width:0}
.product-image-viewer-title{font:400 20px/1.25 var(--serif,Georgia,serif)}
.product-image-viewer button,.product-image-viewer-original{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:10px 16px;border:1px solid var(--line,#d9dcd6);border-radius:999px;background:transparent;color:inherit;font:400 13px/1.4 var(--sans,Arial,sans-serif);cursor:pointer}
.product-image-viewer button:hover,.product-image-viewer-original:hover{background:var(--surface,#f1f0eb)}
.product-image-viewer button[aria-disabled="true"]{color:var(--muted,#626963);cursor:default}
.product-image-viewer button[aria-disabled="true"]:hover{background:transparent}
.product-image-viewer button:focus-visible,.product-image-viewer-original:focus-visible{outline:3px solid var(--green,#496950);outline-offset:3px}
.product-image-viewer-stage{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;background:#f5f5f3;overflow:hidden;border-radius:8px}
.product-image-viewer-image{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;flex:none}
.product-image-viewer-footer{display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;min-width:0}
.product-image-viewer-caption{flex:1 1 100%;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.product-image-viewer-navigation{display:flex;gap:8px;margin-left:auto}
@media(max-width:599px){.product-image-viewer{width:calc(100% - 16px);height:calc(100vh - 16px);height:calc(100dvh - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);padding:12px;border-radius:16px}.product-image-viewer[open]{gap:12px}.product-image-viewer button,.product-image-viewer-original{padding:10px 12px}.product-image-viewer-footer{gap:8px}.product-image-viewer-caption{font-size:12px}}
@media(forced-colors:active){.product-image-viewer{border:2px solid CanvasText}.product-image-viewer button,.product-image-viewer-original{border-color:ButtonText}.product-image-viewer button[aria-disabled="true"]{color:GrayText}}

html.product-image-viewer-is-open,html.product-image-viewer-is-open body{overflow:hidden}
.product-image-viewer-stage [hidden]{display:none}
.product-image-viewer-loading{max-width:40ch;padding:20px;font-size:14px;line-height:1.6;text-align:center;color:var(--muted,#626963)}
/* Short viewports retain an image stage; the dialog scrolls to its controls. */
@media(max-height:500px){.product-image-viewer[open]{grid-template-rows:auto minmax(160px,1fr) auto}}
