.tom-photo-open { display:block; position:relative; cursor:zoom-in; }
.tom-photo-open > img { display:block; max-width:100%; height:auto; }
.tom-photo-open .tom-photo-label { position:absolute; right:12px; bottom:12px; background:#006970; color:#fff; padding:10px 14px; border-radius:5px; font-size:15px; }
.tom-photo-dialog { padding:16px; border:0; border-radius:8px; width: min(1100px, 94vw); max-width:94vw; max-height:92vh; overflow:auto; background:white; color:#222; }
.tom-photo-dialog::backdrop { background:rgb(0 0 0 / 75%); }
.tom-photo-dialog form { position:sticky; top:0; display:flex; justify-content:flex-end; z-index:1; margin:0 0 8px; }
.tom-photo-dialog button { padding:10px 18px; border:0; border-radius:4px; background:#006970; color:white; cursor:pointer; font-size:16px; }
.tom-photo-dialog [role="status"]:empty { display:none; }
.tom-photo-scroll { overflow:auto; max-width:calc(94vw - 32px); max-height:calc(92vh - 80px); touch-action:pan-x pan-y pinch-zoom; }
.tom-photo-scroll img { display:block; width:auto; height:auto; max-width:none; max-height:none; margin:0; }
.tom-photo-scroll img[hidden] { display:none; }
.tom-photo-thumbnails a { display:block; }

.tom-product-gallery { max-width:100%; }
.tom-photo-thumbnails { list-style:none; display:flex; flex-wrap:wrap; gap:8px; padding:10px 0 0; margin:0; }
.tom-photo-thumbnails li { flex:0 0 84px; margin:0; padding:0; }
.tom-photo-thumbnails a { display:flex; align-items:center; justify-content:center; width:84px; height:84px; overflow:hidden; border:1px solid #d6d6d6; background:#fff; }
.tom-photo-thumbnails a:hover, .tom-photo-thumbnails a:focus-visible { border-color:#006970; }
.tom-photo-thumbnails img { display:block; width:100%; height:100%; object-fit:contain; }
