body:has(:is(#photo-viewer,#supplier-product,#tr-fit)[open]) { overflow:hidden }
#supplier-product,#tr-fit { width:min(96vw,960px); max-height:94dvh; padding:0; overflow:hidden }
#supplier-product[open],#tr-fit[open] { display:flex; flex-direction:column }
.viewer-head { align-items:center; padding:10px 14px }
#supplier-product .viewer-head h2,#tr-fit .viewer-head h2 { font-size:clamp(17px,3vw,24px); line-height:1.15; margin:0 }
.viewer-head .ghost,.viewer-head .fit-close { display:grid; place-items:center; min-width:44px; min-height:44px; padding:0; border-radius:7px; font-size:24px }
.viewer-body { align-items:start; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) }
.product-gallery { min-width:0; background:#171a15 }
.product-sidebar { padding:14px 16px; min-width:0 }
.product-gallery .pg-frame { position:relative; isolation:isolate; background:var(--product-canvas,#fff) }
.product-gallery .photo-stage { background:var(--product-canvas,#fff); height:clamp(220px,55dvh,610px) }
.pg-tool { position:absolute; z-index:1; display:grid; place-items:center; height:44px; width:44px; padding:0; border-radius:50%; border:1px solid #ffffff60; background:#171b16eb; color:#fff; cursor:pointer; box-shadow:0 2px 8px #0002 }
.pg-tool:hover { background:#30372b }
.pg-tool:focus-visible,.pg-thumbs button:focus-visible { outline:3px solid #8ca500; outline-offset:2px }
.pg-tool:disabled { visibility:hidden }
.pg-tool svg { width:21px; height:21px; display:block; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round }
.pg-prev,.pg-next { top:50%; transform:translateY(-50%) }
.pg-prev { left:9px } .pg-next { right:9px } .pg-zoom { right:9px; top:9px }
.pg-zoom[aria-pressed=true] .pg-plus { display:none }
.pg-position { position:absolute; bottom:10px; left:10px; background:#141812e8; color:white; border-radius:4px; padding:4px 8px; font:600 .81rem/1.25 system-ui; font-variant-numeric:tabular-nums }
.pg-thumbs { display:flex; gap:7px; overflow-x:auto; padding:10px 12px 5px; scrollbar-width:thin; overscroll-behavior-x:contain }
.pg-thumbs button { flex:0 0 56px; height:56px; padding:2px; border:2px solid transparent; border-radius:5px; background:#fff; color:#141812; overflow:hidden }
.pg-thumbs button[aria-pressed=true] { border-color:var(--lime); box-shadow:0 0 0 1px var(--lime) }
.pg-thumbs img { width:100%; height:100%; display:block; object-fit:contain }
.pg-caption { padding:7px 12px 12px; color:var(--mute); font-size:.85rem; line-height:1.45 }
.pg-error { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); text-align:center; color:#181d15; background:white; padding:8px; font-size:.9rem }
.pg-error button { background:transparent; border:0; padding:8px; color:inherit; text-decoration:underline }
@media(max-width:640px) {
  .viewer-body { display:block }
  .product-gallery .photo-stage { height:clamp(200px,48dvh,460px) }
  .pg-thumbs button { flex-basis:48px; height:48px }
  .viewer-head { padding:6px 10px }
}
.supplier-gallery-links { margin:12px 0 }
.supplier-gallery-links:empty { display:none }
.supplier-gallery-links a { color:var(--lime); text-underline-offset:3px }
#supplier-product .viewer-body:has(.product-gallery[hidden]), #tr-fit .viewer-body:has(.product-gallery[hidden]) { display:block }
.supplier-gallery-links > a { display:inline-flex; align-items:center; min-height:44px; margin-right:12px }
.footwear-stage .footwear-photo-placeholder { padding:1.6rem .7rem; max-width:27ch; line-height:1.35; font-size:clamp(.85rem,2.3vw,1rem); text-wrap:balance }
.footwear-stage .supplier-image img { opacity:0 }
.footwear-stage .supplier-image img[data-loaded] { opacity:1 }
