/* Real Estate starter styles: the module's pages before the site's own design takes over.
   Uses the site's tokens where they exist (--color-accent, --radius…). Scoped to .re. */
.re { --re-accent: var(--color-accent, #0f766e); --re-text: var(--color-text, #1f2328); --re-muted: var(--color-muted, #59636e);
      --re-surface: var(--color-surface, #f4f5f7); --re-line: color-mix(in srgb, var(--re-text) 14%, transparent); --re-radius: var(--radius, 10px);
      width: 100%; max-width: var(--container, 72rem); margin: 0 auto; padding: 1.5rem 1rem 4rem; color: var(--re-text); }
.re, .re *, .re *::before, .re *::after { box-sizing: border-box; }
.re h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: .25rem 0 1rem; }
.re h2 { font-size: 1.35rem; margin: 2rem 0 .75rem; }
.re a { color: var(--re-accent); }
.re-muted { color: var(--re-muted); }
.re-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.re-crumbs { font-size: .875rem; color: var(--re-muted); display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.re-crumbs li + li::before { content: "/"; margin-right: .35rem; }

/* Buttons and fields */
.re-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: var(--re-radius);
          border: 1px solid var(--re-accent); background: var(--re-accent); color: #fff !important; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.re-btn--line { background: transparent; color: var(--re-accent) !important; }
.re-btn:focus-visible, .re a:focus-visible, .re input:focus-visible, .re select:focus-visible, .re summary:focus-visible { outline: 3px solid var(--re-accent); outline-offset: 2px; }
.re label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .25rem; }
.re input[type=text], .re input[type=search], .re select { width: 100%; min-height: 44px; padding: .5rem .65rem; border: 1px solid var(--re-line); border-radius: calc(var(--re-radius) * .6);
          background: #fff; color: var(--re-text); font: inherit; }

/* Channel tabs */
.re-tabs { display: flex; gap: .25rem; flex-wrap: wrap; margin: 0 0 1rem; padding: 0; list-style: none; }
.re-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1rem; border-radius: 999px; text-decoration: none; color: var(--re-text); background: var(--re-surface); font-weight: 600; }
.re-tabs a[aria-current="page"] { background: var(--re-text); color: #fff; }

/* Search form */
.re-search { background: var(--re-surface); border-radius: var(--re-radius); padding: 1rem; display: grid; gap: .75rem; grid-template-columns: 1fr; margin-bottom: 1.25rem; }
.re-search__row { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.re-search details { grid-column: 1 / -1; }
.re-search summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.re-search fieldset { border: 0; margin: .5rem 0 0; padding: 0; }
.re-search legend { font-weight: 600; font-size: .875rem; margin-bottom: .35rem; }
.re-checks { display: flex; flex-wrap: wrap; gap: .4rem; }
.re-checks label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; min-height: 44px; padding: 0 .75rem; border: 1px solid var(--re-line); border-radius: 999px; background: #fff; margin: 0; cursor: pointer; }
.re-search__actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.re-where { position: relative; }
.re-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.re-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .4rem .2rem .7rem; border-radius: 999px; background: #fff; border: 1px solid var(--re-line); font-size: .875rem; }
.re-chip a, .re-chip button { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--re-surface); color: var(--re-text); text-decoration: none; cursor: pointer; font: inherit; }
.re-suggest { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: .25rem 0 0; padding: .25rem; list-style: none; background: #fff; border: 1px solid var(--re-line); border-radius: calc(var(--re-radius) * .6); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.re-suggest li { padding: .6rem .65rem; border-radius: 6px; cursor: pointer; }
.re-suggest li[aria-selected="true"], .re-suggest li:hover { background: var(--re-surface); }

/* Results */
.re-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 1rem; }
.re-bar p { margin: 0; }
.re-views { display: flex; gap: .25rem; }
.re-views a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .85rem; border-radius: 999px; text-decoration: none; color: var(--re-text); border: 1px solid var(--re-line); }
.re-views a[aria-current="true"] { background: var(--re-text); color: #fff; border-color: var(--re-text); }
.re-cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); margin: 0; padding: 0; list-style: none; }
.re-cards--list { grid-template-columns: 1fr; }
.re-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--re-line); border-radius: var(--re-radius); overflow: hidden; background: #fff; height: 100%; }
.re-cards--list .re-card { flex-direction: row; }
.re-cards--list .re-card__photo { flex: 0 0 min(40%, 22rem); aspect-ratio: auto; min-height: 12rem; }
.re-card__photo { position: relative; aspect-ratio: 3 / 2; background: var(--re-surface); }
.re-card__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.re-badges { position: absolute; top: .6rem; left: .6rem; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.re-badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; background: #fff; color: var(--re-text); font-size: .8rem; font-weight: 700; }
.re-card__body { padding: .9rem 1rem 1rem; display: grid; gap: .3rem; }
.re .re-card__body > * { margin: 0; }
.re-card__price { font-weight: 700; font-size: 1.1rem; }
.re-card__title { margin: 0; font-size: 1rem; }
.re-card__title a { color: inherit; text-decoration: none; }
.re-card__title a::after { content: ""; position: absolute; inset: 0; } /* the whole card is the link */
.re-card__address { margin: 0; color: var(--re-muted); }
.re-facts { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; padding: 0; list-style: none; font-size: .925rem; }
.re-facts strong { font-weight: 700; }
.re-card__next { font-size: .875rem; color: var(--re-muted); margin: 0; }
.re-pager { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: 1.5rem; }
.re-map { height: min(70vh, 36rem); border-radius: var(--re-radius); background: var(--re-surface); }
.re-map--small { height: 18rem; }
.re-empty { padding: 3rem 1rem; text-align: center; background: var(--re-surface); border-radius: var(--re-radius); }

/* A property */
.re-gallery { display: grid; gap: .5rem; grid-template-columns: 1fr; margin: 1rem 0; }
.re-gallery a { display: block; position: relative; background: var(--re-surface); border-radius: calc(var(--re-radius) * .6); overflow: hidden; }
.re-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.re-gallery__more { position: absolute; right: .6rem; bottom: .6rem; background: rgba(0,0,0,.7); color: #fff; padding: .25rem .6rem; border-radius: 999px; font-size: .875rem; }
.re-listing { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.re-listing__price { font-size: 1.5rem; font-weight: 700; margin: 0; }
.re-keyfacts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: 1rem 0; margin: 1rem 0; border-block: 1px solid var(--re-line); list-style: none; }
.re-keyfacts li { display: grid; }
.re-keyfacts span { font-size: .8rem; color: var(--re-muted); text-transform: uppercase; letter-spacing: .04em; }
.re-keyfacts strong { font-size: 1.15rem; }
.re-table { width: 100%; border-collapse: collapse; }
.re-table th, .re-table td { text-align: left; padding: .55rem 0; border-bottom: 1px solid var(--re-line); vertical-align: top; }
.re-table th { width: 45%; font-weight: 600; color: var(--re-muted); }
.re-features { columns: 2 12rem; padding-left: 1.1rem; }
.re-side { display: grid; gap: 1rem; align-content: start; }
.re-box { border: 1px solid var(--re-line); border-radius: var(--re-radius); padding: 1rem; }
.re-box h2 { margin-top: 0; font-size: 1.1rem; }
.re-inspections { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.re-inspections li { display: flex; justify-content: space-between; gap: .5rem; align-items: center; flex-wrap: wrap; }
.re-agent { display: grid; grid-template-columns: 64px 1fr; gap: .75rem; align-items: center; }
.re-agent img, .re-agent__initials { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--re-surface); display: grid; place-items: center; font-weight: 700; }
.re-agent p { margin: 0; }
.re-share { display: flex; flex-wrap: wrap; gap: .5rem; }

/* The team */
.re-team { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); list-style: none; margin: 0; padding: 0; }
.re-team li { border: 1px solid var(--re-line); border-radius: var(--re-radius); overflow: hidden; position: relative; }
.re-team img, .re-team .re-agent__initials { width: 100%; height: auto; aspect-ratio: 1; border-radius: 0; font-size: 2rem; }
.re-team div { padding: .75rem 1rem 1rem; }
.re-team h2 { font-size: 1.05rem; margin: 0; }
.re-team a { color: inherit; text-decoration: none; }
.re-team a::after { content: ""; position: absolute; inset: 0; }
.re-quote { margin: 0; padding: 1rem 1.25rem; background: var(--re-surface); border-radius: var(--re-radius); }

/* Lightbox (script) */
.re-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.92); display: grid; grid-template-rows: auto 1fr auto; color: #fff; }
.re-lightbox[hidden] { display: none; }
.re-lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: .5rem .75rem; }
.re-lightbox img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; align-self: center; justify-self: center; min-height: 0; }
.re-lightbox button { min-width: 44px; min-height: 44px; border: 0; border-radius: 999px; background: rgba(255,255,255,.15); color: #fff; font: inherit; font-size: 1.1rem; cursor: pointer; }
.re-lightbox__nav { display: flex; justify-content: center; gap: 1rem; padding: .75rem; }

@media (min-width: 640px) {
    .re-search__row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .re-gallery { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
    .re-gallery a:first-child { grid-row: span 2; }
    .re-gallery a:not(:first-child) img { aspect-ratio: auto; }
}
@media (min-width: 980px) {
    .re-search { grid-template-columns: 2fr 3fr; align-items: end; }
    .re-listing { grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); }
}
@media (max-width: 639px) {
    .re-gallery a:not(:first-child) { display: none; }
    .re-cards--list .re-card { flex-direction: column; }
    .re-cards--list .re-card__photo { flex-basis: auto; aspect-ratio: 3 / 2; min-height: 0; }
}
@media print {
    .re-search, .re-tabs, .re-share, .re-map, .re-noprint, header, footer, nav { display: none !important; }
    .re-listing { grid-template-columns: 1fr; }
    .re a { color: inherit; text-decoration: none; }
}
