/* Эварус — страница города (templates/core/main.twig). 2026 */

.cp { font-family: 'Roboto', 'RobotoRegular', Arial, sans-serif; color: #3a4148; }
.cp *, .cp *:before, .cp *:after { box-sizing: border-box; }
.cp-hero p, .cp-list p, .cp-owner p, .cp-noads p, .cp-tools p, p.cp-empty { margin: 0; }
.cp-wrap { max-width: 1170px; margin: 0 auto; padding: 0 20px; }
.cp a { color: #1a8fc4; }

/* ---------- Первый экран ---------- */
.cp-hero { background: linear-gradient(180deg, #fff 0%, #f6f8fa 100%); border-bottom: 1px solid #e8ecef; padding: 6px 0 22px; }
.cp-hero .breadcrumbs { margin: 10px 0 12px; }
.cp-h1 { margin: 0 0 14px; font-size: 34px; line-height: 1.2; font-weight: 900; color: #2f363d; letter-spacing: -.2px; }
.cp-city { display: inline-flex; align-items: center; gap: 2px; color: #1da8e1 !important; text-decoration: none; border-bottom: 2px dashed rgba(29, 168, 225, .45); cursor: pointer; white-space: nowrap; }
.cp-city:hover { border-bottom-color: #1da8e1; }
.cp-facts { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cp-facts li { padding: 7px 13px; border-radius: 18px; background: #fff; border: 1px solid #e3e8ec; font-size: 15px; color: #59636d; line-height: 1.35; }
.cp-facts b { color: #2f363d; }
.cp-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.cp-mapbtn { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px; border-radius: 10px; border: 2px solid #1da8e1; background: #fff; color: #1479a6 !important; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .15s; }
.cp-mapbtn:hover { background: #eaf7fd; }
.cp-mapbtn .show-map-btn-text-hidden { display: none; }
.cp-mapbtn.show .show-map-btn-text-show { display: none; }
.cp-mapbtn.show .show-map-btn-text-hidden { display: inline; }
.cp-ownerlink { font-size: 14px; color: #6b747c !important; text-decoration: none; }
.cp-ownerlink span { color: #1a8fc4; }
.cp-ownerlink:hover span { text-decoration: underline; }

/* ---------- Карта ---------- */
.cp-map .mainmap__container { display: block !important; height: 0; overflow: hidden; border-radius: 12px; transition: height .3s; }
.cp-map.show { padding: 18px 0 4px; }
.cp-map.show .mainmap__container { height: 440px; box-shadow: 0 6px 22px rgba(0, 0, 0, .08); }

/* ---------- Фильтры ---------- */
.cp-tools { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 18px -20px 6px; padding: 12px 20px; background: rgba(246, 246, 246, .94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cp-tools[hidden] { display: none; }
.cp-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cp-filters::-webkit-scrollbar { display: none; }
.cp-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px; border: 1px solid #d5dce1; border-radius: 19px; background: #fff; color: #3a4148; font-size: 14px; font-family: inherit; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.cp-chip[hidden] { display: none; }
.cp-chip small { font-size: 12px; color: #9aa3ab; }
.cp-chip:hover { border-color: #1da8e1; }
.cp-chip[aria-pressed="true"] { background: #2f363d; border-color: #2f363d; color: #fff; }
.cp-chip[aria-pressed="true"] small { color: #c2cad0; }
.cp-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #6b747c; }
.cp-sort select { height: 38px; padding: 0 10px; border: 1px solid #d5dce1; border-radius: 10px; background: #fff; font-size: 14px; color: #3a4148; font-family: inherit; }
.cp-empty { margin: 10px 0 !important; padding: 16px 18px; border-radius: 10px; background: #fff; color: #6b747c; }
.cp-empty[hidden] { display: none; }
.cp-link { background: none; border: 0; padding: 0; color: #1a8fc4; cursor: pointer; font: inherit; text-decoration: underline; }

/* ---------- Карточка объявления ---------- */
.cp-list { display: flex; flex-direction: column; gap: 16px; margin-top: 10px; }
.ad { display: grid; grid-template-columns: 260px minmax(0, 1fr) 250px; grid-template-rows: auto 1fr auto auto; grid-template-areas: "photo main side" "photo prices side" "photo desc desc" "owner owner owner"; column-gap: 22px; background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 2px 10px rgba(0, 0, 0, .05); border: 1px solid #edf0f2; }
.ad_premium { border: 2px solid #f0c64a; box-shadow: 0 8px 26px rgba(240, 198, 74, .25); }
.ad__photo { grid-area: photo; position: relative; align-self: start; }
.ad__photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #eef2f5; }
.ad__badge { position: absolute; top: 8px; left: 8px; padding: 4px 10px; border-radius: 12px; background: linear-gradient(135deg, #ffd75e, #f0b429); color: #5a4100; font-size: 12px; font-weight: 700; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.ad__main { grid-area: main; min-width: 0; }
.ad__title { font-size: 21px; line-height: 1.3; font-weight: 700; color: #2f363d; overflow-wrap: anywhere; }
.ad__addr { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 14px; line-height: 1.4; color: #6b747c; }
.ad__addr svg { flex: 0 0 auto; margin-top: 1px; }
.ad__prices { grid-area: prices; align-self: start; list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 10px; }
.ad__prices li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 8px; background: #f5f7f9; font-size: 14px; line-height: 1.35; color: #6b747c; }
.ad__prices b { color: #2f363d; white-space: nowrap; }
.ad__side { grid-area: side; display: flex; flex-direction: column; align-items: stretch; }
.ad__call { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 10px 14px; border-radius: 12px; background: #f3ca31; color: #2f363d !important; font-size: 19px; font-weight: 700; text-decoration: none; white-space: nowrap; box-shadow: 0 6px 16px rgba(243, 202, 49, .35); transition: filter .15s, transform .1s; }
.ad__call:hover { filter: brightness(1.04); }
.ad__call:active { transform: translateY(1px); }
.ad__direct { margin-top: 8px !important; text-align: center; font-size: 13px; color: #8a939b; }
.ad__desc { grid-area: desc; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef1f3; }
.ad__desc-text { font-size: 15px; line-height: 1.55; color: #59636d; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ad__desc_open .ad__desc-text { display: block; -webkit-line-clamp: unset; }
.ad__more { margin-top: 4px; padding: 0; border: 0; background: none; color: #1da8e1; font-size: 14px; font-family: inherit; cursor: pointer; }
.ad__more[hidden] { display: none; }
.ad__owner { grid-area: owner; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 14px; padding-top: 10px; border-top: 1px dashed #e8ecef; font-size: 12px; color: #a3abb2; }
.ad__owner a { color: #8a939b !important; }
.ad__owner a:hover { color: #1a8fc4 !important; }

.cp-more { display: block; margin: 22px auto 0; max-width: 360px; padding: 15px 20px; border-radius: 12px; border: 2px solid #1da8e1; background: #fff; color: #1479a6 !important; font-weight: 700; font-size: 16px; text-align: center; text-decoration: none; }
.cp-more:hover { background: #eaf7fd; }

.cp-btn { display: inline-block; padding: 14px 22px; border-radius: 10px; background: #2bb673; color: #fff !important; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; }
.cp-btn:hover { background: #239e62; }
.cp-owner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin: 30px 0 10px; padding: 22px 24px; border-radius: 14px; background: #2f363d; color: #c9d1d6; }
.cp-owner__title { font-size: 19px; font-weight: 700; color: #fff; margin-bottom: 4px !important; }
.cp-owner p { font-size: 15px; line-height: 1.5; color: #c9d1d6; }
.cp-owner p.cp-owner__title { color: #fff; }

.cp-noads { margin: 24px 0; padding: 32px 28px; border-radius: 14px; background: #fff; text-align: center; line-height: 1.6; }
.cp-noads p { margin: 0 0 16px !important; }
.cp-noads__title { font-size: 24px; line-height: 1.3; font-weight: 700; color: #2f363d; }

.cp-fab { position: fixed; z-index: 60; left: 50%; bottom: 18px; transform: translateX(-50%); display: none; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border: 0; border-radius: 23px; background: #2f363d; color: #fff; font-size: 15px; font-weight: 700; font-family: inherit; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); cursor: pointer; }

.cp-text { padding-top: 10px; }
/* блоки «Соседние города» и «Цены» — по той же сетке, что и список */
.cp .container { width: auto; max-width: 1170px; padding: 0 20px; }

/* ---------- Планшет ---------- */
@media (max-width: 1000px) {
  .ad { grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "photo main" "photo prices" "photo side" "desc desc" "owner owner"; }
  .ad__side { margin-top: 14px; }
  .ad__direct { text-align: left; }
}

/* ---------- Телефон ---------- */
@media (max-width: 640px) {
  .cp-wrap, .cp .container { padding: 0 12px; }
  .cp-hero { padding-bottom: 16px; }
  .cp-h1 { font-size: 24px; margin-bottom: 12px; }
  .cp-facts { gap: 6px; margin-bottom: 14px; }
  .cp-facts li { font-size: 13px; padding: 5px 10px; }
  .cp-hero__actions { gap: 10px; }
  .cp-mapbtn { width: 100%; justify-content: center; }
  .cp-ownerlink { font-size: 13px; }
  .cp-map.show .mainmap__container { height: 360px; }
  .cp-tools { margin: 10px -12px 4px; padding: 10px 12px; gap: 8px; }
  .cp-filters { width: 100%; }
  .cp-sort { width: 100%; justify-content: space-between; }
  .cp-sort select { flex: 1; max-width: 240px; }
  .cp-list { gap: 12px; }
  .ad { grid-template-columns: 116px minmax(0, 1fr); grid-template-areas: "photo main" "prices prices" "side side" "desc desc" "owner owner"; column-gap: 12px; padding: 12px; border-radius: 12px; }
  .ad__photo img { aspect-ratio: 1 / 1; border-radius: 8px; }
  .ad__badge { top: 5px; left: 5px; padding: 3px 7px; font-size: 11px; }
  .ad__title { font-size: 17px; }
  .ad__addr { font-size: 13px; margin-top: 4px; }
  .ad__prices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
  .ad__prices li { flex-direction: column; gap: 1px; padding: 6px 9px; font-size: 12px; background: #f5f7f9; }
  .ad__prices b { font-size: 14px; }
  .ad__side { margin-top: 12px; }
  .ad__call { min-height: 52px; font-size: 18px; }
  .ad__direct { display: none; }
  .ad__desc { margin-top: 10px; padding-top: 10px; }
  .ad__desc-text { font-size: 14px; }
  .ad__owner { margin-top: 10px; padding-top: 8px; }
  .cp-owner { padding: 20px 18px; }
  .cp-owner .cp-btn { width: 100%; text-align: center; }
  .cp-fab:not([hidden]) { display: inline-flex; }
}
