/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/


/* custom code start */ 

/* Add to Cart button full width, height */
/** Add to Cart wrapper & button full width + height match korar code */

.wd-add-btn .add_to_cart_button,
.wd-add-btn a.button {
    width: 100% !important;
    min-height: 35px !important; /* BUY NOW button er soman height */
    line-height: 35px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    box-sizing: border-box !important;	
    border-radius: 4px !important; /* Button er border radius */
    overflow: hidden !important; /* Extra background overflow bondho korar jonno */
}



/* add to cart and buy now cart css code start */


/* ==========================================================================
   1. Hide WoodMart Default Buttons & Reset Inner Elements
   ========================================================================== */
/* Hide default WooCommerce/WoodMart action buttons */
.product-grid-item .wd-add-btn,
.product-grid-item .woodmart-add-btn,
.product-grid-item .wd-action-btn.wd-add-cart-btn,
.product-grid-item .add-to-cart-loop {
    display: none !important;
}

/* Remove default inner borders and shadows to prevent double border */
.product-grid-item .product-element-top,
.product-grid-item .product-information,
.product-grid-item.wd-hover-quick {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ==========================================================================
   2. Single 1px Outer Card Border Setup
   ========================================================================== */
/* Apply ONLY ONE clean 1px grey border to the wrapper container */
.product-grid-item .product-wrapper {
    border: 1px solid #d0d0d0 !important;   /* Clean 1px solid grey border */
    border-radius: 8px !important;            /* Smooth rounded corners */
    overflow: hidden !important;              /* Keep image inside border-radius */
    padding-bottom: 10px !important;          /* 10px bottom space inside card */
    background-color: #ffffff !important;
    box-sizing: border-box !important;
}

/* Zero-gap setup for product image */
.product-grid-item .product-element-top {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.product-grid-item .product-image-link img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-top-left-radius: 7px !important;
    border-top-right-radius: 7px !important;
    margin: 0 !important;
}

/* ==========================================================================
   3. Dual Buttons Wrapper Setup
   ========================================================================== */
.wd-dual-buttons-wrapper {
    display: flex !important;
    align-items: stretch !important;
    gap: 6px !important;
    margin-top: 8px !important;
    padding: 0 4px !important; /* Spacing inside card */
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Base button styles */
.wd-dual-buttons-wrapper .button,
.wd-dual-buttons-wrapper .wd-buy-now-btn {
    min-height: 38px !important;
    height: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 6px 2px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: all 0.3s ease !important;
}

/* ==========================================================================
   4. Button Width Ratio (Add to Cart 58% | Buy Now 42%)
   ========================================================================== */
/* Left Button: Add to Cart (58%) */
.wd-dual-buttons-wrapper .add_to_cart_button,
.wd-dual-buttons-wrapper .button:not(.wd-buy-now-btn) {
    flex: 58 1 0% !important;
    width: 58% !important;
}

/* Right Button: Buy Now (42%) */
.wd-dual-buttons-wrapper .wd-buy-now-btn {
    flex: 42 1 0% !important;
    width: 42% !important;
}

/* ==========================================================================
   5. Button Colors & Hover Effects
   ========================================================================== */
/* Add to Cart Button (Vibrant Green) */
.wd-dual-buttons-wrapper .add_to_cart_button,
.wd-dual-buttons-wrapper .button:not(.wd-buy-now-btn) {
    background-color: #27ae60 !important;
    color: #ffffff !important;
    border: 1px solid #27ae60 !important;
}

.wd-dual-buttons-wrapper .add_to_cart_button:hover,
.wd-dual-buttons-wrapper .button:not(.wd-buy-now-btn):hover {
    background-color: #219150 !important;
    border-color: #219150 !important;
    color: #ffffff !important;
}

/* Buy Now Button (Yellow Golden) */
.wd-dual-buttons-wrapper .wd-buy-now-btn {
    background-color: #f39c12 !important;
    color: #ffffff !important;
    border: 1px solid #f39c12 !important;
}

.wd-dual-buttons-wrapper .wd-buy-now-btn:hover {
    background-color: #d68910 !important;
    border-color: #d68910 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   6. Responsive Mobile View (< 768px)
   ========================================================================== */
@media (max-width: 767px) {
    .wd-dual-buttons-wrapper {
        gap: 3px !important;
        padding: 0 2px !important;
    }

    .wd-dual-buttons-wrapper .button,
    .wd-dual-buttons-wrapper .wd-buy-now-btn {
        font-size: 10px !important;
        padding: 6px px !important;
        min-height: 34px !important;
        line-height: 1.2 !important;
    }
}

