:root {
--primary: #2563EB;
--primary-dark: #1D4ED8;
--secondary: #0F172A;
--accent: #22C55E;
--warning: #F59E0B;
--white: #FFFFFF;
--gray-50: #F9FAFB;
--gray-100: #F3F4F6;
--gray-200: #E5E7EB;
--gray-300: #D1D5DB;
--gray-400: #9CA3AF;
--gray-500: #6B7280;
--gray-600: #4B5563;
--gray-700: #374151;
--gray-800: #1F2937;
--gray-900: #111827;
--shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
--shadow-md: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
--shadow-lg: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
--radius-sm: 8px;
--radius: 12px;
--radius-lg: 16px;
--radius-full: 9999px;
--font-display: 'Plus Jakarta Sans', sans-serif;
--font-body: 'Inter', sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; font-family: var(--font-body); color: var(--gray-800); }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }

/* ── Page Layout ── */
.map-page-wrap { height: 100vh; display: flex; flex-direction: column; }

.map-layout {
display: grid;
grid-template-columns: 360px 1fr;
flex: 1;
min-height: 0;
overflow: hidden;
position: relative;
}

/* ── Sidebar ── */
.map-sidebar {
background: var(--white);
border-right: 1px solid var(--gray-200);
display: flex;
flex-direction: column;
overflow: hidden;
z-index: 1200;
transition: transform 0.3s ease;
}

.map-sidebar-scroll {
flex: 1;
overflow-y: auto;
display: flex;
flex-direction: column;
min-height: 0;
}

.map-sidebar-header {
padding: 1rem;
border-bottom: 1px solid var(--gray-200);
flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  text-decoration: none;
}

.sidebar-brand-icon {
width: 34px; height: 34px;
background: var(--primary);
border-radius: 9px;
display: flex; align-items: center; justify-content: center;
color: #fff; font-size: 1.05rem; flex-shrink: 0;
}

.map-search-bar {
display: flex;
align-items: center;
gap: 0.5rem;
background: var(--gray-100);
border-radius: var(--radius);
padding: 0.6rem 0.875rem;
margin-bottom: 0.75rem;
}
.map-search-bar input {
flex: 1; background: transparent; border: none; outline: none;
font-size: 0.875rem; color: var(--gray-800); min-width: 0;
}
.map-search-bar button {
background: var(--primary); color: #fff; border-radius: 8px;
padding: 0.35rem 0.75rem; font-size: 0.78rem; font-weight: 600; flex-shrink: 0;
}

.map-filters {
display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.25rem;
scrollbar-width: none;
}
.map-filters::-webkit-scrollbar { display: none; }

.map-filter-chip {
flex-shrink: 0; padding: 0.3rem 0.8rem; border: 1.5px solid var(--gray-200);
border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 500;
color: var(--gray-600); cursor: pointer; transition: all 0.15s;
white-space: nowrap; background: var(--white);
}
.map-filter-chip.active { border-color: var(--primary); color: var(--primary); background: rgba(37,99,235,0.08); }

.map-range-row {
display: flex; justify-content: space-between; font-size: 0.78rem;
color: var(--gray-500); margin-bottom: 0.3rem; margin-top: 0.6rem;
}
.map-range-val { color: var(--primary); font-weight: 700; }
input[type="range"] { width: 100%; accent-color: var(--primary); }

.map-results-bar {
display: flex; align-items: center; justify-content: space-between; margin-top: 0.75rem;
}
.map-results-bar select {
padding: 0.3rem 0.6rem; border: 1.5px solid var(--gray-200); border-radius: 8px;
font-size: 0.78rem; color: var(--gray-700); outline: none; background: var(--white);
}
.map-results-bar .locate-inline-btn {
background: var(--primary); color: #fff; border-radius: 8px; padding: 0.35rem 0.65rem;
font-size: 0.78rem; font-weight: 600;
}

.map-listings {
flex: 1; overflow-y: auto; padding: 0.875rem; display: flex; flex-direction: column; gap: 0.75rem;
}

.map-listing-card {
display: flex; gap: 0.875rem; background: var(--white); border: 1.5px solid var(--gray-200);
border-radius: var(--radius); padding: 0.75rem; cursor: pointer; transition: all 0.2s;
}
.map-listing-card:hover, .map-listing-card.active {
border-color: var(--primary); box-shadow: 0 4px 16px rgba(37,99,235,0.15);
}
.map-listing-img { width: 86px; height: 70px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.map-listing-info { flex: 1; min-width: 0; }
.map-listing-name {
font-weight: 700; font-size: 0.875rem; color: var(--gray-900); margin-bottom: 0.2rem;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.map-listing-loc { font-size: 0.75rem; color: var(--gray-400); margin-bottom: 0.35rem; }
.map-listing-price { font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--primary); }

/* navbar icon */
.nav-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.footer-logo-img {
  width: 100px;
  height: 100px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Sidebar footer ── */
.map-sidebar-footer {
flex-shrink: 0;
padding: 0.875rem 1rem;
border-top: 1px solid var(--gray-200);
text-align: center;
font-size: 0.8rem;
color: var(--gray-400);
}
.map-sidebar-footer a {
font-family: var(--font-display);
font-weight: 800;
color: var(--primary);
transition: color 0.15s;
}
.map-sidebar-footer a:hover { color: var(--primary-dark); }

/* ── Map area ── */
.map-area { position: relative; flex: 1; min-height: 0; background: #E8EBEE; }
#leaflet-map { width: 100%; height: 100%; z-index: 1; }

/* Real map services (Google/Apple Maps included) render noticeably more
   saturated, higher-contrast tiles than a raw basemap feed looks by
   default — this is what reads as "flat"/"shallow" next to them. Boosting
   saturation/contrast on the tile layer only (not on markers or UI chrome
   sitting above it) closes most of that gap for free, with zero extra
   network requests. */
.leaflet-tile-pane {
  filter: saturate(1.4) contrast(1.1) brightness(1.01);
}

/* A soft inward vignette along the edges of the canvas — the same trick
   Google Maps' own UI uses to keep the map from looking like a flat,
   pasted-on rectangle butted against the sidebar. Sits above the tiles,
   below markers/popups/controls (z-index 650, under Leaflet's default
   marker pane at 600... markers actually sit at 600, so keep this below
   that: see z-index note). */
.map-area::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  box-shadow: inset 0 0 70px rgba(15, 23, 42, 0.16);
}

/* ── First-load shimmer (removed by JS once tiles have painted) ── */
.map-loading-shimmer {
  position: absolute;
  inset: 0;
  z-index: 700;
  background:
    linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%),
    #E2E5E9;
  background-size: 200% 100%, 100% 100%;
  animation: map-shimmer-sweep 1.3s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}
.map-loading-shimmer span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gray-500);
  background: rgba(255,255,255,0.9);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}
.map-loading-shimmer.hidden { opacity: 0; pointer-events: none; }
@keyframes map-shimmer-sweep {
  0% { background-position: 130% 0, 0 0; }
  100% { background-position: -30% 0, 0 0; }
}

.tuHame-pin {
  position: relative;
  background: var(--primary);
  color: #fff;
  padding: 7px 13px 7px 10px;
  border-radius: 20px 20px 20px 4px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(37,99,235,0.4), 0 1px 3px rgba(0,0,0,0.15);
  border: 2px solid rgba(255,255,255,0.9);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tuHame-pin:hover {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 0 6px 18px rgba(37,99,235,0.5), 0 2px 6px rgba(0,0,0,0.2);
}
.tuHame-pin .pin-icon { display: inline-flex; flex-shrink: 0; }
.tuHame-pin .pin-icon svg { width: 15px; height: 15px; display: block; }
.tuHame-pin.pin-bnb { background: #0891B2; box-shadow: 0 4px 14px rgba(8,145,178,0.4), 0 1px 3px rgba(0,0,0,0.15); }
.tuHame-pin.pin-hotel { background: #7C3AED; box-shadow: 0 4px 14px rgba(124,58,237,0.4), 0 1px 3px rgba(0,0,0,0.15); }
.tuHame-pin.pin-commercial { background: #374151; box-shadow: 0 4px 14px rgba(55,65,81,0.4), 0 1px 3px rgba(0,0,0,0.15); }
.tuHame-pin.pin-land { background: #92400E; box-shadow: 0 4px 14px rgba(146,64,14,0.4), 0 1px 3px rgba(0,0,0,0.15); }
.tuHame-pin.pin-industrial { background: #475569; box-shadow: 0 4px 14px rgba(71,85,105,0.4), 0 1px 3px rgba(0,0,0,0.15); }
.tuHame-pin.pin-school { background: #4F46E5; box-shadow: 0 4px 14px rgba(79,70,229,0.4), 0 1px 3px rgba(0,0,0,0.15); }
.tuHame-pin.pin-active {
  background: var(--accent);
  border-color: #fff;
  transform: scale(1.16);
  box-shadow: 0 6px 20px rgba(34,197,94,0.55), 0 2px 6px rgba(0,0,0,0.2);
  z-index: 20;
}

.leaflet-popup-content-wrapper {
border-radius: 14px !important; padding: 0 !important; overflow: hidden;
box-shadow: 0 12px 32px rgba(0,0,0,0.18) !important; border: none !important;
}
.leaflet-popup-content { margin: 0 !important; width: 220px !important; }
.leaflet-popup-tip-container { display: none; }
.leaflet-popup-close-button { top: 6px !important; right: 8px !important; color: #fff !important; font-size: 18px !important; z-index: 10; }

.popup-img { width: 100%; height: 110px; object-fit: cover; display: block; }
.popup-body { padding: 0.875rem; }
.popup-name { font-weight: 700; font-size: 0.875rem; color: #111; margin-bottom: 0.2rem; }

/* ── Mover popup card (separate from property popup sizing) ── */
.mover-popup .leaflet-popup-content-wrapper {
  border-radius: 16px !important;
  padding: 0 !important;
  overflow: hidden;
}
.mover-popup .leaflet-popup-content {
  width: 250px !important;
  margin: 0 !important;
}
.mover-popup-card {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}
.mover-popup-card .mp-header {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  padding: 1rem 1.1rem 0.85rem;
  color: #fff;
}
.mover-popup-card .mp-name {
  font-weight: 800;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.mover-popup-card .mp-vehicle {
  font-size: 0.78rem;
  opacity: 0.9;
  margin-top: 0.15rem;
}
.mover-popup-card .mp-body {
  padding: 0.85rem 1.1rem 1rem;
}
.mover-popup-card .mp-stats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.mover-popup-card .mp-stat {
  background: #FEF3C7;
  color: #92400E;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}
.mover-popup-card .mp-stat.trust {
  background: rgba(34,197,94,0.14);
  color: #15803D;
}
.mover-popup-card .mp-cta {
  display: block;
  text-align: center;
  background: #111827;
  color: #fff;
  padding: 0.55rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}
.mover-popup-card .mp-cta:hover { background: #1F2937; }
.popup-loc { font-size: 0.72rem; color: #9CA3AF; margin-bottom: 0.4rem; }
.popup-price { font-weight: 800; font-size: 1rem; color: var(--primary); margin-bottom: 0.7rem; }
.popup-meta { display: flex; gap: 0.6rem; font-size: 0.72rem; color: #6B7280; margin-bottom: 0.75rem; }
.popup-btn {
display: block; width: 100%; text-align: center; background: var(--primary); color: #fff;
border-radius: 8px; padding: 0.6rem; font-size: 0.82rem; font-weight: 700;
transition: background 0.15s ease;
}
.popup-btn:hover { background: var(--primary-dark); }

.leaflet-control-zoom { border: none !important; box-shadow: var(--shadow-md) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-control-zoom a {
border-radius: 0 !important; border: none !important; border-bottom: 1px solid var(--gray-200) !important;
color: var(--gray-700) !important; font-weight: 700; width: 38px !important;
height: 38px !important; line-height: 38px !important; transition: background 0.15s ease;
}
.leaflet-control-zoom a:last-child { border-bottom: none !important; }
.leaflet-control-zoom a:hover { background: var(--gray-100) !important; color: var(--primary) !important; }

.locate-btn {
position: absolute; bottom: 1.5rem; right: 1.5rem; z-index: 800;
background: #fff; border: none; border-radius: 50%;
width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
font-size: 1.15rem; cursor: pointer; box-shadow: var(--shadow-md); transition: all 0.18s ease;
}
.locate-btn:hover { background: var(--primary); color: #fff; box-shadow: var(--shadow-lg); transform: translateY(-1px); }

.map-info-banner {
position: absolute; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 800;
background: rgba(255,255,255,0.97); backdrop-filter: blur(12px); border-radius: 20px;
padding: 0.5rem 1.25rem; box-shadow: var(--shadow-md); font-size: 0.82rem; font-weight: 600;
color: var(--gray-700); white-space: nowrap; pointer-events: none; max-width: calc(100vw - 2rem);
overflow: hidden; text-overflow: ellipsis;
}

/* ── Mobile hamburger (floating button on map) ── */
.mobile-menu-btn {
display: none;
position: absolute;
top: 1rem; left: 1rem;
z-index: 1300;
width: 42px; height: 42px;
background: var(--white);
border-radius: 10px;
box-shadow: var(--shadow-md);
align-items: center; justify-content: center;
flex-direction: column; gap: 4px;
}
.mobile-menu-btn span {
display: block; width: 18px; height: 2px; background: var(--gray-700); border-radius: 2px;
transition: transform 0.2s, opacity 0.2s;
}
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.sidebar-overlay {
display: none;
position: fixed; inset: 0; background: rgba(15,23,42,0.45);
z-index: 1100;
}
.sidebar-overlay.show { display: block; }

/* ── Toast ── */
.toast-container {
position: fixed; bottom: 1.5rem; right: 1.5rem; left: 1.5rem; z-index: 9999;
display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; pointer-events: none;
}
.toast {
display: flex; align-items: center; gap: 0.75rem; background: var(--secondary); color: #fff;
padding: 1rem 1.25rem; border-radius: var(--radius); box-shadow: var(--shadow-lg);
font-size: 0.9rem; font-weight: 500; transform: translateX(120%);
transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1); min-width: 240px;
max-width: min(90vw, 360px); pointer-events: auto;
}
.toast.show { transform: translateX(0); }
.toast-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ── Mover truck pin (glowing/breathing) ── */
.mover-pin-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mover-pin-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.55) 0%, rgba(245,158,11,0) 70%);
  animation: mover-pin-breathe 2.2s ease-in-out infinite;
}
.mover-pin-circle {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 3px 10px rgba(217,119,6,0.55), 0 0 0 2px #fff;
  animation: mover-pin-pulse 2.2s ease-in-out infinite;
  transition: transform 0.15s ease;
}
.mover-pin-wrap:hover .mover-pin-circle { transform: scale(1.15); }
@keyframes mover-pin-breathe {
  0%, 100% { transform: scale(0.85); opacity: 0.7; }
  50% { transform: scale(1.35); opacity: 0.25; }
}
@keyframes mover-pin-pulse {
  0%, 100% { box-shadow: 0 3px 10px rgba(217,119,6,0.55), 0 0 0 2px #fff; }
  50% { box-shadow: 0 3px 16px rgba(217,119,6,0.85), 0 0 0 4px #fff; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
.map-layout { grid-template-columns: 1fr; }

.map-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 85%;
    max-width: 340px;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
}
.map-sidebar.open { transform: translateX(0); }

.mobile-menu-btn { display: flex; }
.map-info-banner { font-size: 0.74rem; padding: 0.4rem 0.9rem; }
}