/* ===== Catalog Showcase — блок разделов каталога ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600&display=swap');
@font-face {
    font-family: 'Bebas Neue Cyrillic';
    src: url('/local/templates/urban_comfort/fonts/BebasNeueCyrillic.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

/* Основной контейнер */
.catalog-showcase {
    padding: 60px 0;
    background-color: #ffffff;
    font-family: 'Inter Tight', sans-serif;
}

.catalog-showcase__container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 0px;
}

/* Заголовочная часть */
.catalog-showcase__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.catalog-showcase__title {
    margin: 0;
    color: #303030;
    font-size: 32px;
    font-weight: 600;
    font-family: 'Inter Tight', sans-serif;
}

.catalog-showcase__btn-all {
    color: #1481DB;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    padding: 8px 16px;
    border-radius: 40px;
    border: 1px solid #1481DB;
}

.catalog-showcase__btn-all:hover {
    background-color: #1481DB;
    color: white;
}

/* Сетка 4 колонки — ИСПРАВЛЕНО: фиксированные размеры колонок */
.catalog-showcase__grid {
    display: grid;
    grid-template-columns: repeat(4, calc(25% - 15px)); /* 4 равные колонки с учетом gap */
    gap: 20px;
    justify-content: start;
}

/* Обертка элемента — занимает ровно 1 колонку */
.catalog-showcase__item {
    width: 100%;
    min-width: 0px; /* Разрешаем сжатие для grid */
}

/* Широкий баннер на 2 колонки — ИСПРАВЛЕНО */
.catalog-showcase__item--banner-wide {
    grid-column: span 2;
    width: 100%;
}

/* Карточка раздела */
.catalog-section {
    background-color: #F2F3F5;
    padding: 32px 24px;
    position: relative;
    overflow: hidden;
    height: 294px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    box-sizing: border-box;
    /*width: 295px;*/
}

/* Заголовок раздела */
.catalog-section__header {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    height: 70px;
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    flex-shrink: 0;
}

.catalog-section__count {
    color: #1481DB;
    font-size: 22px;
    font-family: 'Bebas Neue Cyrillic', sans-serif;
    font-weight: 400;
    line-height: 1;
    margin: 0 0 2px 0;
    letter-spacing: 0.5px;
    display: block;
	cursor:default;
}

.catalog-section__title {
    color: #303030;
    font-size: 18px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    margin: 4px 0 0 0;
    line-height: 1.2;
    max-width: 160px;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.catalog-section__title-link {
    text-decoration: none;
    display: block;
    width: 100%;
}

/* Изображение раздела - правый верхний угол */
.catalog-section__image {
    position: absolute;
    top: -8px;
    right: 0;
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 112px;
    object-fit: contain;
    pointer-events: none;
    z-index: 1;
}

.catalog-section__image-link {
    display: block;
    position: absolute;
    top: -8px;
    right: 0;
    z-index: 1;
}

/* Блок подразделов */
.catalog-section__subs {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    position: relative;
    z-index: 2;
    gap: 8px;
    margin-top: 20px;
    flex-shrink: 0;
    height: 150px;
}

/* Список подразделов */
.catalog-section__subs-list {
    width: 100%;
    height: 100%;
    margin: 0;
    padding-right: 0;
    overflow: auto;
    flex: 1;
    min-width: 0;
}

/* Стили для mCustomScrollbar */
.catalog-section__subs-list.mCustomScrollbar {
    overflow: hidden;
    width: 100%;
}

.catalog-section__subs-list.mCustomScrollbar .mCSB_container {
    margin-right: 16px;
}

.catalog-section__subs-list.mCustomScrollbar .mCSB_scrollTools {
    position: absolute;
    right: 0px;
    top: 0;
    bottom: 0;
    width: 4px;
    opacity: 1;
}

.mCS-dark-3.mCSB_scrollTools {
    width: 4px;
    opacity: 1;
}

.catalog-section__subs-list.mCustomScrollbar .mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
    background-color: #fff !important;
    width: 4px;
    border-radius: 900px;
    height: 57px !important;
}

.mCSB_dragger {
    height: 57px !important;
}

.catalog-section__subs-list.mCustomScrollbar .mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail {
    background-color: #E1E1E1 !important;
    width: 4px;
    border-radius: 900px;
}

.catalog-section__subs-list.mCustomScrollbar .mCS-dark-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
    background-color: #fff !important;
}

/* Декоративный индикатор скролла */
.catalog-section__subs-scroll {
    align-self: stretch;
    background: #E1E1E1;
    border-radius: 900px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 4px;
    height: 53px;
    flex-shrink: 0;
    position: relative;
    margin-left: 0;
}

.catalog-section__scroll-dot {
    width: 4px;
    height: 20px;
    background: white;
    border-radius: 900px;
    transition: transform 0.05s linear;
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.catalog-section__subs-list.mCustomScrollbar + .catalog-section__subs-scroll {
    display: none;
}

.catalog-section__subs:has(.catalog-section__subs-list:not(.mCustomScrollbar)) 
.catalog-section__subs-scroll {
    display: none;
}

/* Элемент подраздела */
.catalog-section__sub-item {
    color: #818084;
    font-size: 16px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1;
    word-wrap: break-word;
    display: block;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.catalog-section__sub-item:last-child {
    margin-bottom: 0;
}

.catalog-section__sub-item:hover {
    color: #303030;
    text-decoration: underline;
}

/* Пустой список */
.catalog-section__subs-empty {
    width: 100%;
    padding: 8px 0;
    color: #818084;
    font-size: 14px;
    font-style: italic;
}

/* ===== Баннеры ===== */
.catalog-banner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.41);
    background-blend-mode: overlay;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 32px;
    box-sizing: border-box;
    height: 294px;
    width: 100%;
}

.catalog-banner--wide {
    /* Убран grid-column: span 2, т.к. управляется через родителя */
    width: 100%;
}

.catalog-banner--regular {
    width: 100%;
}

.catalog-banner__label {
    color: white;
    font-size: 20px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    word-wrap: break-word;
    max-width: 185px;
}

/* ===== Адаптивность ===== */
@media (max-width: 1200px) {
    .catalog-showcase__grid {
        grid-template-columns: repeat(3, calc(33.333% - 13.333px));
    }
    .catalog-showcase__item--banner-wide {
        grid-column: span 2;
    }
    
    .catalog-section__subs-list.mCustomScrollbar .mCSB_scrollTools {
        right: -8px;
    }
}

@media (max-width: 992px) {
    .catalog-showcase__grid {
        grid-template-columns: repeat(2, calc(50% - 10px));
    }
    .catalog-section__title {
        max-width: 120px;
    }
    .catalog-showcase__item--banner-wide {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .catalog-showcase__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .catalog-showcase__grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-showcase__item--banner-wide {
        grid-column: span 1;
    }
    
    .catalog-section {
        height: auto;
        min-height: 294px;
    }
    
    .catalog-section__subs {
        height: 140px;
        margin-top: 16px;
    }
    
    .catalog-section__image {
        max-width: 150px;
        max-height: 110px;
    }
    
    .catalog-section__subs-list {
        width: 100%;
        height: 140px;
    }
    
    .catalog-section__subs-list.mCustomScrollbar .mCSB_scrollTools {
        right: -6px;
    }
}

@media (max-width: 576px) {
    .catalog-showcase {
        padding: 40px 0;
    }
    
    .catalog-showcase__title {
        font-size: 24px;
    }
    
    .catalog-section {
        padding: 24px 16px;
    }
    
    .catalog-section__image {
        max-width: 120px;
        max-height: 90px;
    }
}


/* Стили для страницы тегов */
.tags-page .catalog-header {
    margin-bottom: 20px;
}

.tags-page .catalog-header h1 {
    color: #1481DB;
    font-size: 36px;
    font-family: 'Bebas Neue Cyrillic', sans-serif;
    text-transform: uppercase;
}