/* Real estate: catalogue and property pages (scripts/real-estate.js, templates/real-estate.html,
   templates/property.html). A classic agency layout in the site's type (Inter + DM Serif Text):
   photo header with a search bar, white listing cards with icon facts, property pages with
   breadcrumbs, gallery, facts bar, sticky contact card, specifications, payment plan, location. */
.re-page {
  --re-ink: #161513; --re-text: #3a3631; --re-muted: #6f675e; --re-rule: rgba(22, 21, 19, .12);
  --re-band: #f5f3ef; --re-accent: #9a6a14; --re-shadow: 0 1px 2px rgba(22,21,19,.06), 0 8px 24px rgba(22,21,19,.07);
  background: #fff; color: var(--re-ink); text-align: left;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  padding: var(--layout-header-h, 68px) 0 0;
}
.re-page *, .re-page *::before, .re-page *::after { box-sizing: border-box; }
/* main.css sets overflow-x: hidden on html and body, which turns body into a scroll container and
   stops position: sticky (the contact card); clip hides the same overflow without that side effect */
html:has(.re-page), body:has(.re-page) { overflow-x: clip; }
/* the legacy full-screen section rule (main.css) does not apply here */
.re-page section, .re-page header { display: block; height: auto !important; min-height: 0; margin: 0; color: inherit; text-align: left; scroll-snap-align: none; }
.re-page h1, .re-page h2, .re-page h3 { text-transform: none; letter-spacing: normal; }
.re-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 max(4vw, 16px); }
.re-ico { flex: none; width: 20px; height: 20px; color: var(--re-muted); }
.re-ico--sm { width: 16px; height: 16px; }

.re-eyebrow { margin: 0 0 14px; font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--re-accent); }
.re-page .re-h1 { margin: 0 0 12px; font-family: "DM Serif Text", Georgia, serif; font-weight: 400; font-size: clamp(32px, 4vw, 54px); line-height: 1.06; color: var(--re-ink); }
.re-page .re-h2 { margin: 0 0 18px; font-family: "DM Serif Text", Georgia, serif; font-weight: 400; font-size: clamp(23px, 2vw, 30px); line-height: 1.15; color: var(--re-ink); }
.re-page .re-h3 { margin: 18px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--re-muted); }
.re-p { max-width: 760px; margin: 0 0 14px; font-size: 16px; line-height: 1.7; color: var(--re-text); }
.re-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--re-muted); }

/* buttons */
.re-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.re-actions--stack { flex-direction: column; }
.re-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border: 1px solid var(--re-ink); border-radius: 4px; background: #fff; color: var(--re-ink); cursor: pointer;
  font: 600 13px/1.2 "Inter", system-ui, sans-serif; letter-spacing: .04em; text-decoration: none; text-align: center;
}
.re-btn .re-ico { width: 18px; height: 18px; color: currentColor; }
.re-btn:hover { background: var(--re-band); }
.re-btn--primary { background: var(--re-ink); color: #fff; }
.re-btn--primary:hover { background: #33302c; }
.re-page a:focus-visible, .re-page button:focus-visible, .re-page select:focus-visible, .re-page summary:focus-visible { outline: 2px solid var(--re-accent); outline-offset: 3px; }

/* ---------------------------------------------------------------- catalogue: header + search bar */
.re-intro { max-width: 640px; margin: 0; font-size: 17px; line-height: 1.6; color: var(--re-text); }
.re-count { margin: 16px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--re-muted); }

.re-filter { position: relative; z-index: 2; margin-top: 0; margin-bottom: 28px; }
.re-filter > * { background: #fff; }
.re-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.re-filter { padding-top: 0; }
.re-filter__fields { display: flex; flex-wrap: wrap; gap: 14px; flex: 1; padding: 18px 20px; border-radius: 6px; box-shadow: var(--re-shadow); }
.re-filter__field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 170px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--re-muted); }
.re-filter__field select { appearance: none; min-height: 46px; padding: 0 38px 0 14px; border: 1px solid var(--re-rule); border-radius: 4px; color: var(--re-ink); cursor: pointer;
  font: 500 15px/1.2 "Inter", system-ui, sans-serif; letter-spacing: 0; text-transform: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23161513' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; }

/* buyer purposes: tiles ("¿Qué buscas?") and chips in the search bar */
.re-purposes { padding: clamp(40px, 6vh, 64px) 0 clamp(28px, 4vh, 40px); }
.re-purposes__intro { margin: -8px 0 22px; font-size: 16px; color: var(--re-text); }
.re-purposes__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.re-ptile { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--re-rule); border-radius: 6px; background: #fff; color: inherit; text-decoration: none; transition: box-shadow .25s ease, transform .25s ease; }
.re-ptile:hover { box-shadow: var(--re-shadow); transform: translateY(-2px); }
.re-ptile__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--re-band); }
.re-ptile__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.re-ptile:hover .re-ptile__media img { transform: scale(1.05); }
.re-ptile__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 14px 16px 16px; }
.re-ptile__title { font-size: 16px; font-weight: 600; color: var(--re-ink); }
.re-ptile__text { font-size: 13.5px; line-height: 1.45; color: var(--re-text); }
.re-ptile__count { margin-top: auto; padding-top: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--re-accent); }
.re-purpose-chips { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; margin: 0 0 4px; padding: 0; border: 0; }
.re-purpose-chips legend { width: 100%; margin-bottom: 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--re-muted); }
.re-purpose-chips label { position: relative; cursor: pointer; }
.re-purpose-chips input { position: absolute; opacity: 0; pointer-events: none; }
.re-purpose-chips span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--re-rule); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--re-ink); background: #fff; }
.re-purpose-chips label:hover span { border-color: var(--re-ink); }
.re-purpose-chips input:checked + span { background: var(--re-ink); border-color: var(--re-ink); color: #fff; }
.re-purpose-chips input:focus-visible + span { outline: 2px solid var(--re-accent); outline-offset: 2px; }
.re-btn--ghost { border-color: var(--re-rule); color: var(--re-accent); }

/* ---------------------------------------------------------------- listing cards */
.re-list { padding-bottom: clamp(48px, 8vh, 88px); }
.re-hero:not(.re-hero--photo) + .re-list, .re-hero:not(.re-hero--photo) + .re-filter { margin-top: 0; }
.re-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: clamp(18px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
.re-card { margin: 0; }
.re-card[hidden] { display: none; }
.re-card__link { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--re-rule); border-radius: 6px; background: #fff; color: inherit; text-decoration: none; transition: box-shadow .25s ease, transform .25s ease; }
.re-card__link:hover { box-shadow: var(--re-shadow); transform: translateY(-2px); }
.re-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--re-band); }
.re-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.re-card__link:hover .re-card__media img { transform: scale(1.04); }
.re-card.is-sold .re-card__media img { filter: grayscale(.7); }
.re-chips { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.re-chips--inline { position: static; margin-bottom: 12px; }
.re-chip { padding: 5px 9px; border-radius: 3px; background: #fff; color: var(--re-ink); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.re-chips--inline .re-chip { background: var(--re-band); box-shadow: none; }
.re-chip--reserved { background: #f1d9a8 !important; }
.re-chip--sold { background: var(--re-ink) !important; color: #fff; }
.re-card__photos { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 3px; background: rgba(10,10,9,.6); color: #fff; font-size: 12px; font-weight: 600; }
.re-card__photos .re-ico { color: #fff; }
.re-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 0; }
.re-card__price { margin: 0 0 6px; font-size: 21px; font-weight: 700; letter-spacing: -.01em; color: var(--re-accent); }
.re-page .re-card__title { margin: 0 0 8px; font-family: "Inter", system-ui, sans-serif; font-weight: 600; font-size: 17px; line-height: 1.35; color: var(--re-ink); }
.re-card__loc { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 14.5px; color: var(--re-text); }
.re-card__loc--big { font-size: 16px; }
.re-card__facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 16px; padding: 14px 0 0; border-top: 1px solid var(--re-rule); list-style: none; }
.re-card__facts li { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--re-text); }
.re-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: auto -20px 0; padding: 12px 20px; background: var(--re-band); font-size: 12.5px; color: var(--re-muted); }
.re-card__cta { flex: none; font-weight: 600; color: var(--re-ink); }
.re-card__link:hover .re-card__cta { text-decoration: underline; text-underline-offset: 3px; }
.re-empty { padding: 32px 0; text-align: center; }
.re-empty p { margin: 0 0 14px; font-size: 16px; color: var(--re-text); }

/* featured development */
.re-featured { padding: clamp(48px, 8vh, 88px) 0; border-top: 1px solid var(--re-rule); }
.re-featured__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.re-featured__media { overflow: hidden; border-radius: 6px; aspect-ratio: 3 / 2; }
.re-featured__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.re-mini { display: flex; flex-wrap: wrap; gap: 14px 32px; margin: 6px 0 22px; }
.re-mini dt { margin: 0 0 3px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--re-muted); }
.re-mini dd { margin: 0; font-size: 16px; color: var(--re-ink); }

/* "Cuéntanos qué vivienda buscas" */
.re-search { padding: clamp(44px, 7vh, 80px) 0; background: var(--re-band); }
.re-search__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 18px 48px; align-items: center; }
.re-search__text { max-width: 640px; margin: 0; font-size: 16px; line-height: 1.6; color: var(--re-text); }

/* ---------------------------------------------------------------- property page */
.re-crumbs { padding-top: 22px; }
.re-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 18px; padding: 0; list-style: none; font-size: 13px; color: var(--re-muted); }
.re-crumbs li + li::before { content: "›"; margin: 0 9px; color: var(--re-muted); }
.re-crumbs a { color: var(--re-muted); text-decoration: none; }
.re-crumbs a:hover { color: var(--re-ink); text-decoration: underline; }
.re-crumbs [aria-current] { color: var(--re-ink); }
.re-dhead { display: flex !important; justify-content: space-between; align-items: flex-end; gap: 16px 40px; margin-bottom: 22px; }
.re-dhead__side { flex: none; text-align: right; }
.re-dhead__price { margin: 0 0 4px; font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; letter-spacing: -.01em; color: var(--re-accent); }
.re-dhead__ref { margin: 0; font-size: 13px; color: var(--re-muted); }

.re-gallery { position: relative; margin-bottom: 0; }
.re-gallery__grid { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(120px, 15vw, 220px); border-radius: 6px; overflow: hidden; }
.re-gallery__grid li { margin: 0; min-width: 0; }
.re-gallery__lead { grid-column: span 2; grid-row: span 2; }
.re-gallery__grid--1 { grid-template-columns: 1fr; grid-auto-rows: auto; }
.re-gallery__grid--1 .re-gallery__lead { grid-column: auto; grid-row: auto; aspect-ratio: 16 / 9; max-height: 72vh; }
.re-gallery__grid--2 .re-gallery__lead, .re-gallery__grid--3 .re-gallery__lead { grid-column: span 2; }
.re-gallery__grid--2 li:not(.re-gallery__lead) { grid-column: span 2; grid-row: span 2; }
.re-gallery__grid--3 li:not(.re-gallery__lead) { grid-column: span 2; }
.re-gallery__grid--4 li:nth-child(2) { grid-column: span 2; }
.re-gallery__grid--5 li:nth-child(n+6) { display: none; }
.re-gallery__btn { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--re-band); cursor: zoom-in; overflow: hidden; }
.re-gallery__btn img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.re-gallery__btn:hover img { transform: scale(1.03); }
.re-allphotos { position: absolute; right: calc(max(4vw, 16px) + 14px); bottom: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 4px; background: #fff; color: var(--re-ink); cursor: pointer; font: 600 13px/1 "Inter", system-ui, sans-serif; box-shadow: var(--re-shadow); }
.re-allphotos .re-ico { color: var(--re-ink); width: 18px; height: 18px; }

.re-bar { display: flex; flex-wrap: wrap; gap: 12px 34px; margin: 0 auto; padding-top: 22px; padding-bottom: 22px; list-style: none; border-bottom: 1px solid var(--re-rule); }
.re-bar li { display: inline-flex; align-items: center; gap: 9px; font-size: 15.5px; font-weight: 500; color: var(--re-ink); }
.re-bar .re-ico { width: 22px; height: 22px; color: var(--re-accent); }

.re-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 360px); gap: clamp(28px, 4vw, 64px); align-items: start; padding-top: 36px; padding-bottom: clamp(56px, 9vh, 100px); }
.re-sec { padding-bottom: 34px; margin-bottom: 34px !important; border-bottom: 1px solid var(--re-rule); }
.re-body > .re-sec:last-of-type { border-bottom: 0; }
.re-ask { position: sticky; top: calc(var(--layout-header-h, 68px) + 20px); padding: 24px; border: 1px solid var(--re-rule); border-radius: 6px; background: #fff; box-shadow: var(--re-shadow); }
.re-ask__price { margin: 0 0 12px; font-size: 22px; font-weight: 700; color: var(--re-accent); }
.re-page .re-ask__title { margin: 0 0 8px; font-family: "DM Serif Text", Georgia, serif; font-weight: 400; font-size: 22px; line-height: 1.2; }
.re-ask__text { margin: 0 0 18px; font-size: 14.5px; line-height: 1.55; color: var(--re-text); }
.re-ask .re-btn { width: 100%; }

.re-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px 28px; margin: 0; padding: 0; list-style: none; }
.re-checks--one { grid-template-columns: 1fr; }
.re-checks li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--re-text); }
.re-checks .re-ico { width: 18px; height: 18px; margin-top: 2px; color: var(--re-accent); }
.re-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 28px; margin: 0; }
.re-dl div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--re-rule); }
.re-dl dt { margin: 0; font-size: 14px; color: var(--re-muted); }
.re-dl dd { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--re-ink); text-align: right; }

.re-acc details { border-top: 1px solid var(--re-rule); }
.re-acc details:last-child { border-bottom: 1px solid var(--re-rule); }
.re-acc summary { position: relative; padding: 15px 34px 15px 0; cursor: pointer; list-style: none; font-size: 15.5px; font-weight: 600; color: var(--re-ink); }
.re-acc summary::-webkit-details-marker { display: none; }
.re-acc summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 300; color: var(--re-muted); }
.re-acc details[open] summary::after { content: "–"; }
.re-acc .re-checks { padding: 0 0 18px; }

.re-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.re-steps li { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 6px; background: var(--re-band); }
.re-steps__n { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-bottom: 6px; border: 1px solid var(--re-accent); border-radius: 50%; color: var(--re-accent); font-size: 12px; font-weight: 700; }
.re-steps__label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--re-muted); }
.re-steps__value { font-size: 20px; font-weight: 700; color: var(--re-ink); }
.re-steps__note { font-size: 13.5px; line-height: 1.45; color: var(--re-text); }

.re-dist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 28px; margin: 0 0 18px; padding: 0; list-style: none; }
.re-dist li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--re-rule); font-size: 14.5px; color: var(--re-text); }
.re-dist strong { color: var(--re-ink); }

.re-devgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.re-devgrid li { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; }

.re-plan { margin: 0 0 18px; }
.re-plan img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--re-rule); }
.re-plan figcaption { margin-top: 8px; font-size: 13px; color: var(--re-muted); }
.re-tour { position: relative; aspect-ratio: 16 / 10; margin-bottom: 14px; background: var(--re-band); }
.re-tour iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.re-others { padding: clamp(44px, 7vh, 80px) 0; background: var(--re-band); }
.re-others .re-card__foot { background: #f9f8f6; }

/* photo viewer */
.re-lb { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 10, 9, .94); color: #fff; }
.re-lb[open] { display: flex; align-items: center; justify-content: center; }
.re-lb::backdrop { background: rgba(10, 10, 9, .94); }
.re-lb img { display: block; max-width: calc(100vw - 120px); max-height: calc(100vh - 110px); width: auto; height: auto; object-fit: contain; }
.re-lb__count { position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; text-align: center; font: 500 13px/1 "Inter", system-ui, sans-serif; letter-spacing: .08em; color: rgba(255,255,255,.8); }
.re-lb__close, .re-lb__nav { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 4px; background: rgba(255,255,255,.1); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.re-lb__close:hover, .re-lb__nav:hover { background: rgba(255,255,255,.2); }
.re-lb__close { top: 14px; right: 14px; }
.re-lb__nav { top: 50%; transform: translateY(-50%); }
.re-lb__nav--prev { left: 14px; }
.re-lb__nav--next { right: 14px; }

/* ---------------------------------------------------------------- phones and tablets */
@media (max-width: 899px) {
  .re-layout { grid-template-columns: minmax(0, 1fr); }
  .re-ask { position: static; order: -1; }
  .re-featured__grid, .re-search__grid { grid-template-columns: minmax(0, 1fr); }
  .re-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 26vw; }
  .re-gallery__lead, .re-gallery__grid--2 .re-gallery__lead, .re-gallery__grid--3 .re-gallery__lead { grid-column: span 2; grid-row: span 2; }
  .re-gallery__grid--2 li:not(.re-gallery__lead), .re-gallery__grid--3 li:not(.re-gallery__lead) { grid-column: auto; grid-row: auto; }
  .re-gallery__grid--2 li:not(.re-gallery__lead) { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 599px) {
  .re-purposes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .re-ptile__text { display: none; }
  .re-ptile__body { padding: 10px 12px 12px; }
  .re-ptile__title { font-size: 14.5px; }
  .re-purpose-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -14px; padding-right: 14px; scrollbar-width: none; }
  .re-purpose-chips span { white-space: nowrap; }
  .re-filter__fields { padding: 14px; gap: 10px; }
  .re-filter__field { flex: 1 1 calc(50% - 10px); }
  .re-actions { flex-direction: column; }
  .re-actions .re-btn { width: 100%; }
  .re-dhead { flex-direction: column; align-items: flex-start; }
  .re-dhead__side { text-align: left; }
  .re-gallery { padding: 0; }
  .re-gallery__grid { grid-auto-rows: 34vw; gap: 4px; border-radius: 0; }
  .re-gallery__grid--5 li:nth-child(n+4) { display: none; }
  .re-allphotos { right: 12px; bottom: 12px; }
  .re-bar { gap: 10px 22px; }
  .re-bar li { font-size: 14.5px; }
  .re-dl { grid-template-columns: minmax(0, 1fr); }
  .re-devgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .re-lb img { max-width: 100vw; max-height: calc(100vh - 140px); }
  .re-lb__nav { top: auto; bottom: 8px; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .re-card__media img, .re-card__link, .re-gallery__btn img { transition: none; } }
@media print {
  .re-ask .re-actions, .re-search, .re-lb, .re-filter, .re-allphotos { display: none !important; }
  .re-ask { position: static; box-shadow: none; }
}

/* local draft only (RE_DRAFT=1 build): "example prices" banner */
.re-draft { position: sticky; top: var(--layout-header-h, 68px); z-index: 30; margin: 0; padding: 10px 16px; background: #b3261e; color: #fff; text-align: center; font: 700 13px/1.3 "Inter", system-ui, sans-serif; letter-spacing: .06em; }

/* catalogue header film: fills the header like the photo; the subject stays in view on phones */

/* ---------------------------------------------------------------- catalogue hero (film, sector-hero header)
   Headline in the homepage display face (Inter 500, tight tracking). Full screen on desktop and phones.
   Phones: the film covers the whole first viewport under the transparent header; the copy sits at
   the bottom over a gradient, below the presenter's face, clear of the home indicator. */
.re-catalog:has(.sector-hero) { padding-top: 0; }
.re-page .re-hero.sector-hero {
  position: relative; display: flex !important; align-items: flex-end;
  min-height: 100vh !important; min-height: 100svh !important; height: auto !important;   /* full screen on every device */
  padding: calc(var(--layout-header-h, 68px) + 32px) 0 64px !important;
  background: #15110d var(--re-poster, none) center / cover no-repeat;
  color: #fff; overflow: hidden;
}
.re-hero__media, .re-hero__shade { position: absolute; inset: 0; }
.re-hero__media img, .re-hero__media video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.re-hero__shade { background: linear-gradient(90deg, rgba(10,10,9,.7) 0%, rgba(10,10,9,.42) 40%, rgba(10,10,9,.06) 72%), linear-gradient(180deg, rgba(10,10,9,.35) 0%, rgba(10,10,9,0) 22%, rgba(10,10,9,0) 50%, rgba(10,10,9,.5)); }
.re-hero__copy { position: relative; }
.re-page .re-hero__title {
  margin: 0 0 16px; max-width: 12ch; color: #fff;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; font-weight: 500;
  font-size: clamp(48px, 6.4vw, 100px); line-height: .93; letter-spacing: -.04em;
}
/* the last word in the homepage's italic serif accent ("funcionar.") */
.re-page .re-hero__title em { font-family: "DM Serif Text", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.re-hero--photo .re-intro { max-width: 560px; margin: 0 0 26px; color: rgba(255,255,255,.92); font-size: clamp(16px, 1.3vw, 19px); text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.re-btn--light { background: #fff; border-color: #fff; color: var(--re-ink); }
.re-btn--light:hover { background: #f1ede6; }
@media (max-width: 899px) {
  .re-page .re-hero.sector-hero {
    min-height: 100vh !important; min-height: 100svh !important;
    padding: calc(var(--layout-header-h, 68px) + env(safe-area-inset-top, 0px)) max(0px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(0px, env(safe-area-inset-left, 0px)) !important;
  }
  /* portrait crop of the 16:9 film: the presenter walks along the centre line */
  .re-hero__media img, .re-hero__media video { object-position: 50% 50%; }
  .re-hero__shade { background: linear-gradient(180deg, rgba(10,10,9,.42) 0%, rgba(10,10,9,0) 18%, rgba(10,10,9,0) 46%, rgba(10,10,9,.55) 66%, rgba(10,10,9,.82) 100%); }
  .re-page .re-hero__title { max-width: none; font-size: clamp(40px, 11vw, 56px); }
  html[lang="ru"] .re-page .re-hero__title, html[lang="uk"] .re-page .re-hero__title { font-size: clamp(34px, 9.4vw, 48px); }
  .re-hero--photo .re-intro { margin-bottom: 22px; }
}

/* sea views: confirmed listings, or a contact block while there are none */
.re-sea { padding: clamp(40px, 6vh, 64px) 0; }
.re-sea--cta { background: var(--re-band); }
.re-chip--sea { background: #1d4f73 !important; color: #fff; }

/* catalogue header: title and the live count of the listings shown */
.re-list { padding-top: clamp(36px, 6vh, 56px); border-top: 1px solid var(--re-rule); }
.re-list__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 18px; }
.re-list__head .re-h2 { margin: 0; }
.re-list__count { margin: 0; font-size: 15px; font-weight: 600; color: var(--re-muted); }

/* ---------------------------------------------------------------- 3D site model (assets/js/site-model.js) */
.re-sm__viewer { position: relative; margin: 0 0 10px; }
.re-sm__stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; background: #eef0ea; touch-action: none; }
.re-sm__stage canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.re-sm__stage canvas:active { cursor: grabbing; }
.re-sm__loading, .re-sm__fallback { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; font-size: 14px; color: var(--re-muted); }
.re-sm__fallback { display: none; }
.re-sm.is-ready .re-sm__loading, .re-sm.is-no-webgl .re-sm__loading { display: none; }
.re-sm.is-no-webgl .re-sm__fallback { display: grid; }
.re-sm.is-no-webgl .re-sm__stage { aspect-ratio: auto; min-height: 120px; }
.sm-marker { position: absolute; left: 0; top: 0; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 2px solid #fff; border-radius: 50%;
  background: #1c3a5f; color: #fff; font: 700 15px/1 "Inter", system-ui, sans-serif; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.25); transition: background-color .2s, transform .05s; will-change: transform; }
.sm-marker.is-on { background: #c98a1b; }
.sm-marker:focus-visible { outline: 3px solid #c98a1b; outline-offset: 2px; }
.re-sm__bar { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; }
.re-sm__btn { min-height: 38px; padding: 0 14px; border: 1px solid rgba(22,21,19,.18); border-radius: 999px; background: rgba(255,255,255,.94); color: var(--re-ink); cursor: pointer;
  font: 600 13px/1 "Inter", system-ui, sans-serif; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.re-sm__btn:hover { border-color: var(--re-ink); }
.re-sm__btn[aria-pressed="true"] { background: var(--re-ink); border-color: var(--re-ink); color: #fff; }
.re-sm__btn--home { margin-left: auto; }
.re-sm__hint { position: absolute; top: 10px; left: 12px; right: 12px; z-index: 3; margin: 0; font-size: 12px; color: rgba(22,21,19,.6); pointer-events: none; }
.re-sm.is-no-webgl .re-sm__hint { display: none; }
.re-sm__caption { margin: 8px 0 18px; font-size: 13px; color: var(--re-muted); }
.re-sm__intro { margin: 0; font-size: 15px; color: var(--re-text); }
.re-sm__h { margin-top: 0; }
.re-sm__level + .re-sm__level { margin-top: 14px; }
.re-sm__lname { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--re-muted); }
.re-sm__level ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.re-sm__level li > a, .re-sm__level li > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; height: 100%; padding: 10px 12px; border: 1px solid var(--re-rule); border-radius: 4px; color: inherit; text-decoration: none; background: #fff; }
.re-sm__level li > a:hover, .re-sm__level li > a:focus-visible { border-color: #2f6f9f; background: #f3f8fb; }
.re-sm__level li.is-mine > div { border-color: var(--re-accent); background: #fbf6ec; }
.re-sm__ref { font-weight: 700; font-size: 15px; color: var(--re-ink); }
.re-sm__facts { flex-basis: 100%; font-size: 13.5px; color: var(--re-text); }
.re-sm__status, .re-sm__mine { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--re-accent); }
.re-sm__go { margin-left: auto; font-size: 12.5px; font-weight: 600; color: #2f6f9f; }
@media (max-width: 599px) {
  .re-sm__stage { aspect-ratio: 1 / 1; }
  .re-sm__hint { font-size: 11px; }
  .re-sm__btn { min-height: 36px; padding: 0 11px; font-size: 12.5px; }
  .re-sm__bar { position: static; margin-top: 10px; }   /* phones: the buttons under the model, not over it */
  .re-sm__btn--home { margin-left: 0; }
  .re-sm__level ul { grid-template-columns: 1fr; }
}

/* a <fieldset> is min-content wide by default: let the purpose chips scroll inside the panel instead of
   stretching it (on phones the panel was 724 px wide and the second column of fields fell off-screen) */
.re-purpose-chips { min-width: 0; max-width: 100%; }
.re-filter__fields { min-width: 0; max-width: 100%; }
@media (max-width: 599px) {
  .re-purpose-chips { margin-right: 0; padding-right: 0; -webkit-overflow-scrolling: touch; }
  .re-filter__field { min-width: 0; }
  .re-filter__field select { width: 100%; min-width: 0; }
}
