/* SC WooCommerce Mobile View Fix v1.0.0 */
@media (max-width: 782px) {
    html:has(body.sc-woo-mobile-fix-active),
    body.sc-woo-mobile-fix-active {
        width: 100%;
        max-width: 100%;
        overflow-x: clip !important;
    }

    body.sc-woo-mobile-fix-active {
        padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    }

    body.sc-woo-mobile-fix-active #page,
    body.sc-woo-mobile-fix-active .site,
    body.sc-woo-mobile-fix-active .site-content,
    body.sc-woo-mobile-fix-active .content-area,
    body.sc-woo-mobile-fix-active main,
    body.sc-woo-mobile-fix-active .woocommerce,
    body.sc-woo-mobile-fix-active .woocommerce-page,
    body.sc-woo-mobile-fix-active .woocommerce-notices-wrapper,
    body.sc-woo-mobile-fix-active .woocommerce-result-count,
    body.sc-woo-mobile-fix-active .woocommerce-ordering,
    body.sc-woo-mobile-fix-active .products,
    body.sc-woo-mobile-fix-active .product,
    body.sc-woo-mobile-fix-active .product.type-product,
    body.sc-woo-mobile-fix-active .summary,
    body.sc-woo-mobile-fix-active .woocommerce-product-gallery,
    body.sc-woo-mobile-fix-active .woocommerce-tabs,
    body.sc-woo-mobile-fix-active .related,
    body.sc-woo-mobile-fix-active .up-sells,
    body.sc-woo-mobile-fix-active .cross-sells,
    body.sc-woo-mobile-fix-active .cart-collaterals,
    body.sc-woo-mobile-fix-active .checkout,
    body.sc-woo-mobile-fix-active .woocommerce-MyAccount-content,
    body.sc-woo-mobile-fix-active .woocommerce-MyAccount-navigation {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body.sc-woo-mobile-fix-active img,
    body.sc-woo-mobile-fix-active video,
    body.sc-woo-mobile-fix-active iframe,
    body.sc-woo-mobile-fix-active canvas,
    body.sc-woo-mobile-fix-active svg {
        max-width: 100% !important;
        height: auto;
    }

    body.sc-woo-mobile-fix-active .woocommerce ul.products,
    body.sc-woo-mobile-fix-active ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.sc-woo-mobile-fix-active .woocommerce ul.products::before,
    body.sc-woo-mobile-fix-active .woocommerce ul.products::after,
    body.sc-woo-mobile-fix-active ul.products::before,
    body.sc-woo-mobile-fix-active ul.products::after {
        display: none !important;
    }

    body.sc-woo-mobile-fix-active .woocommerce ul.products li.product,
    body.sc-woo-mobile-fix-active ul.products li.product {
        float: none !important;
        clear: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    body.sc-woo-mobile-fix-active ul.products li.product a,
    body.sc-woo-mobile-fix-active ul.products li.product img,
    body.sc-woo-mobile-fix-active ul.products li.product .button,
    body.sc-woo-mobile-fix-active ul.products li.product .price {
        max-width: 100% !important;
        overflow-wrap: anywhere;
    }

    body.sc-woo-mobile-fix-active .woocommerce div.product,
    body.sc-woo-mobile-fix-active .woocommerce div.product .summary,
    body.sc-woo-mobile-fix-active .woocommerce div.product div.images {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.sc-woo-mobile-fix-active .woocommerce div.product form.cart,
    body.sc-woo-mobile-fix-active .woocommerce div.product form.cart .variations,
    body.sc-woo-mobile-fix-active .woocommerce div.product form.cart .variations tbody,
    body.sc-woo-mobile-fix-active .woocommerce div.product form.cart .variations tr,
    body.sc-woo-mobile-fix-active .woocommerce div.product form.cart .variations th,
    body.sc-woo-mobile-fix-active .woocommerce div.product form.cart .variations td {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body.sc-woo-mobile-fix-active .woocommerce div.product form.cart .variations tr {
        display: block !important;
        margin-bottom: 12px !important;
    }

    body.sc-woo-mobile-fix-active .woocommerce div.product form.cart .variations th,
    body.sc-woo-mobile-fix-active .woocommerce div.product form.cart .variations td {
        display: block !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.sc-woo-mobile-fix-active input,
    body.sc-woo-mobile-fix-active select,
    body.sc-woo-mobile-fix-active textarea,
    body.sc-woo-mobile-fix-active button,
    body.sc-woo-mobile-fix-active .button {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body.sc-woo-mobile-fix-active .woocommerce table.shop_table,
    body.sc-woo-mobile-fix-active .woocommerce-cart-form,
    body.sc-woo-mobile-fix-active .woocommerce-checkout-review-order {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    body.sc-woo-mobile-fix-active .woocommerce-breadcrumb,
    body.sc-woo-mobile-fix-active .product_title,
    body.sc-woo-mobile-fix-active .woocommerce-loop-product__title,
    body.sc-woo-mobile-fix-active .woocommerce-product-details__short-description,
    body.sc-woo-mobile-fix-active .woocommerce-Tabs-panel,
    body.sc-woo-mobile-fix-active .entry-content {
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }

    body.sc-woo-mobile-fix-active .scwmf-overflow-clamp {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    body.sc-woo-mobile-fix-active .scwmf-hide-offcanvas-action {
        display: none !important;
    }

    .scwmf-mobile-actions {
        position: fixed;
        z-index: 999990;
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1px;
        width: 100%;
        max-width: 100vw;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        background: rgba(7, 18, 37, 0.97);
        box-shadow: 0 -8px 26px rgba(15, 23, 42, 0.22);
        box-sizing: border-box;
        backdrop-filter: blur(10px);
    }

    .scwmf-action {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 9px;
        min-width: 0;
        min-height: 54px;
        padding: 8px 10px;
        border-radius: 10px;
        color: #fff !important;
        text-decoration: none !important;
        box-sizing: border-box;
    }

    .scwmf-call { background: #dc2626; }
    .scwmf-whatsapp { background: #16a34a; }

    .scwmf-action span:not(.scwmf-icon) { min-width: 0; }
    .scwmf-action small,
    .scwmf-action strong { display: block; color: #fff !important; line-height: 1.15; }
    .scwmf-action small { margin-bottom: 3px; font-size: 10px; opacity: 0.88; }
    .scwmf-action strong { font-size: 15px; font-weight: 900; }

    .scwmf-icon {
        flex: 0 0 auto;
        display: grid;
        place-items: center;
        width: 30px;
        height: 30px;
        border: 1px solid rgba(255,255,255,.35);
        border-radius: 50%;
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    body.sc-woo-mobile-fix-active .woocommerce ul.products,
    body.sc-woo-mobile-fix-active ul.products {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 783px) {
    .scwmf-mobile-actions { display: none !important; }
}
