/* Theme-independent square storefront media. Zoom/lightbox popups keep their natural ratio. */
body.single-product .pv-main-image-wrap,
body.single-product .sv3-stage,
body.single-product .spc-collage .spc-photo,
body.single-product .cpd-main-image,
body.single-product .woocommerce-product-gallery__image{position:relative!important;display:block!important;width:100%!important;max-width:100%!important;height:auto!important;aspect-ratio:1/1!important;min-width:0!important;min-height:0!important;box-sizing:border-box!important;overflow:hidden!important;background:#f8fafc!important;border-radius:inherit;isolation:isolate;contain:layout paint}
body.single-product .woocommerce-product-gallery__image>a{display:block!important;width:100%!important;height:100%!important}
body.single-product .pv-main-image,
body.single-product .sv3-stage>img,
body.single-product .spc-collage .spc-photo>img,
body.single-product .cpd-main-image>img,
body.single-product .woocommerce-product-gallery__image>a>img,
body.single-product .woocommerce-product-gallery__image>img,
body.single-product img.wp-post-image{display:block!important;width:100%!important;height:auto!important;max-width:100%!important;aspect-ratio:1/1!important;object-fit:cover!important;object-position:center!important;transform:none!important;transition:opacity .24s ease!important}
body.single-product .pv-gallery,body.single-product .sv3-gallery,body.single-product .spc-gallery,body.single-product .cpd-gallery,body.single-product .woocommerce-product-gallery{min-width:0!important;box-sizing:border-box!important}
@media(hover:hover){body.single-product .pv-main-image-wrap:hover .pv-main-image,body.single-product .sv3-stage:hover>img,body.single-product .spc-collage .spc-photo:hover>img,body.single-product .cpd-main-image:hover>img,body.single-product .woocommerce-product-gallery__image:hover img{transform:none!important}}
body.single-product .pv-thumb,
body.single-product .sv3-thumbs button,
body.single-product .spc-thumbs button,
body.single-product .cpd-thumbs button,
body.single-product .flex-control-thumbs li{aspect-ratio:1/1!important;overflow:hidden!important}
body.single-product .pv-thumb img,
body.single-product .sv3-thumbs img,
body.single-product .spc-thumbs img,
body.single-product .cpd-thumbs img,
body.single-product .flex-control-thumbs img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important}
@media(max-width:760px){body.single-product .spc,body.single-product .spc-main{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}body.single-product .spc-main{grid-template-columns:minmax(0,1fr)!important}body.single-product .spc-collage{justify-self:stretch!important;align-self:start!important;inline-size:100%!important;max-inline-size:100%!important;min-inline-size:0!important}body.single-product .pv-main-image-wrap,body.single-product .sv3-stage,body.single-product .spc-collage .spc-photo,body.single-product .cpd-main-image,body.single-product .woocommerce-product-gallery__image{width:100%!important;max-width:100%!important;height:auto!important;aspect-ratio:1/1!important}body.single-product .pv-main-image,body.single-product .sv3-stage>img,body.single-product .spc-collage .spc-photo>img,body.single-product .cpd-main-image>img,body.single-product .woocommerce-product-gallery__image>a>img,body.single-product .woocommerce-product-gallery__image>img,body.single-product img.wp-post-image{width:100%!important;height:auto!important;aspect-ratio:1/1!important;max-height:none!important}}
@media(prefers-reduced-motion:reduce){body.single-product .pv-main-image,body.single-product .sv3-stage>img,body.single-product .spc-collage .spc-photo>img,body.single-product .cpd-main-image>img,body.single-product .woocommerce-product-gallery__image img,body.single-product img.wp-post-image{transition:none!important}}
/* Keep custom collage designs square as a whole, with balanced tiles for every image count. */
body.single-product .spc-collage{display:grid!important;width:100%!important;max-width:100%!important;aspect-ratio:1/1!important;gap:6px!important;overflow:hidden!important;grid-auto-flow:row dense}
body.single-product .spc-collage .spc-photo{display:block!important;width:100%!important;max-width:none!important;height:100%!important;min-width:0!important;min-height:0!important;aspect-ratio:auto!important;overflow:hidden!important}
body.single-product .spc-collage .spc-photo>img{width:100%!important;height:100%!important;aspect-ratio:auto!important;object-fit:cover!important}
body.single-product .spc-collage.spc-count-1{grid-template-columns:1fr!important;grid-template-rows:1fr!important}
body.single-product .spc-collage.spc-count-2{grid-template-columns:repeat(2,1fr)!important;grid-template-rows:1fr!important}
body.single-product .spc-collage.spc-count-3{grid-template-columns:1.35fr 1fr!important;grid-template-rows:repeat(2,1fr)!important}
body.single-product .spc-collage.spc-count-3 .spc-photo:first-child{grid-row:1/3!important}
body.single-product .spc-collage.spc-count-4{grid-template-columns:repeat(2,1fr)!important;grid-template-rows:repeat(2,1fr)!important}
body.single-product .spc-collage.spc-count-5{grid-template-columns:1.45fr repeat(2,1fr)!important;grid-template-rows:repeat(2,1fr)!important}
body.single-product .spc-collage.spc-count-5 .spc-photo:first-child{grid-row:1/3!important}
body.single-product .spc-collage.spc-count-6{grid-template-columns:repeat(3,1fr)!important;grid-template-rows:repeat(2,1fr)!important}
body.single-product .spc-collage[class*="spc-count-"]:not(.spc-count-1):not(.spc-count-2):not(.spc-count-3):not(.spc-count-4):not(.spc-count-5):not(.spc-count-6){grid-template-columns:repeat(3,1fr)!important;grid-auto-rows:minmax(0,1fr)!important}
