.elementor-566 .elementor-element.elementor-element-77194ee{--display:flex;}.elementor-566 .elementor-element.elementor-element-811ffbc{margin:-103px 0px calc(var(--kit-widget-spacing, 0px) + 0px) 0px;}.elementor-566 .elementor-element.elementor-element-c229ddb{--display:flex;}.elementor-566 .elementor-element.elementor-element-85109d1{--display:flex;}@media(max-width:767px){.elementor-566 .elementor-element.elementor-element-811ffbc{margin:-100px 0px calc(var(--kit-widget-spacing, 0px) + 0px) 0px;}}/* Start custom CSS *//* =========================================

   🚀 ULTIMATE FIX: EQUAL HEIGHT & ALIGNMENT

   (Tested for Woostify Theme Structure)

========================================= */



/* --- 1. GRID SYSTEM (Desktop) --- */

.woocommerce ul.products {

    display: grid !important;

    grid-template-columns: repeat(4, 1fr) !important;

    gap: 25px !important;

    margin: 0 !important;

    padding: 0 !important;

}



/* Clear Floats */

.woocommerce ul.products::before, 

.woocommerce ul.products::after { display: none !important; }



/* --- 2. CARD WRAPPER (Flexbox Parent) --- */

.woocommerce ul.products li.product {

    float: none !important;

    width: 100% !important;

    margin: 0 !important;

    background: #fff !important;

    border-radius: 16px !important;

    box-shadow: 0 5px 20px rgba(0,0,0,0.05) !important;

    border: 1px solid rgba(0,0,0,0.05) !important;

    padding: 15px !important;

    

    /* Equal Height Logic */

    display: flex !important;

    flex-direction: column !important;

    height: 100% !important; /* Stretch to row height */

}



/* Theme Inner Wrapper Fix */

.woocommerce ul.products li.product .product-loop-wrapper {

    display: flex !important;

    flex-direction: column !important;

    flex: 1 0 auto !important; /* Grow to fill space */

    height: 100% !important;

}



/* --- 3. IMAGE FIX (Full View, No Cut) --- */

.woocommerce ul.products li.product .product-loop-image-wrapper {

    height: 180px !important; /* Fixed Height */

    width: 100% !important;

    display: flex !important;

    align-items: center !important;

    justify-content: center !important;

    margin-bottom: 15px !important;

    background: #fcfcfc !important; /* Light BG for smaller images */

    border-radius: 12px !important;

    overflow: hidden !important;

}



.woocommerce ul.products li.product .product-loop-image-wrapper a {

    display: block; width: 100%; height: 100%;

}



.woocommerce ul.products li.product img {

    max-height: 100% !important;

    max-width: 100% !important;

    height: auto !important;

    width: auto !important;

    object-fit: contain !important; /* Image puri dikhegi */

    margin: 0 auto !important;

}



/* --- 4. CONTENT ALIGNMENT (The Fix) --- */

.woocommerce ul.products li.product .product-loop-content {

    display: flex !important;

    flex-direction: column !important;

    flex-grow: 1 !important; /* Bachi hui jagah lega */

    padding: 0 !important;

}



/* Title Styling */

.woocommerce ul.products li.product .woocommerce-loop-product__title,

.woocommerce ul.products li.product h2 {

    font-family: 'Jost', sans-serif !important;

    font-size: 16px !important;

    font-weight: 700 !important;

    color: #1a1a1a !important;

    line-height: 1.4 !important;

    margin-bottom: 10px !important;

    

    /* Fixed lines to prevent jumping */

    display: -webkit-box !important;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;

    min-height: 45px !important; /* Jagah reserve ki */

}



/* Price Styling */

.woocommerce ul.products li.product .price {

    color: #f2295b !important;

    font-weight: 800 !important;

    font-size: 16px !important;

    display: block !important;

    margin-bottom: 15px !important;

    margin-top: auto !important; /* Push price down if title is short */

}



/* --- 5. BUTTON & CART OVERLAP FIX --- */

.woocommerce ul.products li.product .product-loop-meta {

    margin-top: auto !important; /* Button ko bottom mein dhakelta hai */

    width: 100% !important;

    display: flex !important;

    flex-direction: column;

    gap: 10px;

}



/* Add to Cart Button */

.woocommerce ul.products li.product .button,

.woocommerce ul.products li.product .loop-add-to-cart-btn {

    width: 100% !important;

    background: linear-gradient(135deg, #f2295b 0%, #ff5e62 100%) !important;

    color: #fff !important;

    border-radius: 50px !important;

    padding: 10px 0 !important;

    font-weight: 600 !important;

    text-align: center !important;

    border: none !important;

    display: block !important;

    line-height: 1.5 !important;

}



/* "View Cart" Link Fix (Overlap issue solved) */

.woocommerce ul.products li.product .added_to_cart {

    display: block !important;

    text-align: center !important;

    font-size: 13px !important;

    color: #1a1a1a !important;

    margin-top: 5px !important;

    font-weight: 600 !important;

}



/* =========================================

   📱 MOBILE OPTIMIZATION (Strict 2 Columns)

========================================= */

@media (max-width: 768px) {

    /* Grid Setup */

    .custom-featured-products .woocommerce ul.products,

    .all-products-grid .woocommerce ul.products,

    .woocommerce ul.products {

        display: grid !important;

        grid-template-columns: repeat(2, 1fr) !important; /* 2 Columns Fixed */

        gap: 12px !important;

        padding: 0 5px !important;

    }



    /* Card Tweaks */

    .woocommerce ul.products li.product {

        padding: 10px !important;

        min-height: 320px !important; /* Ensure min height */

    }



    /* Image Height Mobile */

    .woocommerce ul.products li.product .product-loop-image-wrapper {

        height: 120px !important;

        margin-bottom: 10px !important;

    }



    /* Title Size */

    .woocommerce ul.products li.product .woocommerce-loop-product__title {

        font-size: 13px !important;

        min-height: 38px !important; /* Alignment fix */

    }



    /* Price */

    .woocommerce ul.products li.product .price {

        font-size: 14px !important;

        margin-bottom: 10px !important;

    }



    /* Button */

    .woocommerce ul.products li.product .button {

        font-size: 12px !important;

        padding: 8px 0 !important;

    }

}/* End custom CSS */