/*
* стили для страниц: Каталог /catalog/ и Категория каталога /catalog/ярлык-каталога/
*/

.main-content {
    color: var(--color-text);
}

.block {
    padding-right: 96px !important;
    padding-left: 96px !important;
}

.cover {
    height: 30vw;
    margin-top: 60px;
    padding: 30px;
    background-size: cover;
}

.title {
    font-family: var(--title-family);
    text-transform: uppercase;
    font-size: clamp(20px, 8vw, 50px);
    line-height: clamp(22px, 8vw, 52px);
    font-weight: 400;
}

.cover__text {
    font-size: 20px;
    line-height: 22px;
    font-weight: 400;
}

.btn:not([type="submit"]) {
    padding: 10px;
    font-size: 18px;
    line-height: 20px;
    font-weight: 500;
}

.btn:hover {
    transform: scale(1.05);
}

.catalog {
    margin: 60px 0;
}

.catalog__filter {
    width: 296px;
    flex-shrink: 0;
}

.form-select {
    padding: 20px;
    background-color: #252525;
    border: none;
    border-radius: 0;
    font-size: 18px;
    color: #FFFFFF;
}

.form-select:focus {
    border: none;
    box-shadow: none;
}

/*на парметре Мощность появлялись страндартные стрелки вверх-вниз, их убираем*/
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.no-arrow {
    --bs-form-select-bg-img: none !important;
    background-image: none !important;
}

.catalog__filter .btn {
    width: 100%;
    padding: 20px;
    font-size: 18px;
}

.catalog__content {
    flex: 1;
    min-width: 0;
}

.catalog__list:not(.catalog__content) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.catalog__list.catalog__content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 20px;
}

.catalog__item {
    padding: 20px;
    background-color: #252525;
}

.catalog__categories .catalog__item:hover {
    transform: scale(1.05);
}

.catalog__item-title {
    font-size: 18px;
    line-height: 20px;
    min-height: 40px; /* lh*2 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /*для обрезки заголовка больше, чем на 2 строках*/
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog__item-text {
    font-size: 12px;
    line-height: 14px;
    min-height: 14px; /* lh*1 */
}

.catalog__item .bi-arrow-right-short::before {
    font-size: 30px;
}

/* контейнер для слайдера */
.catalog__item-img {
    display: flex;
    flex-direction: column; /* колонки: контент сверху, точки снизу */
    justify-content: center; /* вертикальное центрирование контента */
    align-items: center;
    min-width: 0;
    height: 264px;
    background-color: #252525;
}


/*.catalog__content .catalog__item-img {
    height: 315px;
}*/

/* сам Swiper */
.product-slider {
    flex: 1 1 auto; /* занимает всё доступное пространство */
    display: flex;
    align-items: center; /* вертикальное центрирование слайдов внутри этого блока */
    justify-content: center; /* горизонтальное центрирование */
    width: 100%;
    max-height: 100%;
    overflow: hidden;
    background-color: #353535;
}

.swiper-slide {
    display: flex;
    justify-content: center;
}

/* картинки */
.catalog__item img,
.product-slider img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto; 
}

/* точки и стрелки остаются снизу */
.swiper-pagination {
    flex-shrink: 0; /* чтобы не сжимались и не влияли на центрирование картинки */
}

.swiper-pagination-bullet-active {
    color: #0F9907;
    background-color: #0F9907;
}

/*стрелки слайдера*/
.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 30px;
    font-weight: 600;
}

.swiper-button-next, .swiper-button-prev {
    color: rgb(var(--color-accent-rgb));
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    transform: scale(1.05);
}


@media (max-width: 1600px) {
    .cover {
        flex-direction: column;
        gap: 20px !important;
    }

    .cover .title,
    .cover .cover__text {
        width: 100% !important;
    }

    .form img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 1300px) {
    .main-content {
        padding: 0 20px;
    }

    .block {
        padding: 0 !important;
    }

    section {
        margin-top: 30px !important;
    }

    .cover__text {
        width: auto !important;
        flex-grow: 1;
        top: 20px !important;
    }
}

@media (max-width: 991px) {
    .cover {
        height: auto;
        padding: 20px !important;
        flex-direction: column;
        background-size: cover;
        gap: 50px;
    }

    .cover .title {
        width: 100% !important;
    }

    .cover__text {
        top: 0 !important;
        font-size: 18px;
        line-height: 20px;
    }

    .catalog {
        flex-direction: column;
    }

    .catalog__filter {
        display: none !important;
    }

    .form img {
        width: 100%;
        height: 200px;
        margin-bottom: 20px;
    }
    
    .form {
        flex-direction: column;
    }
}

@media (max-width: 767px) {
    .btn {
        justify-content: space-between !important;
        padding: 10px 30px;
        font-size: 14px !important;
        line-height: 16px !important;
    }

    .form .btn {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .cover__text {
        font-size: 14px;
        line-height: 16px;
    }

    .catalog__list {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}