/* Основная обертка (Серый фон) */
.catalog-tabs-wrapper {
    background-color: #F3F4F5; /* Серый фон всего блока */
    padding: 80px 0; /* Отступы сверху и снизу */
    font-family: 'Inter', sans-serif;
    width: 100%;
}

/* Внутренний контейнер (1360px) */
.catalog-tabs-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Заголовок */
.ct-header-row {
    margin-bottom: 24px;
}

.ct-title {
    color: #292A2A;
    font-size: 40px;
    font-weight: 600;
    margin: 0;
}

/* Табы */
.ct-tabs-row {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ct-tab-btn {
    padding: 12px 20px;
    background: #FFFFFF;
    border-radius: 45px;
    border: 1px solid #DEE2E3;
    color: #292A2A;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.ct-tab-btn:hover {
    background: #DEE2E3;
    border-color: #DEE2E3;
}

.ct-tab-btn.active {
    background: #DEE2E3;
    border-color: transparent;
}

/* Сетка товаров (Grid 4 в строке) */
.ct-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Карточка товара */
.ct-product-card {
    /* Расчет ширины: (100% - 3 отступа по 20px) / 4 */
    width: calc((100% - 60px) / 4);
    background: #FFFFFF;
    border-radius: 12px;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: box-shadow 0.2s;
    height: 222px; /* Фиксированная высота из Figma */
}

.ct-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Картинка */
.ct-card-image {
    width: 140px;
    height: 140px;
    background: #FFFFFF; /* Белый фон картинки */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.ct-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Название */
.ct-card-title {
    color: #292A2A;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Ограничение в 2 строки */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Карточка ссылки (8-й элемент) */
.ct-link-card {
    width: calc((100% - 60px) / 4);
    background: rgba(0, 177, 186, 0.10);
    border-radius: 12px;
    display: flex;
    justify-content: center; /* Центрируем содержимое по горизонтали */
    align-items: center;    /* Центрируем содержимое по вертикали */
    text-decoration: none;
    height: 222px;
    box-sizing: border-box;
    transition: background 0.2s;
}

.ct-link-card:hover {
    background: rgba(0, 177, 186, 0.20);
}

.ct-link-content {
    display: flex;
    flex-direction: row;
    align-items: center; /* Выравнивает элементы по вертикали по центру */
    gap: 8px;
}

.ct-link-text {
    color: #00B1BA;
    font-size: 16px;
    font-weight: 500;
    line-height: 1; /* Убираем лишний межстрочный интервал, который мешает центровке */
    white-space: nowrap;
}

.ct-link-icon {
    width: 20px;
    height: 20px;
    display: flex;         /* Делаем иконку flex-контейнером */
    align-items: center;   /* Центрируем SVG внутри по вертикали */
    justify-content: center; /* Центрируем SVG внутри по горизонтали */
    flex-shrink: 0;
}
/* Адаптив */
@media (max-width: 1100px) {
    .ct-product-card, .ct-link-card {
        width: calc((100% - 40px) / 3); /* 3 в строке */
    }
}

@media (max-width: 800px) {
    .ct-product-card, .ct-link-card {
        width: calc((100% - 20px) / 2); /* 2 в строке */
    }
}

/* Скрытие неактивных табов по умолчанию */
.ct-tab-content {
    display: none;
}

.ct-tab-content.active {
    display: block;
}