
/* OBLAKATRAVEL — единый каталог категорий */

.ot-category-catalog {
    width: 100%;
}

/* Панель фильтрации */

.ot-category-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
}

.ot-category-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ot-category-filter label {
    font-size: 14px;
    font-weight: 600;
    color: #40536b;
}

.ot-category-filter select {
    min-width: 220px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #fff;
    color: #0f2238;
    font: inherit;
}

.ot-category-toolbar__right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

[data-tour-count] {
    color: #40536b;
    font-size: 14px;
}

/* Переключатель вида */

.ot-category-view {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
}

.ot-category-view button {
    min-height: 42px;
    padding: 8px 18px;
    border: 0;
    background: #fff;
    color: #40536b;
    font-family: "Onest", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ot-category-view button + button {
    border-left: 1px solid #dbe5f0;
}

.ot-category-view button[aria-pressed="true"] {
    background: #0f2238;
    color: #fff;
}

.ot-category-filter select:focus-visible,
.ot-category-view button:focus-visible {
    outline: 3px solid #2784d7;
    outline-offset: 3px;
}

/* Общая сетка */

.ot-category-tour-item {
    min-width: 0;
}

.ot-category-tour-item[hidden],
.ot-category-no-results[hidden] {
    display: none !important;
}

.ot-category-tour-item > .ot-tour-card {
    height: 100%;
}

.ot-category-tour-item > .ot-horizontal-card {
    display: none;
}

/* Режим списка */

.ot-category-catalog .ot-tour-card-grid.is-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.ot-category-catalog .is-list .ot-category-tour-item > .ot-tour-card {
    display: none;
}

.ot-category-catalog .is-list .ot-category-tour-item > .ot-horizontal-card {
    display: grid;
}

/* Горизонтальная карточка из концепции tc2 */

.ot-category-page .ot-horizontal-card.tc2 {
    grid-template-columns: 300px minmax(0, 1fr) 220px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dbe5f0;
    border-radius: 18px;
    background: #fff;
    color: #0f2238;
    transition: box-shadow .2s ease;
}

.ot-category-page .ot-horizontal-card.tc2:hover {
    box-shadow: 0 12px 32px rgba(15,34,56,.10);
}

.ot-horizontal-card__image {
    display: block;
    min-height: 220px;
    background: #e7edf5;
}

.ot-horizontal-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ot-horizontal-card__placeholder {
    display: grid;
    min-height: 220px;
    place-items: center;
    color: #6a7c91;
}

.ot-horizontal-card__body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
    padding: 18px 20px;
}

.ot-horizontal-card__meta {
    color: #6a7c91;
    font-size: 13.5px;
}

.ot-horizontal-card__body h3 {
    margin: 0;
    font-size: 18.5px;
    line-height: 1.3;
}

.ot-horizontal-card__body h3 a {
    color: #0f2238;
    text-decoration: none;
}

.ot-horizontal-card__route {
    margin: 0;
    color: #40536b;
    font-size: 14.5px;
}

.ot-horizontal-card__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
    color: #40536b;
    font-size: 14px;
}

.ot-horizontal-card__dates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
    color: #6a7c91;
    font-size: 13px;
}

.ot-horizontal-card__date {
    padding: 3px 8px;
    border-radius: 7px;
    background: #eaf5fb;
    color: #0f2238;
}

/* Блок цены */

.ot-horizontal-card__price {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px;
    border-left: 1px dashed #dbe5f0;
}

.ot-horizontal-card__price strong {
    font-size: 21px;
    line-height: 1.3;
}

.ot-horizontal-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 18px;
    border-radius: 10px;
    background: #168da7;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.ot-horizontal-card__button:hover {
    background: #11758d;
    color: #fff;
}

.ot-horizontal-card__button:focus-visible {
    outline: 3px solid #2784d7;
    outline-offset: 3px;
}

/* Пустой результат */

.ot-category-no-results {
    padding: 35px;
    text-align: center;
    color: #40536b;
}

/* Адаптивность */

@media (max-width: 1050px) {
    .ot-category-page .ot-horizontal-card.tc2 {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .ot-horizontal-card__price {
        grid-column: 2;
        border-left: 0;
        border-top: 1px dashed #dbe5f0;
    }
}

@media (max-width: 650px) {
    .ot-category-toolbar {
        align-items: stretch;
    }

    .ot-category-filter,
    .ot-category-filter select {
        width: 100%;
    }

    .ot-category-page .ot-horizontal-card.tc2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .ot-horizontal-card__image {
        min-height: 0;
        height: 210px;
    }

    .ot-horizontal-card__price {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ot-horizontal-card.tc2 {
        transition: none;
    }
}


/* OBLAKATRAVEL — доработка режима списка */

.ot-category-results-title {
    margin: 0 0 22px;
    color: #0f2238;
    font-size: clamp(21px, 2vw, 27px);
    font-weight: 700;
    line-height: 1.3;
}

.ot-category-catalog .ot-tour-card-grid.is-list {
    gap: 16px;
}

.ot-category-catalog .is-list .ot-horizontal-card.tc2 {
    grid-template-columns: 300px minmax(0, 1fr) 220px;
}

.ot-category-catalog .is-list .ot-horizontal-card__image {
    min-height: 210px;
    height: auto;
}

.ot-category-catalog .is-list .ot-horizontal-card__body {
    padding: 18px 20px;
}

.ot-category-catalog .is-list .ot-horizontal-card__price {
    grid-column: auto;
    border-top: 0;
    border-left: 1px dashed #dbe5f0;
    align-items: flex-start;
}

/* Адаптация как в исходном макете Японии */

@media (max-width: 860px) {
    .ot-category-catalog .is-list .ot-horizontal-card.tc2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .ot-category-catalog .is-list .ot-horizontal-card__image {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .ot-category-catalog .is-list .ot-horizontal-card__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .ot-category-catalog .is-list .ot-horizontal-card__price {
        grid-column: auto;
        border-left: 0;
        border-top: 1px dashed #dbe5f0;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
}


/* OBLAKATRAVEL — исправление переключения карточек */

/* Плитка: горизонтальные карточки скрыты */
.ot-category-catalog .ot-tour-card-grid:not(.is-list)
.ot-category-tour-item > .ot-horizontal-card {
    display: none !important;
}

/* Список: вертикальные карточки скрыты */
.ot-category-catalog .ot-tour-card-grid.is-list
.ot-category-tour-item > .ot-tour-card {
    display: none !important;
}

/* Одна горизонтальная карточка на всю ширину */
.ot-category-catalog .ot-tour-card-grid.is-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
}

.ot-category-catalog .ot-tour-card-grid.is-list
.ot-category-tour-item {
    width: 100%;
    min-width: 0;
}

/* Горизонтальная карточка */
.ot-category-catalog .ot-tour-card-grid.is-list
.ot-category-tour-item > .ot-horizontal-card.tc2 {
    display: grid !important;
    width: 100%;
    grid-template-columns: 300px minmax(0, 1fr) 220px;
    align-items: stretch;
}

/* Фотография занимает всю высоту левого блока */
.ot-category-catalog .ot-tour-card-grid.is-list
.ot-horizontal-card__image {
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.ot-category-catalog .ot-tour-card-grid.is-list
.ot-horizontal-card__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Адаптивность */
@media (max-width: 860px) {
    .ot-category-catalog .ot-tour-card-grid.is-list
    .ot-category-tour-item > .ot-horizontal-card.tc2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .ot-category-catalog .ot-tour-card-grid.is-list
    .ot-horizontal-card__image {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .ot-category-catalog .ot-tour-card-grid.is-list
    .ot-horizontal-card__price {
        border-left: 0;
        border-top: 1px dashed #dbe5f0;
    }
}
