/* thai-etagi.ru
   Плитки объектов повторяют присланный макет: фото на всю карточку, цена
   стеклянной пилюлей поверх, название и параметры внизу. Раздел карты —
   фильтры слева, сетка карточек, липкая карта справа. */

:root {
  --text: #1f1d1a;
  --muted: #7a746c;
  --line: #e3ded7;
  --line-soft: #efeae3;
  --bg: #f4f0ea;          /* тёплый фон страницы, как в макете */
  --panel: #ffffff;       /* карточки и панели поверх фона */
  --bg-soft: #efe9e1;     /* мягкая подложка внутри панелей */
  --accent: #e8704e;
  --accent-dark: #d15f3f;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 10px 30px rgba(31, 29, 26, .08);
  --shadow-soft: 0 4px 16px rgba(31, 29, 26, .05);
  --top-h: 72px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
a { color: inherit; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 36px 40px; }
.wrap.narrow { max-width: 860px; }
.muted { color: var(--muted); }

/* ── шапка и подвал ──────────────────────────────────────────────────── */

.site-head {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(244, 240, 234, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.site-head-in {
  max-width: 1280px;
  margin: 0 auto;
  height: var(--top-h);
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 19px;
  letter-spacing: -.2px;
  flex: none;
}
.logo span { font-weight: 500; }
.logo b { font-weight: 800; }

.nav { display: flex; gap: 22px; margin-right: auto; }
.nav-link {
  text-decoration: none;
  font-size: 15px;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--text); }
.nav-link.on { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }

.phone { flex: none; text-decoration: none; font-weight: 600; white-space: nowrap; }

.site-foot { margin-top: 60px; background: var(--bg-soft); }
.site-foot-in {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}
.site-foot p { color: var(--muted); margin: 10px 0 0; max-width: 40ch; }
.foot-links, .foot-contacts { display: flex; flex-direction: column; gap: 8px; }
.foot-links a, .foot-contacts a { text-decoration: none; color: var(--muted); }
.foot-links a:hover, .foot-contacts a:hover { color: var(--text); }
.foot-contacts span { color: var(--muted); }

/* ── главная ─────────────────────────────────────────────────────────── */

.hero { background: none; }
.hero-in { max-width: 1280px; margin: 0 auto; padding: 56px 40px 44px; }
.hero-hi { margin: 0; color: var(--muted); font-size: 16px; }
.hero h1 { margin: 6px 0 0; font-size: 40px; line-height: 1.12; letter-spacing: -.8px; max-width: 16ch; }
.hero-sub { margin: 12px 0 0; color: var(--muted); font-size: 17px; }

.hero-search {
  margin: 26px 0 0;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 620px;
  padding: 8px 8px 8px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 40px;
  box-shadow: 0 2px 6px rgba(31, 29, 26, .05);
}
.hero-search { background: var(--panel); border-color: transparent; }
.hero-search svg { color: var(--muted); flex: none; }
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 15px;
  background: none;
}
.hero-search button {
  flex: none;
  border: 0;
  border-radius: 30px;
  padding: 11px 22px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.hero-search button:hover { background: var(--accent-dark); }

.cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.cat {
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 22px;
  border: 1px solid transparent;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  font-size: 14px;
}
.cat:hover { border-color: var(--text); }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec-head h2 { margin: 0; font-size: 24px; letter-spacing: -.4px; }
.see-all { text-decoration: none; color: var(--muted); font-size: 15px; }
.see-all:hover { color: var(--text); }

/* ── плитка объекта (макет со скрина) ────────────────────────────────── */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

/* ВАЖНО: `display:block` ниже перебивает браузерное правило [hidden]{display:none},
   поэтому спрятанная фильтром плитка продолжала бы показываться. */
.tile[hidden] { display: none; }

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.18;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #ddd7cf;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
}
.tile > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.tile:hover > img { transform: scale(1.04); }

/* Карточка, где вместо фотографии планировка: чертёж нельзя кадрировать
   под плитку, его надо показывать целиком и на светлой подложке. */
.tile.plan > img { object-fit: contain; background: #fff; padding: 8px 8px 78px; }
.media.plan img { object-fit: contain; background: #fff; padding: 6px; }

.tile-price, .tile-fav, .tile-chips span {
  background: rgba(28, 26, 24, .42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.tile-price {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 8px 14px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.tile-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.tile-body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: block;
  padding: 46px 14px 14px;
  background: linear-gradient(to top, rgba(20, 18, 16, .78), rgba(20, 18, 16, .28) 55%, transparent);
}
.tile-name { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.tile-dist {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 13px;
  color: rgba(255, 255, 255, .82);
}
.tile-chips { display: flex; gap: 8px; margin-top: 12px; }
.tile-chips span {
  padding: 7px 12px;
  border-radius: 18px;
  font-size: 13px;
  white-space: nowrap;
}

/* ── промо-блок ──────────────────────────────────────────────────────── */

.promo {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.promo-text h3 { margin: 0; font-size: 22px; letter-spacing: -.3px; }
.promo-text p { margin: 10px 0 20px; color: var(--muted); max-width: 52ch; }
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 26px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { background: #000; }
.btn.ghost { background: none; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--bg); border-color: var(--text); }

.promo-map a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  height: 100%;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 0;
  text-decoration: none;
}
.promo-map span { color: var(--muted); font-size: 14px; }
.promo-map b { font-size: 18px; }
.promo-map a:hover { border-color: var(--text); }

/* ── раздел «Недвижимость» ───────────────────────────────────────────── */

.list-top h1 { margin: 0; font-size: 30px; letter-spacing: -.6px; }
.list-top p { margin: 6px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 24px; }
.chip {
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  font-size: 14px;
  white-space: nowrap;
}
.chip:hover { border-color: var(--text); }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }

.empty { color: var(--muted); padding: 30px 0; }

/* ── раздел «Карта» ──────────────────────────────────────────────────── */

.map-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr) minmax(0, 40%);
  gap: 22px;
  padding: 22px 40px 40px;
  align-items: start;
}

.filters {
  position: sticky;
  top: calc(var(--top-h) + 22px);
  padding: 20px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.filters h2 { margin: 0 0 16px; font-size: 17px; }
.f-block { display: block; margin-bottom: 16px; }
.f-block > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
/* Нативные контролы приводим к стилю сайта: у селекта своя стрелка,
   у числовых полей убраны стрелки-крутилки, у чекбокса свой квадрат.
   Иначе браузер рисует их своим шрифтом (Arial) и своими радиусами. */
.f-block select, .f-range input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.f-block select {
  padding-right: 32px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%237a746c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 12px;
  text-overflow: ellipsis;
}
.f-range input::-webkit-outer-spin-button,
.f-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.f-range input { -moz-appearance: textfield; }
.f-block select:focus, .f-range input:focus { border-color: var(--text); }
.f-block select:hover, .f-range input:hover { border-color: #cfc7bd; }
.f-range { display: flex; gap: 8px; }
.f-range input { min-width: 0; }

.f-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.f-check input[type="checkbox"]:hover { border-color: var(--text); }
.f-check input[type="checkbox"]:checked {
  background: var(--text);
  border-color: var(--text);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3 4.8 8.6 9.5 3.9' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

/* Кнопки зума карты — тоже в стиле сайта, а не в шрифте браузера. */
.leaflet-touch .leaflet-bar, .leaflet-bar {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(31, 29, 26, .12);
}
.leaflet-bar a, .leaflet-touch .leaflet-bar a {
  font: 600 17px/30px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  border-bottom-color: var(--line-soft);
  width: 32px;
  height: 32px;
  line-height: 32px;
}
.leaflet-bar a:hover { background: var(--bg-soft); color: var(--text); }
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 11px; border-radius: 8px 0 0 0; }

.f-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.f-pill {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  font-size: 13px;
}
.f-pill:hover { border-color: var(--text); }
.f-pill.on { background: var(--text); border-color: var(--text); color: #fff; }

.f-check { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; cursor: pointer; }
.f-reset {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
}
.f-reset:hover { border-color: var(--text); color: var(--text); }

.map-list .list-head { margin-bottom: 16px; }
.map-list h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.3px; }

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

/* компактная карточка в разделе карты */
.card { position: relative; padding: 10px; border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-soft); }
.card a { color: inherit; text-decoration: none; display: block; }
.media {
  position: relative;
  aspect-ratio: 20 / 19;
  border-radius: var(--radius);
  overflow: hidden;
  background: #eee9e3;
}
.media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s;
}
.media img.on { opacity: 1; }
.badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 6px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .95);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.nav-arrow, .card .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  opacity: 0;
  transition: opacity .15s;
}
.card:hover .nav { opacity: 1; }
.card .nav.prev { left: 10px; }
.card .nav.next { right: 10px; }
.dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 5px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.dots i.on { background: #fff; }

.row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 12px 4px 0; }
.row1 h3 { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row1 .sq { flex: none; font-size: 14px; }
.sub, .facts { margin: 2px 4px 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { margin: 6px 4px 10px; font-size: 15px; }
.price b { font-weight: 700; }
.price span { color: var(--muted); }

.map-wrap {
  position: sticky;
  top: calc(var(--top-h) + 22px);
  height: calc(100vh - var(--top-h) - 44px);
}
#map { width: 100%; height: 100%; border-radius: var(--radius-lg); background: #e8e4dd; box-shadow: var(--shadow-soft); }

.pin {
  padding: 6px 10px;
  border-radius: 20px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
  transition: transform .12s, background .12s, color .12s;
}
.pin:hover { transform: scale(1.06); }
.pin.on { background: var(--text); color: #fff; transform: scale(1.06); }
.pin.dot { width: 16px; height: 16px; padding: 0; border: 3px solid #fff; background: var(--accent); border-radius: 50%; }
.leaflet-marker-icon.pin-wrap { background: none; border: 0; }

.leaflet-popup-content-wrapper { border-radius: var(--radius); padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 260px !important; }
.pp-img { display: block; width: 100%; height: 168px; object-fit: cover; background: #eee9e3; }
.pp-body { padding: 10px 12px 12px; }
.pp-body h4 { margin: 0; font-size: 15px; font-weight: 600; }
.pp-body p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.pp-price { margin-top: 6px !important; color: var(--text) !important; font-weight: 700; }
.leaflet-popup-content a { color: inherit; text-decoration: none; }

/* ── страница объекта ────────────────────────────────────────────────── */

.obj {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 40px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.obj-top { padding-bottom: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }

.obj-tabs { display: flex; gap: 22px; margin-top: 16px; border-bottom: 1px solid var(--line-soft); }
.obj-tabs a {
  padding: 10px 0 12px;
  text-decoration: none;
  font-size: 15px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.obj-tabs a:hover { color: var(--text); border-bottom-color: var(--line); }

.obj-shots { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 10px; }
.obj-side { border-radius: var(--radius-lg); overflow: hidden; background: #eee9e3; }
.obj-side img { width: 100%; height: 100%; object-fit: cover; display: block; }

.obj-main {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #eee9e3;
}
.obj-main img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s;
}
.obj-main img.on { opacity: 1; }
.obj-counter {
  position: absolute;
  right: 12px; bottom: 12px;
  padding: 6px 12px;
  border-radius: 18px;
  background: rgba(28, 26, 24, .55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
}
.obj-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.obj-nav.prev { left: 12px; }
.obj-nav.next { right: 12px; }
.obj-nav:hover { background: #fff; }

.obj-gallery > .obj-sec { margin-top: 20px; margin-bottom: 0; }
.obj-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.obj-thumbs::-webkit-scrollbar { height: 6px; }
.obj-thumbs::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.thumb {
  flex: none;
  width: 92px; height: 68px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #eee9e3;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.on { border-color: var(--accent); }

.obj-card {
  position: sticky;
  top: calc(var(--top-h) + 26px);
  padding: 26px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.obj-card h1 { margin: 0; font-size: 24px; letter-spacing: -.5px; }
.obj-price { margin: 10px 0 0; font-size: 27px; font-weight: 700; letter-spacing: -.6px; }
.obj-m2 { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.obj-addr { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--muted); }

.obj-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 16px; }
.stat span { color: var(--muted); font-size: 13px; }

/* Сводка ключ-значение в правой карточке — как в разборе ЖК. */
.obj-facts { margin: 18px 0; padding: 16px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.obj-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 6px 0; }
.obj-facts span { color: var(--muted); font-size: 14px; }
/* Длинное значение (название комплекса) иначе распирает строку и на узком
   экране даёт горизонтальную прокрутку в четыре пикселя. */
.obj-facts b { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* Плитки со значками: «О квартире» и расстояния в «Расположении». */
.fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.fact { display: flex; align-items: flex-start; gap: 12px; }
.fact i { flex: none; color: var(--accent); line-height: 0; margin-top: 2px; }
.fact b { display: block; font-size: 16px; font-weight: 600; }
.fact span { display: block; color: var(--muted); font-size: 13px; margin-top: 1px; }

.obj-lead { color: var(--muted); margin: 0 0 16px; }

/* Общие пространства комплекса на странице квартиры. */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.shot { display: block; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.shot img { display: block; width: 100%; height: 190px; object-fit: cover; transition: transform .35s; }
.shot:hover img { transform: scale(1.04); }

@media (max-width: 560px) {
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot img { height: 130px; }
}

/* Планировки: белые листы, поэтому даём им подложку и рамку. */
/* Планировок у квартиры бывает 6-7: показываем их плитками, а не в полный
   экран — чертёж открывается по клику в отдельной вкладке. */
.lays { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.lay {
  display: block;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
}
.lay img { display: block; width: 100%; height: 170px; object-fit: contain; }
.lay:hover { border-color: var(--text); }

/* Квартиры в комплексе — реальные площади и цены из нашей же базы. */
.units { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.unit {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 12px;
  padding: 16px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--bg-soft);
  text-decoration: none;
}
.unit:hover { border-color: var(--text); }
.unit.on { border-color: var(--accent); background: var(--bg-soft); }
.unit-plan { grid-row: 1 / 3; color: var(--accent); line-height: 0; }
.unit b { font-size: 15px; font-weight: 600; }
.unit-sq { color: var(--muted); font-size: 13px; }
.unit-price { grid-column: 2; font-weight: 700; margin-top: 4px; }

/* Признаки объявления списком-тегами. */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag {
  padding: 9px 15px;
  border-radius: 20px;
  background: var(--bg-soft);
  border: 0;
  font-size: 14px;
}

/* Рамка на месте будущего блока. Намеренно выглядит как заготовка,
   а не как содержимое: выдуманные факты в карточке объекта недопустимы. */
.soon {
  background-color: var(--bg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 150px;
  padding: 24px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}
.soon svg { color: #c8bfb3; }
.soon b { color: var(--text); font-size: 15px; }
.soon span { font-size: 13px; max-width: 46ch; }
.soon-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* Карточка презентации в правой колонке. */
.pres { margin-top: 18px; padding: 16px; border-radius: var(--radius); background: var(--bg-soft); }
.pres b { display: block; font-size: 15px; }
.pres span { display: block; color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
.btn.small { padding: 9px 16px; font-size: 14px; }

/* Страница жилого комплекса и карточка комплекса на странице квартиры. */
.jk h1 { margin: 0; font-size: 32px; letter-spacing: -.6px; }
.jk-addr { margin: 6px 0 20px; color: var(--muted); }
/* Высоту героя ограничиваем: на широком экране колонка 2fr давала под 800 px,
   и фотография комплекса занимала весь первый экран. */
.jk-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; margin-bottom: 22px;
  align-items: stretch; height: min(46vh, 420px); }
.jk-hero-main { border-radius: var(--radius-lg); overflow: hidden; background: #eee9e3; height: 100%; }
.jk-hero-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Три кадра справа делят высоту главного, иначе колонка вылезает вниз. */
.jk-hero-side { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 10px; min-height: 0; }
.jk-hero-side img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); display: block; min-height: 0; }

.jk-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.jk-shot { display: block; border-radius: var(--radius); overflow: hidden; background: #eee9e3; }
.jk-shot img { width: 100%; height: 150px; object-fit: cover; display: block; }
.jk-body > b { font-size: 19px; letter-spacing: -.2px; }
.jk-body > span { display: block; color: var(--muted); margin: 2px 0 12px; }
.obj-chars.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }

@media (max-width: 900px) {
  .jk-hero { grid-template-columns: minmax(0, 1fr); height: auto; }
  .jk-hero-main { aspect-ratio: 16 / 10; }
  .jk-hero-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jk-hero-side img { height: 90px; }
  .jk-card { grid-template-columns: minmax(0, 1fr); }
  .jk-shot img { height: 180px; }
}

/* Блок застройщика — как в разборе ЖК: имя, цифры, пояснение, кнопки. */
.dev { padding: 22px; border-radius: var(--radius); background: var(--bg-soft); }
.dev-top { display: flex; align-items: center; gap: 12px; }
.dev-top i { color: var(--accent); line-height: 0; }
.dev-top b { font-size: 18px; letter-spacing: -.2px; }
.dev-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; max-width: 560px; }
.dev-note { margin: 0 0 18px; color: var(--muted); font-size: 14px; max-width: 68ch; }
.dev-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.wa { display: inline-flex; align-items: center; gap: 8px; background: #12805c; }
.btn.wa:hover { background: #0e6a4c; }
.btn.icon-only { display: inline-grid; place-items: center; width: 46px; padding: 0; background: var(--panel); color: var(--text); }
.btn.icon-only:hover { background: #fff; }

.obj-cta { display: flex; flex-direction: column; gap: 10px; }
.obj-cta .btn { text-align: center; }
.obj-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; }

.obj-body { padding-top: 34px; }
.obj-sec { margin-bottom: 20px; padding: 26px; border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-soft); }
.obj-sec h2 { margin: 0 0 14px; font-size: 21px; letter-spacing: -.3px; }
.obj-desc { max-width: 74ch; }
.obj-desc p { margin: 0 0 10px; }

.obj-chars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; max-width: 900px; }
.obj-chars > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.obj-chars span { color: var(--muted); }
.obj-chars b { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }

.obj-map { height: 380px; border-radius: var(--radius); overflow: hidden; background: #e8e4dd; }
.obj-body { padding-top: 26px; }

/* ── контакты ────────────────────────────────────────────────────────── */

.lead { color: var(--muted); font-size: 17px; max-width: 60ch; }
.contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 26px 0 34px; }
.contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}
.contact span { color: var(--muted); font-size: 14px; }
.contact b { font-size: 19px; }
a.contact:hover { box-shadow: var(--shadow); }

/* ── мобильная раскладка ─────────────────────────────────────────────── */

.map-toggle {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 950;
  padding: 12px 22px;
  border: 0;
  border-radius: 24px;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
}

@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .units { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .map-wrap { display: none; }
  .map-toggle { display: block; }
  body.map-on .map-wrap {
    display: block;
    position: fixed;
    inset: var(--top-h) 0 0;
    height: auto;
    z-index: 940;
  }
  body.map-on #map { border-radius: 0; }
  body.map-on .map-list, body.map-on .filters { display: none; }
}

@media (max-width: 900px) {
  .wrap, .hero-in, .site-head-in, .site-foot-in { padding-left: 20px; padding-right: 20px; }
  .obj { padding: 18px 20px 0; grid-template-columns: minmax(0, 1fr); }
  .obj-shots { grid-template-columns: minmax(0, 1fr); }
  .obj-side { display: none; }
  .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .units { grid-template-columns: minmax(0, 1fr); }
  .soon-row { grid-template-columns: minmax(0, 1fr); }
  .obj-tabs { overflow-x: auto; scrollbar-width: none; }
  .obj-tabs::-webkit-scrollbar { display: none; }
  .obj-card { position: static; }
  .map-layout { grid-template-columns: minmax(0, 1fr); padding: 18px 20px 80px; }
  .filters { position: static; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .hero h1 { font-size: 30px; }
  .hero-search { flex-wrap: wrap; }
  .promo { grid-template-columns: minmax(0, 1fr); }
  .site-foot-in { grid-template-columns: minmax(0, 1fr); }
  .obj-chars, .contacts { grid-template-columns: minmax(0, 1fr); }
  .nav { gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .phone { display: none; }
}

@media (max-width: 560px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile { aspect-ratio: 1 / 0.9; }
  .obj-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
