/* === 1. Блок быстрого подбора на главной странице === */
.ch-hero-search-wrap {
    background: linear-gradient(135deg, #1b365d 0%, #27496d 100%);
    padding: 36px 0 42px;
    color: #fff;
    position: relative;
}
.ch-hero-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
    line-height: 1.25;
}
.ch-hero-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 24px;
}
.ch-search-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 14px 35px rgba(13, 30, 58, 0.28);
    color: #2c3e50;
    text-align: left;
}
.ch-deal-tabs {
    display: inline-flex;
    background: #f0f3f7;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 16px;
}
.ch-deal-tab {
    border: none;
    background: transparent;
    padding: 7px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #546e7a;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ch-deal-tab.active {
    background: #1b365d;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(27, 54, 93, 0.25);
}
.ch-search-grid {
    display: grid;
    grid-template-columns: 1.15fr 1.25fr 1.15fr 1.3fr auto;
    gap: 12px;
    align-items: end;
}
.ch-field-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #607d8b;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ch-field-control {
    width: 100%;
    height: 44px;
    border: 1px solid #d5dce4;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    color: #263238;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s;
}
.ch-field-control:focus {
    border-color: #1b365d;
}
.ch-rooms-pills { display: flex; gap: 5px; }
.ch-room-pill {
    flex: 1; height: 44px; border: 1px solid #d5dce4; background: #fff;
    border-radius: 8px; font-size: 13px; font-weight: 600; color: #37474f;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 6px; transition: all 0.15s ease; user-select: none;
}
.ch-room-pill:hover { border-color: #1b365d; color: #1b365d; }
.ch-room-pill.active { background: #1b365d; border-color: #1b365d; color: #fff; }
.ch-price-pair { display: flex; gap: 6px; }
.ch-price-pair .ch-field-control { padding: 0 9px; }
.ch-search-actions { display: flex; gap: 8px; }
.ch-btn-find {
    height: 44px; padding: 0 22px; background: #ff6b00; border: none; border-radius: 8px;
    color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.ch-btn-find:hover { background: #e55f00; color: #fff; }
.ch-btn-map {
    height: 44px; padding: 0 15px; background: #eef3f8; border: 1px solid #cfd8e3;
    border-radius: 8px; color: #1b365d; font-weight: 600; font-size: 14px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; text-decoration: none !important;
}
.ch-btn-map:hover { background: #dfe8f2; color: #1b365d; }
.ch-search-bottom-row {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf1f5;
}
.ch-quick-tags { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.ch-quick-tag {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px;
    background: #f4f7fa; border: 1px solid #e1e8f0; border-radius: 20px;
    font-size: 13px; color: #2c3e50 !important; text-decoration: none !important;
}
.ch-quick-tag:hover { background: #1b365d; border-color: #1b365d; color: #ffffff !important; }
.ch-id-inline { display: flex; align-items: center; gap: 6px; }
.ch-id-inline input { width: 155px; height: 32px; border: 1px solid #d5dce4; border-radius: 6px; padding: 0 10px; font-size: 13px; }
.ch-id-inline button { height: 32px; padding: 0 11px; border: 1px solid #d5dce4; background: #f8fafc; border-radius: 6px; font-size: 12px; font-weight: 600; color: #37474f; cursor: pointer; }
/* === 2. Улучшенные карточки объектов === */
.ch-ad-card {
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07); border: 1px solid #eaeef3;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    display: flex; flex-direction: column; height: 100%; text-align: left;
}
.ch-ad-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(27, 54, 93, 0.14); }
.ch-ad-media { position: relative; display: block; overflow: hidden; background: #f2f4f7; aspect-ratio: 370 / 250; }
.ch-ad-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.ch-ad-card:hover .ch-ad-media img { transform: scale(1.03); }
.ch-ad-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 5px; z-index: 2; pointer-events: none; }
.ch-ad-badge { background: rgba(27, 54, 93, 0.88); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 5px; }
.ch-ad-badge--rent { background: rgba(255, 107, 0, 0.92); }
.ch-fav-btn {
    position: absolute; top: 10px; right: 10px; width: 34px; height: 34px;
    border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.92); color: #607d8b;
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.ch-fav-btn:hover, .ch-fav-btn.is-fav { color: #e53935; background: #fff; }
.ch-fav-btn svg { width: 18px; height: 18px; fill: currentColor; }
.ch-ad-photo-count {
    position: absolute; bottom: 8px; right: 10px; background: rgba(0, 0, 0, 0.62);
    color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; z-index: 2; pointer-events: none;
}
.ch-hover-zones { position: absolute; inset: 0; display: flex; z-index: 1; }
.ch-hover-zone { flex: 1; height: 100%; position: relative; }
.ch-hover-zone::after { content: ""; position: absolute; bottom: 4px; left: 3px; right: 3px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.45); }
.ch-hover-zone.active::after { background: #ff6b00; }
.ch-ad-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.ch-ad-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ch-ad-price { font-size: 21px; font-weight: 800; color: #1b365d; line-height: 1.2; }
.ch-ad-price-m2 { font-size: 12px; color: #78909c; white-space: nowrap; }
.ch-ad-title { font-size: 15px; font-weight: 700; margin: 0 0 8px; line-height: 1.35; }
.ch-ad-title a { color: #263238; text-decoration: none; }
.ch-ad-title a:hover { color: #ff6b00; }
.ch-ad-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ch-ad-spec-chip { background: #f3f6f9; color: #37474f; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 5px; }
.ch-ad-address { font-size: 13px; color: #607d8b; margin-top: auto; padding-top: 8px; border-top: 1px solid #f0f3f7; display: flex; align-items: flex-start; gap: 5px; line-height: 1.35; }
.ch-ad-address .mdi { color: #ff6b00; font-size: 15px; margin-top: 1px; }
.ch-fav-nav-link { display: inline-flex !important; align-items: center; gap: 5px; cursor: pointer; }
.ch-fav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #ff6b00; color: #fff; font-size: 11px; font-weight: 700; }
.ch-fav-item { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid #e6ecf2; border-radius: 8px; margin-bottom: 10px; text-align: left; }
.ch-fav-item img { width: 84px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.ch-fav-item-info { flex: 1; min-width: 0; }
.ch-fav-item-price { font-weight: 700; color: #1b365d; font-size: 15px; }
.ch-fav-item-title { font-size: 13px; color: #263238; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-fav-item-addr { font-size: 12px; color: #78909c; }
.ch-recent-section { background: #f7f9fc; padding: 48px 0; border-top: 1px solid #e6ecf2; }
.ch-recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 26px; }
.ch-calc-card { background: #ffffff; border: 1px solid #e1e8f0; border-radius: 12px; padding: 24px; box-shadow: 0 6px 24px rgba(27, 54, 93, 0.08); text-align: left; }
.ch-calc-programs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ch-calc-prog-btn { border: 1px solid #d5dce4; background: #f8fafc; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: #37474f; cursor: pointer; }
.ch-calc-prog-btn.active { background: #1b365d; border-color: #1b365d; color: #fff; }
.ch-calc-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; }
.ch-calc-slider-row { margin-bottom: 16px; }
.ch-calc-slider-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: #455a64; margin-bottom: 6px; }
.ch-calc-slider-val { color: #1b365d; font-weight: 700; font-size: 15px; }
.ch-calc-range { width: 100%; accent-color: #ff6b00; cursor: pointer; }
.ch-calc-result-box { background: linear-gradient(135deg, #1b365d 0%, #27496d 100%); color: #fff; border-radius: 10px; padding: 22px; }
.ch-calc-monthly-label { font-size: 13px; opacity: 0.85; margin-bottom: 4px; }
.ch-calc-monthly-val { font-size: 30px; font-weight: 800; color: #fff; margin-bottom: 14px; }
.ch-calc-meta { display: flex; justify-content: space-between; font-size: 13px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.18); margin-bottom: 16px; }
@media (max-width: 991px) {
    .ch-search-grid { grid-template-columns: 1fr 1fr; }
    .ch-search-actions { grid-column: span 2; }
    .ch-btn-find { flex: 1; }
    .ch-calc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .ch-hero-title { font-size: 22px; }
    .ch-search-grid { grid-template-columns: 1fr; }
    .ch-search-actions { grid-column: span 1; }
}

/* === 3. Фикс верхней шапки и 3 карточек услуг === */
@media (min-width: 992px) {
    .rd-navbar-top-panel.ch-topbar-clean {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 16px !important;
        padding: 6px 0 !important;
    }
    .rd-navbar-top-panel.ch-topbar-clean .left-side,
    .rd-navbar-top-panel.ch-topbar-clean .right-side {
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        float: none !important;
    }
    .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-links {
        display: flex !important;
        align-items: center !important;
        gap: 16px !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }
    .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-links > li {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
    }
    .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-contacts {
        display: flex !important;
        align-items: center !important;
        gap: 16px !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }
    .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-contacts .contact-item {
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}
.ch-tg-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 14px;
    background: #eef6fc;
    color: #1b365d !important;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none !important;
}
.ch-tg-pill:hover {
    background: #229ed9;
    color: #fff !important;
}
.thumbnail-terry {
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: 0 8px 24px rgba(13, 30, 58, 0.14) !important;
}
.thumbnail-terry > a {
    display: block;
    position: relative;
}
.thumbnail-terry > a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 29, 52, 0.08) 25%, rgba(15, 29, 52, 0.78) 100%);
    pointer-events: none;
}
.thumbnail-terry figcaption {
    z-index: 2 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

/* === 4. Точное однострочное выравнивание шапки === */
@media (min-width: 992px) {
    .rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        min-height: 44px !important;
        padding: 6px 0 !important;
        border-bottom: 1px solid #edf1f6 !important;
    }
    .rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean::before,
    .rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean::after {
        display: none !important;
        content: none !important;
    }
    .rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean .left-side,
    .rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean .right-side {
        display: flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
    }
    .rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-links,
    .rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-contacts {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 18px !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 12.5px !important;
        line-height: 1.2 !important;
    }
    .rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean .contact-item {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
    }
    .rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean .contact-item .icon {
        font-size: 16px !important;
        line-height: 1 !important;
        margin: 0 !important;
    }
}

/* === 5. Выравнивание контактов в шапке на одной линии без переноса === */
@media (min-width: 992px) {
    .rd-navbar-top-panel.ch-topbar-clean,
    .rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        min-height: 40px !important;
        padding: 4px 0 !important;
        gap: 10px !important;
    }
    .rd-navbar-top-panel.ch-topbar-clean .left-side {
        display: flex !important;
        align-items: center !important;
        flex: 0 1 auto !important;
        margin-right: auto !important;
    }
    .rd-navbar-top-panel.ch-topbar-clean .right-side {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex: 0 0 auto !important;
        margin-left: auto !important;
    }
    .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-links,
    .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-contacts {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 12px !important;
        font-size: 12px !important;
    }
    .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-links > li > a {
        font-size: 11.5px !important;
        letter-spacing: 0.2px !important;
    }
    .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-contacts .contact-item {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        white-space: nowrap !important;
        font-size: 12px !important;
    }
}

/* === 6. Фикс шапки: разносим ссылки влево, контакты вправо в 1 строку === */
@media (min-width: 992px) {
    .rd-navbar-wrap .rd-navbar-top-panel.ch-topbar-clean {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 6px 0 !important;
    }
    .rd-navbar-wrap .rd-navbar-top-panel.ch-topbar-clean > .left-side {
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
    }
    .rd-navbar-wrap .rd-navbar-top-panel.ch-topbar-clean > .right-side {
        margin: 0 0 0 auto !important;
        padding: 0 !important;
        text-align: right !important;
    }
    .rd-navbar-wrap .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-links {
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
        margin: 0 !important;
    }
    .rd-navbar-wrap .rd-navbar-top-panel.ch-topbar-clean .ch-topbar-contacts {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 14px !important;
        margin: 0 !important;
    }
}

/* === 7. Презентабельный вид карточки объекта (каталог + главная) === */
.ch-card-neat {
    background: #ffffff;
    border: 1px solid #e4eaf2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(17, 36, 68, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.ch-card-neat:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(17, 36, 68, 0.12);
}
.ch-card-neat .wrapper__content-border {
    display: none !important;
}
.ch-card-neat__body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 !important;
}
.ch-card-neat__img {
    display: block;
    overflow: hidden;
    background: #f3f6fa;
}
.ch-card-neat__img img {
    width: 100%;
    height: 235px;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.ch-card-neat:hover .ch-card-neat__img img {
    transform: scale(1.03);
}
.ch-card-neat__content {
    padding: 16px 18px 18px !important;
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.ch-card-neat__title {
    font-size: 15.5px !important;
    line-height: 1.35 !important;
    margin: 0 0 10px !important;
    min-height: 42px;
}
.ch-card-neat__title a {
    color: #16325c !important;
    text-decoration: none !important;
}
.ch-card-neat__title a:hover {
    color: #d97706 !important;
}
.ch-card-neat__specs {
    list-style: none !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    font-size: 13px;
    line-height: 1.55;
}
.ch-card-neat__specs li {
    padding: 2px 0;
    border-bottom: 1px dashed #eef2f7;
}
.ch-card-neat__specs li:last-child {
    border-bottom: none;
}
.ch-spec-lbl {
    color: #64748b;
    font-weight: 500;
}
.ch-spec-val {
    color: #1e293b;
    font-weight: 600;
}
.ch-card-neat__price {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #e8eef5;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.ch-price-lbl {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 600;
}
.ch-price-val {
    font-size: 17px;
    font-weight: 800;
    color: #0f294a;
    letter-spacing: -0.2px;
}

/* === 8. Переопределение clearfix :before/:after из style.css:26741 в топбаре === */
@media (min-width: 992px) {
    .rd-navbar-top-panel.rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean:before,
    .rd-navbar-top-panel.rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean:after {
        display: none !important;
        content: none !important;
    }
    .rd-navbar-top-panel.rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 6px 0 !important;
    }
    .rd-navbar-top-panel.rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean .left-side {
        float: none !important;
        width: auto !important;
        margin: 0 !important;
    }
    .rd-navbar-top-panel.rd-navbar-static .rd-navbar-top-panel.ch-topbar-clean .right-side {
        float: none !important;
        width: auto !important;
        margin: 0 0 0 auto !important;
    }
}
