/* === Блок товарных подборок на главной (задача 141169) === */

/* Секция */
.main-selections {
    padding: 60px 0;
    background-color: #FFFFFF;
}

.main-selections__inner {
    background-color: #F9F9FA;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    padding: 30px;
}

/* Фоновая картинка (снаряжение справа) */
.main-selections__bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: url('/local/templates/quarta_new/assets/images/selections_bg.png') no-repeat right top;
    background-size: cover;
    opacity: 0.8;
    z-index: 1;
    pointer-events: none;
}

.main-selections__content {
    position: relative;
    z-index: 2;
}

/* Обертка табов с серой полоской снизу */
.main-selections__tabs-wrapper {
    border-bottom: 1px solid #EEEFF3;
    margin-bottom: 16px;
    padding-bottom: 16px;
}

/* Табы (Кнопки как в корзину) */
.main-selections__tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.main-selections__tab {
    padding: 8px 16px;
    border: 1px solid #004989;
    border-radius: 4px;
    background: #FFFFFF;
    font-size: 14px;
    line-height: 20px;
    color: #004989;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.main-selections__tab:hover,
.main-selections__tab.is-active {
    background: #004989;
    color: #FFFFFF;
    border-color: #004989;
}

/* Заголовок и описание подборки (внутри products.news) */
.products-news-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.products-news-description {
    font-size: 16px;
    color: #6C7A87;
    max-width: 600px;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Панели */
.main-selections__panel {
    display: none;
}

.main-selections__panel.is-active {
    display: block;
}

.main-selections__tabs-scroll {
    display: none;
}

/* Слайдер — переиспользуем .products-news-slider из задачи 141168 */
/* Вытягиваем слайдер вправо, чтобы выглядывающий товар доходил до края рамки */
.main-selections__inner .products-news-slider {
    margin-right: -30px;
}
.main-selections__inner .products-news-slider .main-slider__arrow-next {
    right: 30px;
}
/* Все стили точек (24x6 / 10x6), стрелок, карточек уже есть в products.news/style.css */

/* Адаптив */
@media (max-width: 992px) {
    .main-selections {
        padding: 40px 0;
    }
    .main-selections__inner {
        padding: 24px;
    }
    .main-selections__inner .products-news-slider {
        margin-right: -24px;
    }
    .main-selections__inner .products-news-slider .main-slider__arrow-next {
        right: 24px;
    }
    .main-selections__bg {
        display: none;
    }
    .main-selections__tabs-wrapper {
        position: relative;
    }
    .main-selections__tabs-scroll {
        display: block;
        position: absolute;
        top: 0;
        bottom: 16px; /* Не перекрываем border-bottom и padding-bottom */
        width: 60px;
        z-index: 2;
        border: none;
        outline: none;
        cursor: pointer;
        padding: 0;
        transition: opacity 0.2s ease;
    }
    .main-selections__tabs-scroll.is-right {
        right: -5px; /* Немного сдвигаем вправо для красивого отступа от края контейнера */
        background: url("data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L1 11' stroke='%23004989' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right center no-repeat,
                    linear-gradient(to left, #F9F9FA 25%, rgba(249, 249, 250, 0) 100%);
    }
    .main-selections__tabs-scroll.is-left {
        left: -5px;
        background: url("data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 1L1 6L6 11' stroke='%23004989' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") left center no-repeat,
                    linear-gradient(to right, #F9F9FA 25%, rgba(249, 249, 250, 0) 100%);
    }
    .main-selections__tabs-scroll.is-hidden {
        opacity: 0;
        pointer-events: none;
    }
    .main-selections__tabs-scroll:active {
        opacity: 0.7;
    }
    .main-selections__tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .main-selections__tabs::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 576px) {
    .main-selections {
        padding: 24px 0;
    }

    .main-selections__inner {
        padding: 16px;
    }
    
    .main-selections__inner .products-news-slider {
        margin-right: -16px;
    }
    .main-selections__inner .products-news-slider .main-slider__arrow-next {
        right: 16px;
    }

    .main-selections__tabs-wrapper {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .main-selections__tabs {
        gap: 6px;
        padding-right: 20px; /* Чтобы последний таб не прилипал к стрелке */
    }

    .main-selections__tab {
        font-size: 13px;
        padding: 6px 14px;
    }
}
