/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/
/* =========================================================
   BudApproach – Strain Filter Tabs Recovery
   ========================================================= */

/* Hỗ trợ cả contract cũ lẫn contract mới trong lúc khôi phục */
body .ba-strain-tabs,
body .ba-filter-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 34px;
    width: 100%;

    margin: 8px 0 32px;
    padding: 0;
}

body .ba-strain-tabs button.ba-strain-tab,
body .ba-filter-tabs button.ba-filter-tab {
    appearance: none !important;
    -webkit-appearance: none !important;

    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto !important;
    min-width: 0 !important;
    min-height: 40px;

    margin: 0 !important;
    padding: 6px 2px 11px !important;

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;

    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;

    color: #555 !important;

    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.45px !important;
    text-transform: uppercase !important;

    cursor: pointer;
}

/* Xóa pseudo-element button của WoodMart */
body .ba-strain-tabs button.ba-strain-tab::before,
body .ba-filter-tabs button.ba-filter-tab::before {
    display: none !important;
}

/* Gạch chân */
body .ba-strain-tabs button.ba-strain-tab::after,
body .ba-filter-tabs button.ba-filter-tab::after {
    content: "";

    position: absolute;
    bottom: 1px;
    left: 50%;

    display: block !important;

    width: 72%;
    height: 3px;

    border: 0 !important;
    border-radius: 999px;

    background: #183d32 !important;

    opacity: 0;

    transform: translateX(-50%) scaleX(0.4);
    transform-origin: center;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

body .ba-strain-tabs button.ba-strain-tab:hover,
body .ba-strain-tabs button.ba-strain-tab.is-active,
body .ba-filter-tabs button.ba-filter-tab:hover,
body .ba-filter-tabs button.ba-filter-tab.is-active {
    color: #183d32 !important;
}

body .ba-strain-tabs button.ba-strain-tab:hover::after,
body .ba-strain-tabs button.ba-strain-tab.is-active::after,
body .ba-filter-tabs button.ba-filter-tab:hover::after,
body .ba-filter-tabs button.ba-filter-tab.is-active::after {
    opacity: 1;

    transform:
        translateX(-50%)
        scaleX(1);
}

/*
 * Không dùng display:none.
 * Giữ Product Filters sống trong DOM để WoodMart khởi tạo AJAX.
 */
.ba-strain-filter-source,
.ba-filter-source,
[data-widget_type="wd_product_filters.default"],
.elementor-widget-wd_product_filters {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;

    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}