/* Nevada Desert Realty – Sales Map  (/css/sales-map.css) */
.nvdr-map {
  --sm-teal: #317e7e;
  --sm-teal-soft: #79cbcb;
  --sm-gold: #c8a96e;
  --sm-ink: #3a3530;
  --sm-muted: #7a736c;
  --sm-line: #e8e4df;
  --sm-bg: #f8f6f2;
  --sm-card: #ffffff;
  font-family: 'DM Sans', sans-serif;
  color: var(--sm-ink);
  background: transparent;           /* takes the section's background */
}

/* Homepage section wrapper: matches the other homepage sections (90px top and bottom) */
#sales-map { padding: 90px 0; background: #ffffff; }
@media (max-width: 768px) { #sales-map { padding: 60px 0; } }
.nvdr-map *, .nvdr-map *::before, .nvdr-map *::after { box-sizing: border-box; }

/* ---------- header ---------- */
.sm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 16px; }
.sm-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sm-teal); margin: 0 0 6px; }
.sm-title { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 0; color: var(--sm-ink); }
.sm-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.sm-stat b { display: block; font-family: 'Playfair Display', Georgia, serif; font-size: 26px; line-height: 1; color: var(--sm-ink); font-variant-numeric: tabular-nums; }
.sm-stat span { font-size: 12px; color: var(--sm-muted); }

.sm-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.sm-seg { display: inline-flex; background: var(--sm-card); border: 1px solid var(--sm-line); border-radius: 999px; padding: 3px; }
.sm-seg button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--sm-ink); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.sm-seg button[aria-pressed="true"] { background: var(--sm-teal); color: #fff; }
.sm-select { font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--sm-line); background: var(--sm-card); color: var(--sm-ink); }
.sm-legend { margin-left: auto; display: flex; gap: 14px; font-size: 13px; color: var(--sm-muted); align-items: center; }
.sm-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }

/* ---------- body: map + panel ---------- */
.sm-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.12); background: var(--sm-card); }
.sm-canvas { position: relative; min-height: 560px; height: 640px; }
.sm-leaflet { position: absolute; inset: 0; background: #e9e6e0; }
.sm-hint { position: absolute; left: 14px; bottom: 14px; z-index: 500; background: rgba(255,255,255,.94); border-radius: 999px; padding: 7px 14px; font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.08); pointer-events: none; }
.sm-reset { position: absolute; right: 12px; top: 12px; z-index: 500; border: 0; background: #fff; font: inherit; font-size: 13px; font-weight: 500; padding: 8px 14px; border-radius: 999px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); color: var(--sm-ink); }
.sm-reset[hidden] { display: none; }

.sm-panel { border-left: 1px solid var(--sm-line); display: flex; flex-direction: column; height: 640px; }
.sm-crumbs { padding: 14px 18px 0; font-size: 13px; color: var(--sm-muted); display: flex; flex-wrap: wrap; gap: 4px; }
.sm-crumbs button { border: 0; background: none; padding: 0; font: inherit; color: var(--sm-teal); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.sm-crumbs span[aria-current] { color: var(--sm-ink); font-weight: 500; }
.sm-panel-head { padding: 8px 18px 14px; border-bottom: 1px solid var(--sm-line); }
.sm-panel-head h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 24px; margin: 0 0 10px; line-height: 1.15; }
.sm-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sm-kpi { background: var(--sm-bg); border-radius: 10px; padding: 9px 10px; }
.sm-kpi b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.sm-kpi span { font-size: 11.5px; color: var(--sm-muted); }
.sm-list { overflow-y: auto; flex: 1; padding: 8px 10px 14px; }
.sm-list-label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sm-muted); padding: 10px 8px 6px; }

.sm-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; font: inherit; color: inherit; padding: 9px 8px; border-radius: 10px; cursor: pointer; }
.sm-row:hover, .sm-row:focus-visible { background: var(--sm-bg); outline: none; }
.sm-row-count { flex: 0 0 auto; min-width: 40px; height: 40px; border-radius: 50%; background: var(--sm-teal); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.sm-row-main { flex: 1; min-width: 0; }
.sm-row-main b { display: block; font-weight: 500; }
.sm-row-main span { font-size: 12.5px; color: var(--sm-muted); }
.sm-row-tag { font-size: 11px; font-weight: 700; color: #6b5420; background: #f3ead8; border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.sm-thumb { flex: 0 0 auto; width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--sm-line); }

/* ---------- home detail ---------- */
.sm-home { padding: 0 0 16px; }
.sm-home-photo { position: relative; aspect-ratio: 3 / 2; background: var(--sm-line); }
.sm-home-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-ribbon { position: absolute; left: 12px; top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 6px; color: #fff; background: var(--sm-teal); }
.sm-ribbon.is-active { background: var(--sm-gold); color: #2a2218; }
.sm-ribbon.is-pending { background: #fff; color: #6b5420; }
.sm-home-body { padding: 14px 18px 0; }
.sm-home-price { font-family: 'Playfair Display', Georgia, serif; font-size: 28px; line-height: 1; }
.sm-home-addr { margin: 6px 0 2px; font-weight: 500; }
.sm-home-city { font-size: 13px; color: var(--sm-muted); }
.sm-specs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.sm-specs span { font-size: 13px; background: var(--sm-bg); border-radius: 999px; padding: 4px 10px; }
.sm-side { font-size: 13.5px; margin: 0 0 14px; }
.sm-cta { display: block; text-align: center; background: var(--sm-teal); color: #fff; text-decoration: none; font-weight: 500; padding: 11px 16px; border-radius: 10px; }
.sm-cta:hover { background: #276868; }
.sm-cta.alt { background: none; color: var(--sm-teal); border: 1px solid var(--sm-teal); margin-top: 8px; }

/* ---------- map markers ---------- */
.sm-bubble { display: grid; place-items: center; border-radius: 50%; background: var(--sm-teal, #317e7e); color: #fff; font: 700 14px/1 'DM Sans', sans-serif; box-shadow: 0 0 0 6px rgba(49,126,126,.28), 0 4px 12px rgba(0,0,0,.25); cursor: pointer; transition: transform .15s; position: relative; }
.sm-bubble:hover { transform: scale(1.08); }
.sm-bubble small { position: absolute; top: 100%; left: 50%; transform: translate(-50%, 9px); background: #fff; color: #3a3530; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.sm-bubble em { position: absolute; top: -8px; right: -12px; font-style: normal; background: #c8a96e; color: #2a2218; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 999px; border: 2px solid #fff; }
.sm-pin { width: 18px; height: 18px; border-radius: 50%; background: #317e7e; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.35); cursor: pointer; }
.sm-pin.is-active { background: #c8a96e; width: 22px; height: 22px; }
.sm-pin.is-pending { background: #fff; border-color: #c8a96e; }
.sm-pin.is-picked { outline: 3px solid #3a3530; outline-offset: 2px; }
.leaflet-div-icon.sm-icon { background: none; border: 0; }
.sm-popup .leaflet-popup-content { margin: 0; width: 240px !important; }
.sm-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 12px; overflow: hidden; }
.sm-pop img { width: 100%; height: 140px; object-fit: cover; display: block; }
.sm-pop div { padding: 10px 12px 12px; font-family: 'DM Sans', sans-serif; }
.sm-pop b { font-size: 16px; }
.sm-pop p { margin: 2px 0 0; font-size: 12.5px; color: #7a736c; }

@media (max-width: 900px) {
  .sm-body { grid-template-columns: 1fr; }
  .sm-canvas { height: 62vh; min-height: 380px; }
  .sm-panel { border-left: 0; border-top: 1px solid var(--sm-line); height: auto; max-height: none; }
  .sm-list { max-height: 520px; }
  .sm-legend { margin-left: 0; width: 100%; }
}
