/* Consistent fitted image stage, independent of the product's source dimensions. */
.photo-zoom{min-width:0;width:100%;margin:0;align-self:start}
.photo-viewport{position:relative;overflow:hidden;width:100%;height:min(55vh,540px);height:min(55dvh,540px);min-height:220px;background:#f6f1e9;border:1px solid #dce1d1;border-radius:3px;touch-action:none;user-select:none;-webkit-user-select:none;isolation:isolate;cursor:zoom-in}
.photo-viewport.is-enlarged{cursor:grab}.photo-viewport.is-enlarged:active{cursor:grabbing}
.photo-viewport>img{position:absolute!important;top:50%;left:50%;display:block!important;margin:0!important;padding:0!important;max-width:none!important;max-height:none!important;min-width:0!important;object-fit:contain!important;object-position:center;transform-origin:center;pointer-events:none;transition:none!important}
.photo-zoom-tools{display:flex;align-items:center;justify-content:center;gap:8px;margin:10px 0 0;flex-wrap:wrap}
.photo-zoom-tools>button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin:0;padding:8px 12px;background:#fffef8;color:#2b4d37;border:1px solid #acb99c;border-radius:4px;font:14px/1.3 Manrope,Arial,sans-serif;cursor:pointer}
.photo-zoom-tools>button:disabled{opacity:.4;cursor:default}.photo-zoom-tools>button:hover:enabled{background:#e8eddf}
.photo-zoom-tools output{min-width:50px;text-align:center;font:14px/1.3 Manrope,Arial,sans-serif;color:#344b37}
.photo-zoom-help{font:12px/1.5 Manrope,Arial,sans-serif;color:#52624c;text-align:center;margin:10px 0 0!important}
.photo-viewport:focus-visible,.photo-zoom-tools button:focus-visible{outline:2px solid #2b4d37;outline-offset:3px}
#product-dialog{width:min(1100px,94vw);max-height:92vh;max-height:92dvh;overflow:auto}
#product-dialog .product-detail{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:28px;align-items:start;margin-top:20px}
#product-dialog .product-detail>div{min-width:0}
.ring-photo-detail:has(.photo-zoom),.earring-photo-detail:has(.photo-zoom){grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
@media(max-width:650px){
 #product-dialog{width:calc(100vw - 20px);padding:14px;box-sizing:border-box}
 #product-dialog .product-detail,.ring-photo-detail:has(.photo-zoom),.earring-photo-detail:has(.photo-zoom){grid-template-columns:minmax(0,1fr);gap:20px}
 .photo-viewport{height:min(48vh,420px);height:min(48dvh,420px);min-height:190px}
 .dialog-heading{gap:12px;align-items:start}.dialog-heading h2{font-size:27px;min-width:0}.dialog-heading>button{flex-shrink:0;min-height:44px}
}
