/* Shared merchandising tokens: card grids and detail media have different ratios. */
:root{--mt-grid-gap:12px;--mt-card-inset:4px;--mt-card-ratio:4/5;--mt-detail-limit:760px}
.woocommerce ul.products,.wc-block-product-template{gap:var(--mt-grid-gap)!important}
.woocommerce ul.products li.product,.wc-block-product-template .wc-block-product{padding:var(--mt-card-inset) var(--mt-card-inset) 12px!important;position:relative}
.woocommerce ul.products li.product a img,.wc-block-product .wc-block-components-product-image img{aspect-ratio:var(--mt-card-ratio)!important;object-fit:cover!important;border:0;width:100%;height:auto}
.woocommerce ul.products li.product img.mt-image-contain,.wc-block-product .wc-block-components-product-image img.mt-image-contain{object-fit:contain!important}
.mt-card-badges{position:absolute;inset:10px 8px auto;z-index:2;display:flex;flex-wrap:wrap;justify-content:center;gap:4px;pointer-events:none}
.mt-card-badges>span,.woocommerce ul.products li.product .mt-card-badges .onsale{position:static!important;margin:0!important;min-width:0;min-height:0;line-height:1.3;padding:5px 7px;border-radius:12px;font-size:9px;max-width:100%;background:var(--mt-mint);color:var(--mt-text)}
.woocommerce ul.products li.product .mt-card-badges .onsale{background:var(--mt-action);color:white}
.mt-sample-card{text-align:center;margin:3px 0 6px;font-size:8px}
.woocommerce ul.products li.product:has(.mt-sample-card) .mt-card-badges{top:28px}
.woocommerce div.product div.images{padding:6px;background:transparent}
.woocommerce div.product div.images .woocommerce-product-gallery__image{background:transparent}
.woocommerce div.product div.images .woocommerce-product-gallery__image a{display:block;width:fit-content;max-width:100%;margin-inline:auto;overflow:hidden;border-radius:var(--mt-radius-md);background:var(--mt-pink-soft)}
.woocommerce div.product div.images .woocommerce-product-gallery__image img{aspect-ratio:auto!important;width:auto!important;height:auto!important;max-width:100%;max-height:var(--mt-detail-limit);object-fit:contain;display:block;margin:auto;transition:transform 250ms ease}
.woocommerce div.product div.images .flex-control-thumbs{gap:6px;margin-top:8px}
.woocommerce div.product div.images .flex-control-thumbs li{width:calc(25% - 4.5px);max-width:84px}
.mt-product-media{gap:var(--mt-grid-gap);align-items:start;padding-top:12px;grid-template-columns:repeat(2,minmax(0,1fr));max-width:780px;margin-inline:auto}
.mt-product-media figure{padding:6px;width:fit-content;max-width:100%;justify-self:center;background:transparent}
.mt-product-media:has(>figure:only-child){grid-template-columns:minmax(0,1fr);max-width:560px;margin-inline:auto}
.mt-product-media img,.mt-product-media video{display:block;width:auto;max-width:100%;height:auto;max-height:560px;aspect-ratio:auto;object-fit:contain}
.woocommerce-tabs .wp-video{width:fit-content!important;max-width:100%!important;margin-inline:0}
.woocommerce-tabs video,.mt-translated-native-media video{display:block;width:auto!important;max-width:100%;height:auto!important;max-height:560px;aspect-ratio:auto}
.woocommerce-tabs .mejs-container,.woocommerce-tabs .mejs-overlay{max-width:100%}
.woocommerce-tabs video.mt-description-video{width:min(100%,calc(560px * var(--mt-video-ratio,1)))!important;aspect-ratio:var(--mt-video-ratio,auto);object-fit:contain;background:var(--mt-text)}
.woocommerce-tabs .panel:has(>.mt-description-video):not(:has(>p)){width:fit-content;max-width:100%}
@media(min-width:1024px){.woocommerce ul.products,.wc-block-product-template{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:760px){:root{--mt-grid-gap:8px;--mt-card-inset:3px;--mt-detail-limit:600px}.mt-product-media{grid-template-columns:repeat(2,minmax(0,1fr))}.mt-product-media figcaption{font-size:11px}.mt-card-badges{inset:8px 4px auto}.mt-card-badges>span,.woocommerce ul.products li.product .mt-card-badges .onsale{font-size:8px;padding:4px 5px}}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){.woocommerce div.product div.images:not(.zoom-enabled) .woocommerce-product-gallery__image a:hover img{transform:scale(1.04)}}
@media(prefers-reduced-motion:reduce){.woocommerce div.product div.images .woocommerce-product-gallery__image img{transition:none!important;transform:none!important}}

.wc-block-components-product-sale-badge{inset:10px auto auto 50%!important;transform:translateX(-50%);margin:0!important;max-width:calc(100% - 16px);z-index:2}

.v3-video-frame:has(video){aspect-ratio:auto!important;min-height:0;display:flex;justify-content:center;padding:12px}
.v3-video-frame video{width:auto!important;height:auto!important;max-width:100%;max-height:620px;aspect-ratio:auto!important;object-fit:contain;background:transparent}
.v3-category img{aspect-ratio:2/3!important;height:auto!important;object-fit:cover;contain-intrinsic-size:auto!important}
.v3-category h3>span,.v3-hero-product>span:last-child{font-size:0!important}
.v3-category h3>span:after,.v3-hero-product>span:last-child:after{content:"";display:inline-block;width:12px;height:12px;background:currentColor;clip-path:polygon(0 85%,65% 20%,20% 20%,20% 0,100% 0,100% 80%,80% 80%,80% 35%,15% 100%)}
@media(max-width:760px){.v3-video-frame video{max-height:75svh}.v3-video-frame:has(video){aspect-ratio:auto!important}}

/* Wrap the frame around intrinsic video dimensions, not the grid column. */
.v3-video-frame:has(video){width:fit-content!important;max-width:100%;justify-self:center;align-self:center;box-sizing:border-box;padding:0!important;background:transparent;box-shadow:none;overflow:hidden;border-radius:22px}
.v3-video-frame video{display:block;max-width:100%;margin:0;border-radius:22px}
