/* WRAPPER */
.ftt {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 0;
    font-family: inherit;
}

/* TOP */
.ftt__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.ftt__months {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ftt-month {
    border: 1px solid #e7e7e7;
    background: #fff;
    padding: 7px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
}

.ftt-month.is-active {
    border-color: #b9ff38;
    box-shadow: 0 0 0 3px rgba(185,255,56,.22);
}

.ftt__all {
    border: 0;
    background: #b9ff38;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
}

/* GRID */
.ftt__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 980px) {
    .ftt__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .ftt__grid {
        grid-template-columns: 1fr;
    }
}

/* CARD */
.ftt-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
    position: relative;
}

.ftt-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ff4f4f;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    box-shadow: 0 8px 18px rgba(0,0,0,.25);
}


@media (max-width: 600px) {
    .ftt-card__badge {
        font-size: 10px;
        padding: 5px 8px;
        top: 8px;
        right: 8px;
    }
}

.ftt-card__img {
    height: 180px;
    background: #f3f3f3;
}

.ftt-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ftt-card__ph {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,#eee,#f8f8f8);
}

/* CARD BODY */
.ftt-card__body {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* TITLE */
.ftt-card__title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 900;
}

/* CHIPS (дата, выезд, скидка и т.д.) */
.ftt-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.ftt-chip {
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.ftt-chip--more {
    cursor: pointer;
    background: #fff;
    border-color: #dcdcdc;
}

/* акцентная плашка (например, скидка) */
.ftt-chip--promo {
    background: #ffeaa5;
    border-color: #ffd36b;
}

/* DESCRIPTION */
.ftt-card__desc {
    color: #333;
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 0;
}

/* CARD BOTTOM – ЦЕНЫ + КНОПКИ */
.ftt-card__bottom {
    margin-top: auto;              /* прижимает низ карточки к нижнему краю */
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

/* PRICE TITLE */
.ftt-card__priceTitle {
    margin-top: 14px;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 900;
    color: #222;
    text-transform: uppercase;
    letter-spacing: .12em;
    opacity: .75;
}

/* PRICES BLOCK */
.ftt-card__prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 600px) {
    .ftt-card__prices {
        grid-template-columns: 1fr;
    }
}

.ftt-price {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 2px 0;
}

.ftt-price__label {
    font-size: 11px;
    color: #777;
    font-weight: 700;
    margin-bottom: 4px;
}

.ftt-price__value {
    font-size: 18px;
    font-weight: 900;
    color: #111;
}

/* ACTIONS (КНОПКИ) */
.ftt-card__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 8px;
}

.ftt-btn {
    border: 0;
    background: #f2f2f2;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    font-size: 13px;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.ftt-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0,0,0,.10);
}

.ftt-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* вторичная кнопка – "Подробнее" */
.ftt-card__actions .ftt-btn[data-action="details"] {
    background: #ffffff;
    border: 2px solid #111;
    color: #111;
    box-shadow: 0 10px 18px rgba(0,0,0,.08);
}

/* основная кнопка – "Резервировать" */
.ftt-card__actions .ftt-btn[data-action="book"],
.ftt-btn--primary {
    background: #b9ff38;
}

/* MUTED TEXT */
.ftt-muted {
    color: #666;
    padding: 10px 0;
}

/* --------- Дальше всё остальное (модалка, галерея, формы и т.д.) оставил почти без изменений --------- */

/* MODAL */
.ftt-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.ftt-modal.is-open {
    display: block;
}

.ftt-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}

.ftt-modal__card {
    position: relative;
    width: min(920px, calc(100% - 24px));
    margin: 5vh auto;
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
}

.ftt-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.ftt-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-right: 38px;
}

.ftt-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.ftt-modal__meta {
    margin-top: 6px;
    color: #666;
    font-size: 13px;
    line-height: 1.35;
}

/* TABS */
.ftt-tabs {
    display: flex;
    gap: 8px;
    margin: 14px 0 10px;
    flex-wrap: wrap;
}

.ftt-tab {
    border: 1px solid #e7e7e7;
    background: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    font-size: 13px;
}

.ftt-tab.is-active {
    border-color: #b9ff38;
    box-shadow: 0 0 0 3px rgba(185,255,56,.22);
}

.ftt-pane {
    display: none;
}

.ftt-pane.is-active {
    display: block;
}

/* CONTENT */
.ftt-content {
    color: #222;
    font-size: 16px;
    line-height: 1.7;
}

.ftt-content p {
    margin: 0 0 12px;
}

.ftt-content ul,
.ftt-content ol {
    margin: 0 0 12px;
    padding-left: 20px;
}

.ftt-content li {
    margin: 0 0 6px;
}

/* GALLERY */
.ftt-gallery {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.ftt-gallery__frame {
    position: relative;
    width: 100%;
    height: 420px;
    background: #f3f3f3;
    border-radius: 14px;
    overflow: hidden;
    user-select: none;
    touch-action: pan-y;
}

.ftt-gallery__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .12s ease;
}

.ftt-gallery__frame.is-drag img {
    transition: none;
}

.ftt-gallery__hint {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(0,0,0,.35);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(6px);
}

@media (max-width: 700px) {
    .ftt-gallery__frame {
        height: 280px;
    }
}

.ftt-gallery__nav {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 22px;
    font-weight: 900;
    background: rgba(255,255,255,.92);
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.ftt-gallery__nav:hover {
    transform: translateY(-1px);
}

.ftt-gallery__nav:active {
    transform: translateY(0);
}

@media (max-width: 520px) {
    .ftt-gallery__nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
        opacity: .85;
    }
}

.ftt-gallery__dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
}

.ftt-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    background: #ddd;
    cursor: pointer;
}

.ftt-dot.is-active {
    background: #b9ff38;
}

/* FORM */
.ftt-form {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ftt-form label {
    font-weight: 900;
    font-size: 13px;
}

.ftt-form input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e6e6e6;
    background: #fff;
}

.ftt-form__msg {
    font-size: 13px;
    margin-top: 4px;
}

.ftt-form__msg.is-ok {
    color: #1a7f37;
    font-weight: 900;
}

.ftt-form__msg.is-err {
    color: #b42318;
    font-weight: 900;
}

body.ftt-modal-open {
    overflow: hidden;
}

/* PEOPLE PICKER */
.ftt-people {
    margin-top: 4px;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 12px;
    background: #fafafa;
}

.ftt-people__title {
    font-weight: 900;
    margin-bottom: 10px;
}

.ftt-people__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px dashed #e8e8e8;
}

.ftt-people__row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.ftt-people__label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ftt-people__name {
    font-weight: 900;
}

.ftt-people__sub {
    font-size: 12px;
    color: #666;
    font-weight: 800;
}

/* STEPPER */
.ftt-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 999px;
    padding: 6px 8px;
    min-width: 140px;
    justify-content: space-between;
}

.ftt-stepper__btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: #f1f1f1;
    font-weight: 900;
    font-size: 18px;
    cursor: pointer;
}

.ftt-stepper__val {
    font-weight: 900;
    font-size: 16px;
    min-width: 24px;
    text-align: center;
}

/* TOTAL */
.ftt-total {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #eaeaea;
}

.ftt-total__label {
    font-weight: 900;
    color: #222;
}

.ftt-total__value {
    font-weight: 900;
    font-size: 18px;
}

/* CONSENTS */
.ftt-consents {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 14px;
    background: #fafafa;
}

.ftt-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    font-weight: 800;
    color: #222;
}

.ftt-check input {
    margin-top: 2px;
    width: 16px;
    height: 16px;
}

.ftt-check a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}





/* ===== FIX: scroll inside modal (mobile + desktop) ===== */

/* Модалка центрируется и не должна "вылезать" за экран */
.ftt-modal__card{
  /* делаем из карточки колонку */
  display: flex;
  flex-direction: column;

  /* ограничиваем высоту в пределах экрана */
  max-height: calc(100dvh - 24px);
  margin: 12px auto;

  /* чтобы скролл был внутри, а не у всей карточки */
  overflow: hidden;
}

/* чтобы крестик не "съедал" место и не мешал */
.ftt-modal__head,
.ftt-tabs,
.ftt-modal__title,
.ftt-modal__meta{
  flex: 0 0 auto;
}

/* В details-модалке: скроллим именно блок с табами/контентом */
.ftt-tabpanes{
  flex: 1 1 auto;
  min-height: 0;            /* критично для flex+overflow */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS плавный скролл */
  overscroll-behavior: contain;      /* чтобы не тянуло фон */
  touch-action: pan-y;
  padding-right: 4px;       /* чтобы текст не прятался под скроллбар */
}

/* В booking-модалке: скроллим форму (если длинная) */
.ftt-form{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-right: 4px;
}

/* Чуть компактнее на телефонах */
@media (max-width: 520px){
  .ftt-modal__card{
    width: calc(100% - 16px);
    margin: 8px auto;
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }
}
