/* =========================================================
   HPD PRODUCT CATEGORY PAGES
   3-AREA PRODUCT CARD ARCHITECTURE
   ========================================================= */


/* =========================================================
   01 - CATEGORY PAGE BASE
   ========================================================= */

body.tax-product_cat {
    background-color: #ffffff;
}

body.tax-product_cat .et_pb_section {
    background-color: #ffffff;
}

body.tax-product_cat .et_pb_row {
    width: 90%;
    max-width: 1180px;
}


/* =========================================================
   02 - WOO PRODUCTS MODULE
   ========================================================= */

body.tax-product_cat .et_pb_wc_products {
    width: 100%;
    margin: 0 auto;

    padding-top: 10px;
    padding-bottom: 20px;
}

body.tax-product_cat .et_pb_wc_products .et_pb_module_inner {
    width: 100%;
}


/* =========================================================
   03 - RESULT COUNT + SORTING
   ========================================================= */

body.tax-product_cat .woocommerce-result-count {
    margin: 0 0 24px 0 !important;

    font-size: 14px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;

    color: #5f6b76 !important;
}

body.tax-product_cat .woocommerce-ordering {
    margin: 0 0 24px 0 !important;
}

body.tax-product_cat .woocommerce-ordering select {
    min-width: 190px;
    min-height: 42px;

    padding: 8px 38px 8px 14px;

    background-color: #ffffff;

    color: #263442;

    border: 1px solid #cfd7df;
    border-radius: 5px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    box-shadow: none;

    cursor: pointer;
}

body.tax-product_cat .woocommerce-ordering select:hover,
body.tax-product_cat .woocommerce-ordering select:focus {
    border-color: #0e2a47;
    outline: none;
}


/* =========================================================
   04 - PRODUCT GRID
   ========================================================= */

body.tax-product_cat ul.products {
    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

    row-gap: 26px !important;
    column-gap: 18px !important;

    width: 100% !important;

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

    list-style: none !important;
}

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


/* =========================================================
   05 - AREA 1
   OUTER PRODUCT CARD
   ========================================================= */

body.tax-product_cat ul.products li.product {
    position: relative;

    display: flex !important;
    flex-direction: column !important;

    width: 100% !important;

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

    background-color: #ffffff;

    border: 1px solid #dfe5eb;
    border-radius: 7px;

    box-shadow:
        0 2px 7px rgba(14, 42, 71, 0.05);

    overflow: hidden;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

body.tax-product_cat ul.products li.product:hover {
    transform: translateY(-2px);

    border-color: #c7d1da;

    box-shadow:
        0 7px 18px rgba(14, 42, 71, 0.10);
}


/* =========================================================
   06 - PRODUCT LINK WRAPPER
   ========================================================= */

body.tax-product_cat ul.products li.product > a {
    display: flex !important;
    flex-direction: column !important;

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

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

    text-decoration: none !important;
}


/* =========================================================
   07 - AREA 2
   IMAGE AREA
   ZERO PADDING
   ========================================================= */

body.tax-product_cat ul.products li.product > a > img {
    display: block !important;

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

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

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

    background-color: #ffffff;

    border-radius: 6px 6px 0 0 !important;

    opacity: 1 !important;
    filter: none !important;

    transition:
        opacity 0.18s ease,
        transform 0.18s ease !important;
}


/* =========================================================
   08 - FIX DIVI / WOO IMAGE HOVER
   Keep image fully visible
   ========================================================= */

body.tax-product_cat ul.products li.product:hover img,
body.tax-product_cat ul.products li.product a:hover img,
body.tax-product_cat .et_pb_wc_products li.product:hover img,
body.tax-product_cat .et_pb_wc_products li.product a:hover img {
    opacity: 1 !important;

    filter: none !important;
    -webkit-filter: none !important;

    visibility: visible !important;
}

body.tax-product_cat ul.products li.product .et_overlay,
body.tax-product_cat .et_pb_wc_products li.product .et_overlay {
    display: none !important;

    opacity: 0 !important;
    visibility: hidden !important;

    background: transparent !important;

    pointer-events: none !important;
}

body.tax-product_cat ul.products li.product:hover .et_overlay,
body.tax-product_cat .et_pb_wc_products li.product:hover .et_overlay {
    display: none !important;

    opacity: 0 !important;
    visibility: hidden !important;
}


/* =========================================================
   09 - AREA 3
   PRODUCT TITLE
   ========================================================= */

body.tax-product_cat ul.products li.product
.woocommerce-loop-product__title {

    min-height: 72px;

    margin: 0 !important;

    padding:
        14px
        14px
        7px
        14px !important;

    background-color: #ffffff;

    color: #17202a !important;

    font-size: 15px !important;
    line-height: 1.35 !important;

    font-weight: 400 !important;
}

body.tax-product_cat ul.products li.product:hover
.woocommerce-loop-product__title {

    color: #0e2a47 !important;
}


/* =========================================================
   10 - PRODUCT SKU
   Optional
   If no SKU exists, nothing is displayed.
   ========================================================= */

body.tax-product_cat ul.products li.product
.hpd-loop-sku {

    display: block;

    margin: 0 !important;

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

    background-color: #ffffff;

    color: #68737d !important;

    font-size: 12px !important;
    line-height: 1.35 !important;

    font-weight: 400 !important;
}

body.tax-product_cat ul.products li.product
.hpd-loop-sku strong {

    color: #0e2a47 !important;

    font-weight: 600 !important;
}


/* =========================================================
   11 - PRODUCT RATING
   ========================================================= */

body.tax-product_cat ul.products li.product
.star-rating {

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

    color: #ff8a00 !important;

    font-size: 13px !important;
}

body.tax-product_cat ul.products li.product
.star-rating::before {

    color: #d6dce2 !important;
}


/* =========================================================
   12 - PRICE
   IMPORTANT:
   Price follows title/SKU immediately.
   No automatic push to bottom.
   ========================================================= */

body.tax-product_cat ul.products li.product .price {
    display: block;

    /*
     * Previously:
     * margin: auto 0 0 0
     *
     * That created the large blank area when
     * a product had no SKU.
     *
     * Now the price naturally follows whatever
     * information exists above it.
     */
    margin: 0 !important;

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

    background-color: #ffffff;

    color: #1f5ebe !important;

    font-size: 15px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}

body.tax-product_cat ul.products li.product
.price .woocommerce-Price-amount {

    color: #1f5ebe !important;
    font-weight: 700 !important;
}

body.tax-product_cat ul.products li.product
.price del {

    color: #7b858e !important;

    font-weight: 400 !important;

    opacity: 0.7;
}

body.tax-product_cat ul.products li.product
.price ins {

    color: #1f5ebe !important;

    font-weight: 700 !important;

    text-decoration: none !important;
}


/* =========================================================
   13 - SALE BADGE
   ========================================================= */

body.tax-product_cat span.onsale {
    top: 10px !important;
    left: 10px !important;

    min-width: auto !important;
    min-height: auto !important;

    padding: 6px 9px !important;

    background-color: #ff8a00 !important;

    color: #ffffff !important;

    border-radius: 4px !important;

    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 700 !important;

    box-shadow: none !important;
}


/* =========================================================
   14 - REMOVE DEFAULT BUTTONS
   ========================================================= */

body.tax-product_cat ul.products li.product
.button {

    display: none !important;
}


/* =========================================================
   15 - PAGINATION
   ========================================================= */

body.tax-product_cat nav.woocommerce-pagination {
    display: flex;

    justify-content: center;
    align-items: center;

    width: 100%;

    margin: 40px 0 12px 0 !important;
}

body.tax-product_cat nav.woocommerce-pagination ul {
    display: flex !important;

    align-items: center;

    gap: 6px;

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

    border: 0 !important;

    list-style: none !important;
}

body.tax-product_cat nav.woocommerce-pagination ul li {
    margin: 0 !important;
    border: 0 !important;
}

body.tax-product_cat nav.woocommerce-pagination
ul li a,

body.tax-product_cat nav.woocommerce-pagination
ul li span {

    display: inline-flex !important;

    align-items: center;
    justify-content: center;

    min-width: 38px;
    height: 38px;

    padding: 0 10px !important;

    background-color: #ffffff !important;

    color: #0e2a47 !important;

    border: 1px solid #cfd7df !important;
    border-radius: 4px;

    font-size: 14px !important;
    line-height: 1 !important;
    font-weight: 700 !important;

    text-decoration: none !important;

    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

body.tax-product_cat nav.woocommerce-pagination
ul li a:hover {

    background-color: #0e2a47 !important;

    color: #ffffff !important;

    border-color: #0e2a47 !important;
}

body.tax-product_cat nav.woocommerce-pagination
ul li span.current {

    background-color: #ff8a00 !important;

    color: #ffffff !important;

    border-color: #ff8a00 !important;
}


/* =========================================================
   16 - EMPTY CATEGORY MESSAGE
   ========================================================= */

body.tax-product_cat .woocommerce-info {
    margin: 20px 0 !important;

    padding: 18px 20px !important;

    background-color: #f8fafc;

    color: #263442;

    border: 1px solid #d9e0e7;
    border-top: 3px solid #ff8a00;

    border-radius: 5px;
}


/* =========================================================
   17 - CATEGORY HERO
   ========================================================= */

body.tax-product_cat .hpd-category-hero {
    margin-bottom: 26px;

    padding: 24px 26px;

    background-color: #f8fafc;

    border: 1px solid #dce3e9;
    border-left: 4px solid #ff8a00;

    border-radius: 6px;
}

body.tax-product_cat .hpd-category-hero h1 {
    margin: 0 0 8px 0 !important;

    color: #0e2a47 !important;

    font-size: 32px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
}

body.tax-product_cat .hpd-category-hero p {
    max-width: 850px;

    margin: 0 !important;

    color: #4b5661 !important;

    font-size: 15px !important;
    line-height: 1.6 !important;
}


/* =========================================================
   18 - TABLET
   ========================================================= */

@media only screen and
(min-width: 768px) and
(max-width: 980px) {

    body.tax-product_cat .et_pb_row {
        width: 92%;
    }

    body.tax-product_cat ul.products {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        row-gap: 22px !important;
        column-gap: 16px !important;
    }

    body.tax-product_cat ul.products
    li.product > a > img {

        height: 230px !important;
    }

    body.tax-product_cat ul.products
    li.product
    .woocommerce-loop-product__title {

        min-height: 66px;

        padding:
            13px
            13px
            7px
            13px !important;
    }

    body.tax-product_cat ul.products
    li.product
    .hpd-loop-sku {

        padding:
            0
            13px
            6px
            13px !important;
    }

    body.tax-product_cat ul.products
    li.product .price {

        margin: 0 !important;

        padding:
            0
            13px
            15px
            13px !important;
    }
}


/* =========================================================
   19 - MOBILE
   ========================================================= */

@media only screen and
(max-width: 767px) {

    body.tax-product_cat .et_pb_row {
        width: 92%;
    }

    body.tax-product_cat
    .woocommerce-result-count {

        float: none !important;

        width: 100%;

        margin-bottom: 10px !important;
    }

    body.tax-product_cat
    .woocommerce-ordering {

        float: none !important;

        width: 100%;

        margin-bottom: 20px !important;
    }

    body.tax-product_cat
    .woocommerce-ordering select {

        width: 100%;
        min-width: 0;
    }

    body.tax-product_cat ul.products {
        grid-template-columns:
            1fr !important;

        row-gap: 16px !important;
        column-gap: 0 !important;
    }

    body.tax-product_cat ul.products
    li.product > a > img {

        height: 260px !important;
    }

    body.tax-product_cat ul.products
    li.product
    .woocommerce-loop-product__title {

        min-height: 0;

        padding:
            14px
            14px
            7px
            14px !important;

        font-size: 16px !important;
        font-weight: 400 !important;
    }

    body.tax-product_cat ul.products
    li.product
    .hpd-loop-sku {

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

        font-size: 12px !important;
    }

    body.tax-product_cat ul.products
    li.product .price {

        margin: 0 !important;

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

        font-size: 16px !important;
    }

    body.tax-product_cat
    nav.woocommerce-pagination {

        margin-top: 28px !important;
    }
}


/* =========================================================
   20 - SMALL MOBILE
   ========================================================= */

@media only screen and
(max-width: 480px) {

    body.tax-product_cat ul.products
    li.product > a > img {

        height: 230px !important;
    }

    body.tax-product_cat
    nav.woocommerce-pagination
    ul li a,

    body.tax-product_cat
    nav.woocommerce-pagination
    ul li span {

        min-width: 35px;
        height: 35px;

        padding: 0 8px !important;

        font-size: 13px !important;
    }

}

/* =========================================================
   21 - VIEW ALL PRODUCTS + PAGINATION ROW
   WooCommerce product-category archives only
   Keeps the blue View All button and page numbers centered
   together without changing the product grid/cards.
   ========================================================= */

body.tax-product_cat .hpd-pagination-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;

    width: 100% !important;

    margin: 40px 0 12px 0 !important;
    padding: 0 !important;
}

body.tax-product_cat
.hpd-pagination-row
.hpd-view-all-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    margin: 0 !important;
}

body.tax-product_cat
.hpd-pagination-row
nav.woocommerce-pagination {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: auto !important;

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


/* =========================================================
   22 - VIEW ALL ROW RESPONSIVE
   ========================================================= */

@media only screen and
(max-width: 767px) {

    body.tax-product_cat .hpd-pagination-row {
        flex-wrap: wrap !important;
        gap: 12px !important;

        margin-top: 28px !important;
    }

    body.tax-product_cat
    .hpd-pagination-row
    .hpd-view-all-controls {
        width: 100%;
    }

    body.tax-product_cat
    .hpd-pagination-row
    nav.woocommerce-pagination {
        width: 100% !important;
    }
}

