/* ==========================================================================
   FLATS / BROWSE PAGE (flats.php only) — loaded after styles.css.
   Navy + orange brand, white surfaces, soft borders, restrained shadows.
   Dark mode needs nothing here: theme-init.php inverts the whole page.
   ========================================================================== */
.rh-flats {
  --rhx-navy: #0f172a;
  --rhx-ink: #1e293b;
  --rhx-muted: #64748b;
  --rhx-line: #e5e8ee;
  --rhx-soft: #f6f7f9;
  --rhx-orange: #F28C1B;
  --rhx-orange-grad: linear-gradient(180deg, #F79A2E 0%, #EE7F12 100%);
  --rhx-orange-ink: #c2410c;
  --rhx-green: #059669;
  background: #fbfbfc;
}

.rhx { max-width: 1440px; padding-bottom: 8px; }
.rhx-hero svg, .rhx-search svg, .rhx-toolbar svg, .rhx-dd-menu svg { stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.rhx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Heading ---------- */
.rhx-hero { margin: 20px 0 14px; }
.rhx-title { margin: 0; font-size: clamp(24px, 2.3vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -0.025em; color: var(--rhx-navy); }
.rhx-sub { margin: 8px 0 0; font-size: clamp(14px, 1.05vw, 16px); color: #475569; font-weight: 500; }

/* ---------- Search card ---------- */
.rhx-search {
  position: relative;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--rhx-line);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 8px 24px rgba(15, 23, 42, 0.04);
}
.rhx-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.9fr) repeat(4, minmax(132px, 1fr)) auto;
  gap: 12px;
  align-items: stretch;
}
.rhx-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 12px;
  color: var(--rhx-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
  min-width: 0;
}
.rhx-field:hover { border-color: #cbd2dc; }
.rhx-field:focus-within { border-color: var(--rhx-orange); box-shadow: 0 0 0 3px rgba(242, 140, 27, 0.15); }
.rhx-ico { width: 17px; height: 17px; flex: 0 0 17px; color: #475569; }
.rhx-ico--txt { display: inline-flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; line-height: 1; }
.rhx-field input,
.rhx-field select {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--rhx-ink);
  padding: 0;
}
.rhx-field input::placeholder { color: #94a3b8; font-weight: 400; }
.rhx-field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right center;
  text-overflow: ellipsis;
}
.rhx-more { cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; text-align: left; }
.rhx-more span { flex: 1; white-space: nowrap; }
.rhx-more .rhx-chev { width: 14px; height: 14px; color: #475569; stroke-width: 2.2; transition: transform .2s ease; }
.rhx-more[aria-expanded="true"] .rhx-chev { transform: rotate(180deg); }
.rhx-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 26px;
  border: 0;
  border-radius: 12px;
  background: var(--rhx-orange-grad);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(238, 127, 18, 0.25);
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
.rhx-search-btn svg { width: 18px; height: 18px; stroke-width: 2.3; }
.rhx-search-btn:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(238, 127, 18, 0.32); }
.rhx-search-btn:focus-visible, .rhx-chip:focus-visible, .rhx-more:focus-visible, .rhx-view button:focus-visible { outline: 3px solid var(--rhx-navy); outline-offset: 2px; }

/* Suggestions dropdown under the locality box */
.rhx-field--loc .search-suggestions-dropdown { left: -1px; right: -1px; }

/* Advanced filters */
.rhx-advanced {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--rhx-line);
}
.rhx-advanced.hidden { display: none; }
.rhx-adv-field label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--rhx-muted); text-transform: uppercase; letter-spacing: .04em; }
.rhx-adv-field select {
  width: 100%;
  height: 46px;
  padding: 0 34px 0 14px;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 14.5px;
  color: var(--rhx-ink);
  cursor: pointer;
}
.rhx-adv-field select:focus { outline: 0; border-color: var(--rhx-orange); box-shadow: 0 0 0 3px rgba(242, 140, 27, 0.15); }
.rhx-reset { height: 46px; padding: 0 16px; border: 1px solid transparent; background: transparent; color: var(--rhx-orange-ink); font: inherit; font-size: 14px; font-weight: 700; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.rhx-reset:hover { background: #fff7ed; }

/* Popular localities */
.rhx-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.rhx-popular-label { font-size: 14.5px; color: #475569; font-weight: 500; margin-right: 2px; }
.rhx-chip {
  height: 34px;
  padding: 0 16px;
  border: 1px solid #e3e7ed;
  border-radius: 999px;
  background: var(--rhx-soft);
  color: var(--rhx-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.rhx-chip:hover { background: #fff7ed; border-color: #fcd9b0; color: var(--rhx-orange-ink); }
.rhx-chip.active { background: #fff7ed; border-color: var(--rhx-orange); color: var(--rhx-orange-ink); font-weight: 600; }

/* ---------- Promo carousel: short, wide, sits above the fold ---------- */
.rh-flats .rh-ad-wrap { max-width: none; margin: 18px 0 0; padding: 0; }
.rh-flats .rh-ad-slider { border-radius: 18px; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.10); }
.rh-flats .rh-ad-slide { min-height: 196px; }
.rh-flats .rh-ad-content { max-width: 680px; padding: 46px 40px 40px 108px; }
.rh-flats .rh-ad-title { font-size: clamp(22px, 2.4vw, 34px); margin-bottom: 8px; }
.rh-flats .rh-ad-sub { font-size: clamp(14px, 1.3vw, 18px); margin-bottom: 18px; }
.rh-flats .rh-ad-cta { padding: 12px 24px; font-size: 15px; background: var(--rhx-orange-grad); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22); }
.rh-flats .rh-ad-cta:hover { background: var(--rhx-orange-grad); filter: brightness(1.05); }
.rh-flats .rh-ad-tag { left: 108px; right: auto; top: 16px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.22); }
.rh-flats .rh-ad-arrow { width: 40px; height: 40px; opacity: 1; transform: translateY(-50%) scale(1); }
.rh-flats .rh-ad-arrow.prev { left: 24px; }
.rh-flats .rh-ad-arrow.next { right: 24px; }

/* ---------- Results toolbar ---------- */
.rhx-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 16px; flex-wrap: wrap; }
.rhx-count { margin: 0; font-size: 21px; color: #334155; font-weight: 500; }
.rhx-count strong { font-size: 25px; font-weight: 800; color: var(--rhx-navy); margin-right: 4px; }
.rhx-toolbar-right { display: flex; align-items: center; gap: 16px; }
.rhx-sort { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; color: var(--rhx-muted); }
.rhx-sort select {
  height: 42px;
  min-width: 156px;
  padding: 0 38px 0 14px;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--rhx-ink);
  cursor: pointer;
}
.rhx-sort select:focus { outline: 0; border-color: var(--rhx-orange); box-shadow: 0 0 0 3px rgba(242, 140, 27, 0.15); }
.rh-flats .view-buttons.rhx-view {
  display: inline-flex;
  min-width: 0;
  height: 42px;
  padding: 3px;
  gap: 2px;
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 11px;
}
.rh-flats .rhx-view button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}
.rh-flats .rhx-view button svg { width: 17px; height: 17px; margin: 0; }
.rh-flats .rhx-view button:hover { color: var(--rhx-navy); background: var(--rhx-soft); }
.rh-flats .rhx-view button.active { background: #fff7ed; border-color: #fbc58a; color: var(--rhx-orange-ink); }

/* ---------- Property cards ---------- */
.rh-flats .property-grid { gap: 24px; margin-bottom: 40px; }
.rh-flats .property-card.rh-card {
  border: 1px solid var(--rhx-line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.04);
}
.rh-flats .property-card.rh-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 14px 30px rgba(15, 23, 42, 0.09); }
.rh-flats .rh-card .rh-card-media { aspect-ratio: 16 / 10; }
.rh-flats .rh-card .rh-card-media::after { height: 30%; background: linear-gradient(to top, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0)); }
.rh-flats .rh-badge { font-size: 13px; font-weight: 600; padding: 6px 11px; gap: 6px; }
.rh-flats .rh-badge--verified { color: #15803d; }
.rh-flats .rh-badge--verified svg { width: 15px; height: 15px; padding: 2px; border-radius: 50%; background: #16a34a; color: #fff; stroke: #fff; stroke-width: 3.5; box-sizing: border-box; }
.rh-flats .rh-card .rh-card-heart { top: 12px; right: 12px; width: 40px; height: 40px; }
.rh-flats .rh-card .rh-card-body { padding: 16px 18px 14px; }
.rh-flats .rh-card .rh-card-title { font-size: 18px; font-weight: 700; color: var(--rhx-navy); margin-bottom: 4px; }
.rh-flats .rh-card .rh-card-title:hover { color: var(--rhx-orange-ink); }
.rh-flats .rh-card-location { font-size: 14.5px; color: #475569; }
.rh-flats .rh-card-price { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.rh-flats .rh-card-price-main { font-size: 23px; font-weight: 800; color: var(--rhx-navy); letter-spacing: -0.01em; }
.rh-flats .rh-card-price-main small { font-size: 14px; font-weight: 500; color: var(--rhx-muted); }
.rh-flats .rh-card-price-sub { font-size: 13px; color: #94a3b8; margin: 0; }

.rh-card-specs { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; color: #475569; font-size: 14px; }
.rh-card-specs span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.rh-card-specs svg { width: 19px; height: 19px; flex: 0 0 19px; color: #64748b; }

.rh-flats .rh-card-actions--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 16px; }
.rh-flats .rh-card-actions--pair .rh-card-ghost,
.rh-flats .rh-card-actions--pair .rh-card-cta { height: 44px; border-radius: 10px; font-size: 15px; font-weight: 700; justify-content: center; }
.rh-flats .rh-card-actions--pair .rh-card-ghost { background: #fff; border: 1px solid #cfd5de; color: var(--rhx-navy); }
.rh-flats .rh-card-actions--pair .rh-card-ghost:hover { border-color: var(--rhx-navy); background: #fff; }
.rh-flats .rh-card-cta--primary,
.rh-flats .rh-card-cta--pro { background: var(--rhx-orange-grad); color: #fff; box-shadow: 0 3px 10px rgba(238, 127, 18, 0.22); }
.rh-flats .rh-card-cta--primary:hover,
.rh-flats .rh-card-cta--pro:hover { background: var(--rhx-orange-grad); filter: brightness(1.05); box-shadow: 0 5px 14px rgba(238, 127, 18, 0.3); }
.rh-flats .rh-card-cta--done { font-size: 13px !important; }

.rh-flats .rh-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0f2f5; font-size: 12.5px; color: var(--rhx-muted); }
.rh-flats .rh-card-meta-good { color: var(--rhx-green); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-card-compare { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; color: var(--rhx-muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.rh-card-compare svg { width: 13px; height: 13px; margin: 0 !important; }
.rh-card-compare:hover { color: var(--rhx-navy); background: var(--rhx-soft); }

/* Map mode: cards share the row with the map, so stack the two buttons */
.rh-flats .flats-split-layout.split-active .rh-card-actions--pair { grid-template-columns: 1fr; }


/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .rhx-search-row { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
  .rhx-field--loc { grid-column: 1 / -1; }
  .rhx-search-btn { padding: 0 28px; }
}
@media (max-width: 1024px) {
  .rh-flats .rh-ad-content { padding: 40px 40px 40px 80px; }
  .rh-flats .rh-ad-tag { left: 80px; }
  .rh-flats .rh-ad-arrow.prev { left: 16px; }
  .rh-flats .rh-ad-arrow.next { right: 16px; }
  .rhx-advanced { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .rhx-hero { margin: 18px 0 14px; }
  .rhx-search { padding: 14px; border-radius: 16px; }
  .rhx-search-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rhx-field { height: 50px; padding: 0 12px; }
  .rhx-field--select .rhx-ico { display: none; }
  .rhx-field input, .rhx-field select, .rhx-more { font-size: 15px; }
  .rhx-search-btn { grid-column: 1 / -1; height: 50px; }
  .rhx-advanced { grid-template-columns: 1fr; }
  .rhx-popular { gap: 8px; }
  .rhx-popular-label { width: 100%; font-size: 13.5px; }
  .rhx-chip { height: 32px; padding: 0 13px; font-size: 13.5px; }
  .rh-flats .rh-ad-content { padding: 30px 22px 44px; }
  .rh-flats .rh-ad-tag { left: 22px; top: 12px; }
  .rh-flats .rh-ad-slide { min-height: 220px; }
  .rhx-toolbar { margin: 18px 0 12px; }
  .rhx-count { font-size: 17px; }
  .rhx-count strong { font-size: 21px; }
  .rhx-toolbar-right { width: 100%; justify-content: space-between; gap: 10px; }
  .rhx-sort select { min-width: 0; }
  .rh-flats .rhx-view button { padding: 0 12px; }
}
@media (max-width: 340px) {
  .rhx-search-row { grid-template-columns: 1fr; }
  .rhx-sort > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rhx-search-btn, .rhx-more .rhx-chev, .rh-flats .property-card.rh-card { transition: none; }
}

/* ---------- Styled drop-down menus (enhanced <select>s) ---------- */
.rh-flats .rhx-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden; padding: 0 !important; border: 0 !important; }
.rhx-dd-host { position: relative; }
.rhx-dd-btn { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 15.5px; font-weight: 500; color: var(--rhx-ink); text-align: left; cursor: pointer; }
.rhx-dd-btn:focus-visible { outline: none; }
.rhx-field.rhx-dd-host:has(.rhx-dd-btn:focus-visible) { border-color: var(--rhx-orange); box-shadow: 0 0 0 3px rgba(242, 140, 27, 0.18); }
.rhx-dd-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rhx-dd-btn.is-set .rhx-dd-val { color: var(--rhx-orange-ink); font-weight: 600; }
.rhx-dd-chev { width: 15px; height: 15px; flex: 0 0 15px; color: #475569; stroke-width: 2.3; transition: transform .18s ease; }
.rhx-dd-open .rhx-dd-chev { transform: rotate(180deg); }
.rhx-field.rhx-dd-open { border-color: var(--rhx-orange); box-shadow: 0 0 0 3px rgba(242, 140, 27, 0.15); }

.rhx-dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -1px;
  min-width: calc(100% + 2px);
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--rhx-line);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.05);
  z-index: 60;
  display: none;
  box-sizing: border-box;
  outline: none;
}
.rhx-dd-open > .rhx-dd-menu { display: block; animation: rhxDdIn .14s ease-out; }
@keyframes rhxDdIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.rhx-dd-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 9px; font-size: 15px; font-weight: 500; color: var(--rhx-ink); cursor: pointer; white-space: nowrap; }
.rhx-dd-item svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--rhx-orange); stroke-width: 2.6; visibility: hidden; }
.rhx-dd-item.is-active { background: #fff7ed; }
.rhx-dd-item[aria-selected="true"] { color: var(--rhx-orange-ink); font-weight: 700; }
.rhx-dd-item[aria-selected="true"] svg { visibility: visible; }

/* Sort + More-filters selects get the same box as before, now as buttons */
.rhx-sort.rhx-dd-host .rhx-dd-btn,
.rhx-adv-field.rhx-dd-host .rhx-dd-btn { height: 42px; min-width: 156px; padding: 0 14px; border: 1px solid #dfe3ea; border-radius: 10px; background: #fff; font-size: 15px; }
.rhx-adv-field.rhx-dd-host .rhx-dd-btn { width: 100%; height: 46px; }
.rhx-sort.rhx-dd-host .rhx-dd-btn:hover, .rhx-adv-field.rhx-dd-host .rhx-dd-btn:hover { border-color: #cbd2dc; }
.rhx-sort.rhx-dd-open .rhx-dd-btn, .rhx-adv-field.rhx-dd-open .rhx-dd-btn,
.rhx-sort .rhx-dd-btn:focus-visible, .rhx-adv-field .rhx-dd-btn:focus-visible { border-color: var(--rhx-orange); box-shadow: 0 0 0 3px rgba(242, 140, 27, 0.15); }
.rhx-sort .rhx-dd-menu { left: auto; right: 0; min-width: 220px; }
.rhx-sort.rhx-dd-host { display: inline-flex; align-items: center; gap: 10px; }
.rhx-adv-field .rhx-dd-menu { top: calc(100% + 6px); left: 0; min-width: 100%; }
.rhx-dd-menu.rhx-dd-menu--right { left: auto; right: -1px; }

@media (max-width: 760px) {
  .rhx-dd-btn { font-size: 15px; }
  .rhx-sort.rhx-dd-host .rhx-dd-btn { min-width: 0; }
  .rhx-dd-menu { max-height: 60vh; }
}
@media (prefers-reduced-motion: reduce) {
  .rhx-dd-open > .rhx-dd-menu { animation: none; }
  .rhx-dd-chev { transition: none; }
}

/* ---------- Near me ---------- */
.rhx-near { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; margin-right: -6px; padding: 0 12px; border: 1px solid #fbd5a8; border-radius: 999px; background: #fff7ed; color: var(--rhx-orange-ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.rhx-near svg { width: 16px; height: 16px; stroke-width: 2.2; }
.rhx-near:hover { background: #ffedd5; border-color: #F28C1B; }
.rhx-near:focus-visible { outline: 3px solid var(--rhx-navy); outline-offset: 2px; }
.rhx-near.active { background: var(--rhx-orange-grad); border-color: transparent; color: #fff; box-shadow: 0 3px 10px rgba(238, 127, 18, 0.28); }
.rhx-near.is-loading svg { animation: rhxSpin 1s linear infinite; }
@keyframes rhxSpin { to { transform: rotate(360deg); } }
.rh-card-dist { flex: 0 0 auto; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #ecfdf5; color: #047857; font-style: normal; font-size: 12px; font-weight: 700; white-space: nowrap; }
@media (max-width: 340px) { .rhx-near-txt { display: none; } .rhx-near { padding: 0 10px; } }
@media (prefers-reduced-motion: reduce) { .rhx-near.is-loading svg { animation: none; } }

/* ---------- Phones: sort + view as two equal halves ---------- */
@media (max-width: 760px) {
  .rhx-toolbar { gap: 12px; }
  .rhx-toolbar-right { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
  .rhx-sort.rhx-dd-host { width: 100%; gap: 0; }
  .rhx-sort > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rhx-sort.rhx-dd-host .rhx-dd-btn { width: 100%; min-width: 0; height: 44px; padding: 0 12px; gap: 8px; justify-content: flex-start; }
  .rhx-sort.rhx-dd-host .rhx-dd-btn::before { content: ""; flex: 0 0 17px; width: 17px; height: 17px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4v16M3 8l4-4 4 4M17 20V4M13 16l4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat; }
  .rhx-sort.rhx-dd-host .rhx-dd-val { flex: 1; min-width: 0; }
  .rhx-sort .rhx-dd-menu { left: 0; right: auto; min-width: 100%; width: max-content; max-width: calc(100vw - 32px); }
  .rh-flats .view-buttons.rhx-view { width: 100%; height: 44px; box-sizing: border-box; }
  .rh-flats .rhx-view button { flex: 1; justify-content: center; padding: 0 8px; }
}

/* ---------- Saved page (saved.php) — same look as Browse ---------- */
.rh-flats .refer-container { max-width: 1440px; }
.rh-flats .refer-title { display: flex; align-items: center; gap: 14px; margin: 28px 0 6px; font-size: clamp(28px, 3.1vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -0.025em; color: #0f172a; }
.rh-flats .refer-title .gift-icon { display: inline-flex !important; align-items: center; justify-content: center; flex: 0 0 48px; width: 48px !important; height: 48px !important; margin: 0 !important; border-radius: 14px; background: #fff1e0 !important; color: #EE7F12 !important; }
.rh-flats .refer-title .gift-icon svg { width: 24px; height: 24px; fill: currentColor; }
.rhx-saved-sub { margin: 0 0 8px; font-size: 16px; color: #475569; font-weight: 500; }
.rh-flats #savedPropertyGrid { gap: 24px !important; margin-top: 20px !important; }
@media (min-width: 1100px) { .rh-flats #savedPropertyGrid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
.rh-flats #empty-card { border-radius: 18px; border: 1px solid #e5e8ee; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05); }
.rh-flats #empty-card .copy-button { background: linear-gradient(180deg, #F79A2E 0%, #EE7F12 100%) !important; color: #fff !important; border: 0 !important; border-radius: 12px !important; font-weight: 700 !important; }
@media (max-width: 760px) {
  .rh-flats .refer-title { margin-top: 18px; gap: 10px; }
  .rh-flats .refer-title .gift-icon { flex-basis: 40px; width: 40px !important; height: 40px !important; }
  .rh-flats #savedPropertyGrid { grid-template-columns: 1fr !important; }
}
