.object-title.object__selection-title {
    margin-right: 16px;
    margin-left: 16px;
}

.object__selection-option {
    display: flex;
    justify-content: flex-start;
    margin: 0 16px 16px;
    column-gap: 8px;
}

.object__selection-slider {
    position: relative;
    margin: 0;
}

.page__object .object__selection-slider::before,
.page__selection-building .object__selection-slider::before,
.page__selection-floor .object__selection-slider::before,
.page__commerce .object__selection-slider::before {
    position: absolute;
    z-index: -1;
    top: 0px;
    left: 0;
    width: 100%;
    height: 200px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(102, 102, 102, 0) 103.75%);
    content: '';
}

.page__object .object__selection-slider::after,
.page__selection-building .object__selection-slider::after,
.page__selection-floor .object__selection-slider::after,
.page__commerce .object__selection-slider::after {
    position: absolute;
    z-index: -1;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 168px;
    box-sizing: border-box;
    background: linear-gradient(360deg, rgba(0, 0, 0, 0.6) 0%, rgba(102, 102, 102, 0) 100%);
    content: '';
}

.object__selection-subtitle {
    line-height: 29px;
    padding: 24px 16px 0;
    margin: 0;
    color: var(--base-white);
    font-size: 24px;
    font-weight: 300;
}

.object__selection-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.object__selection .object__selection-slider picture {
    display: block;
    overflow: hidden;
}

.object__selection-item iframe {
    position: absolute;
    z-index: -2;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    width: 100%;
    height: 661px;
    border: none;
}

@media (max-width: 959px) {

    .page__selection-flat.page__selection .object__selection-slider,
    .page__selection-section.page__selection .object__selection-slider {
        height: 661px;
    }

    .page__selection-flat .floor__selection-image,
    .page__selection-section .floor__selection-image1 {
        width: max-content;
    }

    /* Контейнер с контентом */
    .page__selection-flat .object__selection.container,
    .page__selection-section .object__selection.container {
        position: relative;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 12px; /* Отступ для фейкового скроллбара */
        scroll-behavior: smooth;
        cursor: grab;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Скрываем системный скролл */
        -ms-overflow-style: none;
        max-width: none; /* Убираем ограничение */
        width: auto;
    }

    .page__selection-flat .section__selection,
    .page__selection-section .section__selection {
        overflow: visible;
    }

    .page__selection-flat .object__selection .object__selection-slider,
    .page__selection-section .object__selection .object__selection-slider {
        max-width: none;
        padding-bottom: 0;
        margin: 0;
        flex-grow: 1;
    }

    .page__selection-flat #mapster_wrap_0,
    .page__selection-section #mapster_wrap_0 {
        height: 100%;
        width: auto !important; /* Автоматическая ширина */
        display: flex;
        justify-content: center;
        align-items: center;
        max-width: none !important;
    }

    .page__selection-flat .object__selection .object__selection-slider .floor__selection-image picture,
    .page__selection-section .object__selection .object__selection-slider .floor__selection-image picture {
        height: 100%;
    }

    .page__selection-flat .img-content,
    .page__selection-section .img-content {
        width: auto;
        height: 100%;
    }

    .page__selection-flat .scroll-wrapper,
    .page__selection-section .scroll-wrapper {
        position: absolute;
        bottom: 12px;
        left: 16px;
        width: 100%; /* Ширина будет обновляться через JavaScript */
        z-index: 10;
        height: 12px;
        margin-top: 10px;
        right: 16px;
    }

    .page__selection-flat .custom-scrollbar-wrapper,
    .page__selection-section .custom-scrollbar-wrapper {
        position: relative;
        width: 100%;
        height: 8px;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 4px;
        bottom: 0;
        margin-right: 16px;
    }

    .page__selection-flat .custom-scrollbar-thumb,
    .page__selection-section .custom-scrollbar-thumb {
        position: absolute;
        height: 8px;
        background-color: var(--accent);
        border-radius: 4px;
        width: 20%; /* Ширина ползунка будет определяться в JS */
        transition: transform 0.3s ease;
    }

        .page__selection-flat .custom-scrollbar-thumb:active,
        .page__selection-section .custom-scrollbar-thumb:activ {
            cursor: grabbing;
        }



    .page__selection-flat.page__selection .object__selection-buttons,
    .page__selection-section.page__selection .object__selection-buttons {
        width: 90vw;
        flex-shrink: 0;
        position: sticky;
        left: 16px;
        right: 0;
        bottom: 0;
    }

    .page__selection-flat .buttons__link,
    .page__selection-section .buttons__link {
        padding: 0;
        margin: 0;
        width: 24px;
        height: 24px;
        background: none;
        border: none;
    }
}

@media (min-width: 960px) {
    .object__selection-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0 16px 32px;
    }

    .object__selection-title {
        margin: 0;
    }

    .object__selection-option {
        overflow: hidden;
        margin: 0;
        border: 1px solid var(--background-block);
        border-radius: 12px;
        background: var(--base-white);
        column-gap: 0;
    }

    .object__selection-subtitle {
        line-height: 38px;
        padding: 32px 32px 0;
        font-size: 32px;
    }

    .object__selection-button {
        justify-content: flex-end;
    }

    .page__selection-floor .object__selection-slider img {
        margin-left: 0;
    }

    .page__selection .object__selection-slider {
        height: 661px;
    }
}

@media (min-width: 1440px) {

    .page__selection .object__selection-slider {
        height: 856px;
    }

    .object__selection-wrapper {
        max-width: 1240px;
        margin: 0 auto 48px;
    }

    .page__object .object__selection-title {
        margin-bottom: 0;
        margin-left: 0;
    }

    .object__selection .object__selection-slider {
        max-width: none;
        padding-bottom: 0;
        margin: 0;
    }

    .object__selection-subtitle {
        width: 1240px;
        line-height: 56px;
        padding: 48px 0 0;
        font-size: 40px;
        left: 50%;
        transform: translateX(-50%);
        position: absolute;
    }

    .object__selection-button {
        width: 1240px;
        margin-right: auto;
        margin-left: auto;
    }
}
