/* Targeted storefront corrections; third-party component files remain untouched. */
@media (max-width: 900px) {
    .mbs-catalog .wc-block-product-filters.is-overlay-opened .wc-block-product-filters__close-overlay {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 38px;
        margin: 0;
        padding: 0 13px;
        border: 1px solid #e3e3e3;
        border-radius: 999px;
        background: #f7f7f8;
        color: #292b31;
        box-shadow: none;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
    }
    .mbs-catalog .wc-block-product-filters.is-overlay-opened .wc-block-product-filters__close-overlay:hover {
        background: #ececed;
        color: #292b31;
    }
    .mbs-catalog .wc-block-product-filters__close-overlay svg { width: 18px; height: 18px; }
}

@media (max-width: 767px) {
    /* Print configurator: the product surface provides its own inner gutter. */
    body.wpc-shengda-customizer #content { padding-inline: 0; }
    body.wpc-shengda-customizer .wpc-peer-product { flex: 0 0 clamp(132px, 38vw, 155px); }
    body.wpc-shengda-customizer .wpc-product-heading-row h1 { font-size: 18px; }

    /* Standard products share the custom product's compact breadcrumb and sale pill. */
    body.wac-product-template .woocommerce-breadcrumb,
    body.wac-priced-product .woocommerce-breadcrumb {
        margin-bottom: 14px;
        padding: 7px 12px;
        color: #8b8c91;
        font-size: 13px;
        line-height: 1.4;
    }
    body.wac-product-template .wac-gallery-column > .onsale,
    body.wac-priced-product div.product .onsale {
        top: 12px;
        left: 12px;
        z-index: 3;
        width: max-content;
        min-width: 0;
        min-height: 0;
        margin: 0;
        padding: 6px 12px;
        border-radius: 999px;
        background: #ffd4c1;
        color: #222;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.5;
    }
    body.wac-product-template .wac-single-product .summary > .pc-product-favorite,
    body.wac-priced-product .summary > .pc-product-favorite {
        top: 0;
        right: 0;
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
        padding: 5px;
    }
    body.wac-product-template .wac-single-product .summary > .pc-product-favorite .pc-tool-icon,
    body.wac-priced-product .summary > .pc-product-favorite .pc-tool-icon {
        width: 20px;
        height: 20px;
    }
    body.wac-product-template .wac-native-row {
        grid-template-columns: minmax(0, 1fr);
    }
    body.wac-product-template .wac-native-label {
        justify-content: flex-start;
        width: 100%;
        text-align: left;
    }
    .mbs-product-discovery .mbs-journal .mbs-discovery-heading { font-size: 22px; }
}

@media (max-width: 600px) {
    .mbs-catalog ul.products li.product .mbs-catalog-favorite {
        top: 8px;
        left: 8px;
        width: 31px;
        min-width: 31px;
        max-width: 31px;
        height: 31px;
        min-height: 31px;
        max-height: 31px;
        padding: 6px;
    }
    .mbs-catalog ul.products li.product .mbs-catalog-favorite .pc-tool-icon {
        width: 19px;
        height: 19px;
    }
    .mbs-catalog nav.woocommerce-pagination ul.page-numbers {
        justify-content: flex-start;
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .mbs-catalog nav.woocommerce-pagination ul.page-numbers::-webkit-scrollbar { display: none; }
    .mbs-catalog nav.woocommerce-pagination ul.page-numbers > li { flex: 0 0 42px; min-width: 42px; }
    .mbs-catalog nav.woocommerce-pagination ul.page-numbers > li > .page-numbers {
        display: grid;
        place-items: center;
        flex: 0 0 42px;
        box-sizing: border-box;
        width: 42px !important;
        min-width: 42px;
        height: 42px !important;
        min-height: 42px;
        padding: 0 !important;
        border-radius: 50%;
        line-height: 1;
    }
}

@media (max-width: 480px) {
    .mbs-cart-drawer {
        left: 16px;
        right: 16px;
        top: 16px;
        bottom: 16px;
        width: auto;
        max-width: none;
        height: calc(100dvh - 32px);
    }
}

@media (max-width: 360px) {
    /* Woo Blocks' cart table can exceed a narrow viewport when item options are long. */
    body.woocommerce-cart .wc-block-cart__main {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }
}
