/*
Theme Name: Shopnex Child
Theme URI: https://example.com/
Description: Child theme for Shopnex
Author: Your Name
Template: shopnex
Version: 1.0.6
*/


/* =========================================================
   GLOBAL BOX SIZING
========================================================= */

.custom-product-card,
.custom-product-card *,
.custom-product-card *::before,
.custom-product-card *::after {
    box-sizing: border-box;
}


/* =========================================================
   SHOP PRODUCT GRID - 5 PRODUCTS PER ROW
========================================================= */

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 15px !important;

    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    list-style: none !important;
}


/* Each WooCommerce product */

.woocommerce ul.products li.product {
    float: none !important;
    clear: none !important;

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

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

    min-width: 0 !important;
}


/* Remove default theme spacing */

.woocommerce ul.products li.product::before,
.woocommerce ul.products li.product::after {
    display: none !important;
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.custom-product-card {
    position: relative !important;

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

    background: #ffffff !important;

    border: 1px solid #e5ddd3 !important;
    border-radius: 8px !important;

    overflow: hidden !important;

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

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}


.custom-product-card:hover {
    transform: translateY(-3px) !important;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, .08) !important;
}


/* =========================================================
   IMAGE AREA
========================================================= */

.custom-product-image {
    position: relative !important;

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

    background: #f3ede4 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    overflow: hidden !important;

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


/* Image link */

.custom-product-image-link {
    display: flex !important;

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

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

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

    text-decoration: none !important;
}


/* Product image */

.custom-product-image img,
.custom-product-image img.custom-product-img,
.custom-product-card img.custom-product-img {
    display: block !important;

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

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

    object-fit: contain !important;

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

    transition: transform .35s ease !important;
}


.custom-product-card:hover .custom-product-img {
    transform: scale(1.04) !important;
}


/* =========================================================
   PRODUCT BADGE
========================================================= */

.custom-product-badge {
    position: absolute !important;

    top: 10px !important;
    left: 10px !important;

    z-index: 20 !important;

    display: inline-flex !important;

    align-items: center !important;

    padding: 6px 9px !important;

    margin: 0 !important;

    border-radius: 3px !important;

    color: #ffffff !important;

    font-size: 9px !important;
    font-weight: 700 !important;

    line-height: 1 !important;

    text-transform: uppercase !important;

    white-space: nowrap !important;
}


.custom-product-badge.orange {
    background: #e66d2d !important;
}


.custom-product-badge.green {
    background: #527d65 !important;
}


/* =========================================================
   WISHLIST
========================================================= */

.custom-product-wishlist {
    position: absolute !important;

    top: 10px !important;
    right: 10px !important;

    z-index: 20 !important;

    width: 31px !important;
    height: 31px !important;

    min-width: 31px !important;

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

    border: 0 !important;
    border-radius: 50% !important;

    background: #ffffff !important;

    color: #173b52 !important;

    font-size: 19px !important;
    font-weight: 400 !important;

    line-height: 31px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    cursor: pointer !important;

    transition: transform .2s ease !important;
}


.custom-product-wishlist::before,
.custom-product-wishlist::after {
    content: none !important;
}


.custom-product-wishlist:hover {
    transform: scale(1.08) !important;
}


/* =========================================================
   PRODUCT DETAILS
========================================================= */

.custom-product-details {
    width: 100% !important;

    padding: 15px !important;

    margin: 0 !important;

    background: #ffffff !important;

    text-align: left !important;
}


/* =========================================================
   PRODUCT TITLE
========================================================= */

.custom-product-title {
    display: block !important;

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

    min-height: 36px !important;

    font-size: 14px !important;
    font-weight: 600 !important;

    line-height: 1.3 !important;
}


.custom-product-title a {
    color: #073452 !important;

    text-decoration: none !important;

    font-size: inherit !important;
    font-weight: inherit !important;

    line-height: inherit !important;

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


.custom-product-title a:hover {
    color: #e66d2d !important;
}


/* =========================================================
   DESCRIPTION
========================================================= */

.custom-product-description {
    width: 100% !important;

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

    color: #777777 !important;

    font-size: 11px !important;

    line-height: 1.4 !important;

    white-space: nowrap !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
}


/* =========================================================
   RATING
========================================================= */

.custom-product-rating {
    display: flex !important;

    align-items: center !important;

    gap: 5px !important;

    min-height: 15px !important;

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


/* WooCommerce star rating */

.custom-stars .star-rating {
    margin: 0 !important;

    font-size: 11px !important;

    color: #e87922 !important;
}


.custom-stars .star-rating::before {
    color: #e87922 !important;
}


.custom-stars .star-rating span::before {
    color: #e87922 !important;
}


.custom-rating-number {
    color: #777777 !important;

    font-size: 10px !important;

    line-height: 1 !important;

    white-space: nowrap !important;
}


/* =========================================================
   PRICE + CART BOTTOM
========================================================= */

.custom-product-bottom {
    display: flex !important;

    align-items: center !important;
    justify-content: space-between !important;

    gap: 10px !important;

    width: 100% !important;

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


/* =========================================================
   PRODUCT PRICE
========================================================= */

.custom-product-price {
    flex: 1 !important;

    color: #073452 !important;

    font-size: 16px !important;
    font-weight: 700 !important;

    line-height: 1.2 !important;

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


.custom-product-price .price {
    color: inherit !important;

    font-size: inherit !important;

    font-weight: inherit !important;
}


.custom-product-price ins {
    text-decoration: none !important;
}


.custom-product-price del {
    display: block !important;

    margin: 3px 0 0 0 !important;

    color: #999999 !important;

    font-size: 10px !important;
    font-weight: 400 !important;

    line-height: 1.2 !important;
}


/* =========================================================
   CUSTOM CART BUTTON
========================================================= */

.custom-product-card .custom-cart-button {
    position: relative !important;

    width: 35px !important;
    height: 35px !important;

    min-width: 35px !important;
    max-width: 35px !important;

    min-height: 35px !important;

    flex: 0 0 35px !important;

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

    border: 1px solid #f36f21 !important;
    border-radius: 6px !important;

    background: #ffffff !important;
    background-image: none !important;

    color: #173b52 !important;

    display: flex !important;

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

    text-decoration: none !important;

    overflow: hidden !important;

    transition:
        background .2s ease,
        color .2s ease !important;

    box-shadow: none !important;
}


/* =========================================================
   REMOVE SHOPNEX PLUS ICON
========================================================= */

/* Remove any icon generated by CSS */

.custom-product-card .custom-cart-button::before,
.custom-product-card .custom-cart-button::after,
.custom-product-card .custom-cart-icon::before,
.custom-product-card .custom-cart-icon::after {
    content: none !important;

    display: none !important;

    background: none !important;
}


/* Remove theme background icon */

.custom-product-card .custom-cart-button {
    background-image: none !important;

    text-indent: 0 !important;
}


/* Show our cart icon */

.custom-product-card .custom-cart-button .custom-cart-icon {
    position: relative !important;

    z-index: 10 !important;

    display: flex !important;

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

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

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

    color: inherit !important;

    font-size: 17px !important;

    font-family:
        Arial,
        sans-serif !important;

    line-height: 1 !important;
}


/* Hover */

.custom-product-card .custom-cart-button:hover {
    background: #f36f21 !important;

    color: #ffffff !important;

    border-color: #f36f21 !important;

    box-shadow: none !important;
}


/* =========================================================
   HIDE DEFAULT SHOPNEX BUTTONS INSIDE CUSTOM CARD
========================================================= */

.custom-product-card .button:not(.custom-cart-button),
.custom-product-card a.button:not(.custom-cart-button),
.custom-product-card .add_to_cart_button:not(.custom-cart-button),
.custom-product-card .ajax_add_to_cart:not(.custom-cart-button),
.custom-product-card .added_to_cart,
.custom-product-card .product_type_simple:not(.custom-cart-button),
.custom-product-card .product_type_variable:not(.custom-cart-button),
.custom-product-card .product_type_grouped:not(.custom-cart-button),
.custom-product-card .product_type_external:not(.custom-cart-button) {
    display: none !important;
}


/* =========================================================
   HOVER - SHOW CART BUTTON ONLY ON PRODUCT CARD HOVER
========================================================= */

/* Hidden normally */

.custom-product-card .custom-cart-button {
    opacity: 0 !important;

    transform: translateX(8px) !important;

    pointer-events: none !important;
}


/* Show on hover */

.custom-product-card:hover .custom-cart-button {
    opacity: 1 !important;

    transform: translateX(0) !important;

    pointer-events: auto !important;
}


/* Keep button visible on keyboard focus */

.custom-product-card .custom-cart-button:focus {
    opacity: 1 !important;

    pointer-events: auto !important;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1200px) {

    .woocommerce ul.products {
        grid-template-columns:
            repeat(4, minmax(0, 1fr)) !important;
    }

}


@media (max-width: 1024px) {

    .woocommerce ul.products {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        gap: 15px !important;
    }


    .custom-product-image {
        height: 220px !important;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

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

        gap: 10px !important;
    }


    .custom-product-image {
        height: 190px !important;
    }


    .custom-product-details {
        padding: 12px !important;
    }


    .custom-product-title {
        font-size: 13px !important;

        min-height: 34px !important;
    }


    .custom-product-description {
        font-size: 10px !important;
    }


    .custom-product-price {
        font-size: 14px !important;
    }


    .custom-product-card .custom-cart-button {
        width: 33px !important;
        height: 33px !important;

        min-width: 33px !important;
        max-width: 33px !important;

        flex-basis: 33px !important;
    }


    /* On mobile keep cart visible because touch has no hover */

    .custom-product-card .custom-cart-button {
        opacity: 1 !important;

        transform: translateX(0) !important;

        pointer-events: auto !important;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .custom-product-image {
        height: 160px !important;
    }


    .custom-product-details {
        padding: 10px !important;
    }


    .custom-product-title {
        font-size: 12px !important;
    }

}