/* Публичный раздел «Travel». Самодостаточно. Токены из common.css. */
/* ⚠ Отступ сверху задаёт ОБЩЕЕ правило (css/common.css: body.site-light .page):
   у раздела своего быть не должно, иначе страницы расходятся по вертикали. */
.tvp { padding-bottom: 60px; }
.tvp .container { max-width: var(--container); margin: 0 auto; padding: 0 var(--page-pad, 24px); width: 100%; }
.food-adminbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: rgba(17,24,39,.04); border-radius: 12px; padding: 10px 14px; margin-bottom: 22px; font-size: 13px; color: var(--muted); }

/* ── лента категорий (sticky), на десктопе в контейнере, на мобильном full-bleed ── */
.tvp-hours { display: flex; width: 100%; box-sizing: border-box; align-items: center; justify-content: center; gap: 8px; background: rgba(178,122,49,.07); border: 1px solid rgba(178,122,49,.15); border-radius: 12px; padding: 10px 16px; font-size: 14px; color: var(--text); margin-top: 16px; margin-bottom: 22px; }
/* ⚠ Отступ СВЕРХУ нужен только в приложении: у шапки раздела там нет своего
   нижнего поля, и плашка часов вставала вплотную к тексту (замерено: было 0).
   На сайте зазор уже даёт соседний блок (26px) - там поле снимается ниже. */
.tvp-hours i { color: var(--st-gold, #B27A31); }
.tvp-hours b { font-weight: 700; }
.tvp-hours.is-closed { background: rgba(185,28,28,.07); border-color: rgba(185,28,28,.2); }
.tvp-hours.is-closed i { color: #b91c1c; }
.tvp-hours__closed { color: #b91c1c; font-weight: 700; }

/* тур под замком (вне рабочих часов) */
.tvp-tour.is-locked .tvp-tour__media { filter: grayscale(.5) brightness(.9); }
.tvp-tour__lock { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 28px; background: rgba(0,0,0,.35); }

.tvp-cats { position: sticky; top: var(--header-height); z-index: 5; display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: none; padding: 10px 0; background: var(--bg); scrollbar-width: none; }
.tvp-cats::-webkit-scrollbar { display: none; }
.tvp-cat { white-space: nowrap; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-light); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; flex: 0 0 auto; }
.tvp-cat.is-active { background: var(--black); color: #fff; border-color: var(--black); }

.tvp-block { padding-top: 8px; margin-bottom: 12px; }
.tvp-block__title { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 8px 0 14px; }

/* ── карточки туров ── */
.tvp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px 14px; }
.tvp-tour { cursor: pointer; display: block; text-decoration: none; color: var(--text); }
.tvp-tour * { text-decoration: none; }
.tvp-tour__media { position: relative; aspect-ratio: 1/1; border-radius: 16px; background: #eef0f3 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #c2c8d0; font-size: 34px; overflow: hidden; }
.tvp-tour__count { position: absolute; right: 8px; top: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.tvp-tour__dur { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.62); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.tvp-tour__body { padding: 10px 2px 0; }
.tvp-tour__name { font-weight: 700; font-size: 15px; }
.tvp-tour__desc { color: var(--muted); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tvp-tour__price { margin-top: 6px; font-size: 14px; }
.tvp-tour__price span { color: var(--muted); font-size: 12px; }
.tvp-tour__more { display: none; }   /* кнопка «Подробнее» только в новом виде гостя, css/guest-v2.css */

.tvp-empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.tvp-empty__ico { font-size: 46px; color: #c2c8d0; margin-bottom: 14px; }
.tvp-empty p { font-size: 16px; margin-bottom: 18px; }

/* ── детальная карточка тура (галерея слева, инфо справа) ── */
body.tvp-noscroll { overflow: hidden; }
.tvp-modal { position: fixed; inset: 0; display: none; z-index: 1110; }
.tvp-modal.is-open { display: flex; align-items: center; justify-content: center; padding: 20px; }
.tvp-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.tvp-modal__dialog { position: relative; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); width: min(940px, 100%); max-height: 90vh; overflow: hidden; }
.tvp-modal__x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(0,0,0,.5); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.tvp-modal__grid { display: grid; grid-template-columns: 1.1fr 1fr; max-height: 90vh; }
/* колонки ограничиваем по высоте окна, чтобы длинный текст справа скроллился,
   а фото слева не растягивалось под него и не резалось */
.tvp-modal__gallery, .tvp-modal__info { min-height: 0; max-height: 90vh; }
.tvp-modal__gallery { background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.tvp-gal__main { flex: 1 1 auto; min-height: 320px; border-radius: 12px; background: #eef0f3 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #c2c8d0; font-size: 44px; }
.tvp-gal__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0px; flex: 0 0 auto; }
.tvp-gal__thumb { aspect-ratio: 1/1; border: 2px solid transparent; border-radius: 8px; background: #eef0f3 center/cover no-repeat; cursor: pointer; padding: 0; opacity: .7; transition: opacity .12s, border-color .12s; }
.tvp-gal__thumb:hover { opacity: 1; }
.tvp-gal__thumb.is-on { opacity: 1; border-color: var(--black); }
.tvp-modal__info { padding: 28px 26px 24px; overflow-y: auto; display: flex; flex-direction: column; }
.tvp-info__name { font-size: 23px; font-weight: 800; letter-spacing: -.01em; }
.tvp-info__desc { color: var(--muted); font-size: 14px; margin-top: 8px; line-height: 1.5; }
.tvp-info__specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 12px; margin-top: 18px; }
.tvp-info__spec { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tvp-info__spec-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: #eef1f6; color: #2f6bed; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.tvp-info__spec-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.tvp-info__spec-lbl { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.2; }
.tvp-info__spec-val { font-size: 13px; font-weight: 600; color: var(--muted); }
.tvp-info__spec-val.is-yes { color: #16a34a; }
.tvp-info__spec-val.is-no { color: #dc2626; }
@media (max-width: 560px) { .tvp-info__specs { grid-template-columns: repeat(2, 1fr); } }
.tvp-info__ptitle, .tvp-info__ititle { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 20px 0 8px; }
.tvp-info__prices { display: flex; gap: 10px; }
.tvp-price { flex: 1 1 0; min-width: 0; border: 1px solid var(--border-light); border-radius: 12px; padding: 8px 14px; }
.tvp-price span { display: block; color: var(--muted); font-size: 12px; }
.tvp-price b { font-size: 16px; }
.tvp-info__pernote { color: var(--muted); font-size: 12px; margin-top: 6px; }
.tvp-info__info { color: var(--text); font-size: 13.5px; line-height: 1.5; background: rgba(178,122,49,.06); border: 1px solid rgba(178,122,49,.15); border-radius: 12px; padding: 12px 14px; }

/* ── страница тура (/t/{id}) ── */
.tour { max-width: 680px; margin: 0 auto; padding: calc(var(--header-height) + 24px) 16px 0; }
.tour__main { position: relative; width: 100%; aspect-ratio: 1/1; border-radius: 16px 16px 0 0; background: #eef0f3 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #c2c8d0; font-size: 48px; overflow: hidden; }
.tour__main[data-full] { cursor: zoom-in; }
.tour__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.tour__thumb { aspect-ratio: 1/1; border: 1px solid var(--border-light); border-radius: 0; background: #eef0f3 center/cover no-repeat; cursor: pointer; padding: 0; opacity: .75; transition: opacity .12s, border-color .12s; }
.tour__thumb:hover { opacity: 1; }
.tour__thumb.is-on { opacity: 1; border-color: var(--black); }
.tvp-info__desc--first { margin-top: 16px; }
.tour__card { background: var(--surface); border: 1px solid var(--border-light); border-radius: 16px; padding: 16px; margin-top: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.tour__card .tvp-info__desc--first { margin-top: 0; }

/* бронирование: тарифы + степперы + итог */
.tour__book { background: var(--surface); border: 1px solid var(--border-light); border-radius: 16px; padding: 16px; margin-top: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.tour__book-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.tour__trow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.tour__trow:last-of-type { border-bottom: 0; }
.tour__tinfo { display: flex; flex-direction: column; min-width: 0; }
.tour__tlabel { font-weight: 700; font-size: 15px; color: var(--text); }
.tour__tprice { font-size: 13px; color: var(--muted); }
/* display перебивает атрибут hidden - без этой строки скрытый блок виден */
.tour__book-foot[hidden] { display: none; }
.tour__book-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; padding-top: 14px; }
.tour__total { display: flex; flex-direction: column; }
.tour__total span { font-size: 12px; color: var(--muted); }
.tour__total b { font-size: 18px; font-weight: 800; color: var(--text); }
.tour__bookbtn { display: inline-flex; align-items: center; gap: 8px; background: var(--qr-gold, #b07c2e); color: #fff; border: 0; border-radius: 12px; padding: 13px 22px; font-size: 15px; font-weight: 800; cursor: pointer; }
.tour__bookbtn:active { transform: scale(.98); }

/* попап подтверждения бронирования */
.tour-pop { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; padding: 24px; }
.tour-pop.is-open { display: flex; }
.tour-pop__ov { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.tour-pop__box { position: relative; background: var(--surface); border-radius: 18px; padding: 24px; width: min(340px, 100%); text-align: center; box-shadow: var(--shadow); }
.tour-pop__t { font-size: 17px; font-weight: 800; margin-bottom: 18px; }
.tour-pop__btns { display: flex; gap: 10px; }
.tour-pop__btn { flex: 1; border: 1px solid var(--border-light); background: var(--surface); color: var(--text); border-radius: 12px; padding: 12px; font-weight: 700; font-size: 14px; cursor: pointer; }
/* Главное действие фирменным золотом - как «Place order» и «Close» в оценке. */
.tour-pop__btn--ok { background: var(--qr-gold, #b07c2e); color: #fff; border-color: var(--qr-gold, #b07c2e); }

@media (max-width: 720px) {
    .tvp-modal__grid { grid-template-columns: 1fr; overflow-y: auto; }
    /* min-height: auto — чтобы галерея не ужималась ниже своего контента и
       второй ряд миниатюр не вылезал за неё, наезжая на информацию */
    .tvp-modal__gallery, .tvp-modal__info { overflow: visible; max-height: none; min-height: auto; }
    .tvp-gal__main { min-height: 260px; flex: 0 0 auto; }
}
@media (max-width: 560px) {
    /* карточки в 2 столбца, фото квадратные */
    .tvp-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
    /* лента категорий full-bleed */
    .tvp-cats { margin-left: calc(-1 * var(--page-pad, 24px)); margin-right: calc(-1 * var(--page-pad, 24px)); padding: 10px var(--page-pad, 24px); scroll-padding-left: var(--page-pad, 24px); }
    /* попап на весь экран, единый скролл */
    .tvp-modal.is-open { padding: 0; }
    .tvp-modal__dialog { width: 100%; max-width: none; border-radius: 0; height: 100vh; height: 100dvh; max-height: none; }
    .tvp-modal__grid { height: 100vh; height: 100dvh; max-height: none; align-content: start; }
    .tvp-gal__main { min-height: 300px; }
    .tvp-info__name { font-size: 21px; }
}

/* клик по главному фото тура → полноэкранный лайтбокс */
.tvp-gal__main:not(.is-empty) { cursor: zoom-in; }
.tvp-light { position: fixed; inset: 0; display: none; z-index: 1200; }
.tvp-light.is-open { display: flex; align-items: center; justify-content: center; }
.tvp-light__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.9); }
.tvp-light__img { position: relative; max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); object-fit: contain; }
.tvp-light__x { position: absolute; top: 16px; right: 20px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.tvp-light__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.tvp-light__prev { left: 20px; }
.tvp-light__next { right: 20px; }
.tvp-light__nav:hover, .tvp-light__x:hover { background: rgba(255,255,255,.25); }
.tvp-light__count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; z-index: 2; }
@media (max-width: 560px) {
    .tvp-light__nav { width: 40px; height: 40px; font-size: 24px; }
    .tvp-light__prev { left: 8px; } .tvp-light__next { right: 8px; }
}

/* сохраняем переносы строк в описаниях/инфо */
.tvp-info__desc, .tvp-info__info, .tvp-tour__desc { white-space: pre-line; }

/* ── мгновенный скелетон при переходе к туру (страница «открывается сразу») ── */
@keyframes tvpSkSh { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.tvp-skel { position: fixed; inset: 0; z-index: 1500; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tsk { position: relative; overflow: hidden; background: #e6e9ef; }
.tsk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: tvpSkSh 1.15s infinite; }
.tsk-ln { display: block; height: 12px; border-radius: 6px; }
.tsk-ln + .tsk-ln { margin-top: 6px; }
/* обложка тура: шиммер, пока подгружается фон-картинка */
.tour__main.is-imgloading::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: tvpSkSh 1.15s infinite; }

/* ── ПУБЛИЧНЫЙ САЙТ: туры в том же виде, что места и блюда (макет 25.09.2026) ──
   Белая карточка с фото сверху, ярлыки категорий - фирменные пилюли, часы - бежевая пилюля.
   В приложении гостя вид прежний: всё висит на body.site-wide. */
body.site-wide .tvp-hours { width: auto; display: inline-flex; justify-content: flex-start;
    background: var(--st-gold-soft); border: 0; border-radius: 999px; padding: 11px 18px;
    font-size: 14px; color: #6b5a3f; margin-top: 0; margin-bottom: 26px; }
body.site-wide .tvp-hours i { color: var(--st-gold); }
body.site-wide .tvp-hours b { color: var(--st-ink); }

body.site-wide .tvp-cats { background: var(--st-bg); padding: 12px 0; gap: 10px; }
body.site-wide .tvp-cat { background: var(--st-card, #fff); border: 0; color: #6b7280;
    padding: 9px 16px; box-shadow: 0 1px 3px rgba(60,50,40,.06); }
body.site-wide .tvp-cat:hover { background: var(--st-gold-soft); color: var(--st-gold); }
body.site-wide .tvp-cat.is-active { background: var(--st-gold); color: #fff; box-shadow: none; }

body.site-wide .tvp-block__title { font-size: 23px; font-weight: 800; letter-spacing: -.015em;
    color: var(--st-ink); margin: 18px 0 14px; }
body.site-wide .tvp-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
body.site-wide .tvp-tour { background: var(--st-card, #fff); border-radius: 20px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(60,50,40,.05); transition: transform .12s ease, box-shadow .15s;
    display: flex; flex-direction: column; }
body.site-wide .tvp-tour:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(60,50,40,.09); }
/* фото квадратное (просьба владельца 17.10.2026; на первом макете было 1.37:1) */
body.site-wide .tvp-tour__media { aspect-ratio: 1 / 1; border-radius: 0; background-color: #f0ece6; }
body.site-wide .tvp-tour__body { padding: 16px 20px 20px; }
body.site-wide .tvp-tour__name { font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; color: var(--st-ink); }
body.site-wide .tvp-tour__desc { font-size: 14px; line-height: 1.45; color: #6b7280; margin-top: 6px;
    -webkit-line-clamp: 3; }
body.site-wide .tvp-tour__price { margin-top: 12px; font-size: 15px; color: var(--st-ink); }
body.site-wide .tvp-tour__price b { font-weight: 800; }
body.site-wide .tvp-tour__price span { font-size: 14px; color: #6b7280; }
@media (max-width: 560px) {
    body.site-wide .tvp-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    body.site-wide .tvp-tour__body { padding: 12px 14px 16px; }
    body.site-wide .tvp-tour__name { font-size: 14px; }
    body.site-wide .tvp-tour__desc { font-size: 12.5px; }
    /* цена в узкой колонке рвалась после «IDR /» - сумму не переносим, единицу уводим целиком */
    body.site-wide .tvp-tour__price { font-size: 13px; margin-top: 8px; }
    body.site-wide .tvp-tour__price b { white-space: nowrap; }
    body.site-wide .tvp-tour__price span:last-child { white-space: nowrap; }
    body.site-wide .tvp-block__title { font-size: 20px; }
}

/* появление: фото внутри карточки идёт навстречу (кадры общие, css/common.css) */
@media (prefers-reduced-motion: no-preference) {
body.site-in .tvp-grid.is-real > * .tvp-tour__media {
    animation: qapPhoto var(--qap-dur) var(--qap-ease) both;
    animation-delay: calc(var(--qap-d0) + min(var(--i, 0), 4) * var(--qap-step)); }
}
