.tea-category-tree,
.tea-category-group {
    display: grid;
}

.tea-catalog-page .product-desc,
.tea-catalog-page .product-tags {
    display: none;
}

.tea-category-link,
.tea-category-toggle {
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #1E3A2B;
    font: inherit;
    text-align: left;
}

.tea-category-link,
.tea-category-toggle {
    display: flex;
    min-height: 42px;
    padding: 10px 12px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.tea-category-link--all {
    margin-bottom: 6px;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(30, 58, 43, 0.14);
    color: rgba(30, 58, 43, 0.68);
}

.tea-category-toggle i {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-top: 2px solid var(--brand-dark);
    border-right: 2px solid var(--brand-dark);
    transform: rotate(135deg);
    transition: transform 180ms ease;
}

.tea-category-toggle[aria-expanded="true"] i {
    transform: rotate(-45deg);
}

.tea-subcategories {
    display: grid;
    gap: 1px;
    padding: 0 0 8px 18px;
}

.tea-subcategories[hidden] {
    display: none !important;
}

.tea-category-toggle {
    cursor: pointer;
}

.tea-category-toggle:hover,
.tea-category-link:hover {
    color: var(--brand-dark);
}

.tea-subcategory {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    min-height: 38px;
    padding: 8px 6px;
    align-items: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #1E3A2B;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    text-transform: uppercase;
    transition: background-color 160ms ease, color 160ms ease;
}

.tea-subcategory:hover {
    background: rgba(168, 200, 160, 0.24);
    color: var(--brand-dark);
}

.tea-subcategory input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.tea-subcategory-check {
    display: grid;
    box-sizing: border-box;
    aspect-ratio: 1;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    min-height: 18px;
    max-height: 18px;
    flex: 0 0 18px;
    align-self: center;
    place-items: center;
    border: 1.5px solid rgba(30, 58, 43, 0.58);
    border-radius: 4px;
    background: #FFFFFF;
}

.tea-subcategory-check::after {
    width: 5px;
    height: 9px;
    border-right: 2px solid #FFFFFF;
    border-bottom: 2px solid #FFFFFF;
    content: '';
    opacity: 0;
    transform: translateY(-1px) rotate(45deg) scale(0.6);
    transition: opacity 140ms ease, transform 140ms ease;
}

.tea-subcategory input:checked + .tea-subcategory-check {
    border-color: #183F2C;
    background: #183F2C;
}

.tea-subcategory input:checked + .tea-subcategory-check::after {
    opacity: 1;
    transform: translateY(-1px) rotate(45deg) scale(1);
}

.tea-category-link.is-active,
.tea-category-group.is-active .tea-category-toggle,
.tea-subcategory.is-active {
    color: #183F2C;
    font-weight: 900;
}

.tea-category-link.is-active,
.tea-subcategory.is-active {
    background: #EEF3EE;
}

.tea-category-link.is-active {
    box-shadow: inset 3px 0 0 #183F2C;
}

.tea-subcategory.is-active {
    background: #EEF3EE;
}

.tea-category-link--all.is-active {
    border-bottom-color: transparent;
}

.tea-category-link:focus-visible,
.tea-category-toggle:focus-visible,
.tea-subcategory:focus-within {
    outline: 2px solid #A8C8A0;
    outline-offset: 2px;
}

@media (min-width: 769px) {
    .tea-catalog-page .catalog-layout {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 30px;
        align-items: start;
    }

    .tea-catalog-page .filters-sidebar {
        position: sticky;
        top: 18px;
        width: auto;
        max-height: calc(100vh - 36px);
        margin: 0;
        padding: 20px;
        overflow-y: auto;
        border: 1px solid rgba(30, 58, 43, 0.12);
        background: #FFFFFF;
        scrollbar-width: thin;
    }

    .tea-catalog-page .filters-container {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .tea-catalog-page .filter-group:first-child .tea-category-tree {
        display: grid;
    }

    .tea-catalog-page .filter-group:first-child {
        grid-column: auto;
    }

    .tea-catalog-page .filter-group h4 {
        margin-bottom: 2px;
        color: #1E3A2B;
        font-size: 13px;
        text-transform: uppercase;
    }
}

@media (max-width: 768px) {
    .tea-category-link,
    .tea-category-toggle {
        min-height: 46px;
    }

    .tea-subcategory {
        min-height: 44px;
    }
}
