/**
 * Дерево категорий в catalog-filters + мобильная полоса типа над товарами.
 * public/css — без сборки Vite.
 */

/* ----- Мобильные кнопки типа над контентом (друг под другом) ----- */
.catalog-mobile-type-bar {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 0.25rem;
}

.catalog-mobile-type-bar__btn {
    width: 100%;
    min-height: 3.1rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #f5f5f5;
    color: #252b18;
    font-family: "Montserrat", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.catalog-mobile-type-bar__btn:hover {
    background: rgba(34, 40, 24, 0.08);
    border-color: #252b18;
}

.catalog-mobile-type-bar__btn.is-active {
    background: #222818;
    border-color: #222818;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(34, 40, 24, 0.18);
}

/* ----- Дерево категорий в сайдбаре ----- */
.catalog-filters__cat-tree {
    display: flex;
    flex-direction: column;
    padding: 0.1rem 0 0.4rem;
}

.catalog-filters__cat-all,
.catalog-filters__cat-parent {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0 -0.6rem;
    text-align: left;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-family: "Montserrat", sans-serif;
    color: #252b18;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 2.4rem;
    padding: 0.5rem 0.6rem;
    appearance: none;
    -webkit-appearance: none;
}

.catalog-filters__cat-all {
    font-size: 0.9rem;
    font-weight: 300;
}

.catalog-filters__cat-parent {
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 0.4rem;
}

.catalog-filters__cat-branch {
    padding-top: 0.65rem;
    margin-top: 0.55rem;
    border-top: 1px solid #e5e5e0;
}

.catalog-filters__cat-branch:first-of-type .catalog-filters__cat-parent {
    margin-top: 0.2rem;
}

.catalog-filters__cat-children {
    list-style: none;
    margin: 0.45rem 0 0.15rem;
    padding: 0 0 0 0.75rem;
    border-left: 2px solid #d0d0cc;
}

.catalog-filters__cat-child-item {
    margin: 0;
}

.catalog-filters__cat-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    border-radius: 6px;
    padding: 0.5rem 0.55rem;
    margin: 0.1rem 0;
    font-family: "Montserrat", sans-serif;
    font-size: 0.84rem;
    font-weight: 300;
    color: #252b18;
    line-height: 1.35;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 2.35rem;
    appearance: none;
    -webkit-appearance: none;
}

.catalog-filters__cat-child-label {
    flex: 1;
    min-width: 0;
}

.catalog-filters__cat-child-meta {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4e5540;
    opacity: 0.88;
    flex-shrink: 0;
}

.catalog-filters__cat-all:hover,
.catalog-filters__cat-parent:hover,
.catalog-filters__cat-child:hover {
    background: rgba(34, 40, 24, 0.06);
}

.catalog-filters__cat-all.is-active,
.catalog-filters__cat-parent.is-active,
.catalog-filters__cat-child.is-active {
    background: rgba(34, 40, 24, 0.1);
}

.catalog-filters__cat-all.is-active {
    font-weight: 600;
}

.catalog-filters__cat-child.is-active .catalog-filters__cat-child-label {
    font-weight: 600;
}

@media (max-width: 767px) {
    .catalog-mobile-type-bar {
        display: flex;
        flex-direction: column;
    }

    .catalog-filters__group--categories-tree {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .catalog-filters__group-body--categories.is-open {
        max-height: min(85vh, 920px);
    }
}

