/* Buyer tools: local, device-only search and comparison helpers. */
.site-language-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line, #d5e3e6);
  border-radius: 999px;
  background: #fff;
}
.language-flag {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 12px;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(7 59 92 / 18%);
}
.site-language-switcher a {
  display: inline-flex;
  min-width: 43px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  color: var(--navy, #12384b);
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}
.site-language-switcher a[aria-current="page"],
.intl-links a[aria-current="page"] {
  border-color: var(--navy, #12384b);
  background: var(--navy, #12384b);
  color: #fff;
}
.site-language-switcher a:hover:not([aria-current="page"]),
.intl-links a:hover:not([aria-current="page"]) {
  background: var(--mist, #f1f8f9);
}
.site-language-switcher a:focus-visible,
.intl-links a:focus-visible {
  outline: 3px solid var(--blue, #287db4);
  outline-offset: 2px;
}
.primary-nav .site-language-switcher { margin-left: 5px; }
.primary-nav .site-language-switcher a {
  padding: 5px 8px;
  border-bottom: 0;
  font-size: .75rem;
}
.primary-nav .site-language-switcher a:after { display: none; }
.detail-language-switcher { margin-inline: 8px; }
.hero-photo .banner-language-switcher {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 8px 24px rgb(12 48 66 / 22%);
}

.buyer-search-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 9px;
  margin-left: auto;
}
.buyer-search-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.buyer-search-controls select,
.buyer-search-controls button,
.compare-button,
.recent-clear,
.compare-dock button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
}
.buyer-search-controls select { min-width: 152px; padding: 8px 10px; }
.buyer-search-controls button,
.recent-clear,
.compare-dock button { padding: 9px 12px; cursor: pointer; }
.buyer-search-controls button:hover,
.compare-button:hover,
.recent-clear:hover,
.compare-dock button:hover { border-color: var(--lime); background: #eef5e5; }
.buyer-alert { background: var(--navy) !important; border-color: var(--navy) !important; color: #fff !important; }
.buyer-alert:hover { background: var(--navy-deep) !important; }
.buyer-view-toggle { display: inline-flex; align-items: end; gap: 0; }
.buyer-view-toggle button { border-radius: 0; }
.buyer-view-toggle button:first-child { border-radius: 8px 0 0 8px; }
.buyer-view-toggle button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.buyer-view-toggle button[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.buyer-view-toggle button[aria-pressed="true"] + button { border-left-color: var(--navy); }

.buyer-advanced-filters {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px dashed #c5d8dc;
}
.buyer-advanced-filters summary,
.buyer-saved-searches summary {
  color: var(--navy);
  font-size: .875rem;
  font-weight: 800;
  cursor: pointer;
}
.buyer-advanced-filters summary::marker,
.buyer-saved-searches summary::marker { color: var(--blue); }
.buyer-advanced-fields {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 220px);
  gap: 12px;
  max-width: 470px;
  margin-top: 14px;
}
.buyer-advanced-fields label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 7px;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 700;
}
.buyer-advanced-fields label:last-child { grid-template-columns: 1fr; }
.buyer-advanced-fields input,
.buyer-advanced-fields select {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.buyer-advanced-fields input:focus,
.buyer-advanced-fields select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgb(44 130 160 / 12%); }
.buyer-advanced-fields span { grid-column: 2; grid-row: 1; padding-bottom: 11px; color: var(--muted); font-size: .875rem; }

.buyer-saved-searches {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px dashed #c5d8dc;
}
.buyer-saved-search-list { display: grid; gap: 8px; max-width: 680px; margin-top: 12px; }
.buyer-saved-search { display: flex; align-items: stretch; gap: 7px; }
.buyer-saved-search > button:first-child {
  flex: 1;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.buyer-saved-search > button:first-child:hover { border-color: var(--lime); background: #eef5e5; }
.buyer-saved-search-remove {
  width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}
.buyer-saved-search-remove:hover { color: var(--navy); border-color: var(--blue); }

.buyer-toast {
  position: fixed;
  z-index: 31;
  top: 94px;
  right: 24px;
  max-width: min(420px, calc(100vw - 48px));
  margin: 0;
  padding: 13px 16px;
  border: 1px solid #b7cfc0;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 12px 30px rgb(14 54 51 / 16%);
  font-size: .875rem;
  font-weight: 700;
}

.compare-button {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  color: var(--navy);
  background: #f7faf6;
  cursor: pointer;
}
.compare-button::before { content: '⇄'; font-size: 1rem; }
.compare-button[aria-pressed="true"] { border-color: #9fbd71; background: #e5efd8; color: var(--navy-deep); }
.detail-actions .buyer-detail-compare { cursor: pointer; }

.compare-dock {
  position: fixed;
  z-index: 19;
  left: 24px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 48px);
  padding: 9px 10px 9px 15px;
  border: 1px solid #b7cfc0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(14 54 51 / 16%);
}
.compare-dock[hidden] { display: none; }
.compare-dock-status { color: var(--navy); font-size: .8125rem; font-weight: 700; white-space: nowrap; }
.compare-dock .compare-open { border-color: var(--navy); background: var(--navy); color: #fff; }
.compare-dock .compare-open:disabled { cursor: not-allowed; opacity: .58; }
.compare-dock .compare-clear { min-height: 36px; padding: 7px 9px; }

.compare-dialog {
  width: min(1080px, calc(100% - 32px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: transparent;
}
.compare-dialog::backdrop { background: rgb(10 45 43 / 62%); backdrop-filter: blur(4px); }
.compare-card { position: relative; padding: clamp(24px, 4vw, 44px); border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgb(13 54 51 / 25%); }
.compare-card h2 { margin: 8px 0 24px; color: var(--navy); font-size: clamp(1.8rem, 3.8vw, 2.8rem); line-height: 1.1; }
.compare-card > p:not(.eyebrow) { max-width: 60ch; color: var(--muted); }
.compare-close { position: absolute; top: 14px; right: 15px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy); font-size: 1.65rem; line-height: 1; cursor: pointer; }
.compare-close:hover { background: #eef5e5; border-color: var(--lime); }
.compare-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.compare-card table { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; }
.compare-card th,
.compare-card td { padding: 14px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare-card thead th { min-width: 180px; color: var(--navy); background: #f3f7f2; font-family: 'Manrope', Arial, sans-serif; font-size: .95rem; line-height: 1.35; }
.compare-card tbody th { width: 150px; color: var(--muted); font-size: .8125rem; font-weight: 700; }
.compare-card td { color: var(--ink); font-size: .9375rem; line-height: 1.5; }
.compare-card th a { color: inherit; text-decoration: none; }
.compare-card th a:hover { text-decoration: underline; text-underline-offset: 3px; }
.compare-remove { display: block; margin-top: 9px; padding: 0; border: 0; background: transparent; color: var(--blue); font: inherit; font-size: .75rem; font-weight: 700; cursor: pointer; }
.compare-remove:hover { color: var(--navy-deep); text-decoration: underline; }
.compare-footnote { margin: 17px 0 0; font-size: .8125rem; }

.recently-viewed { padding-block: 38px 76px; }
.recent-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.recent-heading .eyebrow { margin-bottom: 8px; }
.recent-heading h2 { color: var(--navy); font-size: clamp(1.55rem, 3vw, 2.25rem); }
.recent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.recent-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 9px 22px rgb(16 63 64 / 7%); transition: transform .18s ease, box-shadow .18s ease; }
.recent-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgb(16 63 64 / 12%); }
.recent-card a { display: block; height: 100%; color: inherit; text-decoration: none; }
.recent-card img { width: 100%; aspect-ratio: 1.5; object-fit: cover; background: var(--mist); }
.recent-card div { padding: 15px; }
.recent-card p { margin: 0 0 6px; color: var(--blue); font-size: .75rem; font-weight: 700; letter-spacing: .06em; }
.recent-card h3 { margin: 0 0 12px; color: var(--ink); font-size: 1rem; line-height: 1.4; }
.recent-card strong { color: var(--navy); font-family: 'Manrope', Arial, sans-serif; font-size: 1.08rem; }

.property-grid[data-buyer-view="list"] { grid-template-columns: minmax(0, 1fr); gap: 9px; }
.property-grid[data-buyer-view="list"] .property {
  --buyer-list-image: 100px;
  --buyer-list-action: 128px;
  position: relative;
  display: block;
  width: 100%;
  min-height: 112px;
  max-width: none;
  margin: 0;
  padding-right: var(--buyer-list-action);
  border-radius: 10px;
  box-shadow: none;
}
.property-grid[data-buyer-view="list"] .property:hover {
  transform: none;
  box-shadow: 0 6px 18px rgb(16 43 72 / 7%);
}
.property-grid[data-buyer-view="list"] .property-link {
  display: flex;
  width: 100%;
  min-width: 0;
  height: auto;
}
.property-grid[data-buyer-view="list"] .property-photo {
  flex: 0 0 var(--buyer-list-image);
  min-height: 112px;
  aspect-ratio: auto;
}
.property-grid[data-buyer-view="list"] .property-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}
.property-grid[data-buyer-view="list"] .property-tag,
.property-grid[data-buyer-view="list"] .property-badge,
.property-grid[data-buyer-view="list"] .property-description,
.property-grid[data-buyer-view="list"] .property-note,
.property-grid[data-buyer-view="list"] .property-price-note,
.property-grid[data-buyer-view="list"] .listing-source,
.property-grid[data-buyer-view="list"] .property-arrow,
.property-grid[data-buyer-view="list"] .listing-source-link { display: none; }
.property-grid[data-buyer-view="list"] .property-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr;
  flex: 1 1 auto;
  min-width: 0;
  padding: 13px 16px;
  column-gap: 18px;
}
.property-grid[data-buyer-view="list"] .property-location {
  grid-column: 1;
  margin: 0 0 3px;
  font-size: .75rem;
  line-height: 1.25;
}
.property-grid[data-buyer-view="list"] .property h3 {
  grid-column: 1;
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.property-grid[data-buyer-view="list"] .property-facts {
  grid-column: 1;
  display: flex;
  gap: 11px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}
.property-grid[data-buyer-view="list"] .property-facts li {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}
.property-grid[data-buyer-view="list"] .property-facts strong { font-size: .8125rem; }
.property-grid[data-buyer-view="list"] .property-facts span {
  display: inline;
  margin: 0;
  font-size: .6875rem;
  line-height: 1.2;
}
.property-grid[data-buyer-view="list"] .property-bottom {
  grid-row: 1 / span 3;
  grid-column: 2;
  align-self: center;
  display: block;
  margin: 0;
  padding: 0;
}
.property-grid[data-buyer-view="list"] .price {
  margin: 0;
  white-space: nowrap;
  font-size: 1.2rem;
  line-height: 1.2;
}
.property-grid[data-buyer-view="list"] .price span { font-size: .8125rem; }
.property-grid[data-buyer-view="list"] .property-actions {
  position: absolute;
  inset: 0 0 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  width: var(--buyer-list-action);
  margin: 0;
  padding: 12px;
  border-left: 1px solid var(--line);
  background: transparent;
}
.property-grid[data-buyer-view="list"] .property-actions .favorite-button,
.property-grid[data-buyer-view="list"] .property-actions .inquiry-button:not(.detail-button),
.property-grid[data-buyer-view="list"] .property-actions .compare-button { display: none; }
.property-grid[data-buyer-view="list"] .property-actions .detail-button {
  grid-column: auto;
  min-height: 38px;
  padding: 8px 9px;
  border-color: var(--navy);
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: .75rem;
  line-height: 1.2;
  text-align: center;
}
.property-grid[data-buyer-view="list"] .property-actions .detail-button:hover {
  border-color: var(--blue);
  background: var(--blue);
}

.related-properties { margin: 48px 0 0; padding-top: 38px; border-top: 1px solid var(--line); }
.related-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.related-heading .eyebrow { margin-bottom: 8px; }
.related-heading h2 { margin: 0; color: var(--navy); font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.16; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.related-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 9px 22px rgb(16 63 64 / 7%); transition: transform .18s ease, box-shadow .18s ease; }
.related-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgb(16 63 64 / 12%); }
.related-card a { display: block; height: 100%; color: inherit; text-decoration: none; }
.related-card img { width: 100%; aspect-ratio: 1.5; object-fit: cover; background: var(--mist); }
.related-card div { padding: 16px; }
.related-card p { margin: 0 0 6px; color: var(--blue); font-size: .8125rem; font-weight: 700; letter-spacing: .05em; }
.related-card h3 { margin: 0 0 12px; color: var(--ink); font-size: 1rem; line-height: 1.4; }
.related-card strong { display: block; color: var(--navy); font-family: 'Manrope', Arial, sans-serif; font-size: 1.08rem; }
.related-card span { display: inline-block; margin-top: 13px; color: var(--blue); font-size: .875rem; font-weight: 700; }

.mobile-detail-contact { display: none; }

@media (max-width: 960px) {
  .buyer-search-controls { width: 100%; margin: 10px 0 0; }
  .recent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .buyer-search-controls { align-items: stretch; gap: 8px; }
  .buyer-search-controls label { flex: 1 1 100%; }
  .buyer-search-controls select { width: 100%; }
  .buyer-search-controls button { flex: 1 1 calc(50% - 4px); }
  .buyer-view-toggle { flex: 1 1 100%; }
  .buyer-view-toggle button { flex: 1 1 50%; }
  .buyer-advanced-fields { grid-template-columns: 1fr; max-width: none; }
  .buyer-saved-search-list { max-width: none; }
  .compare-dock { right: 16px; left: 16px; bottom: 74px; justify-content: space-between; padding: 9px 11px; }
  .has-mobile-detail-contact .compare-dock { bottom: 84px; }
  .compare-dock-status { font-size: .75rem; }
  .compare-dock .compare-clear { display: none; }
  .compare-card { padding: 27px 18px 22px; }
  .compare-card h2 { padding-right: 30px; font-size: 2rem; }
  .recently-viewed { padding-block: 34px 62px; }
  .recent-heading { align-items: start; flex-direction: column; gap: 13px; }
  .recent-grid { grid-template-columns: 1fr; }
  .recent-card a { display: grid; grid-template-columns: 120px 1fr; }
  .recent-card img { height: 100%; min-height: 120px; aspect-ratio: auto; }
  .property-grid[data-buyer-view="list"] .property { display: block; max-width: none; margin: 0; }
  .property-grid[data-buyer-view="list"] .property-link { display: flex; }
  .property-grid[data-buyer-view="list"] .property-photo { width: auto; min-height: 112px; aspect-ratio: auto; }
  .property-grid[data-buyer-view="list"] .property-photo img { height: 100%; aspect-ratio: auto; }
  .property-grid[data-buyer-view="list"] .property-info { padding: 13px 16px; }
  .related-properties { margin-top: 34px; padding-top: 30px; }
  .related-heading { align-items: start; flex-direction: column; gap: 14px; }
  .related-grid { grid-template-columns: 1fr; }
  .related-card a { display: grid; grid-template-columns: 120px 1fr; }
  .related-card img { height: 100%; min-height: 120px; aspect-ratio: auto; }
  .related-card div { padding: 14px; }
  .related-card span { margin-top: 10px; }
  .mobile-detail-contact {
    position: fixed;
    z-index: 24;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid #b7cfc0;
    background: #fff;
    box-shadow: 0 -8px 26px rgb(14 54 51 / 12%);
  }
  .mobile-detail-contact a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 8px;
    color: #fff;
    font-size: .9375rem;
    font-weight: 800;
    text-decoration: none;
  }
  .mobile-detail-call { background: var(--navy); }
  .mobile-detail-mail { background: var(--blue); }
  .has-mobile-detail-contact { padding-bottom: 78px; }
}

@media (max-width: 820px) {
  .primary-nav .site-language-switcher {
    align-self: flex-start;
    margin: 10px 0 0;
  }
}

@media (max-width: 620px) {
  .hero-photo .banner-language-switcher { top: 12px; right: 12px; }
  .detail-header .shell { flex-wrap: wrap; }
  .detail-language-switcher {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-end;
    margin: 2px 0 0;
  }
  .detail-back { order: 2; margin-left: auto; }
  .site-language-switcher a { min-width: 32px; min-height: 32px; padding: 5px 7px; }
}

@media (max-width: 540px) {
  .property-grid[data-buyer-view="list"] .property {
    --buyer-list-image: 84px;
    --buyer-list-action: 98px;
    min-height: 94px;
  }
  .property-grid[data-buyer-view="list"] .property-photo { min-height: 94px; }
  .property-grid[data-buyer-view="list"] .property-info {
    display: block;
    padding: 10px 11px;
  }
  .property-grid[data-buyer-view="list"] .property-location { margin-bottom: 3px; font-size: .6875rem; }
  .property-grid[data-buyer-view="list"] .property h3 { font-size: .875rem; line-height: 1.28; }
  .property-grid[data-buyer-view="list"] .property-facts { display: none; }
  .property-grid[data-buyer-view="list"] .property-bottom { display: block; margin-top: 6px; }
  .property-grid[data-buyer-view="list"] .price { font-size: 1.02rem; }
  .property-grid[data-buyer-view="list"] .price span { font-size: .75rem; }
  .property-grid[data-buyer-view="list"] .property-actions { width: var(--buyer-list-action); padding: 8px; }
  .property-grid[data-buyer-view="list"] .property-actions .detail-button { min-height: 36px; padding: 7px 6px; font-size: .6875rem; }
}
