.product-gallery{position:relative;min-width:0;margin:24px 0 30px;outline-offset:5px;border-radius:14px}
.gallery-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:16px;height:clamp(290px,36vw,470px)}
.gallery-main-stage{position:relative;min-width:0;min-height:0;touch-action:pan-y}
.gallery-photo{position:relative;display:block;width:100%;height:100%;overflow:hidden;border-radius:14px;background:#e7ede6}
.gallery-photo img{display:block;width:100%;height:100%;object-fit:cover;user-select:none;transition:opacity .2s}
.gallery-photo img[hidden],.photo-viewer-stage img[hidden]{display:none}
.gallery-photo-error{display:none;color:#52665a;text-align:center;padding:24px;font:500 14px/1.5 Arial,sans-serif}
.has-image-error>.gallery-photo-error{display:block}
.gallery-photo.has-image-error{display:grid;place-items:center}
.gallery-side{display:grid;grid-template-rows:1fr 1fr;gap:16px;min-width:0;min-height:0}
.product-gallery--pair .gallery-side{grid-template-rows:1fr}
.product-gallery--single .gallery-grid{grid-template-columns:1fr}
.gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);transform-origin:center;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #ffffff70;border-radius:50%;background:#112e28c9;color:#fff;font:400 0/1 Arial,sans-serif;cursor:pointer;z-index:1;box-shadow:0 3px 15px #102d2930;transition:transform .16s ease,background-color .16s ease,box-shadow .16s ease}
.gallery-arrow::before{content:"";position:absolute;top:50%;left:50%;width:10px;height:10px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:translate(calc(-50% - 3px),-50%) rotate(45deg)}
.gallery-arrow--previous::before{transform:translate(calc(-50% + 3px),-50%) rotate(225deg)}
.gallery-arrow--previous{left:14px}.gallery-arrow--next{right:14px}
/* Preserve vertical centering when the global button hover/press rules apply. */
.gallery-arrow:hover{transform:translateY(-50%) scale(1.03);background:#163f38}
.gallery-arrow:active{transform:translateY(-50%) scale(.98)}
.gallery-arrow:focus-visible,.gallery-open-all:focus-visible{outline:3px solid #dc895c;outline-offset:3px}
.gallery-arrow,.gallery-open-all,.photo-viewer-header button,.photo-viewer-thumbs button{touch-action:manipulation}
.gallery-counter{position:absolute;left:14px;bottom:14px;background:#112e28bf;border-radius:7px;color:#fff;padding:7px 10px;font:600 12px/1.4 Arial,sans-serif;pointer-events:none}
.gallery-open-all{position:absolute;right:14px;bottom:14px;border:1px solid #ffffff70;border-radius:8px;background:#123b33e8;color:#fff;padding:11px 16px;font:700 13px/1.4 Arial,sans-serif;cursor:pointer;box-shadow:0 3px 15px #102d2930}
.product-gallery--compact{margin:0}.product-gallery--compact .gallery-grid{height:285px;gap:9px}.product-gallery--compact .gallery-side{gap:9px}.product-gallery--compact .gallery-photo{border-radius:0}
.product-gallery--compact .gallery-arrow{width:36px;height:36px}.product-gallery-empty{padding:45px 20px;background:#edf2ec;border-radius:12px;text-align:center;color:#64786b;margin-bottom:24px}
.photo-viewer{box-sizing:border-box;width:calc(100vw - 32px);max-width:1400px;height:calc(100dvh - 32px);max-height:none;border:0;border-radius:14px;padding:16px;background:#0e2520;color:#fff;overflow:hidden;box-shadow:0 25px 90px #0007}
.photo-viewer[open]{display:grid;grid-template-rows:auto minmax(0,1fr) 88px;gap:14px}
.photo-viewer::backdrop{background:#071511df}
.photo-viewer-header{display:flex;align-items:center;gap:16px;min-width:0}.photo-viewer-header strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 16px/1.4 Arial,sans-serif}
.photo-viewer-header span{font:600 13px Arial,sans-serif;white-space:nowrap}.photo-viewer-header button{flex:none;width:40px;height:40px;border:1px solid #ffffff50;border-radius:50%;background:transparent;color:#fff;font:400 30px Arial,sans-serif;cursor:pointer}
.photo-viewer-stage{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;touch-action:pan-y}.photo-viewer-stage>img{display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;user-select:none}.photo-viewer-stage>.gallery-photo-error{color:#fff}
.photo-viewer-thumbs{display:flex;gap:10px;overflow-x:auto;min-width:0;align-items:center;scrollbar-width:thin;scrollbar-color:#8ea497 #21372d}
.photo-viewer-thumbs button{flex:0 0 100px;height:70px;padding:0;border:2px solid transparent;border-radius:8px;overflow:hidden;background:#243b31;cursor:pointer}
.photo-viewer-thumbs button[aria-pressed=true]{border-color:#edaa79}.photo-viewer-thumbs img{display:block;width:100%;height:100%;object-fit:cover;user-select:none}
@media(prefers-reduced-motion:reduce){.gallery-photo img,.gallery-arrow{transition:none}.gallery-arrow:hover,.gallery-arrow:active{transform:translateY(-50%)}}
@media(max-width:700px){.gallery-grid,.product-gallery--compact .gallery-grid{grid-template-columns:1fr;height:280px;gap:0}.gallery-side{display:none}.gallery-arrow{width:38px;height:38px}.gallery-open-all{padding:9px 12px;font-size:12px}.product-gallery{margin:18px 0 24px}.product-gallery--compact{margin:0}.photo-viewer{width:100vw;max-width:100vw;height:100dvh;border-radius:0;padding:12px}.photo-viewer[open]{gap:10px;grid-template-rows:auto minmax(0,1fr) 76px}.photo-viewer-header strong{font-size:13px}.photo-viewer-thumbs button{flex-basis:78px;height:58px}.photo-viewer-stage .gallery-arrow--previous{left:0}.photo-viewer-stage .gallery-arrow--next{right:0}}
.gallery-open-all{display:inline-flex;align-items:center;gap:7px}
.gallery-open-all>.denebi-icon{display:block;flex-shrink:0}
