/* Product detail photos only: catalogue cards and print/editor canvases are untouched. */
body.qs-themed #productModal .detail-gallery{width:100%;min-width:0;background:#f4f6f9;align-self:start;border-radius:16px;overflow:hidden}
body.qs-themed #productModal .detail-gallery .detail-visual{position:relative;display:block;flex:none;width:100%;min-width:0;min-height:0;max-height:none;height:auto;aspect-ratio:4/5;padding:0;border-radius:0;background:#f4f6f9;overflow:hidden}
body.qs-themed #productModal .product-photo-strip{display:flex;width:100%;height:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;direction:ltr;touch-action:pan-x pan-y pinch-zoom}
.product-photo-strip::-webkit-scrollbar{display:none}
body.qs-themed #productModal button.product-photo-open{display:flex;align-items:center;justify-content:center;flex:0 0 100%;width:100%;min-width:0;height:100%;min-height:0;margin:0;padding:16px;scroll-snap-align:center;scroll-snap-stop:always;border:0;border-radius:0;box-shadow:none;background:transparent;cursor:zoom-in}
body.qs-themed #productModal .product-photo-open img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;padding:0;object-fit:contain;object-position:center;flex:none}
body.qs-themed #productModal .product-photo-open [hidden]{display:none!important}
.product-photo-expand{position:absolute;inset-block-start:12px;inset-inline-end:12px;display:grid;place-items:center;width:36px;height:36px;border:1px solid #ccd5df;border-radius:50%;background:#ffffffed;color:#20384e;pointer-events:none}
.product-photo-expand svg{width:18px;height:18px}
.product-photo-caption{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;color:#43566c;font-size:13px;line-height:1.5}
.product-photo-caption [data-gallery-position]{font-variant-numeric:tabular-nums;white-space:nowrap}
body.qs-themed #productModal .image-thumbs{padding:0 12px 12px;gap:8px;scroll-padding-inline:12px}
body.qs-themed #productModal .image-thumbs button{width:60px;height:64px;min-height:44px;padding:4px;background:#fff;border:2px solid #d8e0e9;border-radius:10px;box-shadow:none}
body.qs-themed #productModal .image-thumbs button.active{border-color:#255570;background:#edf4f9}
body.qs-themed #productModal .image-thumbs img{width:100%;height:100%;object-fit:contain;object-position:center}
body.qs-themed #productModal .detail-visual.qs-branded-placeholder{display:flex;justify-content:center;align-items:center;flex-direction:column;min-height:240px}
body.qs-themed #productModal .detail-visual.qs-branded-placeholder img{width:32px;height:32px;flex:none}
.qs-photo-viewer{position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;background:#f3f5f8;color:#172437;font-family:var(--shop-body,system-ui,sans-serif);overflow:hidden;overscroll-behavior:contain}
.qs-photo-viewer[open]{display:flex;flex-direction:column}
.qs-photo-viewer::backdrop{background:#172437cc}
.qs-photo-viewer *{box-sizing:border-box}
.qs-photo-viewer .photo-viewer-toolbar{display:flex;align-items:center;gap:12px;flex-shrink:0;padding:max(12px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) 12px max(20px,env(safe-area-inset-left));border-bottom:1px solid #d4dde7;background:#fffffff5}
.qs-photo-viewer h2{margin:0;flex:1;min-width:0;font-size:1rem;line-height:1.5;font-weight:650;overflow-wrap:anywhere}
.qs-photo-viewer button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:10px 16px;border:1px solid #b8c7d5;border-radius:24px;background:#fff;color:#213d56;font:600 14px/1.4 var(--shop-body,system-ui,sans-serif);cursor:pointer;touch-action:manipulation;transition:background-color 120ms}
.qs-photo-viewer button:hover{background:#e7eef5}
.qs-photo-viewer button:active{background:#dce8f2}
.qs-photo-viewer button:disabled{opacity:.45;cursor:default}
.qs-photo-viewer button:focus-visible{outline:3px solid #35658b;outline-offset:3px}
.qs-photo-viewer button[aria-pressed=true]{background:#203c58;border-color:#203c58;color:#fff}
.qs-photo-viewer button svg{width:20px;height:20px;flex:none;pointer-events:none}
.qs-photo-viewer .photo-viewer-close{padding:10px;border-radius:50%}
.qs-photo-viewer .photo-viewer-slides{display:flex;flex:1;min-height:0;min-width:0;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;direction:ltr;touch-action:pan-x pan-y pinch-zoom}
.photo-viewer-slides::-webkit-scrollbar{display:none}
.qs-photo-viewer .photo-viewer-slide{flex:0 0 100%;width:100%;height:100%;min-width:0;scroll-snap-align:center;scroll-snap-stop:always;overflow:hidden;display:flex;align-items:center;justify-content:center;padding:16px}
.qs-photo-viewer .photo-viewer-slide img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;flex:none}
.qs-photo-viewer.is-zoomed .photo-viewer-slides{overflow-x:hidden;scroll-snap-type:none}
.qs-photo-viewer .photo-viewer-slide.is-zoomed{display:block;padding:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom}
.qs-photo-viewer .photo-viewer-slide.is-zoomed img{max-width:none;max-height:none;object-fit:contain;margin:auto;cursor:grab;user-select:none}
.qs-photo-viewer .photo-viewer-slide.is-dragging img{cursor:grabbing}
.qs-photo-viewer .photo-viewer-footer{flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:12px;padding:12px max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border-top:1px solid #d4dde7;background:#fffffff5}
.qs-photo-viewer .photo-viewer-navigation{display:flex;align-items:center;justify-content:center;gap:16px;width:100%;direction:ltr}
.qs-photo-viewer .photo-viewer-count{min-width:64px;text-align:center;font-size:14px;font-variant-numeric:tabular-nums}
.qs-photo-viewer .photo-viewer-thumbs{display:flex;max-width:100%;gap:8px;overflow-x:auto;padding:4px;direction:ltr}
.qs-photo-viewer .photo-viewer-thumbs button{flex:none;width:52px;height:56px;padding:3px;border-radius:8px}
.qs-photo-viewer .photo-viewer-thumbs img{width:100%;height:100%;object-fit:contain;border-radius:4px}
.qs-photo-viewer .photo-viewer-help{margin:0;font-size:13px;line-height:1.5;text-align:center;color:#43566c}
.qs-photo-viewer [hidden]{display:none!important}
.photo-viewer-error{padding:24px;text-align:center;color:#96344b;font-size:14px;line-height:1.6}
@media(max-width:760px){body.qs-themed #productModal .detail-gallery .detail-visual{aspect-ratio:1}body.qs-themed #productModal button.product-photo-open{padding:12px}.qs-photo-viewer .photo-viewer-toolbar{gap:8px;padding-inline:12px}.qs-photo-viewer .photo-viewer-toolbar button{padding-inline:12px}.qs-photo-viewer .photo-viewer-slide{padding:12px}.qs-photo-viewer h2{font-size:14px}.qs-photo-viewer .photo-viewer-footer{gap:8px}.qs-photo-viewer .photo-viewer-thumbs button{width:44px;height:48px}}
@media(max-width:700px){body.qs-themed #productModal{overflow:hidden}}
@media(max-height:540px){.qs-photo-viewer .photo-viewer-thumbs,.qs-photo-viewer .photo-viewer-help{display:none}.qs-photo-viewer .photo-viewer-footer{padding-block:8px}}
@media(prefers-reduced-motion:reduce){.qs-photo-viewer *,.product-photo-strip{scroll-behavior:auto!important;transition:none!important}}
@media(prefers-reduced-transparency:reduce){.qs-photo-viewer :is(.photo-viewer-toolbar,.photo-viewer-footer),.product-photo-expand{background:#fff}}
@media(prefers-contrast:more){.qs-photo-viewer{background:#fff;color:#172437}.qs-photo-viewer button{border-color:#52647a}.qs-photo-viewer .photo-viewer-help,.product-photo-caption{color:#263c53}}
