/* Bounded product cards: a single result must never stretch across the page. */
.sf-site-native .sd-product-grid,
.sf-site-native .sf-layout-stack .sf-live-products,
.sf-site-native :is(.sf-standard-page,.sd-product-stage) ul.products {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),240px));
    gap:20px;
    justify-content:start;
    align-items:stretch;
}
.sf-site-native :is(.sf-standard-page,.sd-product-stage) ul.products::before,
.sf-site-native :is(.sf-standard-page,.sd-product-stage) ul.products::after { content:none; display:none; }
.sf-site-native :is(.sf-standard-page,.sd-product-stage) ul.products li.product {
    float:none!important; width:auto!important; margin:0!important; min-width:0;
}
.sf-site-native .sd-product-card img,
.sf-site-native .sf-live-products .sd-product-card img,
.sf-site-native :is(.sf-standard-page,.sd-product-stage) ul.products li.product img {
    display:block; width:100%; height:auto; aspect-ratio:1; object-fit:contain;
    max-height:none; padding:0; background:transparent;
}
.sf-site-native .sd-product-card a>div { padding:16px; }
.sf-site-native .sd-product-card h3,
.sf-site-native .sf-native-content .sd-product-card h3,
.sf-site-native :is(.sf-standard-page,.sd-product-stage) ul.products li.product h2 {
    font-size:19px; line-height:1.25; margin-top:0; margin-bottom:12px;
}
.sf-site-native .sd-card-link { margin-top:16px; min-height:44px; display:flex; align-items:center; }

/* Home category photographs use the same restrained scale as catalog cards. */
.sf-site-native .sf-category-grid {
    grid-template-columns:repeat(3,minmax(0,280px)); gap:24px;
}
.sf-site-native .sf-category-grid a { padding:22px; min-width:0; }
.sf-site-native .sf-category-grid img { display:block; width:100%; height:auto; max-height:none; aspect-ratio:1; object-fit:contain; }
.sf-site-native .sf-category-grid h3 { font-size:21px; line-height:1.25; margin-top:16px; }

/* Product detail: keep the purchase controls wide, bound only the photo column. */
.sf-site-native .sf-product-wrap .sf-container,
.sf-site-native .sd-product-stage div.product {
    grid-template-columns:minmax(0,420px) minmax(0,1fr); gap:35px 40px;
}
.sf-site-native .sf-product-wrap #sf-main-image {
    display:block; width:100%; height:auto; max-width:420px; max-height:420px;
    margin-inline:auto; object-fit:contain;
}
.sf-site-native .sd-product-stage .woocommerce-product-gallery { max-width:420px; }
.sf-site-native .sd-product-stage .woocommerce-product-gallery__image:first-child img:not(.zoomImg) {
    width:100%; height:auto; max-height:420px; object-fit:contain;
}
.sf-site-native .sd-product-stage .woocommerce-product-gallery__image:not(:first-child) img:not(.zoomImg) {
    width:100px; height:100px; max-width:100%; object-fit:contain;
}
@media(max-width:900px) {
    .sf-site-native .sf-product-wrap .sf-container,
    .sf-site-native .sd-product-stage div.product { grid-template-columns:1fr; gap:28px; }
    .sf-site-native .sf-product-wrap .sf-image-col,
    .sf-site-native .sd-product-stage .woocommerce-product-gallery { width:100%; max-width:360px; margin-inline:auto; }
    .sf-site-native .sf-product-wrap #sf-main-image,
    .sf-site-native .sd-product-stage .woocommerce-product-gallery__image:first-child img:not(.zoomImg) { max-height:360px; }
}
@media(max-width:600px) {
    .sf-site-native .sd-product-grid,
    .sf-site-native .sf-layout-stack .sf-live-products,
    .sf-site-native :is(.sf-standard-page,.sd-product-stage) ul.products,
    .sf-site-native .sf-category-grid {
        grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
    }
    .sf-site-native .sd-product-card,
    .sf-site-native :is(.sf-standard-page,.sd-product-stage) ul.products li.product,
    .sf-site-native .sf-category-grid>a { max-width:240px; }
    .sf-site-native .sd-product-card a>div,
    .sf-site-native .sf-category-grid a { padding:12px; }
    .sf-site-native .sd-product-card h3,
    .sf-site-native .sf-native-content .sd-product-card h3,
    .sf-site-native :is(.sf-standard-page,.sd-product-stage) ul.products li.product h2,
    .sf-site-native .sf-category-grid h3 { font-size:16px; line-height:1.3; }
    .sf-site-native :is(.sf-standard-page,.sd-product-stage) ul.products li.product :is(h2,.price,.button) { margin-inline:12px; }
    .sf-site-native :is(.sf-standard-page,.sd-product-stage) ul.products li.product .button { max-width:calc(100% - 24px); font-size:13px; padding:10px; min-height:44px; }
    .sf-site-native .sf-category-grid span { font-size:12px; }
    .sf-site-native .sf-product-wrap .sf-image-col,
    .sf-site-native .sd-product-stage .woocommerce-product-gallery { max-width:280px; }
    .sf-site-native .sf-product-wrap #sf-main-image,
    .sf-site-native .sd-product-stage .woocommerce-product-gallery__image:first-child img:not(.zoomImg) { max-height:280px; }
}

/* Sale label overlays the photo instead of becoming a third grid item. */
.sf-site-native .sd-product-stage > div.product { position:relative; }
.sf-site-native .sd-product-stage > div.product > .onsale {
    position:absolute; top:8px; left:8px; right:auto; bottom:auto;
    width:auto; height:auto; min-width:0; min-height:0; margin:0;
    padding:5px 9px; line-height:1.4; font-size:12px; font-weight:700;
    border:1px solid #111318; border-radius:3px;
    background:#fffef9; color:#111318; z-index:3; pointer-events:none;
}
