/* Страницата на комплекс: важно, параметри, карта, бърза консултация. Основата е в builders.css. */
.cx-important, .cx-facts, .cx-consult { margin-top: clamp(30px, 5vw, 56px); }
.cx-important h2, .cx-facts h2 { margin: 0 0 16px; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.cx-important__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cx-important__list li { display: flex; gap: 12px; padding: 16px 18px; border: 1px solid var(--bp-line, #e3e7ec); border-radius: 12px; background: #fff; }
.cx-important__list .material-icons-outlined { flex: none; color: var(--bp-accent, #e8622c); }
.cx-important__list p { margin: 0; line-height: 1.55; }
.cx-important__list b { display: block; margin-bottom: 3px; }
.cx-features { margin-top: clamp(30px, 5vw, 56px); }
.cx-features h2 { margin: 0 0 16px; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.cx-features__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cx-features__list li { display: flex; align-items: center; gap: 13px; min-height: 64px; padding: 12px 16px; border: 1px solid var(--bp-line, #e3e7ec); border-radius: 12px; background: #fff; font-weight: 600; line-height: 1.3; }
.cx-features__check { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bp-accent, #e8622c); color: #fff; }
.cx-facts { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: clamp(18px, 3vw, 32px); align-items: stretch; }
.cx-facts--nomap { grid-template-columns: minmax(0, 520px); }
.cx-params { margin: 0; }
.cx-params > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--bp-line, #e3e7ec); }
.cx-params dt { font-weight: 500; color: var(--bp-ink-3, #667); }
.cx-params dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.cx-map { min-height: 320px; border-radius: 14px; overflow: hidden; z-index: 0; }
.cx-consult { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: clamp(18px, 3vw, 36px); padding: clamp(22px, 3.5vw, 36px); border-radius: 18px; background: #14283c; color: #fff; }
.cx-consult h2 { margin: 0 0 6px; color: #fff; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.cx-consult__sub { margin: 0 0 18px; color: #d3dde6; line-height: 1.4; }
.cx-consult__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.cx-consult input[type=text], .cx-consult input[type=tel], .cx-consult input[type=email], .cx-consult textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.28); border-radius: 9px; background: rgba(255,255,255,.1); color: #fff; font: inherit; }
.cx-consult ::placeholder { color: rgba(255,255,255,.72); }
.cx-consult input:focus, .cx-consult textarea:focus { outline: 2px solid #fff; outline-offset: 1px; }
.cx-consult__agree { display: flex; gap: 9px; align-items: flex-start; margin-top: 12px; font-size: .9rem; line-height: 1.4; cursor: pointer; }
.cx-consult__agree input { margin-top: 3px; accent-color: var(--bp-accent, #e8622c); }
.cx-consult__msg { margin: 12px 0 0; font-weight: 600; }
.cx-consult__msg.is-error { color: #ffc2b3; }
.cx-consult__broker { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; }
.cx-consult__broker img { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px rgba(255,255,255,.3); }
.cx-consult__broker a { color: #fff; }
.cx-consult__send { width: 100%; min-height: 46px; margin-top: 6px; border: 0; border-radius: 9px; background: var(--bp-accent, #e8622c); color: #fff; font-weight: 700; text-transform: uppercase; cursor: pointer; transition: filter .15s; }
.cx-consult__send:hover, .cx-consult__send:focus-visible { filter: brightness(1.1); }
.cx-consult__send:disabled { opacity: .6; cursor: wait; }
@media (max-width: 860px) {
  .cx-facts { grid-template-columns: minmax(0, 1fr); }
  .cx-consult { grid-template-columns: minmax(0, 1fr); }
  .cx-consult__row { grid-template-columns: minmax(0, 1fr); }
}
/* Основната снимка в героя: без рамка, запълва полето */
.cx-hero .bp-logo { padding: 0; overflow: hidden; }
.cx-hero .bp-logo img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; display: block; }

/* Голямата галерия */
.cx-gallery { min-width: 0; max-width: 100%; margin-top: clamp(20px, 3vw, 32px); }
.cx-gallery__stage { position: relative; aspect-ratio: 16 / 9; max-height: 680px; width: 100%; border-radius: 16px; overflow: hidden; background: #14283c; }
.cx-gallery__open, .cx-gallery__video { position: absolute; inset: 0; display: block; }
.cx-gallery__open[hidden], .cx-gallery__video[hidden], .cx-gallery__nav[hidden], .cx-gallery__count[hidden], .cx-gallery__thumbs[hidden] { display: none; }
.cx-gallery__open { cursor: zoom-in; }
.cx-gallery__open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-gallery__video iframe { width: 100%; height: 100%; border: 0; display: block; }
.cx-gallery__nav { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #14283c; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); transition: background .15s, transform .15s; }
.cx-gallery__nav:hover { background: #fff; transform: scale(1.06); }
.cx-gallery__nav:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cx-gallery__nav .material-icons-outlined { font-size: 30px; }
.cx-gallery__nav--prev { left: 16px; }
.cx-gallery__nav--next { right: 16px; }
.cx-gallery__count { position: absolute; left: 16px; bottom: 14px; padding: 4px 11px; border-radius: 999px; background: rgba(15, 28, 42, .78); color: #fff; font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.cx-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; padding: 3px; overflow-x: auto; scrollbar-width: thin; }
.cx-gallery__thumb { position: relative; flex: 0 0 132px; height: 84px; padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: #e3e7ec; cursor: pointer; opacity: .72; transition: opacity .15s; }
.cx-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-gallery__thumb:hover, .cx-gallery__thumb.is-on { opacity: 1; }
.cx-gallery__thumb.is-on { outline: 3px solid var(--bp-accent, #e8622c); outline-offset: -3px; }
.cx-gallery__thumb:focus-visible { outline: 3px solid #14283c; outline-offset: 1px; opacity: 1; }
.cx-gallery__thumb--video .material-icons-outlined { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 38px; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
@media (max-width: 600px) {
  .cx-gallery__stage { aspect-ratio: 4 / 3; border-radius: 12px; }
  .cx-gallery__nav { width: 40px; height: 40px; margin-top: -20px; }
  .cx-gallery__nav--prev { left: 8px; }
  .cx-gallery__nav--next { right: 8px; }
  .cx-gallery__thumb { flex-basis: 96px; height: 64px; }
}

/* Карта в списъка: голяма снимка със стрелки */
.cx-card { padding: 0; gap: 10px; overflow: hidden; }
.cx-card > :not(.cx-card__media) { margin-left: 18px; margin-right: 18px; }
.cx-card > :last-child { margin-bottom: 16px; }
.cx-card__media { position: relative; aspect-ratio: 4 / 3; margin-bottom: 6px; background: #e3e7ec; }
.cx-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-card__nopic { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 56px; color: #9aa7b4; }
.cx-card__link { color: inherit; text-decoration: none; }
.cx-card__link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.cx-card__link:hover { color: inherit; text-decoration: none; }
.cx-card:has(.cx-card__link:focus-visible) { outline: 2px solid var(--bp-accent, #e8622c); outline-offset: 3px; }
.cx-card__nav { position: absolute; z-index: 2; top: 50%; width: 38px; height: 38px; margin-top: -19px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #14283c; cursor: pointer; box-shadow: 0 1px 6px rgba(0, 0, 0, .25); transition: background .15s, transform .15s; }
.cx-card__nav:hover { background: #fff; transform: scale(1.08); }
.cx-card__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cx-card__nav--prev { left: 10px; }
.cx-card__nav--next { right: 10px; }
.cx-card__count { position: absolute; z-index: 2; right: 10px; bottom: 10px; padding: 2px 9px; border-radius: 999px; background: rgba(15, 28, 42, .78); color: #fff; font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }

.cx-gallery__thumb--offer { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #14283c; color: #fff; opacity: 1; }
.cx-gallery__thumb--offer .material-icons-outlined { font-size: 26px; }
.cx-gallery__thumb--offer small { font-size: .72rem; font-weight: 600; line-height: 1.15; }
.cx-gallery__stage:has(.cx-gallery__offer:not([hidden])) .cx-gallery__count { display: none; }
@media (max-width: 600px) {
  .cx-gallery__stage:has(.cx-gallery__offer:not([hidden])) { aspect-ratio: auto; height: 470px; max-height: none; }
  .cx-gallery__stage:has(.cx-gallery__offer:not([hidden])) .cx-gallery__nav { top: 26px; }
}

/* Заглавната част: само заглавие и бутони */
.cx-hero { grid-template-columns: minmax(0, 1fr); padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.cx-params dd { text-align: right; }

/* Общата карта в каталога */
.cx-allmap { margin: 18px 0 16px; }
#cxMapBox .leaflet-popup-content { margin: 10px; }
.cx-allmap__toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 10px; background: #14283c; color: #fff; font-weight: 700; cursor: pointer; transition: filter .15s, transform .15s; }
.cx-allmap__toggle:hover { filter: brightness(1.2); }
.cx-allmap__toggle:active { transform: translateY(1px); }
.cx-allmap__toggle:focus-visible { outline: 2px solid var(--bp-accent, #e8622c); outline-offset: 2px; }
.cx-allmap__box { height: clamp(320px, 55vh, 560px); margin-top: 12px; border: 1px solid #d5dde5; border-radius: 14px; overflow: hidden; background: #e3e7ec; }
.cx-allmap__box[hidden] { display: none; }
.cx-allmap__pop { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; color: #14283c !important; text-decoration: none !important; }
.cx-allmap__pop img { width: 100%; height: 120px; margin-bottom: 6px; border-radius: 8px; object-fit: cover; }
.cx-allmap__pop b { font-size: 1rem; line-height: 1.25; }
.cx-allmap__pop:hover b { text-decoration: underline; }
.cx-allmap__pop span { font-size: .85rem; color: #4b5b6b; }
.cx-allmap__pop .cx-allmap__offers { color: #14283c; font-weight: 600; }

/* Как се променят цените: водещата графика е широка, другите две са под нея */
.cx-trend { margin: 48px 0; }
.cx-trend__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 20px; }
.cx-trend__head h2 { margin: 0 0 8px; }
.cx-trend__head p { max-width: 680px; margin: 0; color: var(--bp-ink-2); line-height: 1.55; }
.cx-trend__ranges { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bp-paper-2); }
.cx-trend__ranges[hidden] { display: none; }
.cx-trend__ranges button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--bp-ink-2); font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.cx-trend__ranges button[hidden] { display: none; }
.cx-trend__ranges button:hover { color: var(--bp-ink); }
.cx-trend__ranges button[aria-pressed="true"] { background: #fff; color: var(--bp-ink); box-shadow: 0 1px 3px rgba(16, 24, 32, .16); }
.cx-trend__ranges button:focus-visible { outline: 2px solid var(--bp-accent); outline-offset: 1px; }
.cx-trend__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cx-trend__grid[hidden] { display: none; }
.cx-trend__card { min-width: 0; margin: 0; padding: 20px 20px 12px; border: 1px solid var(--bp-line); border-radius: var(--bp-radius); background: #fff; }
.cx-trend__card[hidden] { display: none; }
.cx-trend__card--sale_sqm { grid-column: 1 / -1; box-shadow: var(--bp-shadow); }
.cx-trend__card figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: baseline; margin-bottom: 10px; }
.cx-trend__name { grid-column: 1 / -1; font-size: .9rem; color: var(--bp-ink-2); }
.cx-trend__value { font-size: 1.45rem; line-height: 1.2; color: var(--bp-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cx-trend__card--sale_sqm .cx-trend__value { font-size: 2.1rem; }
.cx-trend__delta { font-size: .86rem; font-weight: 600; color: var(--bp-ink-2); text-align: right; }
.cx-trend__plot { position: relative; width: 100%; touch-action: pan-y; border-radius: 8px; }
.cx-trend__plot:focus-visible { outline: 2px solid var(--bp-accent); outline-offset: 3px; }
.cx-trend__plot svg { display: block; max-width: 100%; }
.cx-trend__grid-line { stroke: var(--bp-line); stroke-width: 1; }
.cx-trend__tick { fill: var(--bp-ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.cx-trend__line { fill: none; stroke: var(--bp-accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.cx-trend__line--est { stroke-width: 2; stroke-dasharray: 2 6; }
.cx-trend__area { fill: var(--bp-accent); fill-opacity: .08; }
.cx-trend__dot { fill: var(--bp-accent); stroke: #fff; stroke-width: 2; }
.cx-trend__cross { stroke: var(--bp-ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.cx-trend__tip { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 1px; padding: 8px 11px; border-radius: 8px; background: #14283c; color: #fff; font-size: .8rem; line-height: 1.35; white-space: nowrap; pointer-events: none; }
.cx-trend__tip[hidden] { display: none; }
.cx-trend__tip b { font-size: .95rem; }
.cx-trend__tip em { font-style: normal; opacity: .75; }
.cx-trend__empty { margin: 0; padding: 40px 0; text-align: center; color: var(--bp-ink-3); }
.cx-trend__note { display: none; margin: 12px 0 0; font-size: .86rem; color: var(--bp-ink-3); }
.cx-trend.has-estimated .cx-trend__note { display: block; }
.cx-trend__data { margin-top: 12px; }
.cx-trend__data summary { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; cursor: pointer; }
@media (max-width: 720px) {
  .cx-trend__grid { grid-template-columns: minmax(0, 1fr); }
  .cx-trend__card { padding: 16px 14px 8px; }
  .cx-trend__card--sale_sqm .cx-trend__value { font-size: 1.75rem; }
  .cx-trend__delta { grid-column: 1 / -1; text-align: left; }
  .cx-trend__ranges { width: 100%; }
  .cx-trend__ranges button { flex: 1; }
}

/* Докато няма достатъчно данни за графика */
.cx-trend--pending h2 { margin: 0 0 16px; }
.cx-trend__pending-card { padding: 20px; border: 1px dashed var(--bp-line); border-radius: var(--bp-radius); background: var(--bp-paper-2); }
.cx-trend__pending-card svg { display: block; width: 100%; height: 40px; margin-bottom: 12px; }
.cx-trend__pending-card line { stroke: var(--bp-ink-3); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; }
.cx-trend__pending-card p { margin: 0; color: var(--bp-ink-2); line-height: 1.55; }
.cx-trend__pending-card b { color: var(--bp-ink); }
/* Абонамент за изгодни цени: тънка лента, полетата и бутонът са на един ред */
.cx-sub { display: grid; gap: 10px; margin-top: 12px; padding: 12px 16px; border: 1px solid var(--bp-line); border-radius: 12px; background: #fafbfb; color: var(--bp-ink); }
.cx-sub__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.cx-sub__text h3 { margin: 0; font-size: 1rem; line-height: 1.3; color: var(--bp-ink); }
.cx-sub__text p { margin: 0; font-size: .86rem; line-height: 1.35; color: var(--bp-ink-2); }
.cx-sub__fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.15fr) auto; gap: 8px; }
.cx-sub__fields input[type="text"], .cx-sub__fields input[type="email"], .cx-sub__fields input[type="tel"] { width: 100%; min-height: 38px; padding: 0 11px; border: 1px solid var(--bp-line); border-radius: 8px; background: #fff; color: var(--bp-ink); font-size: .9rem; }
.cx-sub__fields input:focus-visible { outline: 2px solid var(--bp-accent, #e8622c); outline-offset: 1px; }
.cx-sub__send { min-height: 38px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--bp-accent, #e8622c); color: #fff; font-size: .9rem; font-weight: 700; white-space: nowrap; cursor: pointer; transition: filter .15s, transform .15s; }
.cx-sub__send:hover { filter: brightness(1.1); }
.cx-sub__send:active { transform: translateY(1px); }
.cx-sub__send:focus-visible { outline: 2px solid var(--bp-accent, #e8622c); outline-offset: 2px; }
.cx-sub__send:disabled { opacity: .6; cursor: wait; }
.cx-sub__agree { grid-column: 1 / -1; display: flex; gap: 7px; align-items: flex-start; font-size: .78rem; line-height: 1.35; color: var(--bp-ink-2); cursor: pointer; }
.cx-sub__agree input { flex: none; margin-top: 2px; accent-color: var(--bp-accent, #e8622c); }
.cx-sub__msg { grid-column: 1 / -1; margin: 0; font-size: .86rem; font-weight: 600; }
.cx-sub__msg.is-error { color: #b3261e; }
@media (min-width: 1100px) {
  .cx-sub { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); column-gap: 20px; align-items: center; }
}
@media (max-width: 720px) {
  .cx-sub__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .cx-sub__fields { grid-template-columns: minmax(0, 1fr); }
}

/* Сгради на комплекса: входове, етажи, етажни планове */
.cx-bld { margin: 40px 0; }
.cx-bld h2 { margin-bottom: 16px; }
.cx-bld__building + .cx-bld__building { margin-top: 24px; }
.cx-bld__building h3 { font-size: 1.1rem; margin: 0 0 10px; }
.cx-bld__enter { border: 1px solid var(--bp-line); border-radius: var(--bp-radius); background: var(--bp-paper-2); margin-bottom: 12px; overflow: hidden; }
.cx-bld__enter summary { cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-weight: 600; list-style: none; }
.cx-bld__enter summary::-webkit-details-marker { display: none; }
.cx-bld__enter[open] summary { border-bottom: 1px solid var(--bp-line); }
.cx-bld__plans { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 12px 16px 0; }
.cx-bld__plans a, .cx-bld__links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--bp-line); border-radius: 999px; text-decoration: none; color: inherit; background: #fff; }
.cx-bld__plans a:hover, .cx-bld__links a:hover { border-color: var(--bp-ink-3); }
.cx-bld__floors { width: 100%; border-collapse: collapse; margin: 12px 0 4px; }
.cx-bld__floors th, .cx-bld__floors td { text-align: left; padding: 8px 16px; border-top: 1px solid var(--bp-line); vertical-align: middle; }
.cx-bld__floors thead th { border-top: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bp-ink-3); }
.cx-bld__links { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-bld__links a { padding: 2px; border-radius: 6px; font-size: .75rem; font-weight: 700; min-width: 40px; justify-content: center; }
.cx-bld__links img { display: block; width: 56px; height: 40px; object-fit: cover; border-radius: 4px; }
.cx-bld .is-free { color: #1a7f43; }
.cx-bld .is-sold { color: #b3261e; }
@media (max-width: 575px) { .cx-bld__floors th, .cx-bld__floors td { padding: 8px 10px; } }
