﻿/* ==========================================================================
   ReCRM — новые дизайны сайта агентства (Витрина / Каталог с картой / Бутик)
   Подключается в Modern.Master после layout.css. Цвета агентства приходят
   с сервера CSS-переменными (--accent, --accent2, --hero-img, шрифты, радиусы).
   Все остальные оттенки вычисляются из акцента.
   ========================================================================== */

:root {
  --accent: #3d5a80;
  --accent-ink: #fff;
  --accent2: #c49650;
  --accent2-ink: #1b1a22;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, #fff);
  --accent-soft2: color-mix(in srgb, var(--accent) 16%, #fff);
  --accent-deep: color-mix(in srgb, var(--accent) 78%, #0b0a12);
  --accent-hover: color-mix(in srgb, var(--accent) 85%, #000);
  --ink: #1b1a22;
  --muted: #676574;
  --line: color-mix(in srgb, var(--accent) 10%, #e3e3e8);
  --bg: #fff;
  --bg-alt: color-mix(in srgb, var(--accent) 4%, #f6f6f4);
  --r: 16px;
  --r-sm: 10px;
  --r-pill: 999px;
  --f-display: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --f-display-weight: 800;
  --hero-img: none;
  --shadow: 0 18px 50px rgba(15, 15, 35, .12);
  --header-h: 72px;
}
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --accent-soft: #eef1f6; --accent-soft2: #e2e7f0; --accent-deep: #1d2533;
    --accent-hover: #2b3550; --line: #e3e3e8; --bg-alt: #f5f6f7;
  }
}

/* ---------- база ---------- */
body.m-site {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.m-site h1, .m-site h2, .m-site h3, .m-site .h1, .m-site .h2, .m-site .h3 {
  font-family: var(--f-display);
  letter-spacing: -.015em;
  line-height: 1.15;
  text-wrap: balance;
}
.m-site a { color: var(--accent); }
.m-site a:hover { color: var(--accent-hover); }
.m-site :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.m-site img { max-width: 100%; }
.m-site .general { overflow-x: clip; }
.m-site .container { max-width: 1240px; padding-left: 20px; padding-right: 20px; }
.m-wrap { max-width: 1240px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.m-main { display: block; min-height: 50vh; }
.m-site .home { background: transparent; }

.m-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.m-eyebrow--light { color: rgba(255,255,255,.85); }
.m-eyebrow--accent2 { color: var(--accent2); }
.m-req { color: #c0392b; }
.m-consent { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

/* ---------- кнопки, поля, чипы ---------- */
.m-btn, .m-site .btn-success, .m-site .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r-sm); padding: 12px 20px;
  font-weight: 700; font-size: 15px; line-height: 1.2; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.m-btn--acc, .m-site .btn-success, .m-site .btn-primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.m-btn--acc:hover, .m-site .btn-success:hover, .m-site .btn-primary:hover,
.m-site .btn-success:not(:disabled):not(.disabled):active { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.m-btn--acc2 { background: var(--accent2); color: var(--accent2-ink); }
.m-btn--acc2:hover { filter: brightness(.94); color: var(--accent2-ink); }
.m-btn--ghost, .m-site .btn-outline-secondary {
  background: #fff; color: var(--ink); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font-weight: 700; padding: 10px 18px;
}
.m-btn--ghost:hover, .m-site .btn-outline-secondary:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.m-btn--light { background: #fff; color: var(--ink); }
.m-btn--block { width: 100%; }
.m-btn:disabled { opacity: .6; cursor: default; }
.m-link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; }

.m-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin-bottom: 12px; }
.m-field label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; margin: 0; }
.m-input, .m-site .form-control {
  border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm);
  padding: 11px 12px; min-width: 0; width: 100%; font-size: 15px; color: var(--ink); height: auto;
}
.m-input:focus, .m-site .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft2); outline: 0; }
select.m-input { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23676574' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center; }

.m-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); border-radius: var(--r-pill); padding: 7px 14px; font-size: 14px; font-weight: 600;
  white-space: nowrap; text-decoration: none;
}
.m-site a.m-chip { color: var(--ink); }
.m-site a.m-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.m-chip--sm { padding: 5px 11px; font-size: 13px; }
.m-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.m-iconbtn {
  width: 42px; height: 42px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; position: relative; flex: none;
}
.m-site a.m-iconbtn { color: var(--ink); }
.m-iconbtn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- панель предпросмотра ---------- */
.m-preview-bar { background: #16151c; color: #f2f1f6; font-size: 13.5px; padding: 9px 20px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: center; }
.m-site .m-preview-bar a { color: #fff; font-weight: 700; text-decoration: underline; }

/* ==========================================================================
   Шапка
   ========================================================================== */
.m-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.m-header__row { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.m-logo { display: flex; align-items: center; flex: none; max-width: min(320px, 42vw); text-decoration: none; }
.m-logo img { display: block; max-height: 48px; width: auto; max-width: 100%; object-fit: contain; }
.m-logo__plate { display: inline-flex; }
.m-logo__text { font-family: var(--f-display); font-weight: var(--f-display-weight); font-size: 20px; color: var(--ink); line-height: 1.1; }
.m-nav { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; font-weight: 600; font-size: 14.5px; }
.m-nav .item { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.m-site .m-nav a.item:hover { color: var(--accent); text-decoration: none; }
.m-nav .item.active, .m-nav .item.selected { color: var(--accent); border-bottom-color: var(--accent); }
.m-nav__mobile { display: none; }
.m-header__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.m-phone { font-weight: 800; font-size: 16px; white-space: nowrap; }
.m-site a.m-phone { color: var(--ink); text-decoration: none; }
.m-cart__count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.m-burger { display: none; }
.m-idsearch { position: relative; }
.m-idsearch__box { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; box-shadow: var(--shadow); z-index: 5; }
.m-idsearch.is-open .m-idsearch__box { display: block; }
.m-idsearch__error { font-size: 13px; color: #c0392b; margin-top: 6px; }

/* Логотип на тёмном фоне (Бутик): подложка / белый / как есть */
.m-boutique.m-home .m-header .m-logo__plate,
.m-footer .m-logo__plate { background: #fff; border-radius: var(--r-sm); padding: 6px 10px; }
.m-logo-white.m-boutique.m-home .m-header .m-logo__plate { background: none; padding: 0; }
.m-logo-white.m-boutique.m-home .m-header .m-logo img { filter: brightness(0) invert(1); }
.m-logo-asis.m-boutique.m-home .m-header .m-logo__plate { background: none; padding: 0; }

/* Модалки bootstrap */
.m-site .modal-content { border: 0; border-radius: var(--r); box-shadow: var(--shadow); }
.m-site .modal-header { border-bottom-color: var(--line); padding: 18px 22px; }
.m-site .modal-title { font-family: var(--f-display); font-weight: 700; }
.m-site .modal-body { padding: 20px 22px 22px; }
.m-site .modal .validator { color: #c0392b; font-size: 13px; }

/* ==========================================================================
   A · Витрина — первый экран
   ========================================================================== */
.m-hero { position: relative; color: #fff; background: var(--accent-deep); }
.m-hero__bg { position: absolute; inset: 0; background: var(--hero-img) center 40% / cover no-repeat; }
.m-hero-color .m-hero__bg { display: none; }
.m-hero__shade { position: absolute; inset: 0; background: linear-gradient(100deg, color-mix(in srgb, var(--accent-deep) 92%, transparent) 0%, color-mix(in srgb, var(--accent-deep) 70%, transparent) 48%, color-mix(in srgb, var(--accent-deep) 15%, transparent) 100%); }
.m-hero-color .m-hero__shade { background: radial-gradient(1200px 500px at 85% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%); }
.m-hero__inner { position: relative; padding-top: 80px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 18px; }
.m-hero__title { font-size: clamp(32px, 5vw, 58px); font-weight: var(--f-display-weight); max-width: 16ch; margin: 0; color: #fff; }
.m-hero__lead { font-size: 18px; max-width: 54ch; color: rgba(255,255,255,.88); margin: 0; }

.m-qsearch { background: #fff; color: var(--ink); border-radius: var(--r); padding: 8px; box-shadow: 0 24px 60px rgba(10,10,30,.25); margin-top: 14px; }
.m-qsearch__tabs { display: flex; gap: 4px; padding: 6px 6px 10px; }
.m-qsearch__tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: var(--r-sm); font-weight: 700; cursor: pointer; color: var(--muted); }
.m-qsearch__tabs button.is-on { background: var(--accent-soft); color: var(--accent); }
.m-qsearch__row { display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: 10px; padding: 0 6px 6px; align-items: end; }
.m-qsearch__row .m-field { margin: 0; }
.m-qsearch__row .m-btn { height: 46px; }
.m-hero__chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.m-hero__chips span { font-size: 14px; color: rgba(255,255,255,.8); margin-right: 4px; }
.m-site .m-hero__chips .m-chip { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.m-site .m-hero__chips .m-chip:hover { background: #fff; color: var(--ink); }

/* ==========================================================================
   B · Каталог с картой — заголовок
   ========================================================================== */
.m-titlebar { padding: 28px 0 6px; }
.m-titlebar__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.m-titlebar__title { font-size: clamp(24px, 3vw, 34px); font-weight: var(--f-display-weight); margin: 0; }
.m-titlebar__count { color: var(--muted); margin-top: 4px; }
.m-titlebar__chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ==========================================================================
   C · Бутик — первый экран
   ========================================================================== */
.m-bq-hero { background: var(--accent-deep); color: #fff; }
.m-bq-hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.m-bq-hero__title { font-size: clamp(30px, 4.4vw, 56px); font-weight: var(--f-display-weight); line-height: 1.08; margin: 0; color: #fff; }
.m-bq-hero__title em { font-style: normal; color: var(--accent2); }
.m-bq-hero__lead { font-size: 17px; color: rgba(255,255,255,.78); margin: 20px 0 0; max-width: 46ch; }
.m-sentence { margin-top: 30px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: var(--r); padding: 18px 22px; font-size: 20px; line-height: 2.2; color: rgba(255,255,255,.78); }
.m-sentence__select, .m-sentence__input { background: transparent; border: 0; border-bottom: 2px solid var(--accent2); color: #fff; font-weight: 700; font-size: 20px; padding: 0 4px; border-radius: 0; max-width: 100%; }
.m-sentence__select option, .m-sentence__select optgroup { color: var(--ink); }
.m-sentence__input { width: 6.5em; }
.m-sentence__input::placeholder { color: rgba(255,255,255,.5); font-weight: 500; }
.m-sentence .m-btn { margin-left: 6px; vertical-align: middle; }
.m-bq-hero__photo { position: relative; }
.m-bq-hero__img { aspect-ratio: 4 / 5; width: 100%; border-radius: 220px 220px var(--r) var(--r); background: color-mix(in srgb, var(--accent) 55%, #fff) center / cover no-repeat; }
.m-boutique-tag { position: absolute; left: -24px; bottom: 28px; background: #fff; color: var(--ink); border-radius: var(--r); padding: 14px 16px; box-shadow: 0 20px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 2px; max-width: 260px; text-decoration: none; }
.m-site a.m-boutique-tag { color: var(--ink); }
.m-boutique-tag b { font-family: var(--f-display); font-size: 16px; line-height: 1.25; }
.m-boutique-tag span { font-size: 13.5px; color: var(--muted); }
.m-bq-facts { border-top: 1px solid rgba(255,255,255,.12); }
.m-bq-facts__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 24px; padding-bottom: 24px; }
.m-bq-facts__row:empty { display: none; }
.m-fact b { display: block; font-family: var(--f-display); font-size: 28px; font-weight: var(--f-display-weight); color: var(--accent2); line-height: 1.1; }
.m-fact span { font-size: 14px; color: rgba(255,255,255,.72); }

/* Шапка поверх тёмного первого экрана в «Бутике» */
.m-boutique.m-home .m-header { background: var(--accent-deep); border-color: rgba(255,255,255,.12); backdrop-filter: none; }
.m-boutique.m-home .m-nav .item, .m-boutique.m-home a.m-phone { color: #fff; }
.m-boutique.m-home .m-nav .item:hover { color: var(--accent2); }
.m-boutique.m-home .m-iconbtn { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.m-boutique.m-home .m-header__cta { background: var(--accent2); color: var(--accent2-ink); border-color: var(--accent2); }
.m-boutique.m-home .m-logo__text { color: #fff; }

/* ==========================================================================
   Секции
   ========================================================================== */
.m-sec { padding-top: 64px; padding-bottom: 64px; }
.m-sec--tight { padding-top: 24px; padding-bottom: 40px; }
.m-sec__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.m-sec__title { font-size: clamp(24px, 3vw, 34px); font-weight: var(--f-display-weight); margin: 0 0 20px; }
.m-sec__head .m-sec__title { margin: 0; }
.m-sec__title--sm { font-size: 22px; }
.m-sec__more { font-weight: 700; }

/* карточка объекта */
.m-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.m-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; text-decoration: none; color: var(--ink); }
.m-site a.m-card { color: var(--ink); }
.m-site a.m-card:hover { text-decoration: none; color: var(--ink); }
.m-card__pic { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--bg-alt); }
.m-card__img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s ease; }
.m-card:hover .m-card__img { transform: scale(1.04); }
.m-card__badge { position: absolute; left: 12px; top: 12px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: var(--r-pill); }
.m-card__badge--hot { background: var(--accent2); color: var(--accent2-ink); }
.m-card__body { display: flex; flex-direction: column; gap: 3px; }
.m-card__price { font-family: var(--f-display); font-weight: var(--f-display-weight); font-size: 20px; letter-spacing: -.01em; }
.m-card__meta { font-size: 14px; font-weight: 600; }
.m-card__title { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-card__place { font-size: 13px; color: var(--muted); }
.m-card__place:empty, .m-card__meta:empty { display: none; }

/* Бутик: первая карточка крупная */
.m-boutique .m-hot__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.m-boutique .m-hot__grid .m-card:first-child { grid-column: span 2; grid-row: span 2; }
.m-boutique .m-hot__grid .m-card:first-child .m-card__pic { aspect-ratio: auto; flex: 1; min-height: 320px; }
.m-boutique .m-hot__grid .m-card:first-child .m-card__price { font-size: 26px; }
.m-boutique .m-hot__grid .m-card:nth-child(n+6) { display: none; }

/* О компании */
.m-about { background: var(--bg-alt); }
.m-about__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.m-richtext { font-size: 16px; color: #3a3946; max-width: 70ch; }
.m-richtext h2, .m-richtext h3 { font-size: 20px; margin: 18px 0 8px; }
.m-richtext p { margin: 0 0 12px; }
.m-richtext img { height: auto; border-radius: var(--r-sm); }
.m-about__content { position: relative; }
.m-about__content.is-collapsed { max-height: 320px; overflow: hidden; }
.m-about__content.is-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(transparent, var(--bg-alt)); }
.m-admin-edit { display: inline-block; font-size: 13px; margin-bottom: 10px; }
.m-bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.m-bento:empty { display: none; }
.m-bento__item { background: #fff; border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.m-bento__item:first-child { background: var(--accent); color: var(--accent-ink); }
.m-bento__item b { font-family: var(--f-display); font-size: 34px; font-weight: var(--f-display-weight); letter-spacing: -.02em; line-height: 1; }
.m-bento__item span { font-size: 14.5px; color: var(--muted); }
.m-bento__item:first-child span { color: inherit; opacity: .85; }

/* Этапы */
.m-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: s; }
.m-steps li { border-top: 2px solid var(--ink); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.m-steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); font-family: var(--f-display); font-weight: 700; color: var(--accent); font-size: 14px; }
.m-steps b { font-size: 18px; }
.m-steps p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* Собственникам */
.m-owner { background: var(--accent-soft); border-radius: calc(var(--r) + 8px); padding: 44px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.m-owner__title { font-size: clamp(22px, 2.8vw, 32px); font-weight: var(--f-display-weight); margin: 0 0 10px; }
.m-owner p { color: var(--muted); font-size: 16px; margin: 0; }
.m-owner__acts { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.m-ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-weight: 600; }
.m-ticks li { display: flex; gap: 10px; align-items: center; }
.m-ticks li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* Отзывы */
.m-reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.m-review { margin: 0; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.m-review blockquote { margin: 0; font-size: 15.5px; }
.m-review blockquote::before { content: "★★★★★"; display: block; color: var(--accent2); letter-spacing: 2px; margin-bottom: 8px; }
.m-review figcaption { font-size: 13.5px; color: var(--muted); display: flex; flex-direction: column; }
.m-review figcaption b { color: var(--ink); }

/* Свои разделы */
.m-pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.m-pages__item { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; text-decoration: none; }
.m-site a.m-pages__item { color: var(--ink); }
.m-site a.m-pages__item:hover { border-color: var(--accent); text-decoration: none; }
.m-pages__item b { font-size: 16.5px; }
.m-pages__item span { color: var(--muted); font-size: 14px; }
.m-pages__item span:empty { display: none; }

/* Контактное лицо */
.m-agent { background: var(--bg-alt); border-radius: calc(var(--r) + 8px); padding: 36px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.m-agent__ava { width: 104px; height: 104px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--f-display); font-size: 40px; font-weight: 700; }
.m-agent__title { font-size: 24px; font-weight: var(--f-display-weight); margin: 4px 0 8px; }
.m-agent p { color: var(--muted); margin: 0; max-width: 58ch; }
.m-agent__acts { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }

/* Контакты */
.m-contacts { background: var(--bg-alt); }
.m-boutique .m-contacts { background: var(--accent-deep); color: #fff; }
.m-contacts__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.m-dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; margin: 0; font-size: 16px; }
.m-dl dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-top: 4px; }
.m-dl dd { margin: 0; }
.m-contacts__phone { font-weight: 800; font-size: 20px; }
.m-site a.m-contacts__phone { color: var(--ink); }
.m-cform { background: #fff; border-radius: var(--r); padding: 28px; box-shadow: 0 1px 0 var(--line); color: var(--ink); }
.m-cform h3 { font-size: 22px; font-weight: var(--f-display-weight); margin: 0 0 6px; }
.m-cform > p { color: var(--muted); margin: 0 0 16px; }
.m-cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.m-cform__error { color: #c0392b; font-size: 13.5px; margin-bottom: 8px; }
.m-cform__ok { margin-top: 12px; font-weight: 700; color: #1e7d4f; }
.m-boutique .m-contacts .m-dl dt { color: rgba(255,255,255,.6); }
.m-boutique .m-contacts a { color: var(--accent2); }
.m-boutique .m-contacts a.m-contacts__phone { color: #fff; }
.m-boutique .m-contacts .m-chip { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }

/* ==========================================================================
   Каталог: существующие фильтр, листинг и карта
   ========================================================================== */
.m-site .estate_list_block { padding-bottom: 32px; background: transparent; }
.m-site .searchresult { padding-top: 32px; }
.m-catalog .searchresult, .m-catalog .m-site .searchresult { padding-top: 8px; }
.m-catalog .searchresult { padding-top: 8px; }
.m-catalog__count { color: var(--muted); margin-top: 4px; }

/* фильтр */
.m-site .searchform { background: #fff; border: 1px solid var(--line); border-radius: var(--r) !important; padding: 20px 22px 18px; margin-bottom: 24px; font-size: 15px; color: var(--ink); }
.m-site .searchform .str { margin-bottom: 4px; }
.m-site .searchform .str .buttons, .m-site .searchform .str .selector { color: var(--ink); }
.m-site .searchform .str .buttons .item { border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 13px; margin: 0 6px 8px 0; background: #fff; transition: background .15s, border-color .15s; }
.m-site .searchform .str .buttons .item:hover { border-color: var(--accent); }
.m-site .searchform .str .buttons .item .text { border-bottom: 0; }
.m-site .searchform .str .buttons .item.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.m-site .searchform .str .first_inline_text, .m-site .searchform .str .item.text, .m-site .searchform label { color: var(--muted); font-weight: 600; }
.m-site .searchform .str .dd .ddTitle, .m-site .searchform .str .ui-multiselect { color: var(--accent) !important; font-family: var(--f-body) !important; }
.m-site .searchform .str .dd .ddChild { border-color: var(--accent); border-radius: var(--r-sm); box-shadow: var(--shadow); }
.m-site .searchform .str .dd .ddChild li { font: 14px/1.2 var(--f-body); }
.m-site .searchform .slider_item .ui-slider-range { background-color: var(--accent); }
.m-site .searchform .slider_item .ui-slider-handle { background: #fff; border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.m-site .searchform .slider_item .ui-slider-handle.ui-state-active { background-color: var(--accent); }
.m-site .searchform .input-group-text { background: var(--bg-alt); border-color: var(--line); color: var(--muted); }
.m-site .searchform .price_type { color: var(--accent); }
.m-site .searchform .btn-block { height: 48px; }
.m-site .ui-multiselect-menu { border-radius: var(--r-sm); box-shadow: var(--shadow); border-color: var(--line); font-family: var(--f-body); }

/* листинг */
.m-site .estate_list .card, .m-site #changed_property .card {
  border: 0; border-radius: var(--r); background: transparent; margin-bottom: 22px; overflow: visible;
}
.m-site .estate_list .card .card-img, .m-site #changed_property .card-img {
  display: block; height: auto; aspect-ratio: 4 / 3; border-radius: var(--r); background-size: cover; background-position: center; background-color: var(--bg-alt);
}
.m-site .estate_list .card-body { padding: 12px 2px 4px; }
.m-site .estate_list .card-body > a { font-weight: 600; color: var(--ink); display: block; line-height: 1.35; }
.m-site .estate_list .card-body > a:hover { color: var(--accent); text-decoration: none; }
.m-site .estate_list .card-price { margin: 8px 0 2px; flex-direction: row-reverse; justify-content: flex-end !important; gap: 10px; align-items: baseline; }
.m-site .estate_list .card-price strong:last-child { font-family: var(--f-display); font-weight: var(--f-display-weight); font-size: 19px; text-align: left; }
.m-site .estate_list .card-price strong:first-child { font-weight: 600; color: var(--muted); font-size: 14px; }
.m-site .estate_list .card-info { font-size: 13px; }
.m-site .estate_list .card-info .float-right { float: none !important; }
.m-site .estate_list .card-footer { border: 0; padding: 6px 2px 0; background: transparent; font-size: 13.5px; }
.m-site .estate_list .card.hot { background: transparent; }
.m-site .estate_list .card.hot .card-img { box-shadow: 0 0 0 3px var(--accent2); }
.m-site .searchresult .in_cart { color: var(--muted); }
.m-site .searchresult .added .in_cart_added a { color: var(--accent); font-weight: 600; }
.m-site .estate_list .el_btn { padding-top: 6px; }

/* список + карта: 2 колонки карточек слева, карта справа и «прилипает» */
.m-site #changed_property { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.m-site #changed_property > .row { grid-column: 1 / -1; }
.m-site #changed_property > .row > [class*="col-"] { flex: 0 0 25%; max-width: 25%; }
.m-site .estate_list > .col-lg-4 { flex: 0 0 50%; max-width: 50%; }
.m-site .estate_list > .col-lg-8 { flex: 0 0 50%; max-width: 50%; }
.m-site .estate_list > .col-lg-12 #changed_property { display: block; }
.m-catalog .estate_list > .col-lg-4 { flex: 0 0 56%; max-width: 56%; }
.m-catalog .estate_list > .col-lg-8 { flex: 0 0 44%; max-width: 44%; }
.m-site .estate_list .div_map_holder_out,
.m-site .estate_list .div_map_holder_out.inset,
.m-site .estate_list .div_map_holder_out.bot,
.m-site .estate_list .div_map_holder_out.top {
  position: sticky !important; top: calc(var(--header-h) + 16px) !important; bottom: auto !important;
  height: calc(100vh - var(--header-h) - 32px); min-height: 420px; border-radius: var(--r) !important; overflow: hidden;
}
.m-site .estate_list .div_map_holder { height: 100%; }
.m-site .map_wrapper { align-self: stretch; }
.m-map-toggle { display: none; }

/* ==========================================================================
   Внутренние страницы
   ========================================================================== */
.m-site .maincontent { background: transparent; padding-top: 8px; padding-bottom: 48px; }
.m-site .maincontent .breadcrumbs { border-bottom: 0; padding: 18px 0 10px; margin-bottom: 8px; gap: 10px; flex-wrap: wrap; align-items: center; }
.m-site .maincontent .breadcrumbs .add_cart .text { color: var(--accent); font-weight: 600; }
.m-site .content, .m-site .maincontent .content { font-size: 16px; line-height: 1.65; }
.m-site .content h1, .m-site .maincontent h1 { font-size: clamp(26px, 3.2vw, 38px); font-weight: var(--f-display-weight); margin: 12px 0 20px; }
.m-site .content img { height: auto; border-radius: var(--r-sm); }
.m-site .content table { border-collapse: collapse; }
.m-site .content_menu { border-radius: var(--r); border-color: var(--line) !important; }

/* карточка объекта */
.m-site .property-title { font-family: var(--f-display); font-weight: var(--f-display-weight); line-height: 1.2; }
.m-site h1.property-title { font-size: clamp(24px, 3vw, 34px); margin-bottom: 6px; }
.m-site h2.property-title { font-size: 22px; margin-bottom: 12px; }
.m-site .property-price { font-family: var(--f-display); font-weight: var(--f-display-weight); font-size: clamp(24px, 3vw, 32px); color: var(--ink); }
.m-site .property-pictures { margin-top: 18px; border-radius: var(--r); overflow: hidden; }
.m-site .property-pictures img { border-radius: 0; width: 100%; height: 340px; object-fit: cover; display: block; }
.m-site .property-pictures .slick-slide { padding: 0 2px; }
@media (max-width: 640px) { .m-site .property-pictures img { height: 240px; } }
.m-site .property-common { background: var(--bg-alt) !important; border-radius: var(--r) !important; margin-top: 22px; }
.m-site .property-common .col + .col { border-left-color: #fff; }
.m-site .property-common .h5 { font-family: var(--f-display); font-weight: 700; margin: 0; }
.m-site .property-common .h6 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.m-site .property-map > div { border-radius: var(--r) !important; overflow: hidden; }
.m-site .property-descr { font-size: 16px; line-height: 1.65; max-width: 80ch; }
.m-site .property-params .table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.m-site .property-params .table td { border-top: 1px solid var(--line); padding: 11px 16px; }
.m-site .property-params .table tr:first-child td { border-top: 0; }
.m-site .property-params .table td.name { color: var(--muted); width: 45%; }
.m-site .property-params .table tr:nth-child(even) td { background: var(--bg-alt); }
.m-site .property-agent { border-radius: var(--r) !important; box-shadow: 0 6px 30px rgba(20,20,40,.08) !important; border: 1px solid var(--line); padding: 18px; }
.m-site .property-agent-pic { width: 56px; height: 56px; }
.m-site .property-agent-name { font-weight: 700; font-size: 16px; }
.m-site .property-agent .phone { font-weight: 800; color: var(--ink); }
.m-site .share { padding: 28px 0; }

/* сравнение, формы */
.m-site .table { color: var(--ink); }
.m-site .customers_form, .m-site .feedback_form { background: var(--bg-alt); border-radius: var(--r); padding: 24px; }
.m-site .alert { border-radius: var(--r-sm); }

/* ==========================================================================
   Подвал и кнопка мессенджеров
   ========================================================================== */
.m-footer { background: var(--accent-deep); color: #e9e8f0; padding-top: 52px; padding-bottom: 28px; margin-top: 0; }
.m-site .m-footer a { color: #fff; }
.m-site .m-footer a:hover { color: #fff; text-decoration: underline; }
.m-footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.m-footer__name { font-family: var(--f-display); font-weight: var(--f-display-weight); font-size: 20px; color: #fff; margin-bottom: 10px; }
.m-footer__phone { display: inline-block; font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.m-footer__address { font-size: 14.5px; opacity: .85; margin-bottom: 12px; }
.m-footer__social { display: flex; gap: 8px; flex-wrap: wrap; }
.m-site .m-footer .m-chip { background: transparent; border-color: rgba(255,255,255,.28); color: #fff; }
.m-footer__h { font-family: var(--f-body); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.6); margin: 0 0 12px; }
.m-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.m-footer__custom { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; color: rgba(255,255,255,.82); }
.m-footer__custom table { width: 100%; }
.m-footer__custom td { vertical-align: top; padding: 0 16px 12px 0; }
.m-footer__custom h1, .m-footer__custom h2, .m-footer__custom h3, .m-footer__custom h4 { color: #fff; font-size: 16px; }
.m-footer__seo { margin-top: 24px; font-size: 13.5px; color: rgba(255,255,255,.75); }
.m-footer__bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.65); }
.m-footer__dev, .m-footer__dev * { color: rgba(255,255,255,.65); }
.m-footer .metrika { height: 0; overflow: hidden; }
.m-boutique .m-footer { background: #111017; }

.m-fab { position: fixed; right: 18px; bottom: 18px; z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.m-fab__opts { display: none; flex-direction: column; gap: 6px; align-items: flex-end; }
.m-fab.is-open .m-fab__opts { display: flex; }
.m-fab__link { background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 14px; font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px rgba(20,20,40,.12); }
.m-site a.m-fab__link { color: var(--ink); text-decoration: none; }
.m-fab__btn { border: 0; background: var(--accent); color: var(--accent-ink); border-radius: var(--r-pill); padding: 13px 18px; font-weight: 700; display: flex; gap: 8px; align-items: center; cursor: pointer; box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 40%, transparent); }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1180px) {
  .m-nav { gap: 4px 14px; font-size: 14px; }
  .m-header__cta { display: none; }
}
@media (max-width: 1023px) {
  :root { --header-h: 64px; }
  .m-burger { display: inline-flex; }
  .m-phone { display: none; }
  .m-nav { display: none; position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0; background: #fff; flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 12px 20px 40px; overflow-y: auto; z-index: 39; font-size: 18px; }
  .m-nav.is-open { display: flex; }
  .m-nav .item { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink) !important; }
  .m-nav__mobile { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; }
  .m-nav__phone { font-weight: 800; font-size: 22px; color: var(--ink) !important; }
  .m-header__row { justify-content: space-between; }
  .m-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-qsearch__row { grid-template-columns: 1fr 1fr; }
  .m-qsearch__row .m-field:first-child, .m-qsearch__row .m-btn { grid-column: 1 / -1; }
  .m-bq-hero__grid, .m-about__grid, .m-contacts__grid, .m-owner { grid-template-columns: 1fr; }
  .m-bq-hero__photo { max-width: 420px; }
  .m-boutique-tag { left: 12px; }
  .m-steps, .m-reviews, .m-bq-facts__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-pages { grid-template-columns: 1fr 1fr; }
  .m-footer__cols { grid-template-columns: 1fr 1fr; }
  .m-agent { grid-template-columns: auto minmax(0, 1fr); }
  .m-agent__acts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  /* листинг и карта: список, карта по кнопке */
  .m-site .estate_list > .col-lg-4, .m-site .estate_list > .col-lg-8,
  .m-catalog .estate_list > .col-lg-4, .m-catalog .estate_list > .col-lg-8 { flex: 0 0 100%; max-width: 100%; }
  .m-site .estate_list > .map_wrapper { display: none; }
  .m-site.m-show-map .estate_list > .map_wrapper { display: block; }
  .m-site.m-show-map .estate_list > .col-lg-4 { display: none; }
  .m-site .estate_list .div_map_holder_out { position: relative !important; top: 0 !important; height: 70vh; }
  .m-map-toggle { display: inline-flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 44; background: var(--ink); color: #fff; border-radius: var(--r-pill); padding: 12px 20px; border: 0; font-weight: 700; box-shadow: var(--shadow); }
  .m-site #changed_property > .row > [class*="col-"] { flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 640px) {
  .m-wrap, .m-site .container { padding-left: 16px; padding-right: 16px; }
  .m-sec { padding-top: 44px; padding-bottom: 44px; }
  .m-logo img { max-height: 40px; }
  .m-hero__inner { padding-top: 44px; padding-bottom: 28px; }
  .m-hero__lead { font-size: 16px; }
  .m-qsearch__row, .m-cform__row { grid-template-columns: 1fr; }
  .m-cards, .m-site #changed_property { grid-template-columns: 1fr 1fr; gap: 14px; }
  .m-site #changed_property > .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
  .m-card__price, .m-site .estate_list .card-price strong:last-child { font-size: 16px; }
  .m-card__meta, .m-card__title { font-size: 13px; }
  .m-boutique .m-hot__grid .m-card:first-child { grid-column: 1 / -1; grid-row: auto; }
  .m-boutique .m-hot__grid .m-card:first-child .m-card__pic { min-height: 0; aspect-ratio: 4 / 3; }
  .m-steps, .m-reviews, .m-pages, .m-footer__cols { grid-template-columns: 1fr; }
  .m-bento { grid-template-columns: 1fr 1fr; }
  .m-bento__item { padding: 18px; }
  .m-bento__item b { font-size: 26px; }
  .m-owner, .m-agent { padding: 24px; }
  .m-agent { grid-template-columns: 1fr; }
  .m-agent__ava { width: 72px; height: 72px; font-size: 28px; }
  .m-sentence, .m-sentence__select, .m-sentence__input { font-size: 17px; }
  .m-site .searchform { padding: 16px; }
  .m-site .searchform .str .item_group, .m-site .searchform .str .item.street .textbox { max-width: 100%; }
  .m-fab__btn span { display: none; }
  .m-fab__btn { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .m-site * { transition: none !important; }
}
