/* ============================================================
   Раздел «Участки» (ТЗ п. 11).

   Дополняет catalogs.css: интро, фильтр, чипы, дропдаун, строка
   результата, пустое состояние и кнопки описаны там. Здесь —
   плашки посёлков с генпланом, поля диапазона, таблица участков,
   подгрузка и мобильный лист фильтров.

   На телефоне таблица не скроллится вбок, а превращается в карточки:
   thead прячется, ячейки раскладываются сеткой, подписи колонок
   берутся из data-label. Разметка при этом одна и та же.
   ============================================================ */

.solt-plots { background: #fff; }
.solt-plots .nb { white-space: nowrap; }
.solt-plots .is-muted { color: #666f80; font-weight: 400; }
.solt-plots [hidden] { display: none !important; }
/* ---------- НОВОЕ: плашки посёлков — здесь живёт генплан ---------- */
.solt-plot-villages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 28px 0 0; }
.solt-plot-village {
    display: flex; justify-content: space-between; align-items: center; gap: 20px;
    padding: 20px 24px; border: 1px solid #e6e6e6; border-radius: 10px; background: #fff;
}
.solt-plot-village__body { min-width: 0; }
/* h2 темы сильнее нашего класса — поэтому селектор со скоупом страницы. */
/* h2 темы перебивает даже селектор со скоупом: у неё цепочка в три класса
   и два тега. Размер задаём важностью — точечно, только здесь. */
.solt-cat h2.solt-plot-village__title { margin: 0; font-size: 19px !important; line-height: 1.25; font-weight: 700; }
.solt-plot-village__title a:hover { color: #ff1c1c; }
.solt-plot-village__addr { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 13px; color: #666f80; }
.solt-plot-village__addr::before { content: ""; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50% 50% 50% 0; background: #ff1c1c; transform: rotate(-45deg); }
.solt-plot-village__facts { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.solt-plot-village__facts li { display: flex; align-items: center; white-space: nowrap; }
.solt-plot-village__facts li + li::before { content: ""; width: 3px; height: 3px; margin: 0 10px; border-radius: 50%; background: #b7bfcd; }
.solt-plot-village__facts b { font-weight: 500; margin-right: 4px; }
.solt-plot-village__facts span { color: #666f80; }
.solt-plot-village__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.solt-plot-village__actions .btn { padding: 0 18px; }
.solt-plot-village__actions .solt-link { font-size: 13px; }
/* НОВОЕ: диапазон «от — до». Два поля в одной обойме, единицы — в подписи группы */
.solt-plot-range { display: flex; gap: 6px; }
.solt-plot-range label {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px;
    border: 1px solid #e6e6e6; border-radius: 3px; background: #fff; cursor: text;
    transition: border-color .15s;
}
.solt-plot-range label:hover { border-color: #3a3f42; }
.solt-plot-range label:focus-within { border-color: #ff1c1c; }
.solt-plot-range label.is-filled { border-color: #3a3f42; }
.solt-plot-range span { font-size: 12px; color: #666f80; }
.solt-plot-range input {
    width: 58px; margin: 0; padding: 0; border: 0; outline: 0; background: none;
    font-size: 13px; font-weight: 500; color: #3a3f42; font-variant-numeric: tabular-nums;
}
.solt-plot-range--price input { width: 84px; }
.solt-plot-range input::placeholder { color: #b7bfcd; font-weight: 400; }
.solt-plot-range input::-webkit-outer-spin-button, .solt-plot-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.solt-plot-range input[type=number] { -moz-appearance: textfield; }
.solt-filter__reset { display: inline-flex; align-items: center; height: 36px; padding: 0; border: 0; background: none; font-size: 13px; color: #666f80; cursor: pointer; border-bottom: 1px solid transparent; }
.solt-filter__reset:hover { color: #ff1c1c; }
.solt-filter__reset::before { content: "\00d7"; margin-right: 6px; font-size: 16px; line-height: 1; }
/* Свой дропдаун (solt-select) */
.solt-sort { min-width: 220px; }
.solt-result__right { display: flex; flex-wrap: wrap; gap: 6px 20px; }
/* ---------- НОВОЕ: таблица участков ---------- */
.solt-plot-tablewrap { border: 1px solid #e6e6e6; border-radius: 10px; background: #fff; overflow: hidden; }
.solt-plot-table { width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.solt-plot-table th, .solt-plot-table td { padding: 13px 16px; text-align: left; vertical-align: middle; }
.solt-plot-table th:first-child, .solt-plot-table td:first-child { padding-left: 20px; }
.solt-plot-table th:last-child, .solt-plot-table td:last-child { padding-right: 20px; }
.solt-plot-table thead th {
    /* Липкую шапку убрали: обёртка таблицы обрезает содержимое ради
       скругления, и «прилипшая» строка наезжала на первую строку данных. */
    z-index: 2; padding-top: 12px; padding-bottom: 12px;
    background: #eff4f7; font-size: 11px; line-height: 1.3; font-weight: 500; letter-spacing: 0; text-transform: none; color: #666f80;
    white-space: nowrap;
}
.solt-plot-table tbody tr { border-top: 1px solid #e6e6e6; transition: background-color .12s; }
.solt-plot-table tbody tr:hover { background: #eeeff6; }
.solt-plot-table .is-num { text-align: right; }
/* Заголовок-сортировка: кнопка без рамки, стрелка у активного */
.solt-plot-table thead button {
    display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 0; border: 0; background: none;
    font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer;
}
.solt-plot-table thead .is-num button { flex-direction: row-reverse; }
.solt-plot-table thead button:hover { color: #3a3f42; }
.solt-plot-table thead button::after { content: ""; width: 5px; height: 5px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .35; }
.solt-plot-table thead .is-sorted button { color: #3a3f42; }
.solt-plot-table thead .is-sorted button::after { opacity: 1; border-color: #ff1c1c; }
.solt-plot-table thead .is-sorted.is-desc button::after { margin-top: 3px; transform: rotate(-135deg); }
.solt-plot-num { font-size: 15px; font-weight: 700; white-space: nowrap; }
.solt-plot-num small { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; color: #666f80; letter-spacing: 0.01em; }
.solt-plot-village-cell a { font-weight: 500; border-bottom: 1px solid transparent; }
.solt-plot-village-cell a:hover { color: #ff1c1c; border-color: #ff1c1c; }
.solt-plot-village-cell small { display: block; font-size: 12px; color: #666f80; }
.solt-plot-price { font-size: 15px; font-weight: 700; white-space: nowrap; }
.solt-plot-ppa { color: #666f80; white-space: nowrap; }
.solt-plot-area { font-weight: 500; white-space: nowrap; }
.solt-plot-area small { font-weight: 400; color: #666f80; }
/* Статус: точка + слово. Красная точка = свободен (акцент сайта), серая = бронь */
.solt-plot-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.solt-plot-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff1c1c; }
.solt-plot-status--booked { color: #666f80; }
.solt-plot-status--booked::before { background: #b7bfcd; }
/* В строке таблицы вместо кнопки — ссылка: тридцать одинаковых красных
   кнопок подряд перекрикивали данные, ради которых таблица и сделана.
   На телефоне (карточка) кнопка остаётся полноценной. */
@media (min-width: 768px) {
    .solt-cat .solt-plot-table .btn.btn-border {
        height: auto;
        padding: 0;
        border: 0;
        border-radius: 0;
        font-size: 14px;
        font-weight: 500;
        color: #ff1c1c;
    }
    .solt-cat .solt-plot-table .btn.btn-border:hover,
    .solt-cat .solt-plot-table .btn.btn-border:focus { color: #ff3030; text-decoration: underline; }
    .solt-cat .solt-plot-table tr.is-booked .btn.btn-border { color: #666f80; }
}
.solt-plot-table td:last-child { text-align: right; }
/* Забронированный: строка приглушена целиком, кнопка остаётся — ведёт на посёлок */
.solt-plot-table tr.is-booked { background: #eff4f7; }
.solt-plot-table tr.is-booked td { color: #666f80; }
.solt-plot-table tr.is-booked .solt-plot-num, .solt-plot-table tr.is-booked .solt-plot-price { color: #666f80; font-weight: 500; }
.solt-plot-table tr.is-booked .solt-plot-village-cell a { color: #666f80; }
.solt-plot-table tr.is-booked .btn { color: #666f80; }
.solt-plot-more { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 22px; }
.solt-plot-more span { font-size: 13px; color: #666f80; font-variant-numeric: tabular-nums; }
.solt-plot-more .btn { padding: 0 36px; }
.solt-empty__hint { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; font-size: 13px; }
.solt-empty__hint button { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid #e6e6e6; border-radius: 3px; background: #fff; font-size: 13px; color: #3a3f42; cursor: pointer; }
.solt-empty__hint button:hover { border-color: #3a3f42; }
/* Панель «Фильтры / Сортировка» — только для телефона: на десктопе
   фильтр и так весь на виду. */
.solt-plot-mbar { display: none; }
.solt-plot-mbar .btn { padding: 0 12px; }
.solt-plot-mbar .btn.is-active { border-color: #3a3f42; }
.solt-plot-mbar .btn b { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 3px; background: #ff1c1c; color: #fff; font-size: 12px; font-weight: 700; }
/* НОВОЕ: мобильный лист фильтров (снизу, поверх страницы) */
.solt-plot-sheet-demo { position: relative; min-height: 720px; background: #fff; }
.solt-plot-sheet-overlay { position: absolute; inset: 0; background: rgba(58,63,66,.5); }
.solt-plot-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 92%; display: flex; flex-direction: column;
    background: #fff; border-radius: 10px 10px 0 0;
}
.solt-plot-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid #e6e6e6; }
.solt-plot-sheet__head h3 { font-size: 18px; font-weight: 700; }
.solt-plot-sheet__head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: #e6e6e6; }
.solt-plot-sheet__close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #eeeff6; position: relative; cursor: pointer; }
.solt-plot-sheet__close::before, .solt-plot-sheet__close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; background: #3a3f42; transform: translate(-50%,-50%) rotate(45deg); }
.solt-plot-sheet__close::after { transform: translate(-50%,-50%) rotate(-45deg); }
.solt-plot-sheet__body { padding: 16px 18px 6px; display: flex; flex-direction: column; gap: 18px; }
.solt-plot-sheet .solt-plot-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.solt-plot-sheet .solt-plot-range label { height: 44px; }
.solt-plot-sheet .solt-plot-range input { width: 100%; font-size: 15px; }
.solt-plot-sheet .solt-types button { height: 40px; }
.solt-plot-sheet__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 14px 18px 18px; border-top: 1px solid #e6e6e6; }

.solt-plot-sheet__foot .btn-border { padding: 0 18px; }

/* ---------- Телефон ---------- */
@media (max-width: 767px) {
    /* Плашки посёлков — стопкой, кнопки в ряд под фактами */
.solt-plot-villages { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 20px; }
    .solt-plot-village { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 18px; }
    .solt-plot-village__title { font-size: 17px; }
    .solt-plot-village__actions { flex-direction: row; align-items: center; justify-content: space-between; }
    
    .solt-types--scroll { flex-wrap: nowrap; margin: 0 -15px; padding: 0 15px 2px; overflow-x: auto; scrollbar-width: none; }
    .solt-types--scroll::-webkit-scrollbar { display: none; }
    .solt-sort { width: 100%; min-width: 0; }
    .solt-result__right { display: none; }
    /* Таблица → карточки: та же разметка, thead прячем, ячейки раскладываем сеткой */
    .solt-plot-mbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
    .solt-plot-tablewrap { border: 0; border-radius: 0; overflow: visible; }
    .solt-plot-table, .solt-plot-table tbody { display: block; width: 100%; }
    .solt-plot-table thead { display: none; }
    .solt-plot-table tbody tr {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; align-items: start;
    margin-bottom: 10px; padding: 14px 16px 16px; border: 1px solid #e6e6e6; border-radius: 10px; background: #fff;
}
    .solt-plot-table tbody tr:hover { background: #fff; }
    .solt-plot-table td { display: block; padding: 0; text-align: left; }
    .solt-plot-table td:first-child, .solt-plot-table td:last-child { padding: 0; }
    .solt-plot-table .is-num { text-align: left; }
    /* Строки заданы явно: без этого авто-размещение утащит «Площадь» в правую ячейку первой строки */
.solt-plot-table .solt-plot-td-num { grid-row: 1; grid-column: 1 / 3; }
    .solt-plot-table .solt-plot-td-status { grid-row: 1; grid-column: 3; justify-self: end; }
    .solt-plot-table .solt-plot-td-village { grid-row: 2; grid-column: 1 / -1; margin-top: -6px; }
    .solt-plot-table .solt-plot-td-area,
.solt-plot-table .solt-plot-td-price,
.solt-plot-table .solt-plot-td-ppa { grid-row: 3; }
    .solt-plot-table .solt-plot-td-village a { font-weight: 400; color: #666f80; }
    .solt-plot-table .solt-plot-td-village small { display: inline; }
    .solt-plot-table .solt-plot-td-village small::before { content: " · "; }
    .solt-plot-table .solt-plot-td-area,
.solt-plot-table .solt-plot-td-price,
.solt-plot-table .solt-plot-td-ppa { padding-top: 10px; border-top: 1px solid #e6e6e6; }
    .solt-plot-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; letter-spacing: 0; text-transform: none; color: #b7bfcd; }
    .solt-plot-table .solt-plot-td-action { grid-row: 4; grid-column: 1 / -1; }
    .solt-plot-table .solt-plot-td-action .btn { width: 100%; }
    .solt-plot-num { font-size: 17px; }
    .solt-plot-price { font-size: 16px; }
    .solt-plot-more { margin-top: 14px; }
    .solt-plot-more .btn { width: 100%; }
}

/* ---------- Правки по итогам ревью ---------- */

/* Ритм: шаг между блоками 56px, как на остальных страницах.
   У блока с фотографией в теме 120px полей — ужимаем в пределах раздела. */
.solt-plot-villages { padding-top: 32px; }
.solt-plots .solt-catalog { padding-bottom: 0; }
.solt-plots .section-search-help { padding: 56px 0 0; }

/* Колонки на auto-раскладке разъезжались: «Посёлок» занимал 200px под слово
   в 60, а перед последней колонкой зияла дыра. Фиксируем доли. */
.solt-plot-table { table-layout: fixed; }
.solt-plot-table th:nth-child(1) { width: 19%; }
.solt-plot-table th:nth-child(2) { width: 15%; }
.solt-plot-table th:nth-child(3) { width: 12%; }
.solt-plot-table th:nth-child(4) { width: 15%; }
.solt-plot-table th:nth-child(5) { width: 14%; }
.solt-plot-table th:nth-child(6) { width: 13%; }
.solt-plot-table th:nth-child(7) { width: 12%; }

/* Сортировка переехала в строку результата — она про список, а не про фильтр. */
.solt-plots .solt-result { align-items: center; margin: 16px 0 14px; }
.solt-sort--inline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.solt-sort--inline .solt-fgroup__label { margin: 0; }
.solt-sort--inline .solt-select { width: 220px; }

@media (max-width: 767px) {
    .solt-plot-table { table-layout: auto; }
    .solt-plots .section-search-help { padding: 36px 0 0; }
    .solt-sort--inline { width: 100%; }
    .solt-sort--inline .solt-select { width: 100%; }
}
