/* map-search.css — Property Map page (Leaflet) */

.sgp-mapsearch { max-width: 1280px; margin: 0 auto; padding: 24px 16px 40px; }

.sgp-map-topbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 14px; margin-bottom: 16px;
}
.sgp-map-heading { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sgp-map-heading h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px; color: #111827; margin: 0;
}
.sgp-map-count { font-size: 13px; color: #6b7280; font-weight: 600; }

.sgp-map-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sgp-map-filters select {
    height: 40px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff;
    padding: 0 12px; font-size: 13px; color: #111827; cursor: pointer;
    font-family: inherit; outline: none;
}
.sgp-map-filters select:focus { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.1); }
.sgp-map-mrt-toggle {
    display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #374151;
    font-weight: 600; cursor: pointer; user-select: none;
}
.sgp-map-mrt-toggle input { width: 16px; height: 16px; accent-color: #c0392b; cursor: pointer; }

#sgp-propmap {
    width: 100%; height: 72vh; min-height: 480px;
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 6px 30px rgba(0,0,0,.1); z-index: 1;
}

/* ── Dot markers (price shows on hover, details on click) ── */
.sgp-mdot-wrap { background: none !important; border: none !important; }
.sgp-mdot {
    display: block; width: 16px; height: 16px; border-radius: 50%;
    background: #1f2937; border: 2.5px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.45); cursor: pointer;
    transition: transform .1s ease;
}
.sgp-mdot.is-dev { background: #c0392b; }
.sgp-mdot:hover { transform: scale(1.3); }

/* ── Legend ── */
.sgp-map-legend {
    background: #fff; padding: 7px 11px; border-radius: 8px;
    box-shadow: 0 1px 8px rgba(0,0,0,.2); font-family: 'DM Sans', sans-serif;
    font-size: 12px; color: #374151; display: flex; gap: 14px;
}
.sgp-map-legend span { display: inline-flex; align-items: center; }
.sgp-map-legend i { width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.sgp-map-legend i.d-prop { background: #1f2937; }
.sgp-map-legend i.d-dev { background: #c0392b; }

/* ── Popup card ── */
.leaflet-popup-content { margin: 0 !important; }
.leaflet-popup-content-wrapper { border-radius: 12px !important; overflow: hidden; padding: 0 !important; }
.sgp-pop { width: 230px; font-family: 'DM Sans', sans-serif; }
.sgp-pop-img { width: 100%; height: 120px; background-size: cover; background-position: center; background-color: #eef0f2; }
.sgp-pop-body { padding: 12px 14px; }
.sgp-pop-price { font-size: 16px; font-weight: 800; color: #c0392b; }
.sgp-pop-title { font-size: 14px; font-weight: 700; color: #111827; margin: 3px 0 5px; line-height: 1.35; }
.sgp-pop-meta { font-size: 12px; color: #6b7280; }
.sgp-pop-approx { font-size: 11px; color: #b45309; margin-top: 5px; }
.sgp-pop-btn {
    display: inline-block; margin-top: 10px; background: #2563eb; color: #fff;
    text-decoration: none; font-size: 12px; font-weight: 700; padding: 8px 14px; border-radius: 7px;
}
.sgp-pop-btn:hover { background: #1d4ed8; color: #fff; }

/* ── Intro line ── */
.sgp-map-intro {
    font-size: 14.5px; line-height: 1.7; color: #4b5563;
    max-width: 820px; margin: -4px 0 16px;
}

/* ── Listing cards below the map ── */
.sgp-map-cards {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px; margin: 28px 0 8px;
}
.sgp-map-empty { grid-column: 1 / -1; text-align: center; color: #6b7280; padding: 30px 0; font-size: 14px; }
.sgp-mcard {
    background: #fff; border: 1px solid #eef0f2; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.06); display: flex; flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.sgp-mcard:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.12); }
.sgp-mcard-img {
    position: relative; height: 150px; background-size: cover; background-position: center;
    background-color: #eef0f2;
}
.sgp-mcard-noimg::after {
    content: 'No image'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #9ca3af; font-size: 12px;
}
.sgp-mcard-badge {
    position: absolute; top: 10px; left: 10px; background: #c0392b; color: #fff;
    font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
    padding: 4px 8px; border-radius: 5px;
}
.sgp-mcard-body { padding: 14px 15px 16px; display: flex; flex-direction: column; flex: 1; }
.sgp-mcard-price { font-size: 16px; font-weight: 800; color: #111827; }
.sgp-mcard-title { font-family: 'Playfair Display', Georgia, serif; font-size: 16px; color: #111827; margin: 4px 0 6px; line-height: 1.35; }
.sgp-mcard-meta { font-size: 12.5px; color: #6b7280; margin-bottom: 12px; }
.sgp-mcard-actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sgp-mcard-locate {
    background: none; border: none; color: #6b7280; font-size: 12px; font-weight: 600;
    cursor: pointer; padding: 0; font-family: inherit; text-decoration: underline;
}
.sgp-mcard-locate:hover { color: #c0392b; }
.sgp-mcard-view { color: #2563eb; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.sgp-mcard-view:hover { color: #1d4ed8; }

/* ── Bottom CTA ── */
.sgp-map-cta {
    margin: 34px 0 0; padding: 34px 28px; border-radius: 14px; text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d4a 100%); color: #fff;
}
.sgp-map-cta h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 24px; margin: 0 0 8px; color: #fff; }
.sgp-map-cta p { font-size: 14.5px; line-height: 1.7; color: rgba(255,255,255,.8); max-width: 620px; margin: 0 auto 20px; }
.sgp-map-cta-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.sgp-map-cta-btn {
    display: inline-block; padding: 12px 24px; border-radius: 8px; font-size: 14px; font-weight: 700;
    text-decoration: none; border: 1.5px solid rgba(255,255,255,.4); color: #fff; transition: all .15s;
}
.sgp-map-cta-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.sgp-map-cta-btn.primary { background: #25D366; border-color: #25D366; }
.sgp-map-cta-btn.primary:hover { background: #1eb85a; border-color: #1eb85a; color: #fff; }

@media (max-width: 640px) {
    .sgp-map-topbar { flex-direction: column; align-items: stretch; }
    .sgp-map-filters { justify-content: flex-start; }
    .sgp-map-filters select { flex: 1 1 calc(50% - 5px); }
    #sgp-propmap { height: 60vh; min-height: 380px; }
    .sgp-map-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .sgp-map-cta { padding: 28px 18px; }
}
