/*
 * Catalog, property card and property page. Mobile first.
 * Brand (TQ): yellow only on clickable elements, cypress only decorative, text left-aligned.
 */

.ev-icon { flex: none; }

/* Breadcrumbs */
.ev-crumbs ol {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ev-ink-3);
}
.ev-crumbs li + li::before { content: "›"; margin-right: 6px; }
.ev-crumbs a { color: inherit; text-decoration: none; }
.ev-crumbs a:hover { color: var(--ev-ink); }
.ev-crumbs [aria-current] { color: var(--ev-ink); }

.ev-eyebrow {
  margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ev-ink-3);
}

/* Catalog head */
.ev-catalog__title { margin: 4px 0 20px; font-size: var(--ev-fs-title); font-weight: 700; line-height: 1.15; }
.ev-catalog__count { font-weight: 500; color: var(--ev-ink-3); }

/* Filter form */
.ev-filter {
  display: grid; gap: 14px; padding: 18px; margin-bottom: 20px;
  background: var(--ev-surface); border-radius: var(--ev-radius-md);
}
.ev-filter__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.ev-filter__label {
  padding: 0; margin-bottom: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ev-ink-3);
}
.ev-filter__range { display: flex; align-items: center; gap: 8px; color: var(--ev-ink-3); }
.ev-filter__group--id .ev-input { width: 100%; }
.ev-input {
  width: 100%; min-width: 0; height: 46px; padding: 0 12px;
  border: 1px solid var(--ev-line-strong); border-radius: var(--ev-radius-sm);
  background: var(--ev-surface); color: var(--ev-ink); font: 500 15px/1 var(--ev-font);
}
select.ev-input {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ev-ink-3) 50%), linear-gradient(135deg, var(--ev-ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.ev-input:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 1px; }
.ev-filter__actions { display: flex; align-items: center; gap: 16px; }
.ev-filter__reset { font-size: 14px; color: var(--ev-ink-3); }

@media (min-width: 768px) {
  .ev-filter { display: flex; flex-wrap: wrap; align-items: flex-end; }
  .ev-filter__group { flex: 1 1 200px; }
  .ev-filter__group--id { flex: 0 1 150px; }
  .ev-filter__group--place { flex: 1 1 38%; }
  .ev-filter__group--wide { flex: 1 1 100%; }
}

/* Pill checkboxes (filter options) */
.ev-filter__checks { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-check--pill { position: relative; align-items: center; gap: 0; }
.ev-check--pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ev-check--pill span {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px;
  border: 1px solid var(--ev-line-strong); border-radius: var(--ev-radius-pill); background: var(--ev-surface);
  font-size: 14px; font-weight: 600; color: var(--ev-ink);
}
.ev-check--pill small { font-size: 12px; }
.ev-check--pill a { color: inherit; text-decoration: none; }
.ev-check--pill input:checked + span { background: var(--ev-yellow); border-color: var(--ev-yellow); color: var(--ev-ink-on-yellow); }
.ev-check--pill input:focus-visible + span { outline: 2px solid var(--ev-ink); outline-offset: 1px; }

/* «Більше фільтрів» — <details>, works without JS */
.ev-filter__more { flex: 1 1 100%; min-width: 0; border-top: 1px solid var(--ev-line); padding-top: 12px; }
.ev-filter__more-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 700; color: var(--ev-ink);
}
.ev-filter__more-toggle::-webkit-details-marker { display: none; }
.ev-filter__more-toggle::after {
  content: ""; width: 7px; height: 7px; margin-left: 2px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s;
}
.ev-filter__more[open] > .ev-filter__more-toggle::after { transform: rotate(-135deg) translateY(-2px); }
.ev-filter__more-toggle:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 2px; }
.ev-filter__more-body { display: grid; gap: 16px; padding-top: 12px; }
@media (min-width: 768px) {
  .ev-filter__more-body { display: flex; flex-wrap: wrap; gap: 18px 20px; }
  .ev-filter__more-body > .ev-filter__group { flex: 0 1 260px; }
  .ev-filter__more-body > .ev-filter__group--wide { flex: 1 1 100%; }
}
.ev-filter__badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--ev-radius-pill); background: var(--ev-ink); color: #fff; font-size: 12px; font-weight: 700;
}
.ev-filter__badge[hidden] { display: none; }

/* Bottom sheet on phones (catalog.js adds .has-sheet; without JS the form stays inline) */
.ev-filter__sheet-head { display: none; }
.ev-filter-open { display: none; }
@media (max-width: 767px) {
  .has-sheet .ev-filter-open:not([hidden]) {
    display: inline-flex; gap: 8px; width: 100%; justify-content: center; margin-bottom: 16px;
    background: var(--ev-surface); color: var(--ev-ink); border: 1px solid var(--ev-line-strong);
  }
  .has-sheet .ev-filter {
    position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; margin: 0;
    max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: 0 18px 0; border-radius: var(--ev-radius-lg) var(--ev-radius-lg) 0 0; box-shadow: var(--ev-shadow-lg);
    transform: translateY(105%); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }
  .has-sheet.is-open .ev-filter { transform: none; visibility: visible; transition: transform 0.25s ease; }
  .has-sheet .ev-filter__sheet-head {
    position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
    margin: 0 -18px; padding: 14px 18px; background: var(--ev-surface); border-bottom: 1px solid var(--ev-line);
  }
  .ev-filter__sheet-title { margin: 0; font-size: 20px; font-weight: 700; }
  .ev-filter__sheet-title:focus { outline: none; }
  .ev-filter__close {
    width: 40px; height: 40px; border: 0; border-radius: var(--ev-radius-pill); background: var(--ev-bg);
    font-size: 24px; line-height: 1; color: var(--ev-ink); cursor: pointer;
  }
  .has-sheet .ev-filter__actions {
    position: sticky; bottom: 0; margin: 0 -18px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: var(--ev-surface); border-top: 1px solid var(--ev-line);
  }
  .has-sheet .ev-filter__actions .ev-btn { flex: 1; }
  .ev-filter-backdrop { position: fixed; inset: 0; z-index: 69; background: rgba(17, 17, 17, 0.45); }
  .ev-filter-backdrop[hidden] { display: none; }
}
html.ev-noscroll { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .has-sheet .ev-filter, .has-sheet.is-open .ev-filter { transition: none; }
}

/* Selected filters */
.ev-chip--remove { gap: 8px; }
.ev-chip--remove .ev-icon { color: var(--ev-ink-3); }
.ev-chip--remove:hover .ev-icon { color: var(--ev-ink); }
.ev-active-filters .ev-filter__reset { margin-left: 4px; }

/* Chips (links) */
.ev-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.ev-chips__label {
  margin-right: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ev-ink-3);
}
.ev-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px;
  border-radius: var(--ev-radius-pill); background: var(--ev-surface); color: var(--ev-ink);
  font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid var(--ev-line);
}
.ev-chips--small .ev-chip { padding: 6px 12px; font-size: 13px; }
.ev-chip:hover { border-color: var(--ev-line-strong); }
.ev-chip.is-active { background: var(--ev-yellow); border-color: var(--ev-yellow); color: var(--ev-ink-on-yellow); }
.ev-chip__n { font-weight: 500; color: var(--ev-ink-3); }
.ev-chip.is-active .ev-chip__n { color: var(--ev-ink-2); }

/* Toolbar */
.ev-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin: 18px 0 16px;
}
.ev-toolbar__count { margin: 0; font-weight: 700; }
.ev-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; }
.ev-sort__label { color: var(--ev-ink-3); }
.ev-sort__link { color: var(--ev-ink-2); text-decoration: none; padding: 4px 0; }
.ev-sort__link.is-active { color: var(--ev-ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--ev-yellow); }

/* Grid of cards */
.ev-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ev-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }

/* Loading: results fade and a thin bar runs along the top; error: an inline alert with «Спробувати ще» */
[data-ev-results] { position: relative; }
[data-ev-results][aria-busy="true"] { opacity: 0.55; transition: opacity 0.15s; pointer-events: none; }
[data-ev-results][aria-busy="true"]::before {
  content: ""; position: absolute; z-index: 2; top: -8px; left: 0; height: 3px; width: 30%;
  border-radius: 3px; background: var(--ev-ink); animation: ev-busy 1s ease-in-out infinite;
}
@keyframes ev-busy { from { left: 0; } to { left: 70%; } }
@media (prefers-reduced-motion: reduce) { [data-ev-results][aria-busy="true"]::before { animation: none; width: 100%; } }
.ev-results__error {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px; padding: 16px 18px; background: var(--ev-surface); border-radius: var(--ev-radius-md);
  border-left: 4px solid var(--ev-ink);
}
.ev-results__error p { margin: 0; font-weight: 600; }

.ev-empty { padding: 40px 24px; background: var(--ev-surface); border-radius: var(--ev-radius-md); }
.ev-empty__title { margin: 0 0 6px; font-size: 20px; font-weight: 700; }

/* Property card */
.ev-pcard {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--ev-surface); border-radius: var(--ev-radius-lg); box-shadow: var(--ev-shadow-sm);
  transition: box-shadow 0.15s ease;
}
.ev-pcard:hover { box-shadow: var(--ev-shadow-md); }
.ev-pcard__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ev-cypress-wash); }
.ev-pcard__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.ev-pcard__badges { position: absolute; z-index: 1; top: 12px; left: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ev-pcard__body { display: flex; flex-direction: column; flex: 1; padding: 18px; }
.ev-pcard__price { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.1; }
.ev-pcard__ppm { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--ev-ink-3); }
.ev-pcard__title { margin: 6px 0 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.ev-pcard__title a { color: inherit; text-decoration: none; }
.ev-pcard__title a::after { content: ""; position: absolute; inset: 0; }
.ev-pcard { position: relative; }
.ev-pcard__title a:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 2px; }
.ev-pcard__loc { display: flex; align-items: center; gap: 4px; margin: 4px 0 0; font-size: 13px; color: var(--ev-ink-3); }
.ev-pcard__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ev-ink-2); }
.ev-pcard__facts li { display: inline-flex; align-items: center; gap: 4px; }
.ev-pcard__facts .ev-icon { color: var(--ev-ink-3); }
.ev-pcard__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin: 10px 0 0; }
.ev-pcard__kind { display: flex; flex-direction: column; gap: 2px; }
.ev-pcard__type { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ev-ink-3); }
.ev-pcard__added { font-size: 12px; color: var(--ev-ink-3); }
.ev-pcard__agent { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--ev-line); }
.ev-pcard__body > .ev-pcard__agent { margin-top: 14px; }
.ev-pcard__avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.ev-pcard__agent-name { display: block; font-size: 13px; font-weight: 600; }
.ev-pcard__agent-role { display: block; font-size: 12px; color: var(--ev-ink-3); }
.ev-pcard--busy .ev-pcard__img { filter: grayscale(0.35); }
.ev-pcard__actions { position: absolute; z-index: 2; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; }
.ev-pcard__act {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border: 0; border-radius: 50%; background: var(--ev-surface); color: var(--ev-ink); box-shadow: var(--ev-shadow-sm); cursor: pointer;
}
.ev-pcard__act:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 2px; }

/* Badges (labels, not clickable → no yellow) */
.ev-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px;
  border-radius: var(--ev-radius-pill); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.ev-badge--dark { background: var(--ev-ink); color: var(--ev-ink-on-dark); }
.ev-badge--cypress { background: var(--ev-cypress); color: var(--ev-ink-on-dark); }
.ev-badge--light { background: var(--ev-surface); color: var(--ev-ink); }
.ev-badge--muted { background: var(--ev-cypress-wash); color: var(--ev-cypress-deep); }

/* Pagination */
.ev-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 40px; }
.ev-pagination__btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px;
  border: 1px solid var(--ev-line); border-radius: var(--ev-radius-sm); background: var(--ev-surface);
  color: var(--ev-ink); font-weight: 600; text-decoration: none;
}
.ev-pagination__btn.is-active { background: var(--ev-yellow); border-color: var(--ev-yellow); color: var(--ev-ink-on-yellow); }
.ev-pagination__gap { align-self: center; padding: 0 4px; color: var(--ev-ink-3); }

/* Property page */
.ev-property__head { display: grid; gap: 16px; margin-bottom: 20px; }
.ev-property__badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.ev-property__title { margin: 0; font-size: var(--ev-fs-title); font-weight: 700; line-height: 1.15; }
.ev-property__addr { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; color: var(--ev-ink-2); }
.ev-property__amount { margin: 0; font-size: 34px; font-weight: 700; line-height: 1; }
.ev-property__ppm { margin: 6px 0 0; font-size: 13px; color: var(--ev-ink-3); }
/* «Власник бажає отримати суму в євро: 150 000 €» — the client's own currency under the base price (CRM #137) */
.ev-owner-note { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--ev-ink-2); }
.ev-owner-note--sm { font-size: 12px; color: var(--ev-ink-3); }
/* «≈ … грн» + «i»: a <details> toggletip, the NBU rate date opens on tap (no title tooltips on touch screens);
   above the card's stretched title link. */
.ev-uah__sum { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
.ev-uah__sum::-webkit-details-marker { display: none; }
.ev-uah__sum:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 2px; border-radius: var(--ev-radius-sm); }
.ev-uah__i { display: inline-flex; padding: 4px; margin: -4px; color: var(--ev-ink-4); }
.ev-uah__sum:hover .ev-uah__i, .ev-uah[open] .ev-uah__i { color: var(--ev-ink); }
.ev-uah__note { margin: 4px 0 0; font-size: 12px; color: var(--ev-ink-3); }
.ev-property__lists { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
@media (min-width: 1024px) {
  .ev-property__head { grid-template-columns: 1fr auto; align-items: end; }
  .ev-property__amount { font-size: 44px; }
}

.ev-gallery { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); border-radius: var(--ev-radius-md); overflow: hidden; }
.ev-gallery__item { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ev-cypress-wash); }
.ev-gallery__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-gallery__item--main { grid-column: 1 / -1; }
.ev-gallery__more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--ev-overlay-60); color: var(--ev-ink-on-dark); font-weight: 700;
}
.ev-gallery__link { position: absolute; inset: 0; display: block; cursor: zoom-in; }
.ev-gallery__link:focus-visible { outline: 3px solid var(--ev-ink); outline-offset: -3px; }
/* Odd number of extra photos: the last one takes the full row instead of leaving a hole */
.ev-gallery--n2 .ev-gallery__item:last-child,
.ev-gallery--n4 .ev-gallery__item:last-child { grid-column: 1 / -1; }
@media (min-width: 1024px) {
  .ev-gallery { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; }
  .ev-gallery__item { aspect-ratio: auto; }
  .ev-gallery__item--main { grid-column: auto; grid-row: span 2; }
  /* Fewer than 5 photos: fit the layout to the count, no empty columns */
  .ev-gallery--n1 { grid-template-columns: 1fr; }
  .ev-gallery--n2, .ev-gallery--n3 { grid-template-columns: 2fr 1fr; }
  .ev-gallery--n2 .ev-gallery__item:last-child { grid-column: auto; grid-row: span 2; }
  .ev-gallery--n4 .ev-gallery__item:last-child { grid-column: span 2; }
}

/* Photo viewer (template-parts/lightbox.php) — full screen, black overlay over photos only */
.ev-lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--ev-ink-on-dark); overflow: hidden;
}
.ev-lightbox::backdrop { background: var(--ev-overlay-90); }
html:has(.ev-lightbox[open]) { overflow: hidden; }
.ev-lightbox__bar {
  position: absolute; z-index: 1; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; pointer-events: none;
}
.ev-lightbox__bar > * { pointer-events: auto; }
.ev-lightbox__count { font-weight: 600; }
.ev-lightbox__track {
  display: flex; height: 100%; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-width: none;
}
.ev-lightbox__track::-webkit-scrollbar { display: none; }
.ev-lightbox__slide {
  flex: 0 0 100%; display: flex; align-items: center; justify-content: center;
  padding: 64px 16px; scroll-snap-align: center; scroll-snap-stop: always;
}
.ev-lightbox__slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.ev-lightbox__btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: inherit; cursor: pointer;
}
.ev-lightbox__btn:hover { background: rgba(255, 255, 255, 0.26); }
.ev-lightbox__btn:focus-visible { outline: 2px solid var(--ev-ink-on-dark); outline-offset: 2px; }
.ev-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.ev-lightbox__nav--prev { left: 16px; }
.ev-lightbox__nav--next { right: 16px; }
@media (hover: none) { .ev-lightbox__nav { display: none; } }

/* Map (Leaflet, assets/js/property.js). Own stacking context: Leaflet panes must not cover the sticky header */
.ev-map {
  position: relative; z-index: 0; height: 320px; overflow: hidden;
  border-radius: var(--ev-radius-md); background: var(--ev-cypress-wash); font-family: var(--ev-font);
}
@media (min-width: 1024px) { .ev-map { height: 380px; } }
.ev-map__placeholder { display: flex; align-items: center; justify-content: center; height: 100%; margin: 0; padding: 16px; color: var(--ev-cypress-deep); font-weight: 600; }
.ev-map__note { margin: 8px 0 0; font-size: 13px; color: var(--ev-ink-3); }
/* Brand map pin (property.js, offices.js): a cypress drop with a white house, its tip on the anchor (15, 36).
   Leaflet positions .ev-map__pin with a transform, so effects go on the inner .ev-map__pin-shape.
   .is-active (the office in focus on «Контакти»): bigger, yellow (an active state, TQ), pulsing ring under it. */
.ev-map__pin-shape { position: absolute; z-index: 1; inset: 0; transform-origin: 50% 120%; transition: transform 0.2s ease; }
.ev-map__pin-shape::before {
  content: ""; position: absolute; inset: 0;
  background: var(--ev-cypress-deep); border: 3px solid var(--ev-surface); border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); box-shadow: 0 4px 12px rgba(17, 17, 17, 0.28); transition: background-color 0.2s ease;
}
.ev-map__pin-shape::after {
  content: ""; position: absolute; top: 8px; left: 8px; width: 14px; height: 14px; background: var(--ev-surface);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 11 12 3l10 8v10h-7v-6H9v6H2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 11 12 3l10 8v10h-7v-6H9v6H2z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: background-color 0.2s ease;
}
.ev-map__pin.is-active .ev-map__pin-shape { transform: scale(1.4); }
.ev-map__pin.is-active .ev-map__pin-shape::before { background: var(--ev-yellow); }
.ev-map__pin.is-active .ev-map__pin-shape::after { background: var(--ev-ink-on-yellow); }
.ev-map__pin.is-active::after {
  content: ""; position: absolute; top: 36px; left: 15px; width: 44px; height: 16px; margin: -8px 0 0 -22px;
  border-radius: 50%; background: var(--ev-cypress); opacity: 0; animation: ev-pin-pulse 1.6s ease-out infinite;
}
@keyframes ev-pin-pulse {
  from { opacity: 0.55; transform: scale(0.2); }
  to { opacity: 0; transform: scale(1.4); }
}
@media (prefers-reduced-motion: reduce) {
  .ev-map__pin-shape, .ev-map__pin-shape::before, .ev-map__pin-shape::after { transition: none; }
  .ev-map__pin.is-active::after { animation: none; opacity: 0.35; }
}

/* Similar properties */
.ev-similar { margin-top: 56px; }

/* «Недавно переглянуті»: a scroll-snap strip of the catalog cards (hidden until seen.js fills it) */
.ev-seen[hidden] { display: none; }
.ev-seen.ev-block { margin-top: 56px; }
.ev-seen__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.ev-seen__clear {
  padding: 4px 0; border: 0; background: none; cursor: pointer;
  font: 600 14px/1.2 var(--ev-font); color: var(--ev-ink-3); text-decoration: underline;
}
.ev-seen__clear:hover { color: var(--ev-ink); }
.ev-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(82%, 320px); gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin;
  padding: 4px 2px 12px;
}
.ev-strip > * { scroll-snap-align: start; }
@media (min-width: 1024px) { .ev-strip { grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; } }
.ev-similar__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.ev-similar__all { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ev-ink); }

.ev-property__layout { display: grid; gap: 32px; margin-top: 32px; }
@media (min-width: 1024px) { .ev-property__layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; } }

.ev-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px;
  margin: 0; padding: 20px; list-style: none; background: var(--ev-surface); border-radius: var(--ev-radius-md);
}
.ev-facts li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.ev-facts .ev-icon { color: var(--ev-cypress); }

.ev-block { margin-top: 36px; }
.ev-block__title { margin: 0 0 12px; font-size: 25px; font-weight: 700; }
.ev-specs { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--ev-surface); border-radius: var(--ev-radius-md); overflow: hidden; }
.ev-specs th, .ev-specs td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--ev-line); }
.ev-specs th { width: 45%; font-weight: 500; color: var(--ev-ink-3); }
.ev-specs tr:last-child th, .ev-specs tr:last-child td { border-bottom: 0; }
.ev-video iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--ev-radius-md); }

.ev-agent-card { padding: 22px; background: var(--ev-surface); border-radius: var(--ev-radius-md); }
.ev-agent-card__photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.ev-agent-card__name { margin: 12px 0 0; font-size: 18px; font-weight: 700; }
.ev-agent-card__name a { color: var(--ev-ink); text-decoration: none; }
.ev-agent-card__name a:hover { text-decoration: underline; }
.ev-agent-card__role { margin: 2px 0 0; color: var(--ev-ink-3); }
.ev-property__code { margin: 14px 0 0; font-size: 13px; color: var(--ev-ink-3); }
@media (min-width: 1024px) { .ev-property__aside { position: sticky; top: 100px; align-self: start; } }

/* Landing SEO text (reviewed seo_landing) */
.ev-ltext:not(:has(*)) { display: none; }
.ev-ltext__intro { max-width: 820px; margin: -8px 0 24px; color: var(--ev-ink-2); }
.ev-ltext__intro p { margin: 0 0 10px; }
.ev-ltext--bottom { max-width: 820px; margin-top: 56px; }
.ev-ltext__body { color: var(--ev-ink-2); line-height: 1.65; }
.ev-ltext__body h2, .ev-ltext__body h3 { margin: 28px 0 12px; color: var(--ev-ink); font-size: 22px; }
.ev-faq { margin-top: 40px; }
.ev-faq__title { margin-bottom: 16px; font-size: 22px; }
.ev-faq__item { border-top: 1px solid var(--ev-line); }
.ev-faq__item:last-child { border-bottom: 1px solid var(--ev-line); }
.ev-faq__q { padding: 16px 0; font-weight: 700; cursor: pointer; list-style-position: outside; }
.ev-faq__q:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 2px; }
.ev-faq__a { padding-bottom: 16px; color: var(--ev-ink-2); }
.ev-faq__a p { margin: 0 0 8px; }

/* Property page: ID, description card, share / print toolbar */
.ev-property__id { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; }
.ev-property__id-hint { font-size: 13px; color: var(--ev-ink-3); }
.ev-property__added { margin: 8px 0 0; font-size: 13px; color: var(--ev-ink-3); }
.ev-copy {
  padding: 6px 12px; border: 1px solid var(--ev-line-strong); border-radius: var(--ev-radius-sm);
  background: var(--ev-surface); color: var(--ev-ink); font: 600 13px/1.2 var(--ev-font); cursor: pointer;
}
.ev-copy[hidden] { display: none; }
.ev-copy:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 2px; }
.ev-property__desc { padding: 20px 24px; background: var(--ev-surface); border-radius: var(--ev-radius-md); }
.ev-property__desc > :first-child { margin-top: 0; }
.ev-property__desc > :last-child { margin-bottom: 0; }

.ev-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.ev-share__label { margin-right: 4px; font-size: 13px; font-weight: 700; color: var(--ev-ink-2); }
.ev-share__btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--ev-line); border-radius: var(--ev-radius-pill); background: var(--ev-surface);
  color: var(--ev-ink); font: 600 13px/1 var(--ev-font); text-decoration: none; cursor: pointer;
}
.ev-share__btn[hidden] { display: none; }
.ev-share__btn:hover { border-color: var(--ev-line-strong); box-shadow: var(--ev-shadow-sm); }
.ev-share__btn:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 2px; }
.ev-share__btn--text { padding: 0 14px; }
.ev-share__print { margin-left: auto; }

/* Print / PDF of a property page: the listing itself, no site chrome */
@media print {
  .ev-header, .ev-footer, .ev-cookie, .ev-toast, .ev-crumbs, .ev-share, .ev-property__lists, .ev-copy, .ev-property__id-hint,
  .ev-pcard__actions, .ev-block:has(.ev-map), .ev-similar, .ev-lead, .ev-phone-btn, .ev-video, .ev-lightbox, .ev-gallery__more { display: none !important; }
  .ev-print-only { display: block; }
  .ev-print-head { margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid #000; font-size: 12px; }
  body { background: #fff; }
  .ev-main { padding: 0; }
  .ev-property__head { grid-template-columns: 1fr auto; }
  .ev-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .ev-gallery__item { aspect-ratio: 4 / 3; }
  .ev-gallery__item--main { grid-column: 1 / -1; grid-row: auto; }
  .ev-gallery__item:nth-child(n+4) { display: none; }
  .ev-property__layout { display: block; }
  .ev-property__aside { position: static; margin-top: 16px; }
  .ev-block, .ev-specs, .ev-gallery { break-inside: avoid; }
  .ev-property__desc, .ev-specs, .ev-facts, .ev-agent-card { box-shadow: none; border: 1px solid #ccc; }
}

/* Property description: subheadings and lists from the CRM's plain text (PropertyView::format_description) */
.ev-property__desc h3 { margin: 22px 0 8px; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--ev-ink); }
.ev-property__desc ul { margin: 8px 0 14px; padding-left: 20px; }
.ev-property__desc li { margin: 4px 0; }
.ev-property__desc li::marker { color: var(--ev-cypress); }
