/* Listings section for vancouver-properties.ca
 * Fonts, headings, text and buttons come from the site's own stylesheets
 * (bootstrap.min.css, theme/css/style.css, mobirise/css/mbr-additional.css).
 * This file only adds layout for the cards, filters and popup, using the
 * site's existing colours. All rules are scoped to .c21l.
 */
.c21l {
  --c21l-primary: #beaf87;      /* .btn-primary */
  --c21l-primary-dark: #8b7d4e; /* .btn-primary:hover */
  --c21l-heading: #232323;      /* body / titles */
  --c21l-text: #767676;         /* .mbr-text */
  --c21l-card-title: #635a51;   /* .card-title */
  --c21l-border: #eeeeee;       /* .card border */
  --c21l-soft: #efefef;         /* form background */
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
.c21l *, .c21l *::before, .c21l *::after { box-sizing: border-box; }

/* toolbar */
.c21l-bar {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--c21l-border); padding-bottom: .9rem; margin-bottom: 1.5rem;
}
.c21l-count { margin: 0; color: var(--c21l-text); }
.c21l-count strong { color: var(--c21l-heading); }
.c21l-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.c21l-filters .form-select { width: auto; min-width: 150px; border-radius: 3px; }
.c21l-filters .form-select:focus { border-color: var(--c21l-primary); box-shadow: 0 0 0 .2rem rgba(190,175,135,.3); }

/* grid + cards */
.c21l-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.75rem; }
.c21l-card {
  text-decoration: none !important;
  background: #fff; border: 1px solid var(--c21l-border); border-radius: 3px; overflow: hidden;
  cursor: pointer; display: flex; flex-direction: column; text-align: left; padding: 0; width: 100%;
  color: inherit; font: inherit; transition: box-shadow .3s ease-in-out, transform .3s ease-in-out;
}
.c21l-card:hover, .c21l-card:focus-visible { box-shadow: 0 10px 28px rgba(35,35,35,.12); transform: translateY(-2px); outline: none; }
.c21l-photo { position: relative; aspect-ratio: 3 / 2; background: var(--c21l-soft); overflow: hidden; }
.c21l-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.c21l-card:hover .c21l-photo img { transform: scale(1.04); }
.c21l-tag {
  position: absolute; top: 12px; left: 12px; background: var(--c21l-primary); color: #fff;
  font-size: .7rem; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 3px;
}
.c21l-tag.sold { background: #333333; }
.c21l-pcount {
  position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.55); color: #fff;
  font-size: .75rem; padding: 2px 8px; border-radius: 3px;
}
.c21l-body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.c21l-price { color: var(--c21l-card-title); margin: 0; line-height: 1.2; }
.c21l-addr { color: var(--c21l-heading); margin: 0; line-height: 1.35; }
.c21l-city { color: var(--c21l-text); margin: 0; }
.c21l-specs {
  display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: auto; padding-top: .75rem;
  border-top: 1px solid var(--c21l-border); color: var(--c21l-heading);
}
.c21l-specs b { font-weight: 700; }
.c21l-courtesy { font-size: .75rem; color: var(--c21l-text); padding: 0 1.25rem .9rem; margin: 0; }

/* "show more" under the grid */
.c21l-morebar { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: 2rem 0 .5rem; }
.c21l-morebar:empty { display: none; }
.c21l-shown { font-size: .85rem; color: var(--c21l-text); }
.c21l .c21l-morebtn { margin: 0; min-width: 220px; border-radius: 6px; }

/* states */
.c21l-empty { padding: 3rem 1rem; text-align: center; color: var(--c21l-text); border: 1px dashed #ddd; border-radius: 3px; }
.c21l-empty a { color: var(--c21l-primary-dark); }
.c21l-skel { aspect-ratio: 3 / 3.2; border-radius: 3px; background: linear-gradient(90deg, var(--c21l-soft), #fff, var(--c21l-soft)); background-size: 200% 100%; animation: c21l-sh 1.4s infinite; }
@keyframes c21l-sh { to { background-position: -200% 0; } }

/* sold section heading */
.c21l-subhead { margin: 3.5rem 0 1.25rem; color: var(--c21l-heading); display: flex; align-items: center; gap: 1rem; }
.c21l-subhead::after { content: ""; flex: 1; height: 1px; background: var(--c21l-primary); }

/* sold table */
.c21l-soldnote { color: var(--c21l-text); margin: -.5rem 0 1.25rem; }
.c21l-soldtable { width: 100%; border-collapse: collapse; color: var(--c21l-heading); }
.c21l-soldtable th { text-align: left; font-weight: 500; color: var(--c21l-text); border-bottom: 2px solid var(--c21l-primary); padding: .6rem .75rem; white-space: nowrap; }
.c21l-soldtable td { padding: .65rem .75rem; border-bottom: 1px solid var(--c21l-border); vertical-align: top; }
.c21l-soldtable tbody tr:hover { background: #faf8f3; }
.c21l-soldtable .c21l-st-addr a { color: var(--c21l-heading); font-weight: 500; text-decoration: none !important; display: flex; align-items: center; gap: .75rem; }
.c21l-soldtable td { vertical-align: middle; }
.c21l-st-ph {
  flex: none; width: 64px; height: 46px; border-radius: 6px; overflow: hidden; display: block;
  background: #f4f1ea url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23beaf87' stroke-width='1.6'%3E%3Cpath d='M4 20V9l8-5 8 5v11M9 20v-6h6v6'/%3E%3C/svg%3E") no-repeat center / 22px;
}
.c21l-st-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c21l-soldtable .c21l-st-addr a:hover { color: var(--c21l-primary-dark); }
.c21l-soldtable .c21l-st-price { text-align: right; white-space: nowrap; }

/* footer notice */
.c21l-legal { margin-top: 2.5rem; font-size: .75rem; line-height: 1.55; color: var(--c21l-text); border-top: 1px solid var(--c21l-border); padding-top: 1rem; }

/* ===================== listing detail page (listing.html) ===================== */
/* white page, comfortable margins */
#listing-detail, .c21l-detail-section, section:has(.c21l-listing) { background: #fff !important; background-color: #fff !important; padding-top: 2.5rem; padding-bottom: 3.5rem; }
.c21l-detail-section .container-fluid { padding-left: 0; padding-right: 0; }
.c21l.c21l-listing { max-width: 1180px; margin: 0 auto; padding: 0 2.5rem; background: #fff; }
.c21l-crumbs { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; color: var(--c21l-text); }
.c21l-crumbs a { color: var(--c21l-heading); font-weight: 500; }
.c21l-crumbs a:hover { color: var(--c21l-primary-dark); }
.c21l-crumbs span { font-size: .8rem; letter-spacing: .5px; }

/* photo mosaic */
.c21l-mosaic {
  position: relative; display: grid; gap: 8px; width: 100%; aspect-ratio: 2.15 / 1; min-height: 280px;
  border-radius: 14px; overflow: hidden; background: #fff;
}
.c21l-mosaic.n1 { grid-template-columns: 1fr; }
.c21l-mosaic.n2 { grid-template-columns: 3fr 2fr; }
.c21l-mosaic.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.c21l-mosaic.n4 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.c21l-mosaic.n4 .c21l-tile:nth-child(4) { grid-column: 2 / 4; }
.c21l-mosaic.n5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.c21l-tile { position: relative; padding: 0; border: 0; background: #f1f1f1; cursor: zoom-in; overflow: hidden; min-height: 0; min-width: 0; }
.c21l-tile.big { grid-row: 1 / -1; }
.c21l-tile.extra { display: none; }
.c21l-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0;
  transition: opacity .5s ease, transform .7s cubic-bezier(.2,.7,.2,1), filter .35s;
}
.c21l-tile img.in { opacity: 1; }
.c21l-tile::before {                     /* soft shade for readability on hover */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.18)); opacity: 0; transition: opacity .35s;
}
.c21l-tile:hover img { transform: scale(1.045); }
.c21l-tile:hover::before { opacity: 1; }
.c21l-tile:focus-visible { outline: 3px solid var(--c21l-primary); outline-offset: -3px; }
.c21l-tile[data-more]::after {          /* "+3" on the last tile when there are more photos */
  content: attr(data-more); position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  background: rgba(20,20,20,.45); color: #fff; font-size: 1.6rem; font-weight: 500; letter-spacing: .5px;
  transition: background .3s;
}
.c21l-tile[data-more]:hover::after { background: rgba(20,20,20,.3); }
.c21l-allphotos {
  position: absolute; right: 16px; bottom: 16px; z-index: 3; display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(255,255,255,.96); color: var(--c21l-heading); border: 0; border-radius: 999px;
  padding: .55rem 1rem; font-size: .8rem; font-weight: 500; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.18); transition: transform .2s, box-shadow .2s;
}
.c21l-allphotos svg { width: 15px; height: 15px; }
.c21l-allphotos:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.22); color: var(--c21l-primary-dark); }
.c21l-gal { position: relative; }
.c21l-mcount { display: none; }

/* two-column body */
.c21l-cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 2.5rem; margin-top: 1.75rem; align-items: start; }
.c21l-head { margin-bottom: 1rem; }
.c21l-pill {
  display: inline-block; font-size: .68rem; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--c21l-primary-dark); background: #f6f1e4; border-radius: 999px; padding: .25rem .7rem; margin-bottom: .6rem;
}
.c21l-pill.sold { color: #fff; background: #333; }
.c21l-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.15; font-weight: 500; margin: 0; color: var(--c21l-heading); letter-spacing: -.01em; }
.c21l-place { color: var(--c21l-text); margin-top: .3rem; font-size: 1rem; }
.c21l-mprice { display: none; font-size: 1.6rem; font-weight: 700; color: var(--c21l-card-title); margin-top: .5rem; }

/* key facts */
.c21l-stats {
  list-style: none; margin: 0 0 1.75rem; padding: .9rem 0; display: flex; flex-wrap: wrap; gap: .9rem 0;
  border-top: 1px solid var(--c21l-border); border-bottom: 1px solid var(--c21l-border);
}
.c21l-stats li { display: flex; align-items: center; gap: .6rem; padding: 0 1.25rem; border-right: 1px solid var(--c21l-border); }
.c21l-stats li:first-child { padding-left: 0; }
.c21l-stats li:last-child { border-right: 0; }
.c21l-stats svg { width: 22px; height: 22px; color: var(--c21l-primary-dark); flex: none; }
.c21l-stats b { display: block; font-size: 1rem; font-weight: 600; color: var(--c21l-heading); line-height: 1.15; }
.c21l-stats small { display: block; font-size: .72rem; color: var(--c21l-text); letter-spacing: .3px; }

.c21l-block { margin-bottom: 2rem; }
.c21l-h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 .8rem; color: var(--c21l-heading); letter-spacing: 0; }
.c21l-remarks { white-space: pre-line; color: #555; line-height: 1.7; font-size: .98rem; }
.c21l-remarks.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.c21l-remarks.clamp.open { display: block; -webkit-line-clamp: unset; }
.c21l-more { margin-top: .4rem; padding: 0; border: 0; background: none; color: var(--c21l-primary-dark); font-weight: 500; cursor: pointer; font-size: .9rem; }
.c21l-more:hover { text-decoration: underline; }

/* details card */
.c21l-dcard { border: 1px solid var(--c21l-border); border-radius: 10px; background: #fff; }
.c21l-dsec { padding: 1rem 1.25rem; border-top: 1px solid var(--c21l-border); }
.c21l-dsec:first-child { border-top: 0; }
.c21l-dhead { font-size: .7rem; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--c21l-primary-dark); margin: 0 0 .7rem; }
.c21l-dgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1.25rem; margin: 0; }
.c21l-dgrid dt { font-size: .75rem; font-weight: 400; color: var(--c21l-text); margin: 0 0 .1rem; }
.c21l-dgrid dd { font-size: .92rem; font-weight: 500; color: var(--c21l-heading); margin: 0; line-height: 1.35; overflow-wrap: anywhere; }
.c21l-rooms { width: 100%; border-collapse: collapse; font-size: .9rem; color: var(--c21l-heading); }
.c21l-rooms td { padding: .4rem 0; border-bottom: 1px solid #f2f2f2; }
.c21l-rooms td:nth-child(2) { color: var(--c21l-text); }
.c21l-rooms td:last-child { text-align: right; }
.c21l-rooms tr:last-child td { border-bottom: 0; }

.c21l-openhouse { display: flex; gap: .75rem; align-items: baseline; background: #faf6ea; border-radius: 8px; padding: .7rem 1rem; margin-bottom: 1.25rem; color: var(--c21l-heading); font-size: .92rem; }
.c21l-openhouse b { font-size: .68rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--c21l-primary-dark); white-space: nowrap; }

.c21l-map { aspect-ratio: 16 / 7; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--c21l-border); }
.c21l-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* sticky side card */
.c21l-side { position: sticky; top: 96px; }
.c21l-card-side { border: 1px solid var(--c21l-border); border-radius: 12px; padding: 1.4rem; box-shadow: 0 8px 28px rgba(35,35,35,.07); background: #fff; }
.c21l-sprice { font-size: 1.85rem; font-weight: 700; color: var(--c21l-card-title); line-height: 1.1; }
.c21l-sline { color: var(--c21l-text); font-size: .9rem; margin: .3rem 0 1.1rem; }
.c21l-card-side .c21l-cta { display: flex; justify-content: center; width: 100%; margin: 0; border-radius: 6px; }
.c21l-call { display: block; text-align: center; margin-top: .6rem; padding: .6rem; border: 1px solid var(--c21l-heading); border-radius: 6px; color: var(--c21l-heading) !important; font-weight: 500; font-size: .9rem; transition: all .2s; }
.c21l-call:hover { background: var(--c21l-heading); color: #fff !important; }
.c21l-site {
  display: flex; align-items: center; gap: .7rem; margin-top: .6rem; padding: .7rem .85rem; border-radius: 8px;
  background: #faf6ea; color: var(--c21l-heading) !important; transition: background .2s, transform .2s;
}
.c21l-site:hover { background: #f3ead2; transform: translateY(-1px); }
.c21l-site svg { width: 22px; height: 22px; color: var(--c21l-primary-dark); flex: none; }
.c21l-site span { flex: 1; min-width: 0; }
.c21l-site b { display: block; font-size: .88rem; font-weight: 600; }
.c21l-site small { display: block; font-size: .76rem; color: var(--c21l-primary-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c21l-site i { font-style: normal; color: var(--c21l-primary-dark); }
.c21l-sitenote { margin: .8rem 0 0; font-size: .9rem; color: var(--c21l-text); }
.c21l-sitenote a { color: var(--c21l-primary-dark) !important; font-weight: 500; border-bottom: 1px solid currentColor; }
.c21l-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.c21l-links a { font-size: .78rem; padding: .35rem .7rem; border-radius: 999px; background: var(--c21l-soft); color: var(--c21l-heading) !important; transition: background .2s; }
.c21l-links a:hover { background: #f6f1e4; color: var(--c21l-primary-dark) !important; }
.c21l-agent { display: flex; align-items: center; gap: .75rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--c21l-border); }
.c21l-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--c21l-primary); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .85rem; letter-spacing: .5px; flex: none; }
.c21l-agent b { display: block; color: var(--c21l-heading); font-weight: 600; font-size: .92rem; }
.c21l-agent small { display: block; color: var(--c21l-text); font-size: .78rem; }
.c21l-side .c21l-courtesy { padding: .75rem .25rem 0; }
.c21l-actions { display: flex; flex-wrap: wrap; margin: 1.25rem 0 0; }

.c21l-listing a { text-decoration: none; }
.c21l section, .c21l .c21l-block { background: transparent !important; }
.c21l-mbar { display: none; }

/* full-screen photo viewer */
.c21l-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(10,10,10,.95); display: flex; align-items: center; justify-content: center; }
.c21l-lightbox[hidden] { display: none; }
.c21l-lightbox .c21l-main { max-width: 92vw; max-height: 86vh; object-fit: contain; display: block; border-radius: 4px; }
.c21l-lb-close { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.c21l-lb-close:hover { background: rgba(255,255,255,.25); }
.c21l-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; transition: background .2s; }
.c21l-nav:hover { background: var(--c21l-primary); }
.c21l-nav.prev { left: 18px; } .c21l-nav.next { right: 18px; }
.c21l-counter { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .85rem; opacity: .8; }

@media (max-width: 991px) {
  .c21l-cols { grid-template-columns: minmax(0, 1fr) 290px; gap: 1.75rem; }
  .c21l.c21l-listing { padding: 0 1.75rem; }
  .c21l-dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .c21l-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .c21l-cols { grid-template-columns: 1fr; gap: 1rem; margin-top: 1.1rem; }
  .c21l-side { position: static; }
  .c21l-mosaic, .c21l-mosaic.n1, .c21l-mosaic.n2, .c21l-mosaic.n3, .c21l-mosaic.n4, .c21l-mosaic.n5 {
    display: flex; gap: 8px; aspect-ratio: auto; height: 64vw; max-height: none; min-height: 0;
    overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 12px; scrollbar-width: none;
    margin: 0 -1rem; padding: 0 1rem; border-radius: 0; background: transparent; scroll-padding: 0 1rem;
  }
  .c21l-mosaic::-webkit-scrollbar { display: none; }
  .c21l-tile, .c21l-tile.extra, .c21l-tile.big { display: block; flex: 0 0 88%; scroll-snap-align: start; border-radius: 12px; }
  .c21l-mosaic.n1 .c21l-tile { flex-basis: 100%; }
  .c21l-tile[data-more]::after { display: none; }
  .c21l-tile:hover img { transform: none; }
  .c21l-allphotos { display: none; }
  .c21l-mcount {
    display: block; position: absolute; right: 12%; bottom: 10px; z-index: 3; background: rgba(0,0,0,.55); color: #fff;
    font-size: .75rem; padding: .25rem .6rem; border-radius: 999px; pointer-events: none;
  }
  .c21l-mprice { display: block; }
  .c21l-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem .5rem; }
  .c21l-stats li, .c21l-stats li:first-child { padding: 0; border-right: 0; }
  .c21l-stats b { font-size: .92rem; overflow-wrap: anywhere; }
  .c21l-dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1rem; }
  .c21l-dsec { padding: .9rem 1rem; }
  .c21l-map { aspect-ratio: 4 / 3; }
  .c21l-card-side { box-shadow: none; }
  .c21l-nav { width: 42px; height: 42px; font-size: 24px; }
  .c21l-nav.prev { left: 8px; } .c21l-nav.next { right: 8px; }
  .c21l.c21l-listing { padding: 0 1rem 5.5rem; }
  .c21l-detail-section { padding-top: 1.25rem; }
  .c21l-mbar {
    display: flex; align-items: center; gap: .6rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
    background: #fff; border-top: 1px solid var(--c21l-border); box-shadow: 0 -6px 20px rgba(0,0,0,.08);
    padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
  }
  .c21l-mbar > span { flex: 1; min-width: 0; }
  .c21l-mbar b { display: block; color: var(--c21l-card-title); font-size: 1.05rem; line-height: 1.2; }
  .c21l-mbar small { display: block; color: var(--c21l-text); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .c21l-mbar-call { width: 42px; height: 42px; border: 1px solid var(--c21l-heading); border-radius: 50%; display: grid; place-items: center; color: var(--c21l-heading) !important; flex: none; }
  .c21l-mbar-call svg { width: 18px; height: 18px; }
  .c21l .c21l-mbar-cta { margin: 0; padding: .65rem 1rem; border-radius: 6px; white-space: nowrap; flex: none; }
  .c21l-bar { flex-direction: column; align-items: stretch; }
  .c21l-filters .form-select { flex: 1; min-width: 0; }
  .c21l-subhead { text-align: left; }
  .c21l-soldtable thead { display: none; }
  .c21l-soldtable, .c21l-soldtable tbody, .c21l-soldtable tr, .c21l-soldtable td { display: block; width: 100%; }
  .c21l-soldtable tr { padding: .75rem 0; border-bottom: 1px solid var(--c21l-border); }
  .c21l-soldtable tr[hidden] { display: none; }
  .c21l-soldtable td { border: 0; padding: .1rem 0; }
  .c21l-soldtable td[data-l] { display: inline; width: auto; color: var(--c21l-text); }
  .c21l-soldtable td[data-l]:not(:empty)::after { content: " · "; }
  .c21l-soldtable td[data-l]:last-child::after { content: ""; }
  .c21l-soldtable .c21l-st-price { text-align: left; color: var(--c21l-heading); font-weight: 500; }
}

/* ============================== listing search (search.html) ============================== */
.c21s {
  --c21l-primary: #beaf87; --c21l-primary-dark: #8b7d4e; --c21l-heading: #232323; --c21l-text: #767676;
  --c21l-card-title: #635a51; --c21l-border: #eeeeee; --c21l-soft: #efefef;
  max-width: 1500px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; color: var(--c21l-heading); background: #fff;
}
.c21s *, .c21s *::before, .c21s *::after { box-sizing: border-box; }
.c21s .c21l { padding: 0; max-width: none; margin: 0; }
.c21s-section, section:has(> .container-fluid .c21s) { background-color: #fff !important; }

/* search form */
.c21s-form { background: #fff; border: 1px solid var(--c21l-border); border-radius: 12px; padding: .75rem; box-shadow: 0 6px 24px rgba(35,35,35,.06); }
.c21s-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.c21s-row.extra { margin-top: .5rem; padding-top: .6rem; border-top: 1px solid var(--c21l-border); }
.c21s-row.extra[hidden] { display: none; }
.c21s-form select, .c21s-form input[type="search"] {
  font: inherit; font-size: .9rem; height: 44px; border: 1px solid #e2e2e2; border-radius: 8px; background-color: #fff;
  color: var(--c21l-heading); padding: 0 .75rem; min-width: 0;
}
.c21s-form select {
  padding-right: 2rem; -webkit-appearance: none; appearance: none; cursor: pointer; flex: 1 1 130px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23767676'/%3E%3C/svg%3E") no-repeat right .8rem center;
}
.c21s-form select:focus, .c21s-form input:focus { outline: none; border-color: var(--c21l-primary); box-shadow: 0 0 0 3px rgba(190,175,135,.25); }
.c21s-q { position: relative; flex: 3 1 280px; display: flex; margin: 0; }
.c21s-q svg { position: absolute; left: .8rem; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--c21l-text); pointer-events: none; }
.c21s-q input { width: 100%; padding-left: 2.4rem !important; }
.c21s-toggle, .c21s-reset {
  height: 44px; padding: 0 1rem; border-radius: 8px; border: 1px solid var(--c21l-heading); background: #fff;
  color: var(--c21l-heading); font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer; white-space: nowrap; transition: all .2s;
}
.c21s-toggle:hover { background: var(--c21l-heading); color: #fff; }
.c21s-reset { border-color: transparent; color: var(--c21l-primary-dark); margin-left: auto; }
.c21s-reset:hover { text-decoration: underline; }

/* toolbar */
.c21s-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin: 1.1rem 0 .9rem; }
.c21s-count { font-size: .95rem; color: var(--c21l-text); }
.c21s-count strong { color: var(--c21l-heading); font-size: 1.05rem; }
.c21s-of { color: var(--c21l-text); font-size: .85rem; }
.c21s-right { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.c21s-right select { font: inherit; font-size: .85rem; height: 38px; border: 1px solid #e2e2e2; border-radius: 8px; padding: 0 2rem 0 .7rem; -webkit-appearance: none; appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23767676'/%3E%3C/svg%3E") no-repeat right .7rem center; cursor: pointer; }
.c21s-inmap { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--c21l-text); margin: 0; cursor: pointer; }
.c21s-inmap input { accent-color: var(--c21l-primary-dark); width: 16px; height: 16px; }
.c21s-views { display: inline-flex; border: 1px solid #e2e2e2; border-radius: 8px; overflow: hidden; }
.c21s-views button { border: 0; background: #fff; padding: 0 .9rem; height: 36px; font: inherit; font-size: .82rem; color: var(--c21l-text); cursor: pointer; }
.c21s-views button + button { border-left: 1px solid #e2e2e2; }
.c21s-views button.on { background: var(--c21l-heading); color: #fff; }

/* list + map layout */
.c21s-body { display: grid; gap: 1.5rem; align-items: start; }
.c21s-body.view-both { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.c21s-body.view-list { grid-template-columns: 1fr; }
.c21s-body.view-map { grid-template-columns: 1fr; }
.c21s-body.view-list .c21s-mapwrap, .c21s-body.view-map .c21s-list { display: none; }
.c21s-body.view-both .c21s-list .c21l-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }
.c21s-mapwrap { position: sticky; top: 90px; }
.c21s-map { height: calc(100vh - 130px); min-height: 460px; border-radius: 12px; overflow: hidden; background: #f2f1ee; border: 1px solid var(--c21l-border); z-index: 0; }
.c21s-body.view-map .c21s-mapwrap { position: static; }
.c21s-body.view-map .c21s-map { height: 72vh; }
.c21s-maploading { display: grid; place-items: center; height: 100%; color: var(--c21l-text); font-size: .9rem; }
.c21s-more { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: 1.75rem 0 .5rem; }
.c21s-more:empty { display: none; }
.c21s .c21l-card { border-radius: 10px; }

/* map pins, clusters, popup */
.c21s-pin { background: none; border: 0; }
.c21s-pin span {
  display: inline-block; transform: translate(-50%, -100%); white-space: nowrap; background: #fff; color: var(--c21l-heading);
  font: 600 12px/1 Roboto, Helvetica, Arial, sans-serif; padding: 6px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.22);
  border: 1px solid rgba(0,0,0,.06); transition: background .15s, color .15s, transform .15s;
}
.c21s-pin span::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: #fff; }
.c21s-pin:hover span, .c21s-pin.hot span { background: var(--c21l-heading); color: #fff; transform: translate(-50%, -100%) scale(1.08); }
.c21s-pin:hover span::after, .c21s-pin.hot span::after { border-top-color: var(--c21l-heading); }
.c21s-cluster { background: rgba(190,175,135,.35); border-radius: 50%; }
.c21s-cluster span {
  display: grid; place-items: center; width: 32px; height: 32px; margin: 4px; border-radius: 50%;
  background: var(--c21l-primary-dark, #8b7d4e); color: #fff; font: 600 12px/1 Roboto, Helvetica, Arial, sans-serif;
}
.c21s-cluster.big span { background: #232323; }
.c21s-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 10px; overflow: hidden; }
.c21s-popup .leaflet-popup-content { margin: 0; width: 250px !important; }
.c21s-pop { display: block; color: #232323 !important; text-decoration: none !important; font-family: Roboto, Helvetica, Arial, sans-serif; }
.c21s-pop .ph { display: block; aspect-ratio: 16 / 10; background: #efefef; }
.c21s-pop .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c21s-pop .tx { display: block; padding: .6rem .8rem .75rem; }
.c21s-pop b { display: block; font-size: 1.05rem; color: #635a51; }
.c21s-pop span span, .c21s-pop .tx > span { display: block; font-size: .85rem; margin-top: .1rem; }
.c21s-pop small { display: block; font-size: .78rem; color: #767676; margin-top: .15rem; }
.c21s-pop small.br { font-size: .7rem; }
.c21s-pop em { display: block; font-style: normal; font-size: .8rem; font-weight: 600; color: #8b7d4e; margin-top: .4rem; }

@media (max-width: 991px) {
  .c21s { padding: 1rem 1rem 3rem; }
  .c21s-body.view-both { grid-template-columns: 1fr; }
  .c21s-body.view-both .c21s-mapwrap { order: -1; position: static; }
  .c21s-body.view-both .c21s-map { height: 48vh; min-height: 300px; }
  .c21s-views button[data-v="both"] { display: none; }
  .c21s-body.view-map .c21s-map { height: calc(100vh - 220px); }
}
@media (max-width: 600px) {
  .c21s-row.main > select[name="pmin"], .c21s-row.main > select[name="pmax"] { flex-basis: calc(50% - .25rem); }
  .c21s-row.main > select[name="area"], .c21s-row.main > select[name="beds"] { flex-basis: calc(50% - .25rem); }
  .c21s-toggle { flex: 1 1 100%; }
  .c21s-row.extra select { flex-basis: calc(50% - .25rem); }
  .c21s-reset { margin: 0 auto; }
  .c21s-bar { flex-direction: column; align-items: stretch; }
  .c21s-right { justify-content: space-between; }
  .c21s-right select { flex: 1; }
}

/* ---------- neighbourhood market snapshot (area pages) ---------- */
.c21l-stats-box { border: 1px solid var(--c21l-border, #e6e2d6); border-radius: 12px; padding: 1.25rem 1.4rem; margin: 0 0 1.75rem; background: #fbfaf6; }
.c21l-sb-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: 1rem; }
.c21l-sb-title { margin: 0; font-size: 1.15rem; font-weight: 600; color: #222; }
.c21l-sb-date { font-size: .8rem; color: #888; }
.c21l-sb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
.c21l-sb-tile { background: #fff; border: 1px solid #ece8dc; border-radius: 8px; padding: .8rem .9rem; }
.c21l-sb-tile b { display: block; font-size: 1.35rem; font-weight: 600; color: #222; line-height: 1.2; }
.c21l-sb-tile small { display: block; font-size: .78rem; color: #777; margin-top: .2rem; }
.c21l-sb-types { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: .9rem; font-size: .85rem; color: #555; }
.c21l-sb-types b { color: #8b7d4e; font-weight: 600; }
.c21l-sb-note { margin: .8rem 0 0; font-size: .78rem; color: #888; }
.c21l-sb-note a { color: #8b7d4e; }

/* ---------- plain listing (homes/*.html before the script runs) ---------- */
.c21l-static { max-width: 900px; }
.c21l-static-photo { width: 100%; max-height: 520px; object-fit: cover; border-radius: 10px; margin: .75rem 0 1rem; }
.c21l-static dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.2rem; }
.c21l-static dt { color: #777; font-weight: 400; }
.c21l-static dd { margin: 0; }

/* ---------- request a showing ---------- */
.c21l-ask { display: block; text-align: center; margin-top: .55rem; font-size: .88rem; color: var(--c21l-primary-dark, #8b7d4e) !important; text-decoration: underline; }
.c21l-sr { position: fixed; inset: 0; z-index: 10001; background: rgba(15,15,15,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.c21l-sr[hidden] { display: none; }
.c21l-sr-box { position: relative; background: #fff; border-radius: 12px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 1.6rem 1.5rem 1.3rem; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.c21l-sr-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 1.8rem; line-height: 1; color: #888; cursor: pointer; padding: 4px 8px; }
.c21l-sr-title { margin: 0 0 .2rem; font-size: 1.35rem; font-weight: 600; color: #222; }
.c21l-sr-addr { margin: 0 0 1rem; color: #777; font-size: .9rem; }
.c21l-sr-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
.c21l-sr-fields[hidden] { display: none; }
.c21l-sr-fields label { display: block; font-size: .85rem; font-weight: 500; color: #444; margin-bottom: .75rem; }
.c21l-sr-wide { grid-column: 1 / -1; }
.c21l-sr input:not([type=checkbox]), .c21l-sr select, .c21l-sr textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 11px; font-size: 16px; border: 1px solid #d6d2c6; border-radius: 6px; background: #fff; box-sizing: border-box; font-family: inherit; color: #222; }
.c21l-sr input:focus, .c21l-sr select:focus, .c21l-sr textarea:focus { outline: none; border-color: #beaf87; box-shadow: 0 0 0 3px rgba(190,175,135,.25); }
.c21l-sr-check { display: flex !important; gap: .55rem; align-items: flex-start; font-weight: 400 !important; margin-bottom: .45rem !important; }
.c21l-sr-check input { margin-top: 3px; width: 17px; height: 17px; flex: none; accent-color: #beaf87; }
.c21l-sr-send { width: 100%; margin: .6rem 0 .6rem !important; }
.c21l-sr-send[hidden] { display: none !important; }
.c21l-sr-fine { font-size: .75rem; color: #888; margin: 0; }
.c21l-sr-fine a { color: #8b7d4e; }
.c21l-sr-msg { padding: .75rem .9rem; border-radius: 6px; margin-bottom: 1rem; font-weight: 500; font-size: .92rem; }
.c21l-sr-msg.is-ok { background: #f3f8ee; border: 1px solid #b9d4a2; color: #2f5b17; }
.c21l-sr-msg.is-err { background: #fdf1f0; border: 1px solid #e8b4ae; color: #8a2a1f; }
.c21l-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) { .c21l-sr-fields { grid-template-columns: 1fr; } .c21l-sr-box { padding: 1.3rem 1.1rem 1rem; } }
