/*
 * ST Product Category Tabs
 * Scope toàn bộ CSS dưới .st-category-tabs để không ảnh hưởng Title khác của Flatsome.
 * v1.5.1: H3 chỉ chứa danh mục cha; menu con dùng <nav> riêng.
 * Desktop ép cùng một hàng; mobile mới chủ động xuống dòng.
 */

.st-category-tabs {
    margin-bottom: 1.5em;
}

/*
 * Dùng chính class section-title / section-title-normal của Flatsome trên wrapper.
 * Nhờ vậy border cam dưới toàn hàng vẫn lấy từ CSS thực tế của theme.
 */
.st-category-tabs .st-category-tabs__bar {
    flex-flow: row nowrap;
    margin-bottom: 0;
}

/* H3 chỉ chứa tiêu đề danh mục cha. Reset margin mặc định để không đổi layout. */
.st-category-tabs .st-category-tabs__heading {
    flex: 0 0 auto;
    margin: 0;
    max-width: none;
    padding: 0;
    width: auto;
}

.st-category-tabs .st-category-tabs__main {
    display: inline-block;
    white-space: nowrap;
}

/* Danh mục cha click được nhưng giữ nguyên style Section Title của Flatsome. */
.st-category-tabs .st-category-tabs__parent-link {
    align-items: center;
    color: inherit !important;
    display: inline-flex;
    text-decoration: none !important;
}

.st-category-tabs .st-category-tabs__parent-link:hover,
.st-category-tabs .st-category-tabs__parent-link:focus {
    color: inherit !important;
    text-decoration: none !important;
}

/*
 * Menu con là <nav>, không còn là <span> nên rule
 * .section-title-normal span của Flatsome không tạo border đỏ dưới menu con nữa.
 */
.st-category-tabs .st-category-tabs__menu {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 28px;
    justify-content: flex-end;
    min-width: 0;
    padding: 0 8px;
}

.st-category-tabs .st-category-tabs__menu a {
    border: 0 !important;
    color: rgb(255, 0, 71);
    display: inline-block;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
    padding: 0;
    text-decoration: none;
    white-space: nowrap;
}

.st-category-tabs .st-category-tabs__menu a:hover,
.st-category-tabs .st-category-tabs__menu a.is-active {
    color: #ff0014;
}

.st-category-tabs .st-category-tabs__all {
    font-weight: 600 !important;
}

.st-category-tabs-notice {
    border: 1px dashed #d6d6d6;
    font-size: 13px;
    padding: 10px 12px;
}

@media (max-width: 849px) {
    .st-category-tabs .st-category-tabs__bar {
        align-items: flex-start;
        flex-flow: row wrap;
    }

    .st-category-tabs .st-category-tabs__heading {
        flex-basis: 100%;
        max-width: 100%;
    }

    .st-category-tabs .st-category-tabs__main {
        margin-bottom: 8px;
        max-width: 100%;
    }

    .st-category-tabs .st-category-tabs__menu {
        flex-basis: 100%;
        gap: 20px;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 7px 0 8px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .st-category-tabs .st-category-tabs__menu::-webkit-scrollbar {
        display: none;
    }

    .st-category-tabs .st-category-tabs__menu a {
        font-size: 13px;
    }
}
