body.mt-gallery-open{overflow:hidden}
#mt-product-gallery{width:calc(100% - 48px);max-width:1600px;height:calc(100dvh - 48px);max-height:none;margin:auto;padding:0;border:1px solid #e5dacf;border-radius:16px;background:#faf8f5;color:#42382e;overflow:hidden;box-shadow:0 24px 100px #0005}
#mt-product-gallery[open]{display:flex;flex-direction:column}
#mt-product-gallery::backdrop{background:rgba(25,22,18,.85)}
.mt-gallery__header{display:flex;align-items:center;gap:16px;padding:12px 20px;border-bottom:1px solid #e5dacf;flex-shrink:0}
.mt-gallery__title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}
.mt-gallery button{min-width:44px;min-height:44px;border:1px solid #d9cabc;border-radius:8px;background:#fffdf9;color:#42382e;cursor:pointer;padding:8px 12px;font:inherit}
.mt-gallery button:hover{background:#eee7dd}
.mt-gallery button:focus-visible{outline:3px solid #70533c;outline-offset:2px}
.mt-gallery__stage{position:relative;flex:1;min-height:0;display:flex;justify-content:center;padding:12px 64px;overflow:hidden}
.mt-gallery__viewport{width:100%;height:100%;overflow:hidden;display:flex;justify-content:center;align-items:center;cursor:zoom-in}
.mt-gallery__image{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;user-select:none}
.mt-gallery.is-zoomed .mt-gallery__viewport{cursor:zoom-out;touch-action:none}
.mt-gallery.is-zoomed .mt-gallery__image{transform:scale(2)}
.mt-gallery .mt-gallery__prev,.mt-gallery .mt-gallery__next{position:absolute;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:44px;height:44px;padding:0;line-height:1}
.mt-gallery__prev svg,.mt-gallery__next svg{display:block;width:24px;height:24px;flex-shrink:0}
.mt-gallery__prev{left:12px}.mt-gallery__next{right:12px}
.mt-gallery__hint{text-align:center;font-size:12px;margin:4px 12px 10px;color:#695746;flex-shrink:0}
.mt-gallery__thumbs{display:flex;gap:8px;overflow-x:auto;padding:4px 16px 12px;flex-shrink:0;margin:0 auto;max-width:100%}
.mt-gallery__thumbs button{padding:3px;flex-shrink:0;border:2px solid transparent}
.mt-gallery__thumbs button[aria-current=true]{border-color:#70533c;background:#e9ded1}
.mt-gallery__thumbs img{display:block;width:64px;height:64px;object-fit:cover;border-radius:4px}
body#product .product-cover:has([data-mt-gallery-open]){cursor:zoom-in}
@media(max-width:767px){
 #mt-product-gallery{width:100%;height:100dvh;border:0;border-radius:0}
 .mt-gallery__header{gap:8px;padding:8px;flex-wrap:wrap}
 .mt-gallery__title{flex-basis:100%;font-size:14px}
 .mt-gallery__header [data-gallery-count]{flex:1}
 .mt-gallery__stage{padding:8px 0}
 .mt-gallery__prev{left:6px}.mt-gallery__next{right:6px}
 .mt-gallery__thumbs img{width:52px;height:52px}
}
