/* Approved search layout. Loaded after each page's own styles. */
.brand .bn small, .brand .name small {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}
body.page-search { margin: 0; background: var(--paper, #f4f7fc); }
body.page-search .wrap { max-width: none; padding: 0 0 48px; display: block; }
/* Clip sideways overflow on the page wrapper. `clip` does not create a scroll
   container, so the sticky search header still sticks to the viewport and the
   fixed Agende una visita bar (outside .wrap) is left alone. */
.wrap { overflow-x: clip; }
body.page-search .topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line, #e2e8f2);
  position: sticky; top: 0; z-index: 30;
}
body.page-search .hdr-search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 8px;
  border: 2px solid var(--pine, #15315e); border-radius: 12px; background: #fff;
  padding-left: 10px; min-width: 0; color: #5b6577;
}
body.page-search .hdr-search input {
  flex: 1; border: 0; outline: none; font: 600 16px "DM Sans", system-ui, sans-serif;
  padding: 10px 4px; min-width: 0; color: var(--ink, #16213a); background: transparent;
}
body.page-search .hdr-search button.filter-btn {
  position: relative; flex: 0 0 auto; border: 1px solid #d5dbe6; background: #fff;
  color: var(--pine, #15315e); width: 42px; height: 42px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
body.page-search .hdr-search .fcount {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 99px; background: var(--go, #e23b3b); color: #fff;
  font: 800 11px "DM Sans", system-ui, sans-serif; display: inline-flex; align-items: center; justify-content: center;
}
body.page-search .hdr-search .fcount[hidden] { display: none; }
body.page-search .chipbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--line, #e2e8f2);
}
body.page-search .range {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1.5px solid #cfd6e4; border-radius: 8px; background: #fff;
  padding: 4px 8px; font-size: 13px; font-weight: 800;
}
body.page-search .range select { border: 0; background: transparent; font: inherit; font-weight: 800; max-width: 92px; }
body.page-search .more { position: relative; }
body.page-search .more summary {
  list-style: none; cursor: pointer; font-weight: 800; font-size: 14px;
  border: 1.5px solid #cfd6e4; border-radius: 8px; padding: 8px 12px; background: #fff;
}
body.page-search .more summary::-webkit-details-marker { display: none; }
body.page-search .more-panel {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid var(--line, #e2e8f2); border-radius: 12px;
  padding: 12px; display: grid; gap: 8px; min-width: 240px;
  box-shadow: 0 10px 30px rgba(15,36,68,.12);
}
body.page-search .more-panel label { display: grid; gap: 2px; font-size: 12px; font-weight: 700; color: #5b6577; }
body.page-search .more-panel select { font: 600 14px "DM Sans", system-ui, sans-serif; padding: 8px; border-radius: 8px; border: 1px solid #e2e8f2; }
body.page-search .nav-hide { display: none; }
body.page-search .whyband { display: none !important; }
body.page-search .topbar { display: block; padding: 10px 16px 8px; }
body.page-search .zhead-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.page-search .hdr-search { width: 100%; margin-top: 10px; border-radius: 999px; padding-right: 4px; min-height: 48px; }
body.page-search .z-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; }
body.page-search .z-chips:empty { display: none; }
body.page-search .z-chips button {
  flex: 0 0 auto; border: 0; background: var(--pine, #15315e); color: #fff;
  font: 700 14px "DM Sans", system-ui, sans-serif; border-radius: 999px; padding: 8px 12px; cursor: pointer;
}
/* Always-visible quick filters: city, bedrooms, price range, monthly. The rest live under "More filters". */
body.page-search .z-quick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; padding: 10px 0 2px; }
body.page-search .z-quick .qf { display: grid; gap: 3px; font: 800 11px "DM Sans", system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: #5b6577; }
body.page-search .z-quick select {
  font: 700 14px "DM Sans", system-ui, sans-serif; color: var(--ink, #16213a); background: #fff;
  border: 1.5px solid #cfd6e4; border-radius: 10px; padding: 8px 10px; min-width: 120px; max-width: 220px; cursor: pointer;
}
body.page-search .z-quick #fState { min-width: 0; max-width: 150px; }  /* two-letter codes; keeps City in view on phones */
body.page-search .z-quick select:focus { outline: none; border-color: var(--pine, #15315e); box-shadow: 0 0 0 3px rgba(21,49,94,.15); }
body.page-search .z-quick .qf-more, body.page-search .z-quick .qf-clear {
  font: 800 14px "DM Sans", system-ui, sans-serif; border-radius: 10px; padding: 9px 12px; cursor: pointer;
  border: 1.5px solid var(--pine, #15315e); background: #fff; color: var(--pine, #15315e);
}
body.page-search .z-quick .qf-clear { border-color: transparent; text-decoration: underline; }
body.page-search .z-quick .qf-clear[hidden] { display: none; }
body.page-search .z-sort { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 4px; }
body.page-search .z-sort .count { padding: 0; font-weight: 700; }
body.page-search .sort-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
body.page-search .sort-pill select {
  border: 1.5px solid #cfd6e4; border-radius: 999px; background: #fff; font: 700 14px "DM Sans", system-ui, sans-serif; padding: 8px 12px;
}
body.page-search .filter-sheet {
  position: absolute; right: 16px; top: calc(100% - 4px); z-index: 45; width: min(460px, calc(100vw - 24px));
  background: #fff; border: 1px solid var(--line, #e2e8f2); border-radius: 16px; padding: 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; box-shadow: 0 16px 40px rgba(15,36,68,.16);
}
body.page-search .filter-sheet[hidden] { display: none !important; }
body.page-search .filter-sheet label { display: grid; gap: 4px; font-size: 12px; font-weight: 800; color: #5b6577; }
body.page-search .filter-sheet select { font: 600 14px "DM Sans", system-ui, sans-serif; padding: 8px; border-radius: 8px; border: 1px solid #e2e8f2; width: 100%; }
body.page-search .filter-sheet .sheet-wide { grid-column: 1 / -1; }
body.page-search .z-feat {
  position: absolute; top: 12px; left: 12px; z-index: 5; background: #fff; color: #16213a;
  font: 700 13px "DM Sans", system-ui, sans-serif; padding: 6px 10px; border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
body.page-search #featuredSec { display: none !important; }
body.page-search .reveal { opacity: 1 !important; transform: none !important; }
body.page-search #listings { margin: 0 !important; height: auto; min-height: 0; display: block; overflow: visible; }
body.page-search #faq,
body.page-search #why-buy,
body.page-search #how,
body.page-search #listings,
body.page-search #story { scroll-margin-top: 190px; }
body.page-search #listings .listings-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 8px 16px 0; }
body.page-search #listings .sec-head, body.page-search .hero, body.page-search .stats { display: none; }
body.page-search .chipbar { position: sticky; top: 69px; z-index: 28; }
body.page-search #listings .listings-head { justify-content: flex-start; }
body.page-search #alertBtn {
  background: none !important; border: 0 !important; color: var(--pine, #15315e) !important;
  padding: 0 !important; font: 700 14px "DM Sans", system-ui, sans-serif !important;
  text-decoration: underline; cursor: pointer; box-shadow: none !important;
}
body.page-search #copyLink { display: none !important; }
body.page-search .hm-near, body.page-search .hm-bar, body.page-search .hc-cmpbtn { display: none !important; }
/* Homes first: on desktop the cards take the room and the map is a narrow sticky column on the right
   (about a quarter of the screen), so the pins stay in view while scrolling the filtered homes. */
body.page-search #split { display: grid !important; grid-template-columns: minmax(0, 1fr) clamp(260px, 25vw, 400px); gap: 0; align-items: start; min-height: 0; }
body.page-search #split > div:first-child { min-height: 0; }
body.page-search #splitMap { position: sticky; top: var(--zhead, 168px); height: min(calc(100vh - var(--zhead, 168px) - 16px), 620px); min-height: 280px; margin: 20px 16px 0 4px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line, #e2e8f2); }
body.page-search #splitMap > div,
body.page-search #splitMap .hm-wrap { height: 100%; margin: 0; position: relative; }
body.page-search #splitMap .hm-map {
  height: 100% !important; min-height: 0 !important; margin: 0 !important; border-radius: 0 !important; border: 0;
}
body.page-search #splitMap .hm-foot {
  position: absolute; z-index: 500; left: 12px; bottom: 28px; margin: 0;
  background: #fff; border-radius: 8px; padding: 4px 8px;
  box-shadow: 0 2px 8px rgba(15,36,68,.12);
}
body.page-search .whyband {
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center;
  padding: 14px 16px; background: #fff; border-top: 1px solid var(--line, #e2e8f2);
}
body.page-search .whyband h2 { margin: 0; font-size: 16px; }
body.page-search .whyband ul { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; margin: 0; padding: 0; font-weight: 700; }
body.page-search .view-toggle { display: none; }
body.page-search .story { max-width: 980px; margin: 28px auto; padding: 0 16px; }
.lang { display: inline-flex; border: 1.5px solid var(--line, #e2e8f2); border-radius: 999px; overflow: hidden; margin-right: 4px; }
.lang a { text-decoration: none; color: var(--ink-soft, #5b6577); font-size: 12px; font-weight: 800; padding: 6px 8px; }
.lang a[aria-current="page"] { background: var(--pine, #15315e); color: #fff; }
.topnav a.acct, .topnav a[href="account.html"] { font-weight: 700; }
.near {
  font: 800 14px "DM Sans", system-ui, sans-serif;
  border: 1.5px solid var(--pine, #15315e);
  background: #fff;
  color: var(--pine, #15315e);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.badge-new {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  background: var(--pine, #15315e);
  color: #fff;
  font: 800 11px "DM Sans", system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 8px;
}
.card-face .hc-heart { top: 8px !important; bottom: auto !important; right: 8px !important; }
body.page-search .card .fcity,
body.page-search .card .of-tag,
body.page-search .card .card-cta,
body.page-search .card .card-mini,
body.page-search .card .houseMark,
body.page-search .card .card-addr,
body.page-search .card .status-tag,
body.page-search .card .scrim,
body.page-search .card .badge-new,
body.page-search .card .cs-tag,
body.page-search .card .pg { display: none !important; }
body.page-search .card .status-tag.pending {
  display: inline-block !important;
  background: #c2410c;
  color: #fff;
  z-index: 6;
}
body.page-search .cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important; gap: 16px; padding: 12px 12px 96px; margin-top: 8px; }
body.page-search .card {
  display: flex !important; flex-direction: column; border: 0; border-radius: 16px;
  overflow: hidden; box-shadow: 0 1px 4px rgba(15,36,68,.14); min-height: 0;
}
body.page-search .card:hover { transform: none; }
body.page-search .card-face { aspect-ratio: 16/10 !important; min-height: 200px; }
body.page-search .card-face .pdots { opacity: 1; }
body.page-search .card-face .pdots i { width: 7px; height: 7px; background: rgba(255,255,255,.65); }
body.page-search .card-face .pdots i.on { background: #fff; }
body.page-search .card-body { padding: 12px 14px 16px !important; }
body.page-search .card-price .num { font-size: 30px !important; letter-spacing: -.4px; }
body.page-search .card-specs { margin: 4px 0 2px !important; font-size: 15px !important; font-weight: 650; color: #3c4b63; }
body.page-search .card-where { color: #3c4b63; font-weight: 600; font-size: 15px; margin-top: 2px; }
body.page-search .card-down { font-weight: 800; margin-top: 6px; color: var(--ink, #16213a); }
.topnav a.saved { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.topnav a.saved .count { background: var(--honey, #e23b3b); color: #fff; border-radius: 99px; font-size: 11px; min-width: 16px; text-align: center; padding: 0 5px; }
.why-compact { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line, #e2e8f2); display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.faq details { background: #fff; border: 1px solid var(--line, #e2e8f2); border-radius: 12px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 800; padding: 12px 14px; }
.faq .ans { padding: 0 14px 14px; color: var(--ink-soft, #5b6577); }
.story { margin-top: 28px; }
.story h2 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; letter-spacing: -.4px; }
.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.benefits article { background: #fff; border: 1px solid var(--line, #e2e8f2); border-radius: 14px; padding: 12px 14px; }
.benefits h3 { margin: 0 0 4px; font-size: 16px; }
.benefits p, .story .lede { margin: 0 0 10px; color: var(--ink-soft, #5b6577); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.knob { width: 42px; height: 24px; border-radius: 99px; background: #c5cedd; position: relative; }
.knob::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; }
.switch input:checked + .knob { background: var(--pine, #15315e); }
.switch input:checked + .knob::after { left: 21px; }
.page-home .wrap { max-width: 1100px; }
.page-home #ctaCall, .page-home #ctaCall2 { background: transparent; color: var(--pine, #15315e); border: 0; box-shadow: none; }
@media (min-width: 900px) {
  .page-home .hero { display: grid; grid-template-columns: minmax(0,1.5fr) 320px; column-gap: 18px; align-items: start; }
  .page-home .hero-photo { grid-column: 1; grid-row: 1 / span 8; }
  .page-home .deal-strip, .page-home .cta-group, .page-home .cta-note, .page-home .why-compact,
  .page-home .headline, .page-home .prop-addr, .page-home .prop-specs, .page-home .subhead { grid-column: 2; }
}
@media (max-width: 860px) {
  .card { grid-template-columns: 1fr !important; }
  .card-face { aspect-ratio: 16/10 !important; min-height: 0; }
  .benefits { grid-template-columns: 1fr; }
  .topnav { flex-wrap: wrap; }
  body.page-search .chipbar { position: static; }
  body.page-search #listings { height: auto; overflow: visible; }
  body.page-search #split { display: block !important; min-height: 0; }
  body.page-search #splitMap { display: none; position: static; height: calc(100vh - 210px); margin: 0; border-radius: 0; border: 0; }
  /* phones: the quick filters are one swipeable row so the sticky header stays short */
  body.page-search .z-quick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  body.page-search .z-quick::-webkit-scrollbar { display: none; }
  body.page-search .z-quick .qf, body.page-search .z-quick button { flex: 0 0 auto; }
  body.page-search .z-quick select { min-width: 0; font-size: 16px; padding: 7px 8px; }
  /* the quick filters already show what is picked (with Clear all), so skip the duplicate chip row on phones */
  body.page-search .z-chips { display: none !important; }
  body.page-search .z-quick { padding-top: 8px; }
  body.page-search.show-map #cards,
  body.page-search.show-map #pager,
  body.page-search.show-map #empty { display: none; }
  body.page-search.show-map #splitMap { display: block; }
  body.page-search .view-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    position: fixed; z-index: 1000; left: 50%; bottom: 18px; transform: translateX(-50%); /* above the map pins (Leaflet panes go up to 700) */
    background: #111827; color: #fff; border: 0; border-radius: 999px;
    padding: 12px 18px; font-weight: 800; box-shadow: 0 8px 22px rgba(15,36,68,.35); cursor: pointer;
  }
  body.page-search .cards { padding-left: 10px; padding-right: 10px; }
  body.page-search .z-sort { flex-wrap: wrap; row-gap: 6px; min-width: 0; max-width: 100%; }
  body.page-search .z-sort .count { min-width: 0; white-space: normal; }
  body.page-search .sort-pill { margin-left: auto; max-width: 100%; min-width: 0; }
  body.page-search .sort-pill select { max-width: 100%; min-width: 0; }
}
