.product-gallery-main{display:block;width:100%;height:100%;cursor:zoom-in;position:relative}
.gallery-zoom-hint{position:absolute;bottom:0;right:0;display:flex;align-items:center;gap:5px;padding:5px 8px;background:#fffe;border:1px solid var(--line);border-radius:7px;font-size:.75rem;color:var(--ink-2)}
.product-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(82px,1fr));gap:10px;margin:12px 0 8px;max-width:540px}
.product-gallery a{min-width:0;max-width:160px;padding:6px;border:1px solid #d8e4ee;border-radius:10px;background:#fff;text-align:center;color:#16314c;text-decoration:none;font-size:.76rem;line-height:1.3}
.product-gallery a[aria-current=true]{border:2px solid var(--blue);padding:5px;background:#f0f6ff}
.product-gallery a:hover,.product-gallery a:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.product-gallery img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;border-radius:5px}
.product-gallery span{display:block;margin-top:5px}.gallery-caption{font-size:.78rem;color:var(--muted);line-height:1.45;margin:8px 0 16px;max-width:65ch;min-height:2.9em}
.product-gallery-dialog{border:0;border-radius:16px;padding:14px;width:min(94vw,1050px);max-height:94dvh;overflow:auto;background:#fff;box-shadow:0 20px 80px #081b4b66;color:var(--ink)}
.product-gallery-dialog::backdrop{background:#071b3dd9}.gallery-dialog-head{display:flex;justify-content:space-between;align-items:center;position:sticky;top:-14px;background:#fff;z-index:1;font-size:.85rem;color:var(--muted)}
.product-gallery-dialog figure{margin:0}.product-gallery-dialog figure>img{display:block;width:100%;height:min(67dvh,780px);object-fit:contain;border-radius:10px}.product-gallery-dialog figcaption{padding:12px 8px;font-size:.9rem;line-height:1.5}
.product-gallery-close{border:0;border-radius:50%;width:44px;height:44px;background:#132753;color:#fff;font-size:28px;cursor:pointer}.gallery-dialog-nav{display:flex;justify-content:space-between;gap:12px}.gallery-dialog-nav button{white-space:normal}
@media(max-width:860px){.product-gallery{max-width:420px;margin:10px auto}.gallery-caption{max-width:420px;margin-left:auto;margin-right:auto}.product-gallery a{max-width:none}.product-gallery-dialog{padding:10px;width:96vw}.product-gallery-dialog figure>img{height:60dvh}.gallery-zoom-hint{font-size:.7rem}}

/* Compact mobile gallery: a readable main picture and small side previews. */
@media(max-width:860px){
 .pdp-media:has(.product-gallery){display:grid;grid-template-columns:minmax(0,1fr) 72px;gap:8px;align-items:start}
 .pdp-media:has(.product-gallery) .pdp-image{height:190px;width:100%;max-width:none;aspect-ratio:auto;padding:8px;margin:0}
 .pdp-media:has(.product-gallery) .product-gallery{display:flex;flex-direction:column;grid-column:2;grid-row:1;gap:6px;margin:0;max-height:190px;overflow-y:auto;scrollbar-width:thin}
 .pdp-media:has(.product-gallery) .product-gallery a{flex:none;width:70px;padding:4px;font-size:.62rem;border-radius:7px}
 .pdp-media:has(.product-gallery) .product-gallery a[aria-current=true]{padding:3px}
 .pdp-media:has(.product-gallery) .product-gallery img{height:46px;width:100%;aspect-ratio:auto}
 .pdp-media:has(.product-gallery) .product-gallery span{margin-top:3px}
 .pdp-media:has(.product-gallery) .gallery-caption{grid-column:1/-1;margin:0;min-height:0;font-size:.68rem;line-height:1.4}
 .gallery-zoom-hint{font-size:.62rem;padding:3px 5px}
}
