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

/* ==========================================================================
   Product Loop Card: Desktop, Tablet & Mobile Responsive Architecture
   ========================================================================== */

/* Universal Base Styling & Unclamp for all product loops/grids */
.wd.wd .wd-5b91211b .wd-loop-prod-price {
    margin: 0 !important;
}

.wd-loop-prod-title,
.wd-loop-prod-title.wd-entities-title,
.wd-line-clamp.wd-entities-title,
.wd-line-clamp {
    max-height: none !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    white-space: normal !important;
    height: auto !important;
    display: block !important;
}

/* --- 1. Desktop & Laptop (> 1024px): Category Left, Title Left, Price Left (2-line) & Button Right --- */
@media (min-width: 1025px) {
    /* Category Left Aligned */
    .wd.wd .wd-325811a4,
    .wd.wd .wd-product-cats,
    .wd.wd .wd-loop-prod-meta {
        text-align: left !important;
        justify-content: flex-start !important;
    }

    /* Title Left Aligned */
    .wd.wd .wd-loop-prod-title,
    .wd.wd .wd-loop-prod-title.wd-entities-title {
        text-align: left !important;
        font-size: 14.5px !important;
        line-height: 1.35 !important;
        font-weight: 600 !important;
        min-height: 38px !important;
        margin-bottom: 8px !important;
    }

    .wd.wd .wd-loop-prod-title a {
        text-align: left !important;
        display: inline !important;
        font-size: inherit !important;
        line-height: inherit !important;
        color: inherit !important;
    }

    .wd.wd .wd-5b91211b {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        padding: 12px 15px !important;
        min-height: 52px;
    }

    .wd.wd .wd-5b91211b .wd-loop-prod-price {
        display: block !important;
        text-align: left !important;
        line-height: 1.25 !important;
    }

    .wd.wd .wd-5b91211b .wd-loop-prod-price .price {
        display: inline-block !important;
        line-height: 1.3 !important;
        vertical-align: middle !important;
        margin: 0 !important;
    }

    /* Variable Products: Start price on line 1, Dash + End price on line 2 */
    .wd.wd .wd-5b91211b .wd-loop-prod-price .price > .amount:first-of-type {
        display: block !important;
        white-space: nowrap !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
    }

    .wd.wd .wd-5b91211b .wd-loop-prod-price .price > .amount:last-of-type {
        display: inline !important;
        white-space: nowrap !important;
        font-size: 14px !important;
        color: #444 !important;
    }

    /* Simple Products: Single line */
    .wd.wd .wd-5b91211b .wd-loop-prod-price .price > .amount:only-child {
        display: inline-block !important;
        font-size: 15px !important;
        font-weight: 600 !important;
    }

    .wd.wd .wd-5b91211b .wd-add-btn-wrapp {
        display: flex !important;
        align-items: center !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    .wd.wd .wd-5b91211b .wd-add-btn.wd-add-btn-replace > .button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--btn-accented-brd-radius, 35px) !important;
        margin: 0 !important;
        vertical-align: middle !important;
    }
}

/* --- 2. Tablet & Mobile Devices (<= 1024px): Category, Full Title, 1-Line Price & Button ALL Center Aligned --- */
@media (max-width: 1024px) {
    /* Category Center Alignment */
    .wd.wd .wd-325811a4,
    .wd.wd .wd-product-cats,
    .wd.wd .wd-loop-prod-meta {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .wd.wd .wd-product-cats a {
        text-align: center !important;
        display: inline-block !important;
    }

    /* Title Center Alignment & Responsive Typography */
    .wd.wd .wd-loop-prod-title,
    .wd.wd .wd-loop-prod-title.wd-entities-title {
        text-align: center !important;
        width: 100% !important;
        font-size: 13.5px !important;
        line-height: 1.35 !important;
        font-weight: 600 !important;
        margin-bottom: 6px !important;
        min-height: 36px !important;
    }

    .wd.wd .wd-loop-prod-title a {
        text-align: center !important;
        display: inline !important;
        font-size: inherit !important;
        line-height: inherit !important;
        color: inherit !important;
    }

    /* Price and Button Container: Vertical Column Layout */
    .wd.wd .wd-5b91211b {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        row-gap: 8px !important;
        padding: 10px 8px 12px !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    .wd.wd .wd-5b91211b .wd-loop-prod-price {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin: 0 !important;
    }

    .wd.wd .wd-5b91211b .wd-loop-prod-price .price {
        display: inline-flex !important;
        align-items: baseline !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
        font-size: 13px !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }

    /* Variable products in 1 line on tablet & mobile */
    .wd.wd .wd-5b91211b .wd-loop-prod-price .price > .amount:first-of-type {
        display: inline !important;
        white-space: nowrap !important;
        font-size: 13px !important;
        font-weight: 600 !important;
    }

    .wd.wd .wd-5b91211b .wd-loop-prod-price .price > .amount:last-of-type {
        display: inline !important;
        white-space: nowrap !important;
        font-size: 12.5px !important;
        color: #444 !important;
    }

    /* Simple products on tablet & mobile */
    .wd.wd .wd-5b91211b .wd-loop-prod-price .price > .amount:only-child {
        display: inline !important;
        font-size: 13.5px !important;
        font-weight: 600 !important;
    }

    /* Button wrapper center aligned */
    .wd.wd .wd-5b91211b .wd-add-btn-wrapp {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
    }

    .wd.wd .wd-5b91211b .wd-add-btn.wd-add-btn-replace {
        width: auto !important;
        display: inline-flex !important;
        justify-content: center !important;
        margin: 0 auto !important;
    }

    /* Sleek compact pill button with 35px radius centered directly underneath */
    .wd.wd .wd-5b91211b .wd-add-btn.wd-add-btn-replace > .button {
        width: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--btn-accented-brd-radius, 35px) !important;
        min-height: 28px !important;
        height: 28px !important;
        padding: 0 16px !important;
        font-size: 11.5px !important;
        line-height: 28px !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
        margin: 0 auto !important;
    }

    .wd.wd .wd-5b91211b .wd-add-btn.wd-add-btn-replace .wd-action-text {
        min-height: 28px !important;
        padding: 0 !important;
        font-size: 11.5px !important;
    }

    .wd.wd .wd-5b91211b .wd-add-btn.wd-add-btn-replace .wd-action-icon {
        font-size: 14px !important;
    }
}
