/* style.css - дополненные стили */

.catalog-tabs {
    padding: 30px 15px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.catalog-tabs__header {
    border-bottom: 2px solid #e8e8e8;
    margin-bottom: 35px;
    position: relative;
}

.catalog-tabs__nav {
    display: flex;
    justify-content: center;
    gap: 8%;
    position: relative;
    padding-bottom: 15px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.catalog-tabs__nav::-webkit-scrollbar {
    display: none;
}

button.catalog-tabs__btn {
    font-family: Panton;
}

.catalog-tabs__btn {
    background: none;
    border: none;
    color: #404040;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.84px;
    cursor: pointer;
    transition: color 0.3s ease, font-weight 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
    font-family: inherit;
}

.catalog-tabs__btn:hover {
    color: #8C6942;
}

.catalog-tabs__btn--active {
    color: #8C6942;
}

/* В CSS добавляем класс для отключения анимации */
.catalog-tabs__slider--no-transition {
    transition: none !important;
}

.catalog-tabs__slider {
    position: absolute;
    bottom: -3px;
    left: 0;
    height: 5px;
    background: #808080;
    transition: left 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
    border-radius: 3px;
}

.catalog-tabs__content {
    padding-top: 5px;
}

.catalog-tabs__panel {
    display: none;
    animation: fadeIn 0.35s ease;
}

.catalog-tabs__panel--active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Сетка плиток */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Ссылка-обёртка для плитки */
.catalog-grid__link {
    text-decoration: none;
    display: block;
    color: inherit;
    transition: transform 0.25s ease;
}

.catalog-grid__link:hover .catalog-grid__image img {
    transform: scale(1.03);
}

.catalog-grid__item {
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.catalog-grid__image {
    width: 100%;
    max-height: 280px;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #F7F7F5;
    flex-shrink: 0;
    border-radius: 10px;
}

.catalog-grid__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.catalog-grid__title {
    padding-top: 14px;
    color: var(--Dark-Gray, #404040);
    font-family: Panton;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.77px;
}

@media (max-width: 992px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .catalog-tabs__nav {
        gap: 25px;
    }
    .catalog-tabs__btn {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .catalog-tabs__btn {
        font-size: 14px;
        padding: 8px 0 10px;
    }
    .catalog-tabs__nav {
        gap: 18px;
    }
    .catalog-tabs {
        padding: 15px 10px;
    }
    .catalog-grid__title {
        font-size: 14px;
        padding: 10px 10px 12px;
    }
}

/* ============================================
   loft-catalog-tabs.css
   Все классы с префиксом loft- для уникальности
   ============================================ */

/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
.loft-catalog-tabs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 15px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== ХЕДЕР ТАБОВ ===== */
.loft-catalog-tabs__header {
    border-bottom: 2px solid #e8e8e8;
    margin-bottom: 35px;
    position: relative;
}

.loft-catalog-tabs__nav {
    display: flex;
    gap: 40px;
    position: relative;
    overflow-x: auto;
    padding-bottom: 12px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.loft-catalog-tabs__nav::-webkit-scrollbar {
    display: none;
}

.loft-catalog-tabs__btn {
    background: none;
    border: none;
    padding: 10px 0 12px;
    font-size: 18px;
    font-weight: 400;
    color: #888;
    cursor: pointer;
    transition: color 0.3s ease, font-weight 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
    font-family: inherit;
}

.loft-catalog-tabs__btn:hover {
    color: #333;
}

.loft-catalog-tabs__btn--active {
    color: #1a1a1a;
    font-weight: 600;
}

.loft-catalog-tabs__slider {
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 3px;
    background: #1a1a1a;
    transition: left 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
    border-radius: 3px;
}

/* Отключаем анимацию при инициализации */
.loft-catalog-tabs__slider--no-transition {
    transition: none !important;
}

/* ===== КОНТЕНТ ТАБОВ ===== */
.loft-catalog-tabs__content {
    padding-top: 5px;
}

.loft-catalog-tabs__panel {
    display: none;
    animation: loftFadeIn 0.35s ease;
}

.loft-catalog-tabs__panel--active {
    display: block;
}

@keyframes loftFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   loft-catalog-grid - СЕТКА КАРТОЧЕК
   ============================================ */
.loft-catalog-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 55px 15px;
    margin-bottom: 30px;

}

.loft-catalog-grid__caption {
    color: var(--Dark-Gray, #404040);
    font-family: Panton;
    font-size: 32px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 1.12px;
    margin: 0 0 34px;
}

.loft-catalog-grid__row {
    display: grid;
    gap: 20px;
}

/* Верхний ряд - 2 колонки */
.loft-catalog-grid__row--2 {
    height: 500px;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 20px;
}

/* Нижний ряд - 3 колонки */
.loft-catalog-grid__row--3 {
    min-height: 374px;
    grid-template-columns: repeat(3, 1fr);
}

/* ===== КАРТОЧКИ ===== */
.loft-catalog-grid__link {
    text-decoration: none;
    display: block;
    color: inherit;
    transition: transform 0.25s ease;
}

.loft-catalog-grid__link:hover .loft-catalog-grid__item {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.loft-catalog-grid__link:hover .loft-catalog-grid__image img {
    transform: scale(1.03);
}

.loft-catalog-grid__item {
    position: relative;
    background: #fff;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 5px 9px 20px 0 rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.25s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Карточки в верхнем ряду - больше */
.loft-catalog-grid__item--large .loft-catalog-grid__image {
    aspect-ratio: auto;
}

.loft-catalog-grid__item--large .loft-catalog-grid__title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.loft-catalog-grid__item--large .loft-catalog-grid__description {
    font-size: 18px;
    font-weight: 400;
}

/* ===== ИЗОБРАЖЕНИЕ ===== */
.loft-catalog-grid__image {
    width: 100%;
    aspect-ratio: auto;
    overflow: hidden;
    background: #f7f7f7;
    flex-shrink: 0;
    position: relative;
}

.loft-catalog-grid__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* ===== КОНТЕНТ КАРТОЧКИ ===== */
.loft-catalog-grid__content {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    padding: 16px 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* ===== ТЕКСТ ===== */
.loft-catalog-grid__title {
    color: #404040;
    font-family: Panton;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.36px;
    margin: 0 0 8px 0;
}

.loft-catalog-grid__description {
    color: #404040;
    font-family: Panton;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 8px;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

/* Планшеты */
@media (max-width: 992px) {
    .loft-catalog-tabs__nav {
        gap: 30px;
    }
    .loft-catalog-grid {
        margin-bottom: 0;
        padding: 30px 15px;
    }
}

/* Планшеты вертикальные */
@media (max-width: 768px) {
    .loft-catalog-grid {
        gap: 15px;
    }

    .loft-catalog-grid__row {
        gap: 15px;
    }

    .loft-catalog-grid__row--2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .loft-catalog-grid__row--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .loft-catalog-tabs__nav {
        gap: 20px;
    }

    .loft-catalog-tabs__btn {
        font-size: 16px;
    }

    .loft-catalog-grid__item--large .loft-catalog-grid__title {
        font-size: 18px;
    }

    .loft-catalog-grid__item--large .loft-catalog-grid__description {
        font-size: 14px;
    }

    .loft-catalog-grid__title {
        font-size: 16px;
    }
}

/* Телефоны */
@media (max-width: 480px) {
    .loft-catalog-tabs {
        padding: 15px 10px;
    }

    .loft-catalog-grid {
        gap: 15px;
    }

    .loft-catalog-grid__row {
        gap: 15px;
    }

    .loft-catalog-grid__row--2 {
        grid-template-columns: 1fr;
    }

    .loft-catalog-grid__row--3 {
        grid-template-columns: 1fr;
    }

    .loft-catalog-tabs__nav {
        gap: 18px;
    }

    .loft-catalog-tabs__btn {
        font-size: 14px;
        padding: 8px 0 10px;
    }

    .loft-catalog-grid__item--large .loft-catalog-grid__image {
        aspect-ratio: 16 / 9;
    }

    .loft-catalog-grid__item--large .loft-catalog-grid__title {
        font-size: 18px;
    }

    .loft-catalog-grid__item--large .loft-catalog-grid__description {
        font-size: 14px;
    }

    .loft-catalog-grid__content {
        padding: 12px 16px 16px;
    }

    .loft-catalog-grid__title {
        font-size: 16px;
    }

    .loft-catalog-grid__description {
        font-size: 13px;
    }

    .loft-catalog-grid__badge {
        font-size: 11px;
        padding: 3px 10px;
    }
}

/* Очень маленькие телефоны */
@media (max-width: 360px) {
    .loft-catalog-grid {
        gap: 12px;
    }

    .loft-catalog-grid__row {
        gap: 12px;
    }

    .loft-catalog-grid__content {
        padding: 10px 12px 12px;
    }

    .loft-catalog-grid__title {
        font-size: 14px;
    }

    .loft-catalog-grid__description {
        font-size: 12px;
    }
}