/*
Theme Name: Woodmart Child
Theme URI: https://xtemos.com/woodmart/
Description: Child theme for Woodmart eCommerce theme - Custom Alaafashion Styling
Author: XTemos & Antigravity
Author URI: https://alaafashion.com
Template: woodmart
Version: 1.2.0
Text Domain: woodmart-child
*/

:root {
    --af-primary: #181818;
    --af-accent: #c5a980;
    --af-accent-dark: #a88a5e;
    --af-bg-light: #faf8f5;
    --af-border-color: #eee9e2;
    --af-card-radius: 14px;
}

/* ==========================================================================
   1. FIXED UNIFORM HEIGHT FOR ALL PRODUCT CARDS ACROSS HOMEPAGE, SHOP & RELATED
   ========================================================================== */
.product-grid-item .product-element-top,
.product-grid-item .wd-product-thumb,
.wd-product .product-element-top,
.wd-product .wd-product-thumb {
    height: 350px !important;
    max-height: 350px !important;
    min-height: 350px !important;
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    background-color: var(--af-bg-light) !important;
    border-radius: var(--af-card-radius) var(--af-card-radius) 0 0 !important;
}

.product-grid-item .product-element-top a,
.product-grid-item .product-element-top .product-image-link,
.product-grid-item .product-element-top .wd-product-img-link,
.wd-product .product-element-top a {
    display: block !important;
    height: 100% !important;
    width: 100% !important;
    max-height: 350px !important;
}

.product-grid-item .product-element-top img,
.product-grid-item .product-element-top .product-image-link img,
.product-grid-item .product-element-top .wd-product-img-link img,
.product-grid-item .product-element-top .attachment-woocommerce_thumbnail,
.wd-product .product-element-top img {
    width: 100% !important;
    height: 350px !important;
    max-height: 350px !important;
    min-height: 350px !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.product-grid-item:hover .product-element-top img,
.wd-product:hover .product-element-top img {
    transform: scale(1.06) !important;
}

/* ==========================================================================
   2. UNIFIED CARD CONTAINERS & BASELINE ALIGNMENT
   ========================================================================== */
.product-grid-item,
.wd-product {
    background: #ffffff !important;
    border-radius: var(--af-card-radius) !important;
    border: 1px solid var(--af-border-color) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    transition: all 0.3s ease !important;
    height: 100% !important;
}

.product-grid-item:hover,
.wd-product:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-4px) !important;
    border-color: var(--af-accent) !important;
}

.product-grid-item .wd-entities-title,
.product-grid-item .woocommerce-loop-product__title,
.wd-product .wd-entities-title {
    height: 42px !important;
    max-height: 42px !important;
    min-height: 42px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin: 10px 10px 4px !important;
    text-align: center !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    color: var(--af-primary) !important;
}

.product-grid-item .price,
.wd-product .price {
    height: 26px !important;
    margin: 4px 0 14px !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--af-primary) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
}

/* ==========================================================================
   3. RELATED PRODUCTS BALANCED CENTERING
   ========================================================================== */
.related-and-upsells {
    max-width: 1240px !important;
    margin: 50px auto !important;
    padding: 0 15px !important;
}

.related-and-upsells .slider-title {
    text-align: center !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    color: var(--af-primary) !important;
    margin-bottom: 30px !important;
}

.related-and-upsells .wd-carousel-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 22px !important;
}

.related-and-upsells .wd-carousel-item {
    flex: 0 0 270px !important;
    max-width: 270px !important;
    width: 270px !important;
}

/* ==========================================================================
   4. PRODUCT TABS (DESCRIPTION) - CENTERED LUXURY CARD
   ========================================================================== */
.product-tabs-wrapper {
    margin: 40px auto !important;
    padding: 0 15px !important;
    max-width: 1000px !important;
}

.product-tabs-inner {
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 35px 40px !important;
    border: 1px solid var(--af-border-color) !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.03) !important;
}

.woocommerce-tabs ul.tabs {
    display: flex !important;
    justify-content: center !important;
    gap: 20px !important;
    border-bottom: 2px solid #f2eee9 !important;
    margin-bottom: 25px !important;
    padding: 0 !important;
}

.woocommerce-tabs ul.tabs li a {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #777777 !important;
    padding: 10px 22px !important;
    border: none !important;
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--af-primary) !important;
    border-bottom: 3px solid var(--af-accent) !important;
}

.woocommerce-tabs .woocommerce-Tabs-panel--description,
.woocommerce-tabs .wc-tab-inner {
    max-width: 820px !important;
    margin: 0 auto !important;
}

.woocommerce-tabs .wc-tab-inner p {
    font-size: 16px !important;
    line-height: 2 !important;
    color: #2b2b2b !important;
    text-align: right !important;
    margin-bottom: 12px !important;
}

/* ==========================================================================
   5. MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .product-grid-item .product-element-top,
    .product-grid-item .wd-product-thumb,
    .wd-product .product-element-top,
    .wd-product .wd-product-thumb {
        height: 220px !important;
        max-height: 220px !important;
        min-height: 220px !important;
    }

    .product-grid-item .product-element-top img,
    .product-grid-item .product-element-top .attachment-woocommerce_thumbnail,
    .wd-product .product-element-top img {
        height: 220px !important;
        max-height: 220px !important;
        min-height: 220px !important;
    }

    .related-and-upsells .wd-carousel-wrap {
        gap: 12px !important;
    }

    .related-and-upsells .wd-carousel-item {
        flex: 0 0 calc(50% - 6px) !important;
        max-width: calc(50% - 6px) !important;
        width: calc(50% - 6px) !important;
    }

    .product-tabs-inner {
        padding: 20px 16px !important;
    }

    .product-grid-item .wd-entities-title,
    .product-grid-item .woocommerce-loop-product__title,
    .wd-product .wd-entities-title {
        font-size: 13px !important;
        height: 38px !important;
        max-height: 38px !important;
        min-height: 38px !important;
    }
}
