:root {
  /* В css estate есть var(--bg-1, #f6f8fb) — сама переменная нигде не задана,
     и плашка сортировки всегда оставалась светлой. Привязываем к теме. */
  --bg-1: var(--bg-2, #f2f3f7);
}

/* Раздел «Пхукет» на wse.am — добавки поверх собранного CSS wse.estate (css/estate.css).
   Здесь только то, чего в estate нет: шапка и подвал wse.am, карусель в статической
   карточке, просмотрщик рилсов (подписи), сетки рендеров и хода стройки, шахматка,
   пустой результат фильтра. Палитру не меняем — цвета берём из токенов estate. */

/* ───────────────────────── шапка wse.am ───────────────────────── */
.amhdr {
  position: sticky; top: 0; z-index: 10003;
  background: var(--ink); color: rgba(255, 255, 255, .92);
}
.amhdr__in {
  max-width: var(--container, 1440px); margin: 0 auto;
  padding: 0 var(--pad-x, 24px);
  height: 64px; display: flex; align-items: center; gap: 22px;
}
/* Знак и переключатель городов — ровно те же, что в разделах Еревана и Батуми
   и на главной: WSE + оранжевая точка + AM, три кнопки-ссылки на первые страницы
   разделов. Цвет наследуется от шапки, поэтому на тёмной полосе читается сам. */
.wse-logo { display: inline-flex; align-items: center; font-weight: 800; font-size: 22px;
  letter-spacing: -.04em; color: #fff; text-decoration: none; white-space: nowrap; }
.wse-logo__dot { color: #A85C00; }
.wse-logo--dark .wse-logo__dot { color: #E8850C; }
.wse-city { display: inline-flex; align-items: center; background: rgba(255,255,255,.14);
  border-radius: 100px; padding: 3px; flex-shrink: 0; max-width: 100%; }
.wse-city__item { display: inline-flex; align-items: center; justify-content: center; height: 30px;
  padding: 0 14px; border-radius: 100px; font-size: 14px; font-weight: 600; line-height: 1;
  color: rgba(255,255,255,.7); white-space: nowrap; text-decoration: none;
  transition: color .15s, background .15s; }
.wse-city__item:hover { color: #fff; }
.wse-city__item.is-active { background: #fff; color: #12131A; }

.amnav { display: flex; gap: 20px; }
.amnav a { font-size: 14px; color: rgba(255, 255, 255, .92); font-weight: 600; text-decoration: none; }
.amnav a:hover { color: #fff; }
.amhdr__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.amlink { font-size: 14px; color: rgba(255, 255, 255, .92); font-weight: 600; text-decoration: none; }
.ambtn {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px;
  border-radius: var(--r-btn, 10px); background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.ambtn:hover { background: var(--primary-hover); }
.amburger {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; background: transparent; border: 0;
  color: rgba(255, 255, 255, .92); cursor: pointer;
}
.ammenu { display: none; }
.ammenu[hidden] { display: none; }

/* Липкая полоса табов стоит под нашей шапкой (у estate было 72px). */
.cp-anchor-nav { top: 64px; }

@media (max-width: 1100px) {
  .amnav { display: none; }
  .amlink { display: none; }
}
@media (max-width: 760px) {
  .amhdr__in { gap: 12px; }
  .ambtn { display: none; }
  .amburger { display: inline-flex; }
  .wse-city__item { height: 26px; padding: 0 10px; font-size: 12.5px; }
  .ammenu:not([hidden]) {
    display: flex; flex-direction: column; gap: 2px;
    padding: 8px var(--pad-x, 20px) 16px; background: var(--ink);
    border-top: 1px solid rgba(255, 255, 255, .12);
  }
  .ammenu a {
    padding: 11px 0; color: rgba(255, 255, 255, .92); font-size: 15px;
    font-weight: 600; text-decoration: none;
  }
}
@media (max-width: 420px) {
  .amhdr__in { height: 58px; }
  .wse-logo { font-size: 19px; }

}

/* ───────────────────────── подвал ───────────────────────── */
.site-footer .footer-brand .wse-logo { font-size: 20px; margin-bottom: 12px; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }

/* ──────────────── карточка: карусель фото без React ──────────────── */
.property-card .media .pc-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity .25s var(--ease, ease);
}
.property-card .media .pc-slide.on { opacity: 1; }
.property-card .card-nav { opacity: 0; transition: opacity .15s; }
.property-card:hover .card-nav { opacity: 1; }
.property-card h3 a { color: inherit; text-decoration: none; }

/* Плотная сетка каталога по кнопке «Плитка». */
.catalog-grid.tiles { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .catalog-grid.tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .catalog-grid.tiles { grid-template-columns: 1fr 1fr; } }

/* Кнопка «Фильтры» нужна только там, где фильтр-бар скрыт (телефон). */
.filter-trigger-mobile { display: none; }
@media (max-width: 768px) {
  .filter-trigger-mobile { display: inline-flex; align-items: center; gap: 6px; }
}

.catalog-empty {
  padding: 48px 20px; text-align: center; color: var(--text-2); font-size: 14px;
  border: 1px dashed var(--border); border-radius: var(--r-card-lg); margin-top: 8px;
}
.catalog-empty .btn { margin-left: 10px; }

/* Выпадашки фильтр-бара: у статической версии меню скрыто атрибутом hidden. */
.fselect .cfb-menu[hidden], .cfb-dd .cfb-menu[hidden] { display: none; }

/* ──────────────── лайтбокс: содержимое ──────────────── */
.cp-lightbox-content { display: flex; align-items: center; justify-content: center; }
.cp-lightbox-content img,
.cp-lightbox-content video {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; display: block;
}
.cp-lightbox-nav[hidden] { display: none; }

/* ──────────────── рилсы: подписи и состояние паузы ──────────────── */
.unit-reels-title {
  position: absolute; top: 18px; left: 0; right: 0; text-align: center;
  color: rgba(255, 255, 255, .8); font-family: var(--font-display);
  font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  pointer-events: none;
}
.unit-reels-meta {
  position: absolute; left: 14px; right: 14px; bottom: 34px; z-index: 2;
  color: #fff; pointer-events: none; text-shadow: 0 1px 12px rgba(0, 0, 0, .6);
}
.unit-reels-meta b { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.unit-reels-sound { font-size: 11px; color: rgba(255, 255, 255, .7); }
.unit-reels.paused .unit-reels-stage::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  transform: translate(-40%, -50%);
  border-style: solid; border-width: 17px 0 17px 28px;
  border-color: transparent transparent transparent rgba(255, 255, 255, .92);
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .5));
  pointer-events: none;
}
.reels-strip > button { flex: 0 0 auto; }

/* ──────────────── рендеры: сетки 1–5 кадров (как в estate) ──────────────── */
.pv-tabs { display: flex; gap: 6px; background: var(--bg-2); border-radius: 10px; padding: 3px; }
.pv-tab {
  padding: 8px 16px; border-radius: 8px; font-size: 12px; font-family: var(--font-display);
  font-weight: 600; color: var(--text-2); background: transparent; border: none; cursor: pointer;
}
.pv-tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.pv-pane { display: none; gap: 10px; border-radius: var(--r-card-lg); overflow: hidden; }
.pv-pane.on { display: grid; }
.pv-cell { position: relative; overflow: hidden; cursor: pointer; }
.pv-cell .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .92);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4); color: var(--ink);
}
.pv-n1 { grid-template-columns: 1fr; grid-template-rows: 500px; }
.pv-n2 { grid-template-columns: 1fr 1fr; grid-template-rows: 420px; }
.pv-n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 300px 300px; }
.pv-n3 .pv-cell:first-child { grid-row: span 2; }
.pv-n4 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 300px 300px; }
.pv-n4 .pv-cell:first-child { grid-row: span 2; }
.pv-n4 .pv-cell:nth-child(2) { grid-column: span 2; }
.pv-n5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 300px 300px; }
.pv-n5 .pv-cell:first-child { grid-row: span 2; }
@media (max-width: 760px) {
  .pv-pane.on { grid-template-columns: 1fr !important; grid-template-rows: none !important; }
  .pv-cell { grid-row: auto !important; grid-column: auto !important; height: 220px; }
  .pv-tabs { overflow-x: auto; }
}

/* ──────────────── ход строительства ──────────────── */
.pr-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.pr-shot { aspect-ratio: 16 / 10; border-radius: var(--r-card-lg); overflow: hidden; position: relative; background: var(--bg-2); }
.pr-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pr-cap {
  position: absolute; bottom: 16px; left: 16px;
  background: rgba(13, 27, 62, .85); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.pr-cap-d { font-size: 11px; opacity: .7; letter-spacing: .14em; text-transform: uppercase; }
.pr-cap-t { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.pr-list { display: flex; flex-direction: column; gap: 8px; }
.pr-item {
  background: var(--bg-warm); border: 1px solid var(--border-soft); border-radius: var(--r-card);
  padding: 14px 18px; display: flex; gap: 16px; align-items: center; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.pr-item.on { background: #fff; border: 1.5px solid var(--primary); }
@media (max-width: 760px) { .pr-layout { grid-template-columns: 1fr; } }

/* ──────────────── шахматка (данных на wse.am больше, чем страниц юнитов) ──────────────── */
.chess-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); margin-bottom: 14px; }
.chess-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.chess-b + .chess-b { margin-top: 18px; }
.chess-b h4 {
  font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--ink);
  margin: 0 0 8px; letter-spacing: .02em;
}
.chess-u { display: flex; flex-wrap: wrap; gap: 4px; }
.u, .chess-legend i.u {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 24px; padding: 0 6px; border-radius: 6px;
  font-size: 11px; font-weight: 600; font-family: var(--font-display);
  background: #e6f4ee; color: #0f6b4a; border: 1px solid #c9e7da;
}
.u--res { background: #fdf3e2; color: #8a5a00; border-color: #f0ddba; }
.u--sold { background: var(--bg-2); color: var(--text-3); border-color: var(--border); }
.chess-legend i.u { min-width: 12px; height: 12px; padding: 0; }

/* ──────────────── текст о районе ──────────────── */
.district-note { margin-top: 26px; }
.district-note p { color: var(--text-2); font-size: 14px; line-height: 1.7; margin-top: 10px; }

/* ──────────────── сделка: подгруппы условий ──────────────── */
.deal-sub + .deal-sub { margin-top: 18px; }
.deal-sub .eyebrow { display: block; margin-bottom: 8px; }

/* ──────────────── заявка: ошибка формы ──────────────── */
.req-err { color: #ffd2d2; font-size: 13px; }
.req-err a { color: #fff; text-decoration: underline; }
.req-err[hidden] { display: none; }

/* Галерея: показываем одну из двух раскладок (на estate это делал React по ширине). */
.cp-hero .gallery-mobile-wrap { display: none; }
@media (max-width: 960px) {
  .cp-hero .gallery-grid { display: none; }
  .cp-hero .gallery-mobile-wrap { display: block; }
}

/* Видео в секциях «Шоу-рум» и «Видео-тур» — рамка как у плиток estate. */
.showunits-grid video {
  width: 100%; border-radius: var(--r-card); background: #000; display: block;
}

/* Карта района. */
.cp-map { position: absolute; inset: 0; border-radius: inherit; }
.loc-map .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--text-3); font-size: 13px;
}

/* Полосы графика платежей: цвет задаётся здесь, а не в разметке, чтобы тема
   оформления могла их перекрасить. Порядок от тёмного к светлому, как было. */
.payment-seg.s1 { background: var(--pay-1, #0d1b3e); }
.payment-seg.s2 { background: var(--pay-2, #2a4a7c); }
.payment-seg.s3 { background: var(--pay-3, #6b8cc4); }
.payment-seg.s4 { background: var(--pay-4, #b0c4e8); }

/* ═══════════════════════════════════════════════════════════════
   ГЛАВНАЯ РАЗДЕЛА — /novostrojki/phuket
   До 07.10.2026 раздел открывался сразу каталогом: человек попадал в список,
   не поняв, что мы продаём. Эти блоки — первый экран, сценарии покупки,
   витрина проектов, районы, лента роликов и условия сделки.
   Цвета и шрифты берутся из токенов, поэтому тема оформления меняет и их.
   ═══════════════════════════════════════════════════════════════ */

/* ── Первый экран: фото или видео во весь экран ── */
.th-hero { position: relative; min-height: 88vh; display: flex; align-items: flex-end;
  overflow: hidden; background: var(--ink); }
.th-hero__media { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; }
.th-hero__veil { position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,14,20,.88) 0%, rgba(10,14,20,.35) 45%, rgba(10,14,20,.15) 100%); }
.th-hero__in { position: relative; z-index: 2; padding-top: 120px; padding-bottom: 64px; color: #fff; }
.th-hero__eyebrow { color: rgba(255,255,255,.72); }
.th-hero h1 { color: #fff; font-size: clamp(42px, 6.4vw, 86px); line-height: 1.02;
  letter-spacing: -.03em; margin-top: 18px; }
.th-hero h1 em { font-style: italic; font-weight: 400; color: var(--sand, #e9c89a); }
.th-hero__lead { margin-top: 20px; max-width: 54ch; font-size: 17px; line-height: 1.6;
  color: rgba(255,255,255,.84); }
.th-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.th-hero__ghost { border: 1px solid rgba(255,255,255,.5); color: #fff; }
.th-hero__ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.th-facts { display: flex; gap: 48px; flex-wrap: wrap; margin-top: 56px;
  padding-top: 26px; border-top: 1px solid rgba(255,255,255,.22); }
.th-fact b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 700;
  letter-spacing: -.02em; color: #fff; }
.th-fact span { display: block; margin-top: 6px; font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.6); }

/* ── Сценарии покупки ── */
.th-cases__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.th-case { display: flex; flex-direction: column; gap: 10px; padding: 32px 30px 28px;
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: var(--r-card-lg); color: inherit; text-decoration: none;
  transition: border-color .2s var(--ease), transform .2s var(--ease); }
.th-case:hover { border-color: var(--ink); transform: translateY(-3px); }
.th-case h3 { font-size: 24px; letter-spacing: -.02em; }
.th-case p { color: var(--text-2); font-size: 15px; line-height: 1.6; }
.th-case__go { margin-top: auto; padding-top: 16px; display: inline-flex; align-items: center;
  gap: 8px; font-size: 13px; font-weight: 600; color: var(--primary); }

/* ── Районы ── */
.th-areas__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr);
  gap: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.th-areas__row::-webkit-scrollbar { display: none; }
.th-area { color: inherit; text-decoration: none; }
.th-area__ph { position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--r-card); background: var(--bg-2); }
.th-area__ph img { width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .8s var(--ease); }
.th-area:hover .th-area__ph img { transform: scale(1.05); }
.th-area__cap { margin-top: 12px; }
.th-area__cap b { display: block; font-family: var(--font-display); font-size: 19px; }
.th-area__cap span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--text-2); }

/* ── Условия сделки ── */
.th-how__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.th-how__item { padding: 32px 30px; background: var(--bg-warm); border-radius: var(--r-card-lg); }
.th-how__item b { font-family: var(--font-display); font-size: 40px; font-weight: 800;
  letter-spacing: -.03em; color: var(--ink); display: block; }
.th-how__item h3 { margin-top: 14px; font-size: 19px; }
.th-how__item p { margin-top: 8px; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }

/* ── Витрина проектов на главной ── */
.th-grid { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1024px) {
  .th-cases__grid, .th-how__grid { grid-template-columns: 1fr 1fr; }
  .th-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .th-hero { min-height: 74vh; }
  .th-hero__in { padding-top: 90px; padding-bottom: 40px; }
  .th-facts { gap: 26px; margin-top: 34px; }
  .th-fact b { font-size: 24px; }
  .th-cases__grid, .th-how__grid, .th-grid { grid-template-columns: 1fr; }
  .th-areas__row { grid-auto-columns: 62%; }
}

/* Полоса воронки на главной: заголовок лежит на тёмном фоне, а общий стиль
   красит h2 цветом чернил — на estate этот заголовок рисует React с своим
   цветом, в статике он сливался с фоном. */
.funnel-band h2 { color: #fff; }
.funnel-band p { color: rgba(255,255,255,.82); max-width: 62ch; margin: 10px auto 0; }
.funnel-band .hero-buttons { justify-content: center; margin-top: 22px; }

/* ── Шапка поверх героя (главная раздела) ──
   Арам 07.10: «сделай герой прозрачным, а не синим». Фото первого экрана идёт
   до самого верха, шапка лежит на нём без фона; читаемость держит мягкая тень
   сверху. Как только герой уходит вверх, шапка становится плотной — иначе
   светлые секции просвечивают сквозь белые буквы. */
.amhdr--over {
  background: transparent;
  box-shadow: none;
}
.amhdr--over::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(8,12,20,.55), rgba(8,12,20,0));
}
.amhdr--over .amhdr__in { position: relative; z-index: 1; }
.amhdr--over.is-solid {
  background: var(--ink);
  transition: background .25s ease;
}
.amhdr--over.is-solid::before { opacity: 0; }
/* Герой начинается под шапкой, а не после неё. */
.home-page .home-hero { margin-top: -64px; }
.home-page .home-hero .inner { padding-top: 64px; }
@media (max-width: 420px) {
  /* Шапка на телефоне ниже, и надпись над заголовком прижималась к логотипу:
     добавляем ей воздуха сверх высоты самой шапки. */
  .home-page .home-hero { margin-top: -58px; }
  /* На телефоне в .inner лежит только поиск, а он должен наезжать на фото,
     как на estate: компенсацию высоты шапки здесь не добавляем. */
  .home-page .home-hero .inner { padding-top: 0; }
  /* На телефоне подпись героя лежит в отдельной полосе, прижатой к её низу.
     Полосу удлиняем ровно на высоту шапки, иначе «НЕДВИЖИМОСТЬ В ТАИЛАНДЕ»
     упирается в логотип. */
  .home-page .home-hero .hero-overlay {
    height: calc(50vh + 26px); min-height: 306px; max-height: 446px; padding-top: 72px;
  }
}
