/* YUSTORIS product photo viewport fit - 2026-12-01 */
.picture img{object-fit:contain!important;object-position:center!important}
.product-layout{min-width:0;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.product-layout>*{min-width:0;max-width:100%}
#productDialog:not(.ypc-product-page){box-sizing:border-box;max-width:min(900px,calc(100vw - 24px))!important;max-height:calc(100vh - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto;overscroll-behavior:contain}
.ypg-gallery .ypg-main .ypg-photo{max-width:100%!important;height:clamp(160px,calc(100vh - 280px),440px)!important;height:clamp(160px,calc(100dvh - 280px),440px)!important;object-fit:contain!important;object-position:center!important}
#ypg-viewer[open]{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;gap:0;box-sizing:border-box;width:min(1100px,calc(100vw - 24px))!important;height:min(860px,calc(100vh - 24px))!important;height:min(860px,calc(100dvh - 24px))!important;max-height:calc(100dvh - 24px)!important;overflow:hidden!important}
#ypg-viewer .ypg-bar,#ypg-viewer .ypg-navigation{min-width:0}
#ypg-viewer .ypg-title{overflow-wrap:anywhere}
#ypg-viewer .ypg-large{height:auto!important;min-width:0;min-height:0;max-width:100%;overflow:auto}
#ypg-viewer .ypg-large:not(.ypg-zoom) img{box-sizing:border-box;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important}
@media(max-width:650px){.product-layout{grid-template-columns:minmax(0,1fr)}.ypg-gallery .ypg-main .ypg-photo{height:clamp(160px,42vh,300px)!important;height:clamp(160px,42dvh,300px)!important}#ypg-viewer[open]{padding:12px!important}.picture{min-width:0}}

.product-layout>img{display:block;max-width:100%;max-height:70vh;max-height:70dvh;object-fit:contain;object-position:center}
