/* =====================================================================
   ORANGE SPACES – map.css   (/map/)
   Leaflet's own CSS is loaded in property_map.html.

   SECTIONS
     1. Hero – dark, under the transparent navbar
     2. Filters
     3. Map + card list
     4. Pins, clusters, popups (Leaflet)
     5. Browse by area
   ===================================================================== */


/* ── 1. HERO ────────────────────────────────────────────────────── */
/* Its own top padding includes the navbar height (navbar is transparent over it) */
.mp-hero {
  position: relative; overflow: hidden; color: #fff;
  padding: calc(var(--nav-height) + 46px) 0 96px;
  background:
    radial-gradient(circle at 85% 20%, rgba(0,160,120,.14), transparent 40%),
    linear-gradient(135deg, #0d2018 0%, #13291f 55%, #0b1c15 100%);
}
.mp-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .3;
  background-image: radial-gradient(circle, rgba(213,170,87,.7) 1px, transparent 1.5px);
  background-size: 30px 30px;
}
.mp-hero-inner { position: relative; z-index: 2; }
.mp-hero-inner > * { max-width: 860px; }
.mp-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; font-size: 14px; color: rgba(255,255,255,.55); margin-bottom: 18px; }
.mp-breadcrumb li + li::before { content: "/"; margin-right: 8px; color: rgba(213,170,87,.7); }
.mp-breadcrumb a { color: rgba(255,255,255,.75); text-decoration: none; }
.mp-breadcrumb a:hover { color: var(--os-gold); }
.mp-eyebrow { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--os-gold); }
.mp-title { margin-top: 10px; font-family: var(--font-display); font-weight: 400; font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.1; color: #fff; }
.mp-title em { display: block; font-family: var(--font-serif); font-style: italic; color: var(--color-ivory); }
.mp-intro { margin-top: 16px; font-size: 16px; line-height: 1.8; color: rgba(255,255,255,.82); }
@media (max-width: 768px) { .mp-hero { padding: calc(var(--nav-height) + 34px) 0 80px; } }


/* ── 2. FILTERS ─────────────────────────────────────────────────── */
.mp-filters-wrap { position: relative; z-index: 5; margin-top: -44px; }
.mp-filters {
  display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(150px, 1fr)) auto auto auto;
  gap: 10px; align-items: center; padding: 14px; border-radius: 18px; background: #fff;
  border: 1px solid var(--color-border); box-shadow: 0 24px 60px rgba(6,17,29,.14);
}
.mp-search { position: relative; }
.mp-search svg { position: absolute; left: 14px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--color-gold); pointer-events: none; }
.mp-search input, .mp-filters select {
  width: 100%; height: 48px; border: 1px solid #e2dccd; border-radius: 12px; background: #fff;
  font-family: var(--font-body); font-size: 15px; color: var(--color-navy);
}
.mp-search input { padding: 0 14px 0 42px; }
.mp-filters select {
  appearance: none; -webkit-appearance: none; padding: 0 38px 0 14px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a84c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
}
.mp-search input:focus, .mp-filters select:focus { outline: none; border-color: var(--os-gold); box-shadow: 0 0 0 4px rgba(213,170,87,.15); }
.mp-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border: none; border-radius: 12px;
  background: var(--grad-gold); color: #111; font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.mp-clear { font-size: 13px; font-weight: 700; color: var(--color-emerald); text-decoration: none; padding: 0 6px; }
.mp-count { justify-self: end; white-space: nowrap; padding: 10px 14px; border-radius: 999px; background: var(--color-ivory-soft); font-size: 13px; color: var(--color-navy); }
.mp-count strong { color: var(--color-emerald); }

@media (max-width: 1100px) {
  .mp-filters { grid-template-columns: 1fr 1fr; }
  .mp-search { grid-column: 1 / -1; }
  .mp-count { grid-column: 1 / -1; justify-self: center; }
}
@media (max-width: 560px) {
  .mp-filters { grid-template-columns: 1fr; padding: 12px; }
  .mp-btn { width: 100%; }
  .mp-clear { text-align: center; }
}


/* ── 3. MAP + CARD LIST ─────────────────────────────────────────── */
.mp-body { padding: 28px 0 80px; background: #fff; }
.mp-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }

.mp-map-col { position: sticky; top: calc(var(--nav-height) + 16px); height: calc(100vh - var(--nav-height) - 32px); min-height: 480px; }
.mp-map { width: 100%; height: 100%; border-radius: 20px; overflow: hidden; border: 1px solid var(--color-border); background: var(--color-ivory); z-index: 1; }
.mp-noscript { padding: 20px; font-size: 14px; }

.mp-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 34px; }
.mp-list-head p { font-size: 14px; color: rgba(6,26,43,.7); }
.mp-reset {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--color-border); background: #fff; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--color-emerald);
}
.mp-reset:hover { border-color: var(--color-gold); }

/* Cards = Orange's .prop-card (components.css), a bit smaller so 2 fit beside the map */
.mp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.mp-cards .prop-card { padding: 10px; border-radius: 20px; }
.mp-cards .prop-img { height: 190px; min-height: 190px; border-radius: 14px; }
.mp-cards .prop-body { padding: 14px 4px 4px; }
.mp-cards .prop-title-row { flex-direction: column; gap: 6px; }
.mp-cards .prop-name { font-size: 19px; min-height: 50px; }
.mp-cards .prop-price { font-size: 19px; white-space: normal; }
.mp-cards .prop-price--ask { font-size: 15px; }
.mp-cards .prop-meta { margin-top: 12px; gap: 6px; }
.mp-cards .prop-meta span { padding: 3px 10px; font-size: 12px; }
.mp-cards .prop-footer { padding-top: 14px; gap: 10px; }
.mp-cards .prop-enquire { height: 42px; font-size: 13px; }
.mp-cards .whatsapp-btn { width: 44px; height: 44px; font-size: 20px; flex-shrink: 0; }
.mp-cards .prop-card.is-active { border-color: var(--os-gold); box-shadow: 0 0 0 3px rgba(213,170,87,.45), 0 20px 50px rgba(0,0,0,.12); }

/* "show on map" button on the photo (top right; the sales badge is top left) */
.mp-locate {
  position: absolute; top: 20px; right: 20px; z-index: 6; width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: rgba(6,17,29,.72); color: #fff;
  backdrop-filter: blur(4px); transition: background .2s, transform .2s;
}
.mp-locate:hover, .mp-locate:focus-visible { background: var(--color-emerald); transform: scale(1.06); }
.mp-locate svg { width: 17px; height: 17px; }

.mp-more {
  display: block; width: 100%; margin-top: 18px; padding: 14px; border-radius: 12px; border: 1px solid var(--color-border);
  background: #fff; cursor: pointer; text-align: center; text-decoration: none;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-navy);
}
.mp-more:hover { border-color: var(--color-gold); }
.mp-empty { grid-column: 1 / -1; padding: 40px 20px; text-align: center; border: 1px dashed var(--color-border); border-radius: 16px; }
.mp-empty h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--color-navy); }
.mp-empty p { margin: 8px 0 18px; font-size: 14px; color: rgba(6,26,43,.65); }

@media (max-width: 1024px) {
  .mp-layout { grid-template-columns: 1fr; }
  .mp-map-col { position: relative; top: 0; height: 58vh; min-height: 360px; }
}
@media (max-width: 600px) { .mp-cards { grid-template-columns: 1fr; } .mp-cards .prop-img { height: 220px; min-height: 220px; } }


/* ── 4. PINS, CLUSTERS, POPUPS ──────────────────────────────────── */
.mp-pin { position: relative; width: 34px; height: 44px; filter: drop-shadow(0 4px 6px rgba(6,17,29,.35)); transition: transform .2s; transform-origin: 50% 100%; }
.mp-pin svg { display: block; width: 34px; height: 44px; }
.mp-pin img, .mp-pin span {
  position: absolute; left: 5px; top: 5px; width: 24px; height: 24px; border-radius: 50%; background: #fff; object-fit: contain;
}
.mp-pin span { display: flex; align-items: center; justify-content: center; font: 700 9px/1 var(--font-ui); color: var(--color-navy); }
.mp-pin.is-active { transform: scale(1.25); z-index: 1000; }
.mp-pin.is-active path { fill: var(--color-emerald); }

.mp-cluster {
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--color-navy); color: #fff; border: 3px solid rgba(255,255,255,.9);
  font: 700 13px/1 var(--font-ui); box-shadow: 0 6px 16px rgba(6,17,29,.35); transition: transform .2s;
}
.mp-cluster--md { background: #0f3d2e; }
.mp-cluster--lg { background: var(--os-gold); color: #111; }
.mp-cluster.is-active { transform: scale(1.15); border-color: var(--os-gold); }

.mp-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 14px; overflow: hidden; }
.mp-popup .leaflet-popup-content { margin: 0; width: 250px !important; }
.mp-pop-img { position: relative; height: 120px; background: var(--color-ivory); }
.mp-pop-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-pop-body { padding: 12px 14px 14px; font-family: var(--font-body); }
.mp-pop-dev { margin: 0 !important; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--color-gold); }
.mp-pop-title { margin: 4px 0 0 !important; font-family: var(--font-display); font-size: 17px; line-height: 1.25; color: var(--color-navy); }
.mp-pop-loc { margin: 4px 0 0 !important; font-size: 12px; color: rgba(6,26,43,.65); }
.mp-pop-price { margin: 8px 0 0 !important; font-size: 14px; font-weight: 700; color: var(--color-emerald); }
.mp-pop-link {
  display: inline-block; margin-top: 10px; padding: 8px 14px; border-radius: 999px; background: var(--color-navy);
  color: #fff !important; font-size: 12px; font-weight: 700; text-decoration: none;
}
.mp-pop-list { max-height: 280px; overflow-y: auto; }
.mp-pop-head { padding: 10px 14px; background: var(--color-navy); color: #fff; font: 700 11px/1.4 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }
.mp-pop-item { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--color-border); color: inherit !important; text-decoration: none; }
.mp-pop-item:hover { background: var(--color-ivory-soft); }
.mp-pop-item img { width: 48px; height: 38px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.mp-pop-item strong { display: block; font-size: 13px; color: var(--color-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.mp-pop-item small { display: block; font-size: 12px; color: var(--color-emerald); font-weight: 700; }


/* ── 5. BROWSE BY AREA ──────────────────────────────────────────── */
.mp-areas { padding: 80px 0; }
.mp-areas .sec-title { text-transform: none; }
.mp-area-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.mp-area-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #fff;
  border: 1px solid var(--color-border); color: var(--color-navy); text-decoration: none; font-size: 14px; transition: border-color .2s, transform .2s;
}
.mp-area-chip span { padding: 2px 8px; border-radius: 999px; background: var(--color-ivory); font-size: 12px; font-weight: 700; color: var(--color-emerald); }
.mp-area-chip:hover { border-color: var(--color-gold); transform: translateY(-2px); }
@media (max-width: 768px) { .mp-areas { padding: 60px 0; } }