/*
Theme Name: Porto Child
Theme URI: https://www.portotheme.com/wordpress/porto
Author: P-THEMES
Author URI: https://www.portotheme.com/
Description: Porto Responsive WordPress + eCommerce Theme.
Version: 1.1
Template: porto
License: Commercial
License URI: http://themeforest.net/licenses/regular_extended
Tags: woocommerce, corporate, ecommerce, responsive, blue, black, green, white, light, dark, red, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
*/

/*************** ADD YOUR CUSTOM CSS HERE  ***************/

/* Fix product category layout on desktop archives.
   Keep Porto's left-sidebar archive columns on one row across browser zoom levels. */
@media (min-width: 992px) {
    body.archive.tax-product_cat #main.column2-left-sidebar .main-content-wrap {
        align-items: flex-start;
    }

    body.archive.tax-product_cat #main.column2-left-sidebar .porto-woo-category-sidebar.col-lg-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        width: 25% !important;
    }

    body.archive.tax-product_cat #main.column2-left-sidebar .main-content.col-lg-9 {
        flex: 0 0 75% !important;
        margin-left: 0 !important;
        max-width: 75% !important;
        width: 75% !important;
    }
}

/* Align product cards in category grids.
   Card scans have slightly different proportions, so reserve one image slot and anchor actions. */
body.archive.tax-product_cat ul.products li.product,
body.archive.tax-product_cat ul.products li.product-col,
body.archive.tax-product_cat .products .product {
    display: flex !important;
    flex-direction: column;
}

body.archive.tax-product_cat ul.products li.product .product-inner,
body.archive.tax-product_cat ul.products li.product-col .product-inner,
body.archive.tax-product_cat .products .product .product-inner {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
}

body.archive.tax-product_cat ul.products li.product .product-image,
body.archive.tax-product_cat ul.products li.product-col .product-image,
body.archive.tax-product_cat ul.products li.product .product-image-wrapper,
body.archive.tax-product_cat ul.products li.product-col .product-image-wrapper,
body.archive.tax-product_cat .products .product .product-image,
body.archive.tax-product_cat .products .product .product-image-wrapper {
    aspect-ratio: 63 / 88;
    align-items: center;
    display: flex !important;
    height: auto !important;
    justify-content: center;
    margin-bottom: 16px;
    overflow: hidden;
    width: 100%;
}

body.archive.tax-product_cat ul.products li.product .product-image img,
body.archive.tax-product_cat ul.products li.product-col .product-image img,
body.archive.tax-product_cat .products .product .product-image img {
    display: block;
    height: 100% !important;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    width: 100% !important;
}

body.archive.tax-product_cat ul.products li.product .product-content,
body.archive.tax-product_cat ul.products li.product-col .product-content,
body.archive.tax-product_cat .products .product .product-content {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
}

body.archive.tax-product_cat .product-content .category-list {
    min-height: 18px;
}

body.archive.tax-product_cat .product-content .product-loop-title,
body.archive.tax-product_cat .product-content .woocommerce-loop-product__title {
    min-height: 46px;
}

body.archive.tax-product_cat .product-content .cn-loop-variant-picker {
    margin-top: auto;
    width: 100%;
}

body.archive.tax-product_cat .product-content .cn-loop-variant-picker > *,
body.archive.tax-product_cat .product-content .cn-loop-variant-select,
body.archive.tax-product_cat .product-content .cn-loop-add-to-cart.button {
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 991px) {
    body.archive.tax-product_cat .cn-mobile-filter-toggle {
        align-items: center;
        background: #005e7d;
        border: 0;
        border-radius: 4px;
        color: #fff;
        display: none;
        font-size: 14px;
        font-weight: 800;
        gap: 8px;
        justify-content: center;
        line-height: 1.2;
        margin: 0 0 14px;
        min-height: 44px;
        padding: 12px 16px;
        text-transform: uppercase;
        width: 100%;
    }

    body.archive.tax-product_cat .cn-mobile-filter-toggle:before {
        content: "\2630";
        font-size: 16px;
        line-height: 1;
    }

    body.archive.tax-product_cat.cn-mobile-filters-ready .cn-mobile-filter-toggle {
        display: flex;
        order: 0;
    }

    body.archive.tax-product_cat.cn-mobile-filters-ready #main.column2-left-sidebar .porto-woo-category-sidebar.col-lg-3 {
        display: none !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        order: 1;
        width: 100% !important;
    }

    body.archive.tax-product_cat.cn-mobile-filters-ready.cn-mobile-filters-open #main.column2-left-sidebar .porto-woo-category-sidebar.col-lg-3 {
        display: block !important;
        margin-bottom: 18px;
    }

    body.archive.tax-product_cat #main.column2-left-sidebar .main-content.col-lg-9 {
        flex: 0 0 100% !important;
        margin-left: 0 !important;
        max-width: 100% !important;
        order: 2;
        width: 100% !important;
    }
}

/* Keep the Elementor mobile header inside narrow screens. */
@media (max-width: 767px) {
    html,
    body {
        overflow-x: clip;
    }

    #header,
    #header .elementor-location-header,
    #header .elementor-4529,
    #header .elementor-4529 .e-con {
        max-width: 100vw;
    }

    #header .elementor-4529 .elementor-element.elementor-element-b1e0358 {
        align-items: center !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        justify-content: space-between !important;
        min-height: 58px;
        padding: 8px 10px !important;
        width: 100% !important;
    }

    #header .elementor-4529 .elementor-element.elementor-element-f1bd644 {
        flex: 0 0 42px !important;
        max-width: 42px !important;
        min-width: 42px !important;
        width: 42px !important;
    }

    #header .elementor-4529 .elementor-element.elementor-element-a98f6bd {
        margin: 0 !important;
        order: 0 !important;
    }

    #header .mobile-toggle {
        align-items: center;
        border-radius: 4px;
        display: inline-flex;
        font-size: 18px !important;
        height: 40px;
        justify-content: center;
        line-height: 1;
        padding: 0 !important;
        width: 40px;
    }

    #header .elementor-4529 .elementor-element.elementor-element-8fbedb6 {
        flex: 1 1 auto !important;
        justify-content: center !important;
        margin: 0 !important;
        max-width: none !important;
        min-width: 0 !important;
        width: auto !important;
    }

    #header .elementor-4529 .elementor-element.elementor-element-097df15 {
        flex: 1 1 auto !important;
        margin: 0 !important;
        max-width: min(190px, calc(100vw - 138px)) !important;
        min-width: 0 !important;
        width: auto !important;
    }

    #header .elementor-4529 .elementor-element.elementor-element-097df15 img {
        display: block;
        height: auto;
        max-height: 46px;
        max-width: 100%;
        object-fit: contain;
        width: auto !important;
    }

    #header .elementor-4529 .elementor-element.elementor-element-cadf749 {
        align-items: center !important;
        display: flex !important;
        flex: 0 0 78px !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 4px !important;
        justify-content: flex-end !important;
        margin: 0 !important;
        max-width: 78px !important;
        min-width: 78px !important;
        width: 78px !important;
    }

    #header .elementor-4529 .elementor-element.elementor-element-c4a9daf,
    #header .elementor-4529 .elementor-element.elementor-element-9b2f9a5 {
        flex: 0 0 36px !important;
        margin: 0 !important;
        max-width: 36px !important;
        width: 36px !important;
    }

    #header .elementor-element-c4a9daf .my-account,
    #header .elementor-element-9b2f9a5 #mini-cart .cart-head,
    #header .elementor-element-9b2f9a5 #mini-cart.minicart-inline .cart-head {
        font-size: 21px !important;
        line-height: 36px !important;
    }

    #header #mini-cart,
    #header #mini-cart .cart-head {
        margin: 0 !important;
        min-width: 0;
    }

    #header .cart-items,
    #header .cart-price,
    #header .cart-subtotal {
        display: none !important;
    }

    #header .searchform,
    #header .searchform-popup,
    #header .searchform-fields,
    #header .searchform input,
    #header .searchform .text {
        box-sizing: border-box;
        max-width: 100% !important;
        width: 100% !important;
    }

    .woocommerce-cart .shop_table,
    .woocommerce-checkout .shop_table,
    .woocommerce-order .shop_table,
    .woocommerce-order-received .shop_table {
        max-width: 100%;
    }

    body.archive.tax-product_cat .shop-loop-before {
        align-items: center !important;
        box-sizing: border-box;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px;
        justify-content: space-between !important;
        padding: 8px !important;
        width: 100% !important;
    }

    body.archive.tax-product_cat .shop-loop-before > .elementor-widget-wrap {
        align-items: center !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        width: 100% !important;
    }

    body.archive.tax-product_cat .shop-loop-before .elementor-widget-porto_sb_sort {
        flex: 1 1 0 !important;
        margin: 0 !important;
        max-width: calc(100% - 58px) !important;
        min-width: 0 !important;
        width: calc(100% - 58px) !important;
    }

    body.archive.tax-product_cat .shop-loop-before .elementor-widget-porto_sb_count {
        flex: 0 0 52px !important;
        margin: 0 !important;
        max-width: 52px !important;
        min-width: 52px !important;
        width: 52px !important;
    }

    body.archive.tax-product_cat .shop-loop-before .woocommerce-ordering {
        flex: 1 1 0 !important;
        margin: 0 !important;
        max-width: calc(100% - 58px) !important;
        min-width: 0 !important;
        width: calc(100% - 58px) !important;
    }

    body.archive.tax-product_cat .shop-loop-before .woocommerce-viewing {
        flex: 0 0 52px !important;
        margin: 0 !important;
        max-width: 52px !important;
        min-width: 52px !important;
        width: 52px !important;
    }

    body.archive.tax-product_cat .shop-loop-before select {
        box-sizing: border-box;
        font-size: 12px;
        min-height: 36px;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100% !important;
    }
}

@media (max-width: 360px) {
    #header .elementor-4529 .elementor-element.elementor-element-b1e0358 {
        gap: 6px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    #header .elementor-4529 .elementor-element.elementor-element-f1bd644 {
        flex-basis: 38px !important;
        max-width: 38px !important;
        min-width: 38px !important;
        width: 38px !important;
    }

    #header .mobile-toggle {
        height: 38px;
        width: 38px;
    }

    #header .elementor-4529 .elementor-element.elementor-element-cadf749 {
        flex-basis: 72px !important;
        max-width: 72px !important;
        min-width: 72px !important;
        width: 72px !important;
    }

    #header .elementor-4529 .elementor-element.elementor-element-c4a9daf,
    #header .elementor-4529 .elementor-element.elementor-element-9b2f9a5 {
        flex-basis: 34px !important;
        max-width: 34px !important;
        width: 34px !important;
    }

    #header .elementor-4529 .elementor-element.elementor-element-097df15 {
        max-width: calc(100vw - 128px) !important;
    }

    body.archive.tax-product_cat .product-content .cn-loop-variant-select,
    body.archive.tax-product_cat .product-content .cn-loop-add-to-cart.button {
        font-size: 13px;
    }

    body.archive.tax-product_cat .product-content .cn-loop-add-to-cart.button {
        line-height: 1.15;
        min-height: 54px;
        padding-left: 8px;
        padding-right: 8px;
    }
}
