/* ============================================================
   СМОТРИТЕ ТАКЖЕ — Swiper
   ============================================================ */

/* Обёртка блока — сетка сайта */
.catalog-related-wrapper {
    display: block;
    width: 100%;
    margin: 0px auto 60px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Слайдер */
.related-swiper {
    position: relative;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Обёртка слайдов */
.related-swiper .swiper-wrapper {
    display: flex;
    height: 100%;
    box-sizing: content-box;
}

/* Слайд — ширину ставит Swiper inline, мы только не мешаем */
.related-swiper .swiper-slide {
    flex-shrink: 0;
    height: auto;
    box-sizing: border-box;
    display: flex;
}

/* Карточка */
.related-swiper .bx_catalog_item {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    padding: 0;
    position: static;
    float: none;
}

.related-swiper .bx_catalog_item_container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    position: static;
}

/* Картинка */
.related-swiper .bx_catalog_item_images {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    border-radius: 0;
    position: static;
}

.related-swiper .bx_catalog_item_images img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Название */
.related-swiper .bx_catalog_item_title {
    margin-top: 12px;
    padding: 0;
    overflow: hidden;
    max-height: 4.5em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    font-size: 15px;
}

.related-swiper .bx_catalog_item_title a {
    color: #000;
    text-decoration: none;
}

.related-swiper .bx_catalog_item_title a:hover {
    color: #083966;
}

/* Цена */
.related-swiper .bx_catalog_item_price {
    margin-top: 8px;
    font-size: 17px;
    font-weight: 700;
    color: #000;
}

/* Кнопка */
.related-swiper .slider-btn-box {
    margin-top: auto;
    padding-top: 12px;
}

.related-swiper .slider-btn-box .search-form__btn {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #D9D9D9;
    color: #083966;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}

.related-swiper .slider-btn-box .search-form__btn:hover {
    background: #083966;
    color: #fff;
    border-color: #083966;
}

.related-swiper .slider-btn-box .search-form__triangle {
    display: none;
}

/* Стрелки — квадратные */
.related-swiper .swiper-button-prev,
.related-swiper .swiper-button-next {
    color: #083966 !important;
    background: #fff;
    width: 40px !important;
    height: 40px !important;
    border-radius: 0 !important;
    border: 1px solid #D9D9D9;
    top: 40%;
    margin-top: -20px;
    transition: background .15s, color .15s, border-color .15s;
    box-sizing: border-box;
    z-index: 10;
}

.related-swiper .swiper-button-prev::after,
.related-swiper .swiper-button-next::after {
    font-size: 16px !important;
    font-weight: 700;
}

.related-swiper .swiper-button-prev:hover,
.related-swiper .swiper-button-next:hover {
    background: #083966;
    color: #fff !important;
    border-color: #083966;
}

/* При loop:true этот класс не ставится, но на всякий случай */
.related-swiper .swiper-button-disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Точки пагинации */
.related-swiper .swiper-pagination {
    position: static;
    margin-top: 20px;
    text-align: center;
}

.related-swiper .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    background: #D9D9D9;
    opacity: 1;
    margin: 0 4px !important;
    border-radius: 50%;
    transition: background .2s, width .2s;
}

.related-swiper .swiper-pagination-bullet-active {
    background: #083966;
    width: 20px;
    border-radius: 4px;
}

/* ============================================================
   АДАПТИВ — только для обёртки и стрелок.
   Ширину слайдов регулирует Swiper через breakpoints (JS).
   ============================================================ */

@media (max-width: 576px) {
    .catalog-related-wrapper {
        margin: 0px auto 35px;
    }

    .related-swiper .swiper-button-prev,
    .related-swiper .swiper-button-next {
        display: none;
    }
}
