.catalog-page {
    min-height: 100vh;
    background: #fff;
}

.catalog-page .container {
    max-width: 1440px;
    margin: 0 auto;
}

.catalog-header {
    display: flex;
    align-items: center;
    margin: 49px 0 24px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 4px;
    border: none;
    font-size: 14px;
    line-height: 18px;
    font-weight: 400;
    color: #81AD4F;
    cursor: pointer;
    transition: color 0.2s;
    letter-spacing: -.02em;
    width: 220px;
    margin-right: 24px;
    background: none;
}

.back-button:hover {
}

.breadcrumbs {
    line-height: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #20221E7A;
}

.breadcrumbs a {
    color: #20221E7A;
    letter-spacing: -.03em;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #81AD4F;
}

.breadcrumbs .separator {
    color: #20221E7A;
}

.breadcrumbs .current {
    color: #20221E7A;
    letter-spacing: -.03em;
}

.breadcrumbs .current.cur-cat {
    color: #20221EB8;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}

/* Сайдбар */
.catalog__sidebar {
    background: #fff;
    border-radius: 24px;
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 88px;
}

/* Блок категорий - сворачиваемый */
.categories-block {
    margin-bottom: 24px;
    border-radius: 16px;
    overflow-y: hidden;
    background: #81AD4F14;
    padding: 16px;
}

.categories-block::-webkit-scrollbar {
    display: none;
}

.categories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.categories-header:hover {
}

.categories-title {
    font-size: 18px;
    font-weight: 600;
    color: #20221E;
    margin: 0;
}

.categories-header svg {
    transition: transform 0.3s ease;
    color: #20221E7A;
    width: 20px;
    height: 20px;
}

.categories-header svg.rotated {
    transform: rotate(180deg);
}

.categories-content {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    overflow: hidden;
}

.categories-content.expanded {
    max-height: none;
    opacity: 1;
    overflow-y: auto;
}

.categories-list {
    display: flex;
    padding-top: 16px;
    gap: 4px;
    flex-direction: column;
}

.category-item {
    display: block;
    padding: 4px;
    text-decoration: none;
    color: #20221EB8;
    font-size: 14px;
    line-height: 18px;
    border-radius: 8px;
}

.category-item:hover {
    color: #81AD4F;
}

.category-item.active {
    color: #81AD4F;
}

.category-name {
    display: block;
}

/* Блоки фильтров */
.filter-section {
    margin-bottom: 24px;
}

.filter-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.filter-section__header:hover {
}

.filter-section__title {
    max-width: 80%;
    font-size: 14px;
    font-weight: 500;
    color: #20221E;
    margin: 0;
    line-height: 17px;
    letter-spacing: -.03em;
}

.filter-section__header svg {
    transition: transform 0.3s ease;
    color: #20221E7A;
}

.filter-section__header svg.rotated {
    transform: rotate(180deg);
    margin-right: -4px;
}

.filter-section__content {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    overflow: hidden;
}

.filter-section__content.expanded {
    max-height: none;
    opacity: 1;
    overflow-y: auto;
}

/* Поиск внутри фильтров */
.filter-search {
    margin: 16px 0;
}

.filter-search-input {
    width: 100%;
    height: 44px;
    padding: 12px 16px;
    border: 1px solid #20221E29;
    border-radius: 12px;
    transition: border-color 0.2s;
    font-size: 14px;
}

.filter-search-input:focus {
    outline: none;
    border-color: #81AD4F;
    background: #fff;
}

.filter-search-input::placeholder {
    font-size: 14px;
    line-height: 20px;
    color: #20221E52;
}

.filter-options {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

/* Опции фильтров */
.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #20221EB8;
    font-size: 14px;
    line-height: 18px;
    font-weight: 500;
}

.filter-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background-color: #81AD4F29;
    border-radius: 4px;
    transition: all 0.2s;
    position: relative;
}

.filter-option input[type="checkbox"]:checked {
    background-color: #81AD4F;
}

.filter-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 11px;
    height: auto;
    color: #fff;
    font-weight: 700;
}

.filter-option input[type="checkbox"]:hover {
}

.filter-name {
    flex: 1;
    line-height: 18px;
    font-size: 14px;
    color: #20221EB8;
    letter-spacing: -.02em;
    font-weight: 400;
}

/* Кнопки фильтров */
.filter-actions {
    display: flex;
    margin-top: 32px;
    justify-content: center;
}

.reset-btn {
    color: #81AD4F;
    padding: 12px 33px;
    border-radius: 128px;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
    text-align: center;
    transition: background 0.2s;
    background: #81AD4F1F;
    margin-bottom: 156px;
    text-decoration: none;
}

.reset-btn:hover {
    background: #325B3E0F;
}

/* Основная часть */
.catalog__main {
    min-width: 0;
    margin-bottom: 906px;
}

.active-filters-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
}

.active-filters-left {
    flex: 1;
}

.active-filters-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    align-items: center;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #81AD4F;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: -.02em;
}

.filter-tag-remove {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
}

.filter-tag-remove:hover {
    opacity: 0.8;
}

.reset-filters-btn {
    background: #81AD4F1F;
    color: #81AD4F;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 14px;
    line-height: 16px;
    letter-spacing: -.02em;
    border-radius: 128px;
    transition: all 0.2s;
    display: inline-block;
    border: none;
    margin-left: 8px;
}

.reset-filters-btn:hover {
    background: #81AD4F;
    color: white;
}

.active-filters-right {
    flex-shrink: 0;
    margin-left: 20px;
}

.products-count-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.products-count {
    font-size: 14px;
    color: #20221E7A;
    margin: 0;
    letter-spacing: -.03em;
    line-height: 18px;
}

.count-number {
    font-size: 14px;
    color: #20221E;
    margin: 0;
    letter-spacing: -.03em;
    line-height: 18px;
    margin-left: 4px;
    font-weight: 500;
}

/* Сетка товаров */
.products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 360px;
}

.product-card:hover {
}

.product-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card__image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-bottom: 16px;
    border-radius: 24px;
}

.product-card__title {
    font-size: 16px;
    font-weight: 600;
    color: #20221EB8;
    margin-bottom: 8px;
    line-height: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.product-card__serving{
    color: #20221E7A;
    font-weight: 400;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: -.02em;
}

.product-card__link-more {
    display: flex;
    padding: 9px 22px;
    background: #81AD4F1F;
    text-decoration: none;
    color: #81AD4F;
    border-radius: 128px;
    font-weight: 500;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: -.02em;
    max-width: fit-content;
}

.product-card__favorite {
    position: absolute;
    top: 16px;
    right: 16px;
    background: white;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #20221E;
    transition: all 0.2s;
    z-index: 2;
}

.product-card__favorite:hover {
}

.product-card__favorite svg {
    width: 20px;
    height: 20px;
}

.no-products {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    padding: 40px;
    background: #81AD4F14;
    border-radius: 20px;
    justify-content: center;
    font-weight: 500;
    font-size: 20px;
    line-height: 27.9px;
    letter-spacing: -.02em;
    text-align: center;
    color: #20221E;
    gap: 32px;
}


.not-found {
   margin: 0 auto;
}

.selected-category-block {
    margin-bottom: 24px;
}

.selected-category-label {
    font-size: 13px;
    color: #20221E7A;
    margin-right: 8px;
}

.selected-category-name {
    font-weight: 500;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: #20221E;
}

.selected-category-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #F8F9FA;
    border-radius: 30px;
    display: inline-flex;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog__sidebar {
        position: static;
        margin-bottom: 32px;
    }

    .products__grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .active-filters-header {
        flex-direction: column;
        gap: 16px;
    }

    .active-filters-right {
        margin-left: 0;
        width: 100%;
        text-align: left;
    }

    .products-count-wrapper {
        justify-content: flex-start;
    }

    .products__grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .product-card__image {
        height: 140px;
    }

    .product-card__title {
        font-size: 14px;
        min-height: 40px;
    }

    .filter-section__title {
        font-size: 15px;
        padding: 14px 16px;
    }

    .filter-option {
        font-size: 13px;
    }

    .selected-category-name {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .products__grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    .active-filters-tags {
        gap: 8px;
    }

    .filter-tag {
        padding: 6px 12px;
        font-size: 12px;
    }

    .selected-category-name {
        font-size: 20px;
    }
}

/* Пагинация */
.pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.pagination__container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pagination__prev,
.pagination__next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #20221E1A;
    border-radius: 8px;
    color: #20221E7A;
    transition: all 0.2s;
}

.pagination__prev:hover,
.pagination__next:hover {
    background: #81AD4F14;
    border-color: #81AD4F;
    color: #81AD4F;
}

.pagination__pages {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination__page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid #20221E1A;
    border-radius: 8px;
    color: #20221EB8;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination__page:hover {
    background: #81AD4F14;
    border-color: #81AD4F;
    color: #81AD4F;
}

.pagination__page--active {
    background: #81AD4F;
    border-color: #81AD4F;
    color: white;
}

.pagination__page--active:hover {
    background: #81AD4F;
    border-color: #81AD4F;
    color: white;
}

.pagination__dots {
    color: #20221E7A;
    font-size: 14px;
    padding: 0 4px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .pagination__container {
        gap: 8px;
    }

    .pagination__page {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .pagination__prev,
    .pagination__next {
        width: 36px;
        height: 36px;
    }
}