/* ==================================================
   RMR MOBILE PRODUCT CARDS — FINAL OVERRIDE
   Loaded after style.css, nstyle.css and nhomepage.css.
================================================== */

@media (max-width: 767px) {

    html body.woocommerce .prod-grid,
    html body.woocommerce ul.products,
    html body.woocommerce-page .prod-grid,
    html body.woocommerce-page ul.products,
    html body.tax-product_cat .prod-grid,
    html body.tax-product_cat ul.products,
    html body.tax-product_brand .prod-grid,
    html body.tax-product_brand ul.products,
    html body .main-shop .prod-grid,
    html body .main-shop ul.products {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 22px !important;

        width: 100% !important;
        max-width: 420px !important;
        margin: 0 auto !important;
        padding: 0 12px !important;

        box-sizing: border-box !important;
    }

    html body.woocommerce ul.products::before,
    html body.woocommerce ul.products::after,
    html body.woocommerce-page ul.products::before,
    html body.woocommerce-page ul.products::after,
    html body.tax-product_cat ul.products::before,
    html body.tax-product_cat ul.products::after {
        display: none !important;
        content: none !important;
    }

    html body .main-shop ul.products > li.product,
    html body .main-shop .prod-grid > li.product,
    html body .main-shop .prod-grid > article.prod,
    html body.woocommerce ul.products > li.product,
    html body.woocommerce-page ul.products > li.product,
    html body.tax-product_cat ul.products > li.product {
        float: none !important;
        clear: both !important;

        display: block !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        margin: 0 !important;
        padding: 0 !important;

        box-sizing: border-box !important;
    }

    html body .main-shop article.prod,
    html body .main-shop li.product > article.prod,
    html body.woocommerce li.product > article.prod,
    html body.woocommerce-page li.product > article.prod,
    html body.tax-product_cat li.product > article.prod {
        display: flex !important;
        flex-direction: column !important;

        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        margin: 0 !important;

        overflow: hidden !important;

        border: 1px solid #e0e5ec !important;
        border-radius: 14px !important;

        background: #ffffff !important;

        box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08) !important;
        transform: none !important;
    }

    html body .main-shop article.prod .prod-media,
    html body.woocommerce article.prod .prod-media,
    html body.woocommerce-page article.prod .prod-media,
    html body.tax-product_cat article.prod .prod-media {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        height: 220px !important;
        min-height: 220px !important;
        max-height: 220px !important;

        margin: 0 !important;
        padding: 14px !important;

        overflow: hidden !important;

        background: #ffffff !important;
        box-sizing: border-box !important;
    }

    html body .main-shop article.prod .prod-media > a,
    html body.woocommerce article.prod .prod-media > a,
    html body.woocommerce-page article.prod .prod-media > a,
    html body.tax-product_cat article.prod .prod-media > a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        height: 100% !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    html body .main-shop article.prod .prod-media img,
    html body.woocommerce article.prod .prod-media img,
    html body.woocommerce-page article.prod .prod-media img,
    html body.tax-product_cat article.prod .prod-media img {
        display: block !important;

        width: 100% !important;
        max-width: 100% !important;

        height: 185px !important;
        min-height: 0 !important;
        max-height: 185px !important;

        margin: 0 auto !important;

        object-fit: contain !important;
        object-position: center !important;

        transform: none !important;
    }

    html body .main-shop article.prod .prod-body,
    html body.woocommerce article.prod .prod-body,
    html body.woocommerce-page article.prod .prod-body,
    html body.tax-product_cat article.prod .prod-body {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;

        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;

        margin: 0 !important;
        padding: 18px !important;

        text-align: center !important;
        box-sizing: border-box !important;
    }

    html body .main-shop article.prod .p-cat,
    html body .main-shop article.prod h4,
    html body .main-shop article.prod h4 a,
    html body.woocommerce article.prod .p-cat,
    html body.woocommerce article.prod h4,
    html body.woocommerce article.prod h4 a,
    html body.tax-product_cat article.prod .p-cat,
    html body.tax-product_cat article.prod h4,
    html body.tax-product_cat article.prod h4 a {
        width: 100% !important;
        text-align: center !important;
    }

    html body .main-shop article.prod h4,
    html body.woocommerce article.prod h4,
    html body.tax-product_cat article.prod h4 {
        margin: 0 0 12px !important;

        font-size: 20px !important;
        line-height: 1.15 !important;
    }

    html body .main-shop article.prod .p-price,
    html body.woocommerce article.prod .p-price,
    html body.tax-product_cat article.prod .p-price {
        justify-content: center !important;
        margin: 0 0 12px !important;
        text-align: center !important;
    }

    html body .main-shop article.prod .p-cart,
    html body.woocommerce article.prod .p-cart,
    html body.tax-product_cat article.prod .p-cart {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        max-width: 260px !important;
        min-height: 50px !important;

        margin: 8px auto 0 !important;
        padding: 12px 16px !important;

        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    html body .main-shop .reveal,
    html body.woocommerce .reveal,
    html body.tax-product_cat .reveal {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}

@media (max-width: 420px) {

    html body .main-shop article.prod .prod-media,
    html body.woocommerce article.prod .prod-media,
    html body.tax-product_cat article.prod .prod-media {
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
    }

    html body .main-shop article.prod .prod-media img,
    html body.woocommerce article.prod .prod-media img,
    html body.tax-product_cat article.prod .prod-media img {
        height: 165px !important;
        max-height: 165px !important;
    }
}
