:root {
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f7fafc;
  --ink: #121826;
  --muted: #667085;
  --line: #d9e2ec;
  --line-strong: #b8c5d4;
  --brand: #0f766e;
  --brand-dark: #0f4f4a;
  --accent: #f97316;
  --blue: #2563eb;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-3d: 0 28px 56px rgba(15, 23, 42, 0.18), 0 9px 0 rgba(15, 23, 42, 0.04);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 18% 12%, rgba(15, 118, 110, 0.2), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(37, 99, 235, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), transparent 34%),
    linear-gradient(225deg, rgba(37, 99, 235, 0.11), transparent 30%),
    var(--bg);
  perspective: 1400px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

img {
  max-width: 100%;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  width: min(1540px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0;
}

/* =============================================
   CARTOONIC NAVBAR — MeBanjara
   ============================================= */
.site-header {
  position: relative;
  z-index: 1000;
  display: block;
  padding: 10px 14px;
  border: 3px solid #111827;
  border-radius: 24px;
  background: linear-gradient(145deg, #ffffff 0%, #f0fdf9 60%, #eff6ff 100%);
  box-shadow:
    6px 6px 0 #111827,
    0 0 0 3px #fff,
    0 20px 40px rgba(15, 23, 42, 0.12);
  animation: navFloat 5s ease-in-out infinite;
}

@keyframes navFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.brand-block {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(320px, 580px);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

/* Cartoonic logo badge wrapper */
.brand::before {
  content: "🏠";
  font-size: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  border: 2.5px solid #111827;
  box-shadow: 3px 3px 0 #111827;
  flex: 0 0 auto;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease;
}

.brand:hover::before {
  transform: rotate(-8deg) scale(1.1);
  box-shadow: 4px 4px 0 #111827;
}

.brand-logo {
  width: clamp(130px, 18vw, 200px);
  height: auto;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.08));
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), transparent 36%),
    linear-gradient(135deg, #0f172a, #0f766e);
  color: #fff;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: clamp(1.2rem, 2vw, 1.62rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}

.brand-name-me {
  color: var(--brand);
  font-weight: 900;
}

.brand-name-main {
  color: #111827;
  font-weight: 850;
}

.brand-copy small {
  color: #667085;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-search {
  margin: 0;
  width: 100%;
}

.locate-icon-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2.5px solid #111827;
  border-radius: 999px;
  background: #fef9c3;
  color: #854d0e;
  box-shadow: 3px 3px 0 #111827;
  transition: transform 0.15s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s ease;
}

.locate-icon-btn:hover {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 4px 4px 0 #111827;
  background: #fde68a;
}

.locate-icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn,
.segment-btn,
.filter-chip,
.subtle-btn,
.primary-link,
.ghost-link,
.primary-btn {
  border: 0;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover,
.segment-btn:hover,
.filter-chip:hover,
.subtle-btn:hover,
.primary-link:hover,
.ghost-link:hover,
.primary-btn:hover,
.listing-card:hover {
  transform: translateY(-1px);
}

.text-btn,
.subtle-btn,
.ghost-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.segment-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segment-btn.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

.map-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  gap: 14px;
  padding-top: 14px;
}

.property-rail {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.search-panel,
.results-panel,
.property-section,
.sidebar-card,
.not-found {
  border: 1px solid rgba(217, 226, 236, 0.92);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.91);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.search-panel,
.results-panel {
  padding: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search-panel h1,
.property-section h2,
.not-found h1 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.02;
}

.search-panel h1 {
  max-width: 12ch;
  font-size: clamp(2.05rem, 4vw, 3.3rem);
  font-weight: 900;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.compact-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 12px;
}

.compact-stats span {
  min-height: 58px;
}

.compact-stats strong {
  font-size: 1.08rem;
}

.quick-stats span {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.quick-stats strong {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 900;
}

.search-box {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 0 7px 0 15px;
  border: 2.5px solid #111827;
  border-radius: 999px;
  background: #fff;
  box-shadow: 4px 4px 0 #111827;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.search-box:focus-within {
  box-shadow: 5px 5px 0 #0f766e;
  transform: translateY(-1px);
}

.search-box span {
  color: var(--muted);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 700;
}

.search-submit {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2.5px solid #111827;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #fff;
  cursor: pointer;
  box-shadow: 3px 3px 0 #111827;
  transition: transform 0.15s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s ease;
}

.search-submit:hover {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 4px 4px 0 #111827;
}

.search-submit svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-cluster {
  position: relative;
  z-index: 1001;
  min-width: 0;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 10000;
  max-height: min(420px, calc(100svh - 140px));
  overflow: auto;
  border: 1px solid rgba(217, 226, 236, 0.98);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestion-item {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(217, 226, 236, 0.72);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.search-suggestion-item:last-child {
  border-bottom: 0;
}

.search-suggestion-item:hover {
  background: #f8fafc;
}

.suggestion-pin {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--brand);
}

.suggestion-pin svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.suggestion-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.suggestion-copy strong {
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.compact-filters {
  margin: 0 0 12px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 13px;
  border: 2px solid #111827;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  box-shadow: 3px 3px 0 #111827;
  transition: transform 0.15s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s ease;
}

.filter-chip:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 4px 4px 0 #111827;
}

.filter-chip.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--blue));
  color: #fff;
  box-shadow: 4px 4px 0 #111827;
}

.filter-chip[data-filter="rent"].active {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.2);
}

.filter-chip[data-filter="sale"].active {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.2);
}

.filter-chip[data-filter="pg"].active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.2);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.subtle-btn {
  min-height: 34px;
  padding: 0 11px;
  color: var(--brand);
  font-size: 0.84rem;
}

.results-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 424px);
  min-height: 220px;
  overflow: auto;
  padding-right: 3px;
}

.listing-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  transform-style: preserve-3d;
}

.listing-card.active {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 18px 32px rgba(15, 118, 110, 0.17), 0 5px 0 rgba(15, 118, 110, 0.08);
  transform: translateY(-2px) rotateX(1deg);
}

.listing-card img {
  width: 100%;
  height: 102px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-soft);
}

.listing-topline,
.listing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.listing-topline {
  justify-content: space-between;
  margin-bottom: 6px;
}

.listing-topline span,
.listing-meta span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.listing-topline .listing-kind {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0;
}

.listing-kind.category-rent {
  background: #f97316;
}

.listing-kind.category-sale {
  background: #0f766e;
}

.listing-kind.category-pg {
  background: #2563eb;
}

.listing-topline strong {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 900;
}

.listing-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}

.listing-card p {
  margin: 5px 0 9px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.empty-results {
  min-height: 150px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.suggestion-list {
  display: grid;
  gap: 8px;
}

.suggestion-list p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.suggestion-item {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.suggestion-item strong {
  font-weight: 900;
}

.suggestion-item span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.map-column {
  min-width: 0;
}

.map-frame {
  position: relative;
  height: calc(100dvh - 108px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(184, 197, 212, 0.85);
  border-radius: 24px;
  background: #dfe8ee;
  box-shadow: var(--shadow-3d);
}

#map {
  width: 100%;
  height: 100%;
}

.map-loading,
.map-empty {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.75), transparent 22%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.13), transparent),
    #edf4f7;
  color: var(--ink);
  text-align: center;
}

.map-loading[hidden] {
  display: none;
}

.map-empty[hidden] {
  display: none;
}

.map-loading strong,
.map-empty strong {
  font-size: 1.35rem;
  font-weight: 900;
}

.map-loading span,
.map-empty span {
  color: var(--muted);
  font-weight: 700;
}

.map-overlay-note {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  max-width: min(430px, calc(100% - 36px));
  padding: 11px 14px;
  border: 1px solid rgba(217, 226, 236, 0.95);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255,255,255,.84);
  pointer-events: none;
}

.map-filter-panel {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: min(310px, calc(100% - 36px));
  padding: 12px;
  border: 1px solid rgba(217, 226, 236, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.map-filter-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.map-filter-heading strong {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 900;
}

.map-filter-heading span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.map-filter-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.map-filter-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.map-filter-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.map-filter-chip.active {
  border-color: rgba(15, 23, 42, 0.14);
  background: #111827;
  color: #fff;
}

.map-filter-chip[data-filter="rent"].active {
  background: #f97316;
}

.map-filter-chip[data-filter="sale"].active {
  background: #0f766e;
}

.map-filter-chip[data-filter="pg"].active {
  background: #2563eb;
}

.legend-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

.legend-dot.rent {
  background: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
}

.legend-dot.sale {
  background: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.legend-dot.pg {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.map-overlay-card {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 70px;
  z-index: 5;
  max-width: 480px;
}

@media (min-width: 1121px) {
  .browse-page {
    overflow: hidden;
  }

  .map-layout {
    height: calc(100dvh - 88px);
  }

  .property-rail,
  .results-panel {
    min-height: 0;
  }

  .results-list {
    max-height: calc(100dvh - 332px);
  }
}

.map-overlay-card[hidden] {
  display: none;
}

.active-property-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(217, 226, 236, 0.92);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-3d);
  backdrop-filter: blur(18px);
}

.active-property-card img {
  width: 100%;
  height: 136px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.active-property-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 7px;
}

.active-property-copy h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.12;
}

.active-property-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.active-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px;
}

.active-actions a {
  min-height: 36px;
  padding: 0 11px;
  font-size: 0.8rem;
}

.house-marker {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px 0 8px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 15px 0 rgba(15, 23, 42, 0.14), 0 24px 34px rgba(15, 23, 42, 0.3), inset 0 1px 0 rgba(255,255,255,.34);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.house-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.house-marker.category-rent {
  background: #f97316;
}

.house-marker.category-sale {
  background: #0f766e;
}

.house-marker.category-pg {
  background: #2563eb;
}

.house-marker.active {
  z-index: 2;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.16), 0 20px 38px rgba(15, 23, 42, 0.36), inset 0 1px 0 rgba(255,255,255,.34);
}

.house-marker-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.house-marker-icon svg {
  width: 17px;
  height: 17px;
  fill: rgba(255, 255, 255, 0.94);
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.house-marker-price {
  position: relative;
  z-index: 1;
}

.pin-preview {
  width: 300px;
  overflow: hidden;
  font-family: var(--font-body);
}

.pin-preview img {
  display: block;
  width: 100%;
  height: 145px;
  object-fit: cover;
}

.pin-preview-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.pin-preview-body p,
.pin-preview-body h3,
.pin-preview-body span,
.pin-preview-body small {
  margin: 0;
}

.pin-preview-body p {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pin-preview-body h3 {
  font-size: 1.08rem;
  font-weight: 900;
}

.pin-preview-body span,
.pin-preview-body small {
  color: var(--muted);
}

.pin-preview-meta {
  display: grid;
  gap: 3px;
}

.pin-preview-meta strong {
  color: var(--accent);
}

.pin-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.primary-link,
.primary-btn,
.button-like {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand), var(--blue));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.pin-preview-actions a {
  flex: 1 1 auto;
  min-height: 38px;
  font-size: 0.84rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 20;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(18, 24, 38, 0.96);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(18px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.property-page {
  background: var(--bg);
}

.property-hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #111827;
  perspective: 1200px;
}

.property-nav {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 3;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  animation: heroDrift 12s ease-in-out infinite alternate;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(9, 16, 28, 0.88), rgba(9, 16, 28, 0.22)),
    linear-gradient(180deg, transparent, rgba(9, 16, 28, 0.74));
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100% - 40px));
  padding: 172px 0 58px;
  margin: 0 auto;
  color: #fff;
}

.hero-copy h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.86);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-meta span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.property-layout {
  width: min(1360px, calc(100% - 28px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
  padding: 22px 0 34px;
}

.property-gallery {
  display: grid;
  gap: 10px;
  perspective: 1400px;
}

.gallery-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #dfe8ee;
  box-shadow: var(--shadow-3d);
  transform-style: preserve-3d;
  animation: galleryFloat 7s ease-in-out infinite;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  cursor: zoom-in;
  filter: saturate(0.92);
  transform: scale(1.035) translateZ(-24px);
  transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease;
}

.gallery-slide.active {
  opacity: 1;
  filter: saturate(1.05);
  transform: scale(1.01) translateZ(18px);
}

.gallery-stage:hover .gallery-slide.active {
  transform: scale(1.045) translateZ(34px) rotateX(1.2deg);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  min-width: 56px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-md);
  background: rgba(18, 24, 38, 0.72);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.gallery-nav.prev {
  left: 12px;
}

.gallery-nav.next {
  right: 12px;
}

.gallery-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: rgba(18, 24, 38, 0.76);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}

.gallery-thumb {
  height: 78px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.gallery-thumb.active {
  border-color: var(--brand);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.16);
  transform: translateY(-2px) rotateX(4deg);
}

.gallery-thumb:hover {
  transform: translateY(-2px) rotateX(5deg);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

body.viewer-open {
  overflow: hidden;
  perspective: none;
}

.image-viewer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: clamp(54px, 5vw, 76px) clamp(74px, 8vw, 116px);
  background:
    radial-gradient(circle at 50% 42%, rgba(15, 118, 110, 0.32), transparent 34%),
    linear-gradient(135deg, rgba(7, 13, 24, 0.94), rgba(15, 79, 74, 0.94));
  backdrop-filter: blur(12px) saturate(1.02);
  animation: viewerFade 0.16s ease both;
  transform: none;
}

.image-viewer[hidden] {
  display: none;
}

.viewer-stage {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: viewerFade 0.16s ease both;
  transform: none;
}

.viewer-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 1180px);
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  max-height: calc(100svh - 160px);
  object-fit: contain;
  border-radius: 14px;
  background: rgba(11, 18, 32, 0.84);
  box-shadow: 0 26px 74px rgba(0, 0, 0, 0.46);
}

.viewer-stage figcaption {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  min-height: 30px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 79, 74, 0.68);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.viewer-close,
.viewer-nav {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  transition: transform 0.18s ease, background 0.18s ease;
}

.viewer-close:hover,
.viewer-nav:hover {
  transform: translateY(-2px);
  background: rgba(249, 115, 22, 0.86);
}

.viewer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 900;
}

.viewer-nav {
  position: fixed;
  top: 50%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
  transform: translateY(-50%);
}

.viewer-nav:hover {
  transform: translateY(calc(-50% - 2px));
}

.viewer-prev {
  left: clamp(18px, 4vw, 58px);
}

.viewer-next {
  right: clamp(18px, 4vw, 58px);
}

@keyframes viewerFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes viewerLift {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes galleryFloat {
  0%, 100% { transform: rotateX(0) rotateY(0) translateY(0); }
  50% { transform: rotateX(0.8deg) rotateY(-0.8deg) translateY(-3px); }
}

.property-section,
.sidebar-card {
  padding: 22px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,.78);
}

.property-section {
  margin-top: 16px;
}

.lead-copy,
.property-copy,
.form-note,
.not-found p,
.sidebar-card p {
  color: var(--muted);
  line-height: 1.7;
}

.highlight-grid,
.amenity-grid-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.highlight-card,
.amenity-grid-page span {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 18px rgba(15,23,42,.04);
}

@keyframes heroDrift {
  from { transform: scale(1.04) translate3d(-6px, 0, 0); }
  to { transform: scale(1.08) translate3d(8px, -5px, 0); }
}

.highlight-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.property-sidebar {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
}

.facts-list {
  display: grid;
  gap: 12px;
}

.facts-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.facts-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.facts-list span {
  color: var(--muted);
  font-weight: 700;
}

.facts-list strong {
  text-align: right;
  font-weight: 900;
}

.full-width {
  width: 100%;
  margin-top: 10px;
}

.inquiry-form {
  display: grid;
  gap: 10px;
}

.inquiry-form input,
.inquiry-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.inquiry-form textarea {
  min-height: 112px;
  padding: 12px 13px;
  resize: vertical;
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.not-found {
  width: min(560px, calc(100% - 28px));
  margin: 120px auto;
  padding: 28px;
}

@media (max-width: 1120px) {
  .map-layout,
  .property-layout {
    grid-template-columns: 1fr;
  }

  .results-list {
    max-height: 356px;
  }

  .map-frame {
    position: relative;
    top: auto;
    height: 72vh;
    min-height: 560px;
  }

  .property-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-shell,
  .property-layout {
    width: calc(100% - 18px);
  }

  .site-header {
    padding: 10px;
    border-radius: 20px;
    box-shadow: 4px 4px 0 #111827;
  }

  .brand-block {
    grid-template-columns: 1fr;
    gap: 10px;
    justify-content: stretch;
  }

  .brand {
    gap: 7px;
    justify-content: center;
  }

  .brand::before {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
    border-radius: 11px;
  }

  .brand-logo {
    width: clamp(130px, 46vw, 180px);
    max-width: 100%;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }

  .brand-mark svg {
    width: 17px;
    height: 17px;
  }

  .brand-copy strong {
    font-size: 1.08rem;
  }

  .brand-copy small {
    display: none;
  }

  .header-search {
    min-height: 48px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    padding: 0 5px 0 13px;
    max-width: none;
    box-shadow: 3px 3px 0 #111827;
  }

  .header-search span {
    display: none;
  }

  .locate-icon-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 999px;
    box-shadow: 2px 2px 0 #111827;
  }

  .locate-icon-btn svg {
    width: 17px;
    height: 17px;
  }

  .search-submit {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    box-shadow: 2px 2px 0 #111827;
  }

  .search-submit svg {
    width: 18px;
    height: 18px;
  }

  .search-box input {
    font-size: 0.95rem;
  }

  .search-suggestions {
    top: calc(100% + 7px);
    left: -2px;
    right: -2px;
    max-height: min(360px, calc(100svh - 132px));
    border-radius: 16px;
  }

  .search-suggestion-item {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
  }

  .suggestion-pin {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }

  .property-rail {
    grid-template-columns: 1fr;
  }

  .search-panel h1 {
    max-width: 100%;
    font-size: 2.25rem;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .results-list {
    max-height: 420px;
  }

  .listing-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .listing-card img {
    height: 96px;
  }

  .map-frame {
    min-height: 0;
    height: calc(100svh - 142px);
    border-radius: 18px;
  }

  .suggestion-item {
    padding: 11px;
  }

  .suggestion-item span {
    font-size: 0.82rem;
  }

  .map-overlay-note {
    display: none;
  }

  .map-filter-panel {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    padding: 10px;
    border-radius: 14px;
  }

  .map-filter-heading {
    margin-bottom: 8px;
  }

  .map-filter-heading span {
    display: none;
  }

  .map-filter-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .map-filter-chip {
    min-height: 34px;
    gap: 5px;
    padding: 0 7px;
    font-size: 0.73rem;
  }

  .map-overlay-card {
    left: 10px;
    right: 10px;
    bottom: 58px;
  }

  .active-property-card {
    grid-template-columns: 100px minmax(0, 1fr);
    border-radius: var(--radius-md);
  }

  .active-property-card img {
    height: 118px;
    object-fit: contain;
    object-position: center center;
    background: linear-gradient(135deg, #f8fbff, #eaf3ff);
  }

  .active-property-copy {
    gap: 6px;
  }

  .active-property-copy .listing-topline {
    gap: 6px;
    margin-bottom: 0;
  }

  .active-property-copy .listing-topline .listing-kind {
    min-height: 22px;
    padding: 0 7px;
    font-size: 0.66rem;
  }

  .active-property-copy .listing-topline strong {
    font-size: 0.8rem;
  }

  .active-property-copy h3 {
    font-size: 0.95rem;
  }

  .active-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(42px, 0.62fr);
    align-items: stretch;
    gap: 5px;
    width: 100%;
  }

  .active-actions a {
    min-width: 0;
    min-height: 36px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    line-height: 1;
    white-space: nowrap;
  }

  .active-actions .ghost-link {
    display: inline-flex;
  }

  .house-marker {
    min-height: 34px;
    gap: 6px;
    padding: 0 10px 0 6px;
    border-width: 1.5px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    font-size: 0.76rem;
  }

  .house-marker::after {
    bottom: -5px;
    width: 10px;
    height: 10px;
    border-right-width: 1.5px;
    border-bottom-width: 1.5px;
  }

  .house-marker-icon {
    width: 23px;
    height: 23px;
  }

  .house-marker-icon svg {
    width: 14px;
    height: 14px;
  }

  .property-hero {
    min-height: 52svh;
  }

  .property-nav {
    top: 12px;
    left: 12px;
  }

  .property-nav .ghost-link {
    min-height: 42px;
    padding: 0 13px;
    border-radius: 13px;
    font-size: 0.92rem;
  }

  .hero-media {
    animation: none;
    transform: scale(1.015);
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(9, 16, 28, 0.78), rgba(9, 16, 28, 0.18)),
      linear-gradient(180deg, rgba(9, 16, 28, 0.18), rgba(9, 16, 28, 0.74));
  }

  .hero-copy {
    width: calc(100% - 28px);
    padding: 116px 0 34px;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 12vw, 3rem);
    line-height: 0.96;
  }

  .hero-copy p {
    margin: 12px 0 0;
    font-size: 1rem;
  }

  .hero-meta {
    gap: 8px;
    margin-top: 14px;
  }

  .hero-meta span {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .highlight-grid,
  .amenity-grid-page {
    grid-template-columns: 1fr;
  }

  .gallery-stage {
    min-height: 260px;
    aspect-ratio: 4 / 3;
    animation: none;
  }

  .gallery-nav {
    min-width: 48px;
    min-height: 38px;
    font-size: 0.78rem;
  }

  .image-viewer {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 58px 12px 82px;
  }

  .viewer-stage {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    padding: 0;
  }

  .viewer-stage img {
    max-width: 100%;
    max-height: calc(100vh - 166px);
    max-height: calc(100dvh - 166px);
    max-height: calc(100svh - 166px);
    border-radius: 12px;
  }

  .viewer-stage figcaption {
    bottom: 76px;
  }

  .viewer-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 1.35rem;
  }

  .viewer-nav {
    top: auto;
    bottom: 20px;
    width: 46px;
    height: 46px;
    font-size: 1.7rem;
    transform: none;
  }

  .viewer-nav:hover {
    transform: translateY(-2px);
  }

  .viewer-prev {
    left: calc(50% - 58px);
  }

  .viewer-next {
    right: calc(50% - 58px);
  }
}

/* Blue/white brokerage refresh - keeps map layout and pin data untouched. */
:root {
  --bg: #f4f8fc;
  --surface: #ffffff;
  --surface-soft: #eef6ff;
  --ink: #0b214a;
  --muted: #53657d;
  --line: #d8e7f7;
  --line-strong: #b8cde6;
  --brand: #2563eb;
  --brand-dark: #123f8c;
  --accent: #0ea5e9;
  --blue: #1d4ed8;
  --shadow: 0 18px 52px rgba(21, 77, 156, 0.14);
  --shadow-soft: 0 10px 28px rgba(21, 77, 156, 0.09);
  --shadow-3d: 0 22px 46px rgba(21, 77, 156, 0.16);
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 255, 0.92)),
    var(--bg);
  perspective: none;
}

.site-header {
  padding: 12px 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(21, 77, 156, 0.13);
  animation: none;
  backdrop-filter: blur(18px);
}

.brand::before {
  content: "";
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 34%, #ffffff 0 9%, transparent 10%),
    linear-gradient(135deg, #38bdf8, #2563eb 58%, #0b214a);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.26);
  transform: none;
}

.brand::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  margin-left: 13px;
  margin-top: 17px;
  border-radius: 4px 4px 2px 2px;
  background: #fff;
  clip-path: polygon(50% 0, 100% 38%, 100% 100%, 64% 100%, 64% 62%, 36% 62%, 36% 100%, 0 100%, 0 38%);
  pointer-events: none;
}

.brand:hover::before {
  transform: none;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.3);
}

.brand-logo {
  width: clamp(156px, 19vw, 218px);
}

.brand::before,
.brand::after {
  display: none !important;
  content: none !important;
}

.brand {
  position: relative;
}

.brand-logo {
  width: clamp(190px, 22vw, 270px);
  max-height: 64px;
}

.search-box {
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 8px 22px rgba(21, 77, 156, 0.08);
}

.search-box:focus-within {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 12px 28px rgba(21, 77, 156, 0.12);
  transform: none;
}

.search-submit,
.filter-chip.active,
.primary-link,
.primary-btn {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
}

.search-submit,
.locate-icon-btn,
.filter-chip {
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 8px 18px rgba(21, 77, 156, 0.12);
}

.locate-icon-btn {
  background: #eaf5ff;
  color: #1d4ed8;
}

.filter-chip,
.map-filter-chip,
.text-btn,
.subtle-btn,
.ghost-link,
.detail-back {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.18);
  color: #123f8c;
  box-shadow: 0 7px 18px rgba(21, 77, 156, 0.08);
}

.filter-chip:hover,
.search-submit:hover,
.locate-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(21, 77, 156, 0.14);
}

.filter-chip[data-filter="rent"].active,
.map-filter-chip[data-filter="rent"].active,
.listing-kind.category-rent {
  background: #2563eb;
}

.filter-chip[data-filter="sale"].active,
.map-filter-chip[data-filter="sale"].active,
.listing-kind.category-sale {
  background: #0ea5e9;
}

.filter-chip[data-filter="pg"].active,
.map-filter-chip[data-filter="pg"].active,
.listing-kind.category-pg {
  background: #0f3f8f;
}

.results-panel,
.property-section,
.sidebar-card,
.not-found,
.map-filter-panel,
.active-property-card {
  border-color: rgba(37, 99, 235, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.map-frame {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background: #dbeafe;
  box-shadow: var(--shadow-3d);
}

.map-loading,
.map-empty {
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.92), rgba(255, 255, 255, 0.94)),
    #eff6ff;
}

.listing-card {
  border-color: rgba(37, 99, 235, 0.14);
  box-shadow: 0 8px 20px rgba(21, 77, 156, 0.07);
  transform-style: flat;
}

.listing-card.active {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
}

.listing-topline strong,
.detail-back::before,
.eyebrow {
  color: #2563eb;
}

.house-marker {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.house-marker.category-sale {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
}

.house-marker.category-pg {
  background: linear-gradient(135deg, #0f3f8f, #2563eb);
}

.suggestion-pin {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.summary-tags span {
  border-color: rgba(37, 99, 235, 0.16);
  background: rgba(37, 99, 235, 0.08);
  color: #123f8c;
}

.gallery-stage,
.gallery-thumb,
.property-section,
.sidebar-card,
.listing-card {
  animation: none;
}

@media (max-width: 760px) {
  .site-header {
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(21, 77, 156, 0.12);
  }

  .brand::before {
    width: 38px;
    height: 38px;
  }

  .brand::after {
    margin-left: 11px;
    margin-top: 15px;
    width: 16px;
    height: 16px;
  }

  .brand-logo {
    width: clamp(188px, 62vw, 250px);
    max-height: 58px;
  }
}

/* Final polish: align map guide colors and make detail photos look natural. */
.legend-dot.sale {
  background: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.legend-dot.rent {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.legend-dot.pg {
  background: #0f3f8f;
  box-shadow: 0 0 0 3px rgba(15, 63, 143, 0.15);
}

.property-detail-shell .detail-gallery .gallery-stage {
  height: clamp(430px, 58vh, 620px);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff, #eaf3ff);
  box-shadow: 0 14px 34px rgba(21, 77, 156, 0.12);
}

.property-detail-shell .detail-gallery .gallery-slide,
.property-detail-shell .detail-gallery .gallery-slide.active,
.property-detail-shell .detail-gallery .gallery-stage:hover .gallery-slide.active {
  object-fit: contain;
  padding: 12px;
  background: transparent;
  filter: none;
  transform: none;
}

.property-detail-shell .detail-gallery .gallery-thumb {
  background: #eef6ff;
}

.property-detail-shell .detail-gallery .gallery-thumb img {
  object-fit: cover;
}

@media (max-width: 760px) {
  .property-detail-shell .detail-gallery .gallery-stage {
    min-height: 300px;
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .property-detail-shell .detail-gallery .gallery-slide,
  .property-detail-shell .detail-gallery .gallery-slide.active,
  .property-detail-shell .detail-gallery .gallery-stage:hover .gallery-slide.active {
    padding: 8px;
  }
}

/* 3D property detail image globe. */
.property-detail-shell .property-3d-showcase {
  position: relative;
  height: clamp(360px, 54vh, 560px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.98), rgba(235, 245, 255, 0.86) 46%, rgba(219, 234, 254, 0.78)),
    linear-gradient(135deg, #f8fbff, #eaf3ff);
  box-shadow: 0 18px 42px rgba(21, 77, 156, 0.14);
  perspective: 1500px;
}

.property-detail-shell .property-3d-showcase::before,
.property-detail-shell .property-3d-showcase::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.property-detail-shell .property-3d-showcase::before {
  width: min(70%, 620px);
  aspect-ratio: 1;
  transform: rotateX(68deg);
}

.property-detail-shell .property-3d-showcase::after {
  width: min(50%, 440px);
  aspect-ratio: 1;
  transform: rotateY(62deg);
  opacity: 0.6;
}

.property-detail-shell .orbit-track {
  position: relative;
  width: min(72vw, 760px);
  height: clamp(260px, 42vh, 420px);
  transform-style: preserve-3d;
  animation: propertyOrbit 42s linear infinite;
}

.property-detail-shell .property-3d-showcase:hover .orbit-track {
  animation-play-state: paused;
}

.property-detail-shell .orbit-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(170px, 22vw, 260px);
  height: clamp(130px, 16vw, 190px);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 44px rgba(8, 47, 111, 0.2);
  cursor: pointer;
  transform:
    translate(-50%, -50%)
    rotateY(var(--angle))
    rotateX(10deg)
    translateZ(clamp(190px, 27vw, 340px));
  backface-visibility: hidden;
}

.property-detail-shell .orbit-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fbff;
  transform: rotateX(-10deg);
}

.property-detail-shell .property-3d-showcase.single-image .orbit-track {
  animation: none;
  transform: none;
}

.property-detail-shell .property-3d-showcase.single-image .orbit-card {
  transform: translate(-50%, -50%);
}

.property-detail-shell .detail-gallery .gallery-stage {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@keyframes propertyOrbit {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(-360deg);
  }
}

@media (max-width: 760px) {
  .property-detail-shell .property-3d-showcase {
    height: min(64svh, 390px);
    border-radius: 14px;
    perspective: 1100px;
  }

  .property-detail-shell .orbit-track {
    width: min(94vw, 390px);
    height: 260px;
  }

  .property-detail-shell .orbit-card {
    width: clamp(138px, 46vw, 182px);
    height: clamp(112px, 36vw, 148px);
    padding: 6px;
    transform:
      translate(-50%, -50%)
      rotateY(var(--angle))
      rotateX(8deg)
      translateZ(clamp(118px, 34vw, 160px));
  }

  .property-detail-shell .orbit-card img {
    transform: rotateX(-8deg);
  }
}

/* Full-fit image handling for mobile-shot listing photos. */
.property-detail-shell .detail-gallery img,
.property-detail-shell .property-3d-showcase img,
.viewer-stage img {
  object-fit: contain !important;
}

.viewer-stage img {
  width: auto;
  height: auto;
  max-width: min(100%, 1180px);
  max-height: calc(100dvh - 132px);
  background: #f8fbff;
}

@media (max-width: 760px) {
  .image-viewer {
    padding: 50px 6px 66px;
  }

  .viewer-stage img {
    max-width: 100%;
    max-height: calc(100dvh - 124px);
  }
}

/* Cinematic property slider: premium fade + slow Ken Burns motion. */
.property-detail-shell .property-3d-showcase {
  display: none;
}

.property-detail-shell .detail-gallery .gallery-stage {
  position: relative;
  width: 100%;
  height: clamp(430px, 58vh, 620px);
  min-height: 0;
  overflow: hidden;
  opacity: 1;
  pointer-events: auto;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff, #eaf3ff);
  box-shadow: 0 18px 42px rgba(21, 77, 156, 0.14);
}

.property-detail-shell .detail-gallery .gallery-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 47, 111, 0.02), transparent 42%, rgba(8, 47, 111, 0.12)),
    radial-gradient(circle at 50% 48%, transparent 50%, rgba(8, 47, 111, 0.08));
}

.property-detail-shell .detail-gallery .gallery-slide,
.property-detail-shell .detail-gallery .gallery-slide.active,
.property-detail-shell .detail-gallery .gallery-stage:hover .gallery-slide.active {
  width: 100%;
  height: 100%;
  padding: 14px;
  object-fit: contain !important;
  background: transparent;
  filter: none;
  transform: scale(1);
  transition: opacity 1.05s ease, transform 4.8s ease;
}

.property-detail-shell .detail-gallery .gallery-slide {
  opacity: 0;
}

.property-detail-shell .detail-gallery .gallery-slide.active {
  opacity: 1;
  animation: cinematicKenBurns 4.8s ease forwards;
}

.property-detail-shell .detail-gallery .gallery-nav {
  z-index: 4;
  background: rgba(8, 47, 111, 0.62);
  box-shadow: 0 12px 26px rgba(8, 47, 111, 0.18);
}

.property-detail-shell .detail-gallery .gallery-counter {
  z-index: 4;
  background: rgba(8, 47, 111, 0.72);
}

.property-detail-shell .detail-gallery .gallery-thumb.active {
  border-color: #2563eb;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.listing-kind.category-rent,
.filter-chip[data-filter="rent"].active,
.map-filter-chip[data-filter="rent"].active,
.house-marker.category-rent {
  background: #2563eb;
}

.listing-kind.category-sale,
.filter-chip[data-filter="sale"].active,
.map-filter-chip[data-filter="sale"].active,
.house-marker.category-sale {
  background: #0ea5e9;
}

.listing-kind.category-pg,
.filter-chip[data-filter="pg"].active,
.map-filter-chip[data-filter="pg"].active,
.house-marker.category-pg {
  background: #0f3f8f;
}

@keyframes cinematicKenBurns {
  from {
    transform: scale(1.01) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.075) translate3d(-1.2%, -0.8%, 0);
  }
}

@media (max-width: 760px) {
  .property-detail-shell .detail-gallery .gallery-stage {
    height: auto;
    min-height: 300px;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
  }

  .property-detail-shell .detail-gallery .gallery-slide,
  .property-detail-shell .detail-gallery .gallery-slide.active,
  .property-detail-shell .detail-gallery .gallery-stage:hover .gallery-slide.active {
    padding: 8px;
  }

  .property-detail-shell .detail-gallery .gallery-nav {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }
}

/* Professional property detail page */
body.property-page {
  background: #f3f6f8;
  perspective: none;
}

.property-detail-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 14px 0 42px;
}

.detail-topbar {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.detail-back {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.detail-back::before {
  content: "<";
  margin-right: 8px;
  color: var(--brand);
  font-weight: 900;
}

.detail-gallery {
  gap: 10px;
  perspective: none;
}

.detail-gallery .gallery-stage {
  height: clamp(390px, 52vh, 540px);
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  border: 1px solid rgba(217, 226, 236, 0.95);
  border-radius: 10px;
  background: #e7edf2;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  animation: none;
  transform: none;
  transform-style: flat;
}

.detail-gallery .gallery-slide,
.detail-gallery .gallery-slide.active,
.detail-gallery .gallery-stage:hover .gallery-slide.active {
  filter: none;
  transform: none;
}

.detail-gallery .gallery-slide {
  transition: opacity 0.26s ease;
}

.detail-gallery .gallery-nav {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(12, 18, 28, 0.72);
  font-size: 1.75rem;
  line-height: 1;
}

.detail-gallery .gallery-thumbs {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.detail-gallery .gallery-thumb {
  height: 82px;
  border-radius: 8px;
  transform: none;
}

.detail-gallery .gallery-thumb.active,
.detail-gallery .gallery-thumb:hover {
  border-color: var(--brand);
  transform: none;
}

.detail-summary {
  display: block;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
}

.summary-copy {
  max-width: 820px;
}

.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.summary-tags span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.summary-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.detail-location {
  margin: 10px 0 0;
  color: #475467;
  font-size: 1rem;
  font-weight: 800;
}

.detail-intro {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.detail-price-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
}

.detail-price-inline span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-price-inline strong {
  color: var(--ink);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.15;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 0 22px;
}

.detail-facts article {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.detail-facts span,
.description-address span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-facts strong,
.description-address strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.25;
}

.property-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.property-detail-shell .property-section,
.property-detail-shell .sidebar-card {
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  backdrop-filter: none;
}

.property-detail-shell .property-section {
  margin-top: 0;
  margin-bottom: 14px;
}

.description-section h2 {
  max-width: 760px;
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
  line-height: 1.15;
}

.description-address {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.property-detail-shell .highlight-card,
.property-detail-shell .amenity-grid-page span {
  border-radius: 8px;
  box-shadow: none;
}

.property-detail-shell .property-sidebar {
  position: sticky;
  top: 14px;
}

.contact-card h3 {
  margin: 0 0 4px;
  font-size: 1.28rem;
}

@media (max-width: 1120px) {
  .property-content-grid {
    grid-template-columns: 1fr;
  }

  .detail-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .property-detail-shell .property-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .property-detail-shell {
    width: calc(100% - 18px);
    padding: 8px 0 28px;
  }

  .detail-topbar {
    min-height: 44px;
    font-size: 0.78rem;
  }

  .detail-topbar span {
    max-width: 48%;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .detail-back {
    min-height: 36px;
    padding: 0 11px;
  }

  .detail-gallery .gallery-stage {
    height: auto;
    min-height: 260px;
    aspect-ratio: 4 / 3;
    border-radius: 9px;
  }

  .detail-gallery .gallery-nav {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    font-size: 1.45rem;
  }

  .detail-gallery .gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .detail-gallery .gallery-thumb {
    width: 92px;
    min-width: 92px;
    height: 66px;
  }

  .detail-summary {
    gap: 16px;
    padding: 18px 0;
  }

  .summary-copy h1 {
    font-size: clamp(1.8rem, 9vw, 2.35rem);
  }

  .detail-intro {
    font-size: 0.96rem;
  }

  .detail-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px 0 18px;
  }

  .detail-facts article {
    min-height: 78px;
    padding: 12px;
  }

  .property-detail-shell .property-section,
  .property-detail-shell .sidebar-card {
    padding: 16px;
    border-radius: 9px;
  }
}

/* Final active detail-page experience. Keep this at the end so it wins over legacy gallery rules. */
.property-detail-shell .property-3d-showcase {
  display: none !important;
}

.property-detail-shell .detail-gallery .gallery-stage {
  position: relative !important;
  width: 100%;
  height: clamp(430px, 58vh, 620px);
  min-height: 0;
  overflow: hidden;
  opacity: 1 !important;
  pointer-events: auto !important;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff, #eaf3ff);
  box-shadow: 0 18px 42px rgba(21, 77, 156, 0.14);
}

.property-detail-shell .detail-gallery .gallery-slide,
.property-detail-shell .detail-gallery .gallery-slide.active,
.property-detail-shell .detail-gallery .gallery-stage:hover .gallery-slide.active {
  padding: 14px;
  object-fit: contain !important;
  background: transparent;
  filter: none;
  transition: opacity 1.05s ease, transform 4.8s ease;
}

.property-detail-shell .detail-gallery .gallery-slide {
  opacity: 0;
}

.property-detail-shell .detail-gallery .gallery-slide.active {
  opacity: 1;
  animation: cinematicKenBurns 4.8s ease forwards;
}

.listing-kind.category-rent,
.filter-chip[data-filter="rent"].active,
.map-filter-chip[data-filter="rent"].active,
.house-marker.category-rent {
  background: #2563eb !important;
}

.listing-kind.category-sale,
.filter-chip[data-filter="sale"].active,
.map-filter-chip[data-filter="sale"].active,
.house-marker.category-sale {
  background: #0ea5e9 !important;
}

.listing-kind.category-pg,
.filter-chip[data-filter="pg"].active,
.map-filter-chip[data-filter="pg"].active,
.house-marker.category-pg {
  background: #0f3f8f !important;
}

@media (max-width: 760px) {
  .property-detail-shell .detail-gallery .gallery-stage {
    height: auto;
    min-height: 300px;
    aspect-ratio: 4 / 3;
  }

  .property-detail-shell .detail-gallery .gallery-slide,
  .property-detail-shell .detail-gallery .gallery-slide.active,
  .property-detail-shell .detail-gallery .gallery-stage:hover .gallery-slide.active {
    padding: 8px;
  }
}

/* Professional property detail page refresh. */
body.property-page {
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #f8fbff 0%, #eef6ff 52%, #f7fbff 100%);
  background-size: 34px 34px, 34px 34px, auto;
}

.property-detail-shell {
  width: min(1400px, calc(100% - 44px));
  padding: 16px 0 52px;
}

.detail-topbar {
  margin-bottom: 12px;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.65fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 18px;
}

.property-detail-shell .detail-gallery {
  min-width: 0;
}

.property-detail-shell .detail-gallery .gallery-stage {
  height: clamp(500px, 66vh, 720px);
  border-radius: 20px;
  background: #061b43;
  box-shadow: 0 24px 64px rgba(8, 47, 111, 0.2);
}

.property-detail-shell .detail-gallery .gallery-stage::before {
  content: "";
  position: absolute;
  inset: -34px;
  z-index: 0;
  background-image: var(--active-image);
  background-position: center;
  background-size: cover;
  filter: blur(28px) saturate(1.08);
  opacity: 0.42;
  transform: scale(1.08);
}

.property-detail-shell .detail-gallery .gallery-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 27, 67, 0.04), transparent 44%, rgba(6, 27, 67, 0.2)),
    linear-gradient(90deg, rgba(6, 27, 67, 0.16), transparent 24%, transparent 76%, rgba(6, 27, 67, 0.16));
}

.property-detail-shell .detail-gallery .gallery-slide,
.property-detail-shell .detail-gallery .gallery-slide.active,
.property-detail-shell .detail-gallery .gallery-stage:hover .gallery-slide.active {
  z-index: 2;
  padding: 18px;
  object-fit: contain !important;
}

.property-detail-shell .detail-gallery .gallery-nav,
.property-detail-shell .detail-gallery .gallery-counter {
  z-index: 5;
}

.property-detail-shell .detail-gallery .gallery-thumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15,118,110,0.3) transparent;
  -webkit-overflow-scrolling: touch;
}

.property-detail-shell .detail-gallery .gallery-thumb {
  flex: 0 0 auto;
  width: 110px;
  min-width: 110px;
  height: 80px;
  border: 2px solid rgba(37, 99, 235, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 12px rgba(21, 77, 156, 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.property-detail-shell .detail-summary {
  position: relative;
  min-height: 100%;
  display: grid;
  align-content: space-between;
  gap: 22px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 245, 255, 0.94)),
    #ffffff;
  box-shadow: 0 24px 64px rgba(21, 77, 156, 0.14);
}

.property-detail-shell .detail-summary::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 36%),
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.05) 0 1px, transparent 1px 34px);
}

.detail-motion-scene {
  position: relative;
  height: 170px;
  isolation: isolate;
  perspective: 900px;
}

.building-model {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 154px;
  height: 118px;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateX(58deg) rotateZ(-36deg);
  animation: detailModelFloat 7s ease-in-out infinite;
}

.building-model span {
  position: absolute;
  left: 0;
  width: 154px;
  height: 88px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(219, 234, 254, 0.88)),
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.18) 0 1px, transparent 1px 28px);
  box-shadow: 0 16px 32px rgba(8, 47, 111, 0.16);
}

.building-model span:nth-child(1) {
  bottom: 0;
}

.building-model span:nth-child(2) {
  bottom: 20px;
}

.building-model span:nth-child(3) {
  bottom: 40px;
}

.building-model span:nth-child(4) {
  bottom: 60px;
  background: linear-gradient(135deg, #ffffff, #dff3ff);
}

.model-card {
  position: absolute;
  width: 112px;
  height: 66px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 38px rgba(21, 77, 156, 0.13);
  animation: detailPanelFloat 6.5s ease-in-out infinite;
}

.model-card::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 14px;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 18px 0 rgba(14, 165, 233, 0.55), 42px 18px 0 rgba(14, 165, 233, 0.28);
}

.model-card-one {
  left: 8px;
  top: 22px;
  transform: rotate(-8deg);
}

.model-card-two {
  right: 4px;
  bottom: 12px;
  transform: rotate(9deg);
  animation-delay: -2.2s;
}

.property-detail-shell .summary-copy {
  position: relative;
  z-index: 1;
}

.property-detail-shell .summary-copy h1 {
  font-size: clamp(2.25rem, 4.7vw, 4.8rem);
  line-height: 0.96;
}

.property-detail-shell .detail-intro {
  font-size: 1rem;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.hero-actions .primary-link,
.hero-actions .ghost-link {
  min-height: 48px;
  border-radius: 14px;
}

.hero-trust-row {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.hero-trust-row span {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #53657d;
  font-size: 0.86rem;
  font-weight: 800;
}

.hero-trust-row span::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.property-detail-shell .detail-facts {
  gap: 12px;
}

.property-detail-shell .detail-facts article {
  border-color: rgba(37, 99, 235, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(21, 77, 156, 0.09);
}

.property-detail-shell .property-section,
.property-detail-shell .sidebar-card {
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(21, 77, 156, 0.09);
}

.property-detail-shell .highlight-card,
.property-detail-shell .amenity-grid-page span {
  border-color: rgba(37, 99, 235, 0.12);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #eef6ff);
}

@keyframes detailModelFloat {
  0%, 100% {
    transform: translate(-50%, -50%) rotateX(58deg) rotateZ(-36deg) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) rotateX(58deg) rotateZ(-30deg) translateY(-10px);
  }
}

@keyframes detailPanelFloat {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -9px;
  }
}

@media (max-width: 1120px) {
  .detail-hero-grid {
    grid-template-columns: 1fr;
  }

  .property-detail-shell .detail-summary {
    min-height: 0;
  }

  .detail-motion-scene {
    height: 150px;
  }
}

@media (max-width: 760px) {
  .property-detail-shell {
    width: calc(100% - 18px);
  }

  .detail-hero-grid {
    gap: 12px;
  }

  .property-detail-shell .detail-gallery .gallery-stage {
    height: auto;
    min-height: 340px;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }

  .property-detail-shell .detail-gallery .gallery-slide,
  .property-detail-shell .detail-gallery .gallery-slide.active,
  .property-detail-shell .detail-gallery .gallery-stage:hover .gallery-slide.active {
    padding: 10px;
  }

  .property-detail-shell .detail-gallery .gallery-thumbs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .property-detail-shell .detail-gallery .gallery-thumb {
    flex: 0 0 auto;
    width: 80px;
    min-width: 80px;
    height: 60px;
    border-radius: 8px;
  }

  .property-detail-shell .detail-summary {
    padding: 18px;
    border-radius: 16px;
  }

  .property-detail-shell .summary-copy h1 {
    font-size: clamp(2rem, 12vw, 3.1rem);
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .detail-motion-scene {
    height: 128px;
  }
}

/* Map advanced filters and themed image viewer. */
.map-filter-heading {
  align-items: center;
}

.map-filter-heading > div {
  display: grid;
  gap: 1px;
}

.map-advanced-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background: #eef6ff;
  color: #123f8c;
  box-shadow: 0 8px 18px rgba(21, 77, 156, 0.08);
  cursor: pointer;
}

.map-advanced-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
}

.map-advanced-toggle.active {
  background: #2563eb;
  color: #fff;
}

.map-advanced-toggle.active::after {
  content: attr(data-count);
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0ea5e9;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow: 0 6px 12px rgba(14, 165, 233, 0.32);
}

.map-advanced-filters {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(37, 99, 235, 0.12);
}

.map-advanced-filters[hidden] {
  display: none;
}

.advanced-filter-group,
.advanced-filter-grid label {
  display: grid;
  gap: 7px;
  color: #53657d;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.advanced-filter-group select,
.advanced-filter-grid input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background: #fff;
  color: #0b214a;
  font-weight: 800;
  outline: 0;
}

.advanced-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.advanced-chip {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #123f8c;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.advanced-chip.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.advanced-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.advanced-filter-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.filter-apply-btn,
.filter-reset-btn {
  min-height: 38px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

.filter-apply-btn {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
}

.filter-reset-btn {
  padding: 0 12px;
  background: #fff;
  color: #123f8c;
}

.image-viewer {
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(6, 27, 67, 0.96), rgba(18, 63, 140, 0.95)) !important;
}

.viewer-stage figcaption {
  background: rgba(37, 99, 235, 0.78) !important;
}

.viewer-close,
.viewer-nav {
  border-color: rgba(191, 219, 254, 0.34) !important;
  background: rgba(37, 99, 235, 0.22) !important;
  color: #fff !important;
}

.viewer-close:hover,
.viewer-nav:hover {
  background: #0ea5e9 !important;
  transform: translateY(-2px);
}

.viewer-nav:hover {
  transform: translateY(calc(-50% - 2px));
}

@media (max-width: 760px) {
  .map-filter-panel {
    max-height: calc(100svh - 164px);
    overflow: auto;
  }

  .advanced-filter-grid {
    grid-template-columns: 1fr;
  }

  .map-advanced-toggle {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .viewer-nav:hover {
    transform: translateY(-2px);
  }
}

/* ============================================
   LIST YOUR PROPERTY - Button & Modal
   ============================================ */

.list-property-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  /* Match the card style of .results-panel */
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf9 100%);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  /* Ensure it never overflows the rail */
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.list-property-cta-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.28);
}

.list-property-cta-icon svg {
  width: 19px;
  height: 19px;
}

.list-property-cta-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.list-property-cta-title {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--ink);
  /* Allow wrapping so it never overflows on small screens */
  white-space: normal;
  line-height: 1.2;
}

.list-property-cta-sub {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.4;
  white-space: normal;
}

.list-property-cta-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.17s ease, box-shadow 0.17s ease, transform 0.14s ease;
  box-shadow: 0 3px 10px rgba(15, 118, 110, 0.3);
}

.list-property-cta-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(15, 118, 110, 0.36);
}

.list-property-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10, 16, 28, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.list-property-modal[hidden] {
  display: none;
}

.list-property-modal-inner {
  background: #fff;
  border-radius: 18px;
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: 0 24px 60px rgba(10, 16, 28, 0.22);
  animation: modalSlideUp 0.22s ease;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.list-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(15, 23, 42, 0.07);
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink, #0f172a);
  transition: background 0.15s;
}

.list-modal-close:hover {
  background: rgba(15, 23, 42, 0.13);
}

.list-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink, #0f172a);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.list-modal-subtitle {
  color: var(--muted, #64748b);
  font-size: 0.9rem;
  margin: 0 0 18px;
}

.list-property-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-modal-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  background: #fff;
  font-size: 0.95rem;
  color: var(--ink, #0f172a);
  outline: none;
  transition: border-color 0.18s;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.list-modal-select:focus {
  border-color: var(--brand, #0f766e);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .list-property-cta {
    gap: 12px;
    padding: 14px 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .list-property-cta-icon {
    width: 38px;
    height: 38px;
  }

  .list-property-cta-icon svg {
    width: 17px;
    height: 17px;
  }

  .list-property-cta-title {
    font-size: 0.88rem;
  }

  .list-property-cta-sub {
    font-size: 0.73rem;
  }

  .list-property-cta-btn {
    padding: 0 14px;
    height: 34px;
    font-size: 0.78rem;
  }
}

@media (max-width: 540px) {
  .list-property-cta {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    border-radius: var(--radius-md);
    align-items: flex-start;
  }

  .list-property-cta-body {
    flex: 1 1 calc(100% - 54px);
  }

  .list-property-cta-btn {
    flex: 0 0 100%;
    width: 100%;
    height: 38px;
    font-size: 0.82rem;
    border-radius: var(--radius-md);
  }

  .list-property-modal-inner {
    padding: 24px 18px 20px;
    border-radius: 14px;
  }

  .list-modal-title {
    font-size: 1.2rem;
  }
}

/* =========================================================
   COMPACT-HEIGHT MOBILE FIX — iPhone XS / Samsung S23 class
   Applies ONLY to narrow + short screens (≤760px wide AND
   ≤812px tall). Tablets, desktops, and tall phones are
   unaffected. All aesthetic/colour/shadow tokens preserved.
   ========================================================= */
@media (max-width: 760px) and (max-height: 812px) {

  /* --- Map frame: give back vertical real-estate --- */
  .map-frame {
    height: calc(100svh - 118px);
  }

  /* --- Filter panel: tighten so less map is obscured --- */
  .map-filter-panel {
    top: 8px;
    right: 8px;
    left: 8px;
    max-height: min(42svh, calc(100svh - 236px));
    padding: 7px 8px;
    border-radius: 12px;
  }

  .map-filter-heading {
    margin-bottom: 6px;
  }

  .map-filter-options {
    gap: 5px;
  }

  .map-filter-chip {
    min-height: 30px;
    padding: 0 5px;
    font-size: 0.7rem;
    gap: 4px;
  }

  /* --- Floating property card: smaller, less map covered --- */
  .map-overlay-card {
    left: 8px;
    right: 8px;
    bottom: 46px;
  }

  .active-property-card {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 8px;
    padding: 7px;
    border-radius: 12px;
  }

  /* Thumbnail: slightly shorter */
  .active-property-card img {
    height: 86px;
  }

  /* Text copy: tighter line heights & reduced sizes */
  .active-property-copy {
    gap: 5px;
  }

  .active-property-copy h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.86rem;
    line-height: 1.1;
  }

  .active-property-copy p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .active-property-copy .listing-meta {
    gap: 4px;
  }

  .active-property-copy .listing-meta span {
    font-size: 0.66rem;
  }

  .active-property-copy .listing-meta span:nth-child(n+3) {
    display: none;
  }

  /* Buttons: maintain tap-target (min 36px) but reduce font */
  .active-actions {
    gap: 4px;
    margin-top: 2px;
  }

  .active-actions a {
    min-height: 36px;
    padding: 0 5px;
    font-size: 0.66rem;
  }

  .active-actions .ghost-link {
    display: inline-flex;
  }
}

/* Extra tight: very short phones (≤ 720px height — e.g. older
   SE-sized Android) get one more step of compression */
@media (max-width: 760px) and (max-height: 720px) {

  .map-filter-panel {
    max-height: min(38svh, calc(100svh - 218px));
    padding: 6px 7px;
  }

  .map-filter-chip {
    min-height: 28px;
    font-size: 0.67rem;
  }

  .map-overlay-card {
    bottom: 40px;
  }

  .active-property-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 7px;
    padding: 6px;
  }

  .active-property-card img {
    height: 76px;
  }

  .active-property-copy h3 {
    font-size: 0.82rem;
  }

  .active-property-copy p {
    font-size: 0.74rem;
  }

  .active-actions a {
    min-height: 34px;
    font-size: 0.63rem;
    padding: 0 4px;
  }
}
