.complexes-main,
.complex-detail {
    padding: 34px 0 80px;
}

.complexes-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 40px;
}

.complex-filters {
    align-self: start;
    font-size: 15px;
}

.complex-filters > h3,
.complex-filters form > h3 {
    margin: 0;
    padding: 0 0 15px;
    border-bottom: 1px solid #cfd9e8;
    font-size: 16px;
    font-weight: 650;
}

.complex-filters > h3 {
    padding: 18px 18px 15px;
    border-radius: 8px 8px 0 0;
    background: #f0f4fb;
}

.complex-filters > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 9px 18px;
    background: #f0f4fb;
}

.complex-filters > span:last-of-type {
    padding-bottom: 18px;
    border-radius: 0 0 8px 8px;
}

.complex-filters form {
    margin-top: 14px;
    padding: 18px;
    border-radius: 8px;
    background: #f0f4fb;
}

.complex-filters label {
    display: block;
    margin-top: 15px;
    font-size: 14px;
}

.complex-filters input,
.complex-filters select {
    width: 100%;
    height: 48px;
    margin-top: 7px;
    border: 1px solid #c8d5e5;
    border-radius: 7px;
    padding: 0 14px;
    background: #fff;
    color: #263044;
    font: inherit;
    outline: 0;
}

.complex-filters form > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
}

.complex-filters form > div button {
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 7px;
    background: #20242d;
    color: #fff;
    font-weight: 600;
}

.complex-filters form > div a {
    font-size: 14px;
}

.complex-list {
    min-width: 0;
}

.complex-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.complex-toolbar h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 700;
}

.complex-toolbar h1 span {
    color: #929bad;
    font-size: 17px;
    font-weight: 400;
}

.complex-toolbar > div {
    display: flex;
    gap: 10px;
}

.complex-map-open {
    height: 46px;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: #dbe5f4 !important;
    color: #222936;
    font-size: 0;
    font-weight: 600;
    white-space: nowrap;
}

.complex-map-open::before {
    content: "⌖";
    margin-right: 8px;
    font-size: 17px;
}

.complex-map-open::after {
    content: "На карте";
    font-size: 15px;
}

.complex-toolbar form {
    position: relative;
    width: 285px;
    height: 46px;
    border: 1px solid #cbd7e7;
    border-radius: 7px;
    background: #fff;
}

.complex-toolbar form::after {
    content: "";
    position: absolute;
    top: 13px;
    right: 13px;
    width: 18px;
    height: 18px;
    background: url("/theme/img/icons/search.svg") center / contain no-repeat;
    pointer-events: none;
}

.complex-toolbar input {
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0 44px 0 14px;
    background: transparent;
    color: #263044;
    font: inherit;
    outline: 0;
}

.complex-card {
    min-height: 230px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 25px;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid #cad6e6;
    border-radius: 8px;
    background: #fff;
}

.complex-card__image {
    height: 194px;
    overflow: hidden;
    border-radius: 7px;
    background: #edf2f7;
}

.complex-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.complex-card__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.complex-card__body > div:first-child {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.complex-card h2 {
    margin: 5px 0 10px;
    font-size: 21px;
    text-decoration: underline dotted;
    text-underline-offset: 6px;
}

.complex-card__body > div:first-child button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid #cad6e6;
    border-radius: 7px;
    background: #fff;
}

.complex-card__body > div:first-child button img {
    width: 18px;
    margin: auto;
}

.complex-card__body > strong {
    font-size: 13px;
}

.complex-card p {
    margin: 9px 0;
    color: #3d4758;
    font-size: 14px;
    line-height: 1.45;
}

.complex-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
}

.complex-card mark,
.complex-detail__head mark {
    padding: 8px;
    background: #ffe21b;
}

.complex-card footer a {
    padding: 12px 20px;
    border-radius: 7px;
    background: #20242d;
    color: #fff;
}

.complex-empty {
    min-height: 440px;
    display: grid;
    place-items: start center;
    margin: 0;
    padding-top: 70px;
    color: #7d8798;
    text-align: center;
}

.complex-map-modal[hidden] { display: none; }
.complex-map-modal { position: fixed; inset: 0; z-index: 2000; padding: 8px; background: #292c32; }
.complex-map-modal #complex-map { width: 100%; height: 100%; border-radius: 15px; }
.complex-map-close { position: absolute; top: 18px; right: 18px; z-index: 1000; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff; font-size: 28px; }

.complex-breadcrumbs { margin-bottom: 30px; color: #798496; font-size: 13px; }
.complex-detail__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.complex-detail__head h1 { margin: 0 0 10px; font-size: 30px; }
.complex-detail__head p { margin: 0; }
.complex-detail__head > div:last-child { display: flex; gap: 8px; }
.promotion { padding: 8px; background: #47b874; color: #fff; }
.complex-hero { position: relative; height: 560px; margin: 28px 0; overflow: hidden; border-radius: 9px; background: #edf2f7; }
.complex-hero > img { width: 100%; height: 100%; object-fit: cover; }
.complex-hero > button { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border: 0; border-radius: 7px; background: #fff; }
.complex-hero > button img { width: 18px; margin: auto; }
.complex-detail-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 38px; }
.complex-detail-grid > aside section { padding: 18px; border-radius: 8px; background: #f1f5fb; }
.complex-detail-grid > aside h3 { margin: 8px 0; text-decoration: underline dotted; }
.complex-detail-grid > aside p { font-size: 12px; }
.complex-detail-grid > aside section > div { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid #d4deec; }
.complex-detail-grid > aside small { color: #7f8a9d; }
.complex-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.complex-specs div { display: flex; flex-direction: column; }
.complex-specs small { color: #8290a4; }
.complex-description { line-height: 1.55; }
.complex-map-section { display: grid; grid-template-columns: 1.4fr .7fr; gap: 28px; margin-top: 40px; }
.complex-map-section #complex-detail-map { height: 330px; border-radius: 8px; }
.complex-map-section section { display: flex; flex-direction: column; gap: 10px; }
.complex-map-section h3 { margin: 0 0 8px; }
.sales-section, .documents-section, .complex-objects { margin-top: 55px; }
.sales-section h2, .documents-section h2, .complex-objects > h2 { font-size: 24px; }
.sales-chart { height: 280px; display: flex; align-items: flex-end; gap: 14px; padding: 25px 22px 12px; border: 1px solid #ccd7e5; border-radius: 8px; background: repeating-linear-gradient(to top, #fff 0, #fff 54px, #edf1f6 55px); }
.sales-bar-wrap { position: relative; height: 100%; min-width: 0; flex: 1; display: flex; align-items: center; flex-direction: column; justify-content: flex-end; }
.sales-bar { width: min(42px, 75%); height: var(--height); min-height: 3px; border-radius: 5px 5px 0 0; background: #447dce; transform-origin: bottom; animation: sales-grow .7s ease both; }
.sales-bar-wrap small { margin-top: 8px; }
.sales-value { position: absolute; bottom: calc(var(--height) + 26px); font-size: 11px; opacity: 0; transition: opacity .2s; }
.sales-bar-wrap:hover .sales-value { opacity: 1; }
@keyframes sales-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.documents-section > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.documents-section a { display: grid; grid-template-columns: 1fr auto; padding: 14px; border: 1px solid #ccd7e5; border-radius: 7px; }
.documents-section small { display: block; color: #8290a4; }
.documents-section span { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.complex-objects > h2 span { color: #8f99aa; font-size: 16px; font-weight: 400; }

@media (max-width: 991.98px) {
    .complexes-layout { grid-template-columns: 1fr; }
    .complex-filters { display: none; }
    .complex-detail-grid { grid-template-columns: 1fr; }
    .complex-detail-grid > aside { display: none; }
    .complex-hero { height: 440px; }
}

@media (max-width: 767.98px) {
    .complexes-main, .complex-detail { padding: 24px 0 55px; }
    .complex-toolbar { align-items: stretch; flex-direction: column; }
    .complex-toolbar > div { width: 100%; }
    .complex-toolbar form { min-width: 0; flex: 1; }
    .complex-card { grid-template-columns: 1fr; padding: 16px; }
    .complex-card__image { height: 220px; }
    .complex-detail__head { flex-direction: column; }
    .complex-hero { height: 300px; }
    .complex-specs { grid-template-columns: 1fr 1fr; }
    .complex-map-section { grid-template-columns: 1fr; }
    .documents-section > div { grid-template-columns: 1fr; }
    .sales-chart { gap: 6px; padding-left: 8px; padding-right: 8px; }
    .sales-bar-wrap small { font-size: 9px; }
}
