/* Scoped to the product page. No changes to the other page layouts. */
.detail-gallery.product-gallery{background:transparent;min-width:0}
.product-stage{position:relative;width:100%;aspect-ratio:1;overflow:hidden;background:#eeece5;touch-action:pan-y;cursor:crosshair;border:1px solid var(--line)}
.product-stage.is-zoomed{touch-action:none;cursor:grab}
.product-stage.is-dragging{cursor:grabbing}
.detail-gallery.product-gallery #detail-image{position:absolute;left:50%;top:50%;max-width:none;width:100%;height:100%;transform:translate(-50%,-50%);aspect-ratio:auto;object-fit:contain;user-select:none;-webkit-user-drag:none;will-change:transform}
.gallery-position{position:absolute;left:15px;top:15px;background:#fcfbf8eb;padding:5px 10px;font-size:10px;letter-spacing:.1em;pointer-events:none}
.gallery-nav{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:46px;background:#fcfbf8e8;border:1px solid #deded5aa;font-size:30px;line-height:1;z-index:2;display:grid;place-items:center}
.gallery-previous{left:12px}.gallery-next{right:12px}.gallery-nav:hover{background:var(--green);color:white}
.magnifier-lens{position:absolute;width:164px;height:164px;border:3px solid var(--paper);border-radius:50%;pointer-events:none;z-index:3;box-shadow:0 0 0 1px #23362b66,0 5px 22px #0003;background-color:#eeece5;background-repeat:no-repeat}
.gallery-tools{display:flex;align-items:center;gap:7px;padding:12px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}
.gallery-tools button{min-width:37px;min-height:40px;border:1px solid var(--line);background:var(--paper);font-size:19px;display:flex;align-items:center;justify-content:center}
.gallery-tools button:hover{background:var(--cream)}.gallery-tools button:disabled{opacity:.4;cursor:not-allowed}
.gallery-tools #zoom-reset{font-size:11px;padding-inline:12px}
.gallery-tools #magnifier-toggle{margin-left:auto;font-size:11px;gap:6px;padding-inline:10px}
.gallery-tools #magnifier-toggle[aria-pressed=true]{background:var(--green);color:white;border-color:var(--green)}
.gallery-tools #magnifier-toggle svg{width:16px;height:16px}
.zoom-slider-label{flex:1;min-width:65px;max-width:130px;display:flex;align-items:center}
#gallery-zoom{width:100%;min-width:0;accent-color:var(--green);cursor:pointer;height:35px;margin:0}
#zoom-value{font-size:11px;min-width:32px;text-align:center;font-variant-numeric:tabular-nums}
.gallery-help,.gallery-note{font-size:10px;line-height:1.6;margin:10px 0 16px;color:var(--muted)}
.gallery-thumbnails{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
.gallery-thumbnail{padding:0;text-align:left;min-width:0;border:1px solid transparent;background:transparent}
.thumbnail-image{display:block;aspect-ratio:.95;overflow:hidden;background:var(--cream);border:2px solid transparent}
.detail-gallery.product-gallery .thumbnail-image img{width:100%;height:100%;aspect-ratio:auto;object-fit:contain;transition:opacity .15s}
.gallery-thumbnail>span:last-child{display:block;font-size:9px;line-height:1.5;padding:6px 2px 3px;color:var(--muted)}
.gallery-thumbnail[aria-pressed=true] .thumbnail-image{border-color:var(--green)}
.gallery-thumbnail[aria-pressed=true]>span:last-child{color:var(--green);font-weight:700}
.gallery-thumbnail:hover .thumbnail-image{outline:1px solid #8d9e8a;outline-offset:1px}
.gallery-image-error{position:absolute;inset:0;display:grid;place-items:center;padding:30px;text-align:center;font-size:13px;background:var(--cream)}
@media(max-width:1100px) and (min-width:601px){.gallery-tools{gap:5px}.gallery-tools #magnifier-toggle{margin-left:0}.zoom-slider-label{max-width:85px}.gallery-thumbnails{gap:5px}.gallery-thumbnail>span:last-child{font-size:8px}}
@media(max-width:600px){.product-stage{aspect-ratio:.98}.gallery-thumbnails{gap:6px}.gallery-thumbnail>span:last-child{font-size:8px}.gallery-tools{gap:5px}.gallery-tools button{min-height:42px;min-width:34px}.gallery-tools #magnifier-toggle{padding-inline:8px;font-size:10px}.gallery-tools #zoom-reset{padding-inline:8px}.zoom-slider-label{max-width:90px;min-width:40px}.gallery-help,.gallery-note{font-size:10px}.magnifier-lens{width:130px;height:130px}}
