/* Базовые стили карусели - ширина 100% от родителя */
.base-carousel {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    --slides-to-show: 3;      /* сколько слайдов показывать */
    --carousel-gap: 20px;     /* расстояние между слайдами */
}

.base-carousel__container {
    overflow: hidden;
    width: 100%;
}

.base-carousel__track {
    display: flex;
    gap: var(--carousel-gap);
    transition: transform 0.3s linear;
    align-items: stretch;
}

.base-carousel__track:active {
    cursor: grabbing;
}

.base-carousel__slide {
    flex: 0 0 calc(
        (100% - (var(--slides-to-show) - 1) * var(--carousel-gap)) / var(--slides-to-show)
    );
    min-width: 0;
    display: flex;
}

/* ===== Карточка ===== */
.base-card {
    background: #fff;
    border: 4px solid #f0f0f0;
    overflow: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.base-card__image {
    width: 100%;
    height: 220px;
    background: #f5f5f5;
    flex-shrink: 0;
}

.base-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ===== Блок с названием и свойством (до 3 строк) ===== */
.base-card__title-row {
    min-height: calc(18px * 1.3 * 3);
    align-items: flex-start;
    margin-bottom: 8px;
}

/* Название — слева, до 3 строк */
.base-card__title-row .room-name {
    font-family: Playfair, serif;
    font-size: 22px;
    font-weight: normal;
    line-height: 1.3;
    color: #464646;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

/* Свойство — справа, мелким шрифтом */
/* Колонка — прижимаем содержимое вправо */
.base-card__title-row .room-razm {
    text-align: right;
}

/* Плашка: иконка + текст */
.room-razm__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    /* Размеры */
    min-width: 106px;
    height: 24px;
    padding: 0 8px;
    border-radius: 8px;

    /* Визуал */
    background: #f0f0f0;
    color: #464646;

    /* Текст */
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 1;

    /* Чтобы padding не раздувал ширину */
    box-sizing: border-box;
    white-space: nowrap;
}

/* Иконка */
.room-razm__icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    display: block;
}

/* Текст */
.room-razm__text {
    display: inline-block;
}

/* ===== Цена слева, растягивается ===== */
.base-card__content {
    padding: 0 12px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex: 1;
}

.base_card__price {
    font-family: Open Sans, serif;
    font-size: 20px;
    color: #464646;
}

/* ===== Кнопка по центру на всю ширину ===== */
.base-card__footer {
    padding: 8px 12px 12px;
    margin-top: auto;
    display: flex;
    justify-content: center;
}

.room-detail__book-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    background: #A69DCC;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    border-radius: 6px;
    transition: background 0.2s;
}

.room-detail__book-btn:hover {
    background: #8f85b8;
    color: #fff;
    text-decoration: none;
}

/* Старый класс (оставлен для совместимости, если где-то используется) */
.base-card__button {
    display: inline-block;
    padding: 6px 12px;
    background: #A69DCC;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    border-radius: 4px;
}

/* ===== Стрелки поверх картинок ===== */
.base-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    z-index: 10;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.base-carousel__arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.base-carousel__arrow--prev {
    left: 10px;
}

.base-carousel__arrow--next {
    right: 10px;
}


/* Dots навигация */
.base-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.base-carousel__dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
}

.base-carousel__dot.active {
    background: #A69DCC;
}

/* Пустое состояние */
.base-carousel__empty {
    padding: 40px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
}

/* ===== АДАПТИВНОСТЬ ===== */
/* Меняем только одну переменную — всё остальное пересчитывается само */

@media (max-width: 992px) {
    .base-carousel {
        --slides-to-show: 3;
    }
}

@media (max-width: 768px) {
    .base-carousel {
        --slides-to-show: 2;
        padding: 15px 0;
    }
    .base-carousel__arrow {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    .base-carousel__arrow--prev {
        left: 5px;
    }
    .base-carousel__arrow--next {
        right: 5px;
    }
}

@media (max-width: 576px) {
    .base-carousel {
        --slides-to-show: 1;
    }
    .base-carousel::before,
    .base-carousel::after {
        display: none;
    }
    .base-carousel__arrow {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* Touch-устройства */
.base-carousel {
    touch-action: pan-y pinch-zoom;
}

.base-carousel__track img,
.base-carousel__track a {
    user-select: none;
    -webkit-user-drag: none;
}