.grid {}

.grid .bx_content_section { margin-bottom: 15px; }

.grid .bx_sidebar { margin-bottom: 15px; }

/* grid2x1 */
.grid2x1 {}

.grid2x1 .bx_content_section {
    float: left;
    width: 66%;
    margin-bottom: 15px;
}

.grid2x1 .bx_sidebar {
    float: right;
    width: 33%;
    margin-bottom: 15px;
    padding-left: 5%;
    box-sizing: border-box;
}

@media (max-width: 960px) {
    .grid2x1 .bx_sidebar { padding-left: 4%; }
}

@media (max-width: 640px) {
    .grid2x1 .bx_content_section,
    .grid2x1 .bx_sidebar {
        width: 100%;
        float: none;
    }

    .grid2x1 .bx_sidebar { padding-left: 3%; }
}

@media (max-width: 479px) {
    .grid2x1 .bx_sidebar { padding-left: 1%; }
}

.catalog-block-header {
    font-size: 14px;
    font-weight: bold;
    text-align: left;
    margin: 5px 0;
    padding: 5px 0;
    border-bottom: 2px solid #d9dee6;
    border-bottom-color: var(--primary);
    color: #000;
}


.tags.border-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    position: relative;
}

.tag-item.border-list__item {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tag-item.border-list__item:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.tag-item.border-list__item.selected {
    background-color: #CC9453;
    color: white;
    border-color: #CC9453;
}

.tag-item.border-list__item.list-name {
    background-color: #f8f9fa;
    font-weight: bold;
    cursor: default;
}

.list-expand, .list-collapse {
    cursor: pointer;
    color: #CC9453;
    padding: 8px 16px;
    border: 1px dashed #CC9453;
    border-radius: 20px;
    font-size: 14px;
}

.list-expand:hover, .list-collapse:hover {
    background-color: #CC9453;
    color: white;
}

.icon-cancel-after:after {
    content: '×';
    margin-left: 9px;
    font-size: 15px;
    font-weight: bold;
}

.icon-cancel-after:hover:after {
    color: black;
}

.breadcrumbs-section {
    padding: 15px 0;
    background: #f8f9fa;
}

.custom-breadcrumb {
    background: none;
    margin-bottom: 0;
    padding: 0;
}

.custom-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
}

.custom-breadcrumb .breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
}

.custom-breadcrumb .breadcrumb-item.active {
    color: #6c757d;
}



/* Основные стили для списка категорий */
.catalog-navigations-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    position: relative;
}

.catalog-navigations-categories__item {
    display: inline-block;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.3s ease;
    background-color: #fff;
    cursor: pointer;
}

.catalog-navigations-categories__item:hover {
    color: white;
    background-color: #CC9453;
    border-color: #CC9453;
    text-decoration: none;
}

.catalog-navigations-categories__item.list-name {
    background-color: #f8f9fa;
    font-weight: bold;
    cursor: default;
    border-color: #d9dee6;
}

.catalog-navigations-categories__item.list-name:hover {
    background-color: #f8f9fa;
    color: #333;
    border-color: #d9dee6;
}

/* Кнопки "Показать еще" и "Свернуть" */
.list-expand,
.list-collapse {
    cursor: pointer;
    color: #CC9453;
    padding: 8px 16px;
    border: 1px dashed #CC9453;
    border-radius: 20px;
    font-size: 14px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.list-expand:hover,
.list-collapse:hover {
    background-color: #CC9453;
    color: white;
    border-style: solid;
}

/* Скрытые элементы (для функционала "Показать еще") */
.d-none {
    display: none !important;
}

/* Заголовок секции */
.catalog-categories__title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
}

/* Контейнеры и сетка */
.catalog-navigations {
    margin-bottom: 30px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.align-items-start {
    align-items: flex-start;
}

.justify-content-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.border-list {
    position: relative;
}

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

    .catalog-navigations-categories__item {
        padding: 6px 12px;
        font-size: 13px;
    }

    .catalog-categories__title {
        font-size: 20px;
    }
    .catalog-navigations-categories__item {
        font-size: 11px !Important;
        color: #B28046;
        line-height: 120%;
        padding: 5px 5px !Important;
        border: 1px solid #B28046;
        border-radius: 100px;
    }
    .catalog-navigations-categories {
        gap: 7px;
        padding: 22px 0;
        border-bottom: 1px dashed #C4C4C4;
    }

    .list-expand, .list-collapse {
        cursor: pointer;
        color: #CC9453;
        padding: 5px 5px !important;
        border: 1px dashed #CC9453;
        border-radius: 20px;
        font-size: 13px !important;
    }
}

@media (max-width: 576px) {
    .catalog-navigations-categories {
        justify-content: center;
    }

    .catalog-navigations-categories__item {
        padding: 5px 10px;
        font-size: 12px;
    }

    .d-flex.flex-wrap {
        justify-content: left;
        display: flex;
        flex-wrap: wrap;
    }
}

/* Дополнительные стили для счетчика товаров */
.catalog-navigations-categories__item:not(.list-name):not(.list-expand):not(.list-collapse) {
    position: relative;
}

/* Стили для активной категории */
.catalog-navigations-categories__item.active {
    background-color: #CC9453;
    color: white;
    border-color: #CC9453;
}

/* Анимация появления скрытых элементов */
.catalog-navigations-categories__item {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Стили для кнопки "В каталог" */
.products__more {
    display: inline-block;
    padding: 10px 20px;
    background-color: #CC9453;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.products__more:hover {
    background-color: #b58245;
    color: white;
    text-decoration: none;
}

.products-more-wrapper {
    margin-left: auto;
}

/* Исправления для кнопок "Показать еще" и "Свернуть" */
.catalog-navigations-categories__controls {
    display: contents; /* Важно: позволяет кнопкам быть частью flex-контейнера */
}

.catalog-navigations-categories__more,
.catalog-navigations-categories__collapse {
    flex-shrink: 0; /* Запрещаем сжатие */
    white-space: nowrap; /* Запрещаем перенос текста */
}

/* Убедимся, что все элементы имеют одинаковую высоту */
.catalog-navigations-categories__item {
    padding: 8px 16px;
    min-height: 36px; /* Фиксированная минимальная высота */
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Особые стили для кнопок управления */
.list-expand,
.list-collapse {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Фиксируем размеры элементов */
.catalog-navigations-categories {
    align-items: stretch; /* Равная высота всех элементов */
}

.catalog-navigations-categories__item.list-name {
    flex-shrink: 0;
}

/* Улучшаем адаптивность */
@media (max-width: 768px) {
    .catalog-navigations-categories__item {
        padding: 6px 12px;
        min-height: 32px;
        font-size: 13px;
    }

    .list-expand,
    .list-collapse {
        min-height: 32px;
        padding: 6px 12px;
    }
}

@media (max-width: 576px) {
    .catalog-navigations-categories__item {
        padding: 5px 10px;
        min-height: 30px;
        font-size: 12px;
    }

    .list-expand,
    .list-collapse {
        min-height: 30px;
        padding: 5px 10px;
    }
}

/* Дополнительные исправления для выравнивания */
.catalog-navigations-categories {
    gap: 8px;
    align-items: revert; /* Выравнивание по центру по вертикали */
}

.catalog-navigations-categories__item:not(.list-name) {
    flex: 0 1 auto; /* Автоматическая ширина, но может сжиматься */
}