.tour-search {
    padding: 24px;
}

.tour-search__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tour-search__field {
    display: flex;
    flex-direction: column;
}

.tour-search__field label {
    margin-bottom: 6px;
    font-weight: 500;
}

.tour-search__field input,
.tour-search__field select {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
}

.tour-search__submit {
    margin-top: 20px;
    min-height: 46px;
    padding: 10px 24px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    background: #0d6efd;
}

.tour-search__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tour-search__status {
    margin-top: 16px;
}

.tour-search__error {
    margin-top: 16px;
    color: #b02a37;
}

.tour-search__results {
    margin-top: 24px;
}

.tour-search__hotel {
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
}

.tour-search__hotel-header {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
}

.tour-search__hotel-image {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 6px;
}

.tour-search__hotel-name {
    margin: 0 0 8px;
    font-size: 20px;
}

.tour-search__hotel-meta {
    margin-bottom: 8px;
    font-size: 14px;
}

.tour-search__hotel-description {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.tour-search__tour {
    padding: 14px 0;
    border-top: 1px solid #eee;
}

.tour-search__tour:first-child {
    margin-top: 16px;
}

.tour-search__tour-price {
    font-size: 20px;
    font-weight: 700;
}

.tour-search__tour-meta {
    margin-top: 4px;
    font-size: 14px;
}

.tour-search__tour-operator {
    margin-top: 4px;
    font-size: 13px;
    color: #666;
}

@media (max-width: 767px) {

    .tour-search {
        padding: 16px;
    }

    .tour-search__grid {
        grid-template-columns: 1fr;
    }

    .tour-search__hotel-header {
        grid-template-columns: 1fr;
    }

    .tour-search__hotel-image {
        height: 200px;
    }
}

.tour-search__results {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
}

.tour-search__hotel {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    transition: box-shadow 0.2s ease;
}

.tour-search__hotel:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
}

.tour-search__hotel-header {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.tour-search__hotel-image {
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.tour-search__hotel-name {
    margin: 0 0 6px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.tour-search__hotel-meta {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 8px;
}

.tour-search__hotel-description {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.45;
}

.tour-search__tour {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 8px 20px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid #f1f5f9;
}

.tour-search__tour:first-of-type {
    border-top: 1px solid #f1f5f9;
}

.tour-search__tour-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ff7a00;
    white-space: nowrap;
}

.tour-search__tour-meta {
    font-size: 0.9rem;
    color: #475569;
}

.tour-search__tour-operator {
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: right;
}

/* Мобильная версия */
@media (max-width: 700px) {
    .tour-search__hotel {
        padding: 16px;
    }

    .tour-search__hotel-header {
        flex-direction: column;
        gap: 14px;
    }

    .tour-search__hotel-image {
        width: 100%;
        height: 180px;
    }

    .tour-search__tour {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 12px 0;
    }

    .tour-search__tour-operator {
        text-align: left;
    }

    .tour-search__tour-price {
        font-size: 1.25rem;
    }
}

.tour-search__tour {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 20px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid #f1f5f9;
}

.tour-search__tour-price {
    grid-column: 1;
    grid-row: 1 / 3;
}

.tour-search__tour-meta:nth-of-type(1) {
    grid-column: 2;
    grid-row: 1;
}

.tour-search__tour-meta:nth-of-type(2) {
    grid-column: 2;
    grid-row: 2;
}

.tour-search__tour-operator {
    grid-column: 3;
    grid-row: 1 / 3;
    text-align: right;
}

.tour-search__form {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    max-width: 900px;
    margin: 0 auto;
}

.tour-search__grid,
.tour-search__children {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    margin-bottom: 20px;
}

.tour-search__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tour-search__field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.tour-search__field select,
.tour-search__field input {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tour-search__field select:focus,
.tour-search__field input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.tour-search__submit {
    margin-top: 4px;
    padding: 12px 32px;
    border-radius: 10px;
    font-weight: 600;
}

@media (max-width: 700px) {
    .tour-search__form {
        padding: 20px;
    }

    .tour-search__grid,
    .tour-search__children {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.tour-select {
    position: relative;
}

.tour-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    /* отступ под стрелку, чтобы не прижималась к краю */
}

.tour-select::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.tour-select:focus-within::after {
    transform: translateY(-35%) rotate(-135deg);
}

/* =========================================================
   Дополнительные туры
   ========================================================= */

/*
 * Дополнительные варианты скрыты,
 * но сама структура .tour-search__tour
 * не переопределяется.
 */

.tour-search__tour--extra {
    display: none;
}

.tour-search__hotel--expanded .tour-search__tour--extra {
    display: grid;
}


/* =========================================================
   Кнопка "Показать ещё"
   ========================================================= */

.tour-search__show-more {
    display: block;

    width: auto;

    margin: 10px auto 4px;
    padding: 7px 16px;

    border: 1px solid #0d6efd;
    border-radius: 4px;

    background: #0d6efd;
    color: #ffffff;

    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;

    text-align: center;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}


.tour-search__show-more:hover {
    background: #2855c0;
    border-color: #2855c0;
}


.tour-search__show-more:focus {
    outline: 2px solid rgba(47, 115, 217, 0.25);
    outline-offset: 2px;
}


.tour-search__show-more:active {
    background: #1f58a8;
    border-color: #1f58a8;
}

@media (max-width: 767px) {
    .tour-search__tour-meta {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .tour-search__tour {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 4px;
        align-items: start;
    }

    .tour-search__tour-price,
    .tour-search__tour-meta,
    .tour-search__tour-operator {
        grid-column: 1;
        grid-row: auto;
    }

    .tour-search__tour-operator {
        text-align: left;
    }
}

/* =========================================================
   Каталог отелей — карточки
   ========================================================= */

#widget_wrapper_161 .content_list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

#widget_wrapper_161 .hotels_list_item {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#widget_wrapper_161 .hotels_list_item:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, .15);
}

#widget_wrapper_161 .hotels_list_item:hover .f_photo img {
    transform: scale(1.08);
}

#widget_wrapper_161 .icms-content-fields {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Фото */

#widget_wrapper_161 .f_photo {
    margin: 0;
    overflow: hidden;
}

#widget_wrapper_161 .f_photo img {
    transition: .45s;
}

#widget_wrapper_161 .f_photo .value {
    padding: 0;
}

#widget_wrapper_161 .f_photo img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* Если фото нет */

#widget_wrapper_161 .f_photo:empty {
    display: none;
}

/* Заголовок */

#widget_wrapper_161 .f_title {
    padding: 18px 20px 0;
}

#widget_wrapper_161 .f_title .title_top {
    display: none;
}

#widget_wrapper_161 .f_title h3 {
    margin: 0 !important;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
}

#widget_wrapper_161 .f_title h3 a {
    color: #1e293b;
    text-decoration: none;
    transition: .3s;
}

#widget_wrapper_161 .f_title h3 a:hover {
    color: #0d6efd;
}

/* Местоположение */

#widget_wrapper_161 .f_country,
#widget_wrapper_161 .f_resort,
#widget_wrapper_161 .f_district {
    display: inline;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

#widget_wrapper_161 .f_country {
    margin-left: 20px;
}

#widget_wrapper_161 .f_country::after,
#widget_wrapper_161 .f_resort::after {
    content: " · ";
}

/* Категория */

#widget_wrapper_161 .f_hotel_category {
    display: inline;
    margin-left: 20px;
}

#widget_wrapper_161 .f_hotel_category .value {
    display: inline;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

#widget_wrapper_161 .f_hotel_category .value::after {
    content: "★";
    margin-left: 2px;
}

/* Рейтинг */

#widget_wrapper_161 .f_hotel_rating {
    display: inline;
}

#widget_wrapper_161 .f_hotel_rating .value {
    display: inline;
    color: #64748b;
    font-size: 14px;
}

#widget_wrapper_161 .f_hotel_rating .value::before {
    content: " · рейтинг ";
}

/* Описание */

#widget_wrapper_161 .f_content {
    padding: 14px 20px 20px;
}

#widget_wrapper_161 .f_content .value {
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

/* Кнопка */

#widget_wrapper_161 .read-more.btn.btn-outline-info.btn-sm {
    margin-top: 16px;
    padding: 12px 26px;
    border-radius: 50px;
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    font-weight: 600;
    transition: .3s;
}

#widget_wrapper_161 .read-more.btn.btn-outline-info.btn-sm:hover,
#widget_wrapper_161 .read-more.btn.btn-outline-info.btn-sm:focus {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
    color: #fff;
    transform: translateY(-2px);
}

/* Планшет */

@media (max-width: 991px) {

    #widget_wrapper_161 .content_list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Мобильные */

@media (max-width: 700px) {

    #widget_wrapper_161 .content_list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #widget_wrapper_161 .f_photo img {
        height: 200px;
    }

    #widget_wrapper_161 .f_title {
        padding: 16px 16px 0;
    }

    #widget_wrapper_161 .f_content {
        padding: 14px 16px 16px;
    }

    #widget_wrapper_161 .f_country {
        margin-left: 16px;
    }

    #widget_wrapper_161 .f_hotel_category {
        margin-left: 16px;
    }
}

/* =========================================================
   Точечные исправления карточки отеля
   ========================================================= */

/* География — в одну строку */
#widget_wrapper_161 .f_country,
#widget_wrapper_161 .f_resort,
#widget_wrapper_161 .f_district {
    display: inline;
}

#widget_wrapper_161 .f_country .value,
#widget_wrapper_161 .f_resort .value,
#widget_wrapper_161 .f_district .value {
    display: inline;
}

/* Убираем лишние отступы между географией */
#widget_wrapper_161 .f_country {
    margin-left: 20px;
}

#widget_wrapper_161 .f_resort,
#widget_wrapper_161 .f_district {
    margin-left: 0;
}

/* Категория — показываем 4 звезды */
#widget_wrapper_161 .f_hotel_category .value {
    font-size: 0;
}

#widget_wrapper_161 .f_hotel_category .value::after {
    content: "★★★★";
    font-size: 14px;
    letter-spacing: 1px;
    color: #f5b942;
    margin-left: 0;
}

/* Рейтинг */
#widget_wrapper_161 .f_hotel_rating .value {
    display: inline;
}

/* =========================================================
   Отели — корректная раскладка полей карточки
   ========================================================= */

#widget_wrapper_161 .icms-content-fields {
    display: grid;
    grid-template-columns: max-content max-content max-content 1fr;
    height: 100%;
}

#widget_wrapper_161 .icms-content-fields:not(:has(.f_photo))::before {
    content: "";
    grid-column: 1 / -1;
    grid-row: 1;
    display: block;
    height: 220px;
    background: linear-gradient(135deg, rgba(13, 110, 253, .08), rgba(37, 183, 255, .08));
}

/* Фото и название — на всю ширину */
#widget_wrapper_161 .f_photo,
#widget_wrapper_161 .f_title {
    grid-column: 1 / -1;
}

/* География */
#widget_wrapper_161 .f_country,
#widget_wrapper_161 .f_resort,
#widget_wrapper_161 .f_district {
    display: block;
    margin: 0;
    padding: 0;
}

#widget_wrapper_161 .f_country {
    grid-column: 1;
    padding-left: 20px;
}

#widget_wrapper_161 .f_resort {
    grid-column: 2;
}

#widget_wrapper_161 .f_district {
    grid-column: 3;
}

/* Разделители между страна / курорт / район */
#widget_wrapper_161 .f_country .value::after,
#widget_wrapper_161 .f_resort .value::after {
    content: " · ";
    margin: 0 4px;
}

/* Категория и рейтинг */
#widget_wrapper_161 .f_hotel_category {
    grid-column: 1 / 3;
    padding-left: 20px;
    margin: 14px 0 0;
}

#widget_wrapper_161 .f_hotel_rating {
    grid-column: 3 / -1;
    margin: 14px 0 0;
}

/* Описание */
#widget_wrapper_161 .f_content {
    grid-column: 1 / -1;
    padding: 14px 20px 20px;
}

/* Категория: число из базы превращаем визуально в звёзды */
#widget_wrapper_161 .f_hotel_category .value {
    font-size: 0;
}

#widget_wrapper_161 .f_hotel_category .value::after {
    content: "★★★★";
    font-size: 14px;
    letter-spacing: 1px;
    color: #f5b942;
}

/* Рейтинг */
#widget_wrapper_161 .f_hotel_rating .value {
    display: inline;
}

#widget_wrapper_161 .f_hotel_rating .value::before {
    content: "рейтинг ";
}

/* На мобильном */
@media (max-width: 700px) {

    #widget_wrapper_161 .icms-content-fields {
        grid-template-columns: max-content max-content 1fr;
    }

    #widget_wrapper_161 .f_country {
        padding-left: 16px;
    }

    #widget_wrapper_161 .f_hotel_category {
        padding-left: 16px;
    }

    #widget_wrapper_161 .f_content {
        padding: 14px 16px 16px;
    }
}

/* =========================================================
   Исправление разделителей географии
   ========================================================= */

/* Убираем старые разделители */
#widget_wrapper_161 .f_country::after,
#widget_wrapper_161 .f_resort::after {
    content: none !important;
}

/* Страна → курорт */
#widget_wrapper_161 .f_country .value::after {
    content: " · ";
}

/* Курорт → район, только если район существует */
#widget_wrapper_161 .f_resort:has(+ .f_district) .value::after {
    content: " · ";
}

/* =========================================================
   Кнопки выбора и бронирования тура
   ========================================================= */

.tour-search__select,
.tour-search__booking {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition:
        color 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

/* Выбрать тур */

.tour-search__select {
    margin-top: 10px;
    color: #0d6efd;
    background: #fff;
    border: 1px solid #0d6efd;
}

.tour-search__select:hover,
.tour-search__select:focus {
    color: #fff;
    background: #0d6efd;
    border-color: #0d6efd;
}

.tour-search__select:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Актуальная цена */

.tour-search__tour-actual {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    color: #1e293b;
    font-size: 14px;
}

.tour-search__tour-actual strong {
    color: #ff9200;
    font-weight: 700;
}

/* Перейти к бронированию */

.tour-search__booking {
    color: #fff;
    background: #ff9200;
    border: 1px solid #ff9200;
}

.tour-search__booking:hover,
.tour-search__booking:focus {
    color: #fff;
    background: #e98300;
    border-color: #e98300;
    text-decoration: none;
}

.tour-search__select:focus,
.tour-search__booking:focus {
    outline: 2px solid rgba(13, 110, 253, 0.2);
    outline-offset: 2px;
}

/* Мобильная версия */

@media (max-width: 700px) {

    .tour-search__select,
    .tour-search__booking {
        width: 100%;
    }

    .tour-search__tour-actual {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }
}

#widget_wrapper_161 .f_hotel_category .value::after {
    content: "★";
    margin-left: 2px;
}

#widget_wrapper_161 .f_hotel_category .value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
}

#widget_wrapper_161 .f_hotel_category .value::after {
    content: "★";
    margin-left: 2px;
}

#widget_wrapper_161 .f_hotel_rating .value {
    font-size: 14px;
    color: #64748b;
    font-weight: 400;
}

#widget_wrapper_161 .f_hotel_rating .value::before {
    content: " · рейтинг ";
}

#widget_wrapper_161 .f_hotel_category .value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
}

#widget_wrapper_161 .f_hotel_category .value::after {
    content: "★";
    margin-left: 2px;
}

/* Категория и рейтинг отеля */

#widget_wrapper_161 .f_hotel_category .value {
    display: inline;
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
}

#widget_wrapper_161 .f_hotel_category .value::after {
    content: "★";
    margin-left: 2px;
}

#widget_wrapper_161 .f_hotel_rating .value {
    display: inline;
    font-size: 14px;
    color: #64748b;
    font-weight: 400;
}

#widget_wrapper_161 .f_hotel_rating .value::before {
    content: "рейтинг ";
}

#widget_wrapper_161 .f_hotel_rating {
    display: inline;
    margin: 14px 0 0;
}

#widget_wrapper_161 .f_hotel_rating .value {
    display: inline;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

#widget_wrapper_161 .f_hotel_rating .value::after {
    content: "★";
    margin-left: 4px;
    font-size: 15px;
    color: #ff9200;
}

#widget_wrapper_161 .f_hotel_rating .value::before {
    content: "";
}

/* =========================================================
   Отели — финальное отображение рейтинга
   ========================================================= */

#widget_wrapper_161 .f_hotel_rating {
    grid-column: 1 / -1;
    margin: 14px 0 0;
    padding-left: 20px;
}

#widget_wrapper_161 .f_hotel_rating .value {
    display: inline;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

#widget_wrapper_161 .f_hotel_rating .value::before {
    content: "";
}

#widget_wrapper_161 .f_hotel_rating .value::after {
    content: "★";
    margin-left: 4px;
    color: #ff9200;
    font-size: 15px;
}

@media (max-width: 700px) {

    #widget_wrapper_161 .f_hotel_rating {
        padding-left: 16px;
    }
}

