/*
Theme Name: Avada Child
Description: Child theme for Avada theme
Author: ThemeFusion
Author URI: https://theme-fusion.com
Template: Avada
Version: 1.0.0
Text Domain:  Avada
*/
/* Four across product grid on desktop */
ul.products.products-4 {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

ul.products.products-4 > li.product {
    flex: 0 0 23%;
    max-width: 23%;
}
/* Product grid image wrapper */
ul.products li.product .featured-image {
    width: 300px !important;
    height: 300px !important;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Make the images fit that box */
ul.products li.product .featured-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


/* Tweak titles and SKU */
ul.products li.product .product-title {
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 3em;
    text-align: center;
}

ul.products li.product .lemax-product-loop-sku {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
    text-align: center;
}

/* Keep buttons consistent */
ul.products li.product .product-buttons {
    margin-top: 1rem;
}
/* Three across on medium screens */
@media (max-width: 1024px) {
    ul.products.products-4 > li.product {
        flex: 0 0 30%;
        max-width: 30%;
    }
}

/* Two across on small screens */
@media (max-width: 768px) {
    ul.products.products-4 > li.product {
        flex: 0 0 47%;
        max-width: 47%;
    }
}

/* One per row on phones */
@media (max-width: 480px) {
    ul.products.products-4 > li.product {
        flex: 0 0 100%;
        max-width: 100%;
    }
}


ul.products li.product .tinvwl_add_to_wishlist_button {
    display: flex;
    align-items: center;
}

ul.products li.product .tinvwl_add_to_wishlist_button .tinvwl_add_to_wishlist-text {
    margin-left: 0.5em;
}
.product-details {
    text-align: center;
}
.lemax-product-loop-sku {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
    letter-spacing: 0.03em;
}
ul.products li.product {
    padding: 1.5rem;
    text-align: center;
}

ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 3em;
}

a.fusion-quick-view,
a.show_details_button.fusion-has-quick-view {
    display: none !important;
}
.product-buttons-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.tinv-wraper.woocommerce.tinv-wishlist {
    width: 50%;
}
.tinv-wraper.tinv-wishlist .tinvwl_add_to_wishlist_button {
    font-size: 14px;
    background: var(--button_gradient_top_color);
    color: var(--button_accent_color);
    border-color: var(--button_border_color);
    margin-top: 0 !important;
    padding: 10px 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center;
    line-height: normal !important;
}
.tinv-wraper.tinv-wishlist .tinvwl_add_to_wishlist_button:hover {
    background: var(--button_gradient_top_color_hover);
    color: var(--button_accent_hover_color, var(--button_accent_color));
    border-color: var(--button_border_hover_color);
}
.tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart:before {
    position: static !important;
    margin: 0;
}
.products .product-list-view .product-buttons {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
}

.products .product-list-view .product-buttons .lemaxtoolkit-add-wrapper {
    width: 100%;
    max-width: 200px;
}

.products .product-list-view .tinv-wraper.woocommerce.tinv-wishlist {
    width: 100%;
    max-width: 200px;
}
.product-list-view .product-title {
    text-align: left;
}
.popup_search .modal-dialog.modal-lg {
    max-width: 1550px;
    width: 100%;
}
.popup_search .modal-header
 {
    border-bottom: 0;
    padding: 15px 10px;
    min-height: auto !important;
}
.popup_search .modal-footer {
    display: none;
}
.popup_search .modal-header .close {
    background-color: #000;
    opacity: 1;
    color: #fff;
    padding: 2px 10px;  
    line-height: normal;
    border-radius: 100%;
}
.popup_search .modal-content {
    background-color: #f5f5f5;
}
@media(max-width: 899px) {
    .popup_search .modal-dialog.modal-lg {
        margin: 60px auto 0 auto;
        padding: 10px;
        max-width: 100%;
    }
}
@media(max-width: 767px) {
    .product-buttons-container {
        flex-direction: column;
    }
}

/* Villages Archive Styles */
.lemax-villages {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.lemax-villages__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .lemax-villages__grid {
        grid-template-columns: 1fr;
    }
}

.lemax-villages__card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lemax-villages__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.lemax-villages__image {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
    background: #f5f5f5;
}

.lemax-villages__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid #d4a574;
    border-radius: 8px;
    margin: 15px;
    width: calc(100% - 30px);
    height: calc(100% - 30px);
}

.lemax-villages__content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.lemax-villages__title {
    font-size: 32px;
    font-weight: bold;
    color: #2d5016;
    margin: 0 0 20px 0;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.lemax-villages__description {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 30px 0;
    flex: 1;
}

.lemax-villages__description p {
    margin: 0 0 15px 0;
}

.lemax-villages__description p:last-child {
    margin-bottom: 0;
}

.lemax-villages__button {
    display: inline-block;
    background-color: #2d5016;
    color: #fff;
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: center;
    min-width: 200px;
}

.lemax-villages__button:hover {
    background-color: #1f380f;
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

.lemax-villages__empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

@media (max-width: 767px) {
    .lemax-villages {
        padding: 20px 15px;
    }
    
    .lemax-villages__grid {
        gap: 30px;
        margin-top: 20px;
    }
    
    .lemax-villages__content {
        padding: 20px;
    }
    
    .lemax-villages__title {
        font-size: 24px;
    }
    
    .lemax-villages__description {
        font-size: 14px;
    }
    
    .lemax-villages__button {
        width: 100%;
        min-width: auto;
    }
}
/* Four across product grid on desktop */
ul.products {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

/* Kill Avada float layout */
ul.products li.product {
    float: none !important;
    clear: none !important;
    flex: 0 0 23%;
    max-width: 23%;
    box-sizing: border-box;
}

/* Avada adds "first" and "last"     we do not want them clearing anything */
ul.products li.product.first,
ul.products li.product.last {
    clear: none !important;
}
/* Title and sku styling */
ul.products li.product .product-title {
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 3em;
    text-align: center;
}

ul.products li.product .lemax-product-loop-sku {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
    text-align: center;
}
/* Three across on medium screens */
@media (max-width: 1024px) {
    ul.products li.product {
        flex: 0 0 30%;
        max-width: 30%;
    }
}

/* Two across on tablets and small laptops */
@media (max-width: 768px) {
    ul.products li.product {
        flex: 0 0 47%;
        max-width: 47%;
    }
}

/* One per row on phones */
@media (max-width: 480px) {
    ul.products li.product {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
