/* ================================
   PROPIEDADESVE - SEARCH PAGE
   Matching Landing Page Design
================================ */

/* ================================
   CSS VARIABLES
================================ */
:root {
  /* Primary */
  --primary: #1A3C6E;
  --primary-light: #2A5494;
  --primary-dark: #0F2440;
  /* Accent */
  --accent: #F59E0B;
  --accent-hover: #D97706;
  /* Status */
  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #EF4444;
  /* Text */
  --text-dark: #111827;
  --text-primary: #111827;
  --text-body: #4B5563;
  --text-muted: #9CA3AF;
  /* Backgrounds */
  --bg-white: #FFFFFF;
  --bg-light: #FAFAFA;
  --bg-subtle: #F3F4F6;
  --bg-page: #FAFAFA;
  --bg-card: #FFFFFF;
  --bg-muted: #F3F4F6;
  /* Border */
  --border: #E5E7EB;
  --border-light: #F0F0F0;
  --border-focus: #cbd5e1;
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 100px;
  --radius-pill: 999px;
  /* Transitions */
  --transition: all 0.2s ease;
}

/* ================================
   RESET & BASE
================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-body);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
}

/* ================================
   UTILITIES
================================ */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.d-lg-none {
  display: none;
}

@media (max-width: 1024px) {
  .d-lg-none {
    display: inline-flex;
  }
}

.text-muted {
  color: var(--text-muted);
}

/* ================================
   BUTTONS
================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--text-body);
  border: 2px solid var(--border);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-light);
}

.btn-save-alert {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
}

.btn-save-alert:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

/* ================================
   HEADER
================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.logo span {
  color: var(--accent);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body);
  transition: var(--transition);
  padding: 8px 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.logout-form {
  margin: 0;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 1024px) {
  .nav-links,
  .user-menu,
  .nav-actions,
  .notifications-dropdown {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
}

.mobile-menu.show {
  display: block;
}

.mobile-menu-link {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-body);
  border-bottom: 1px solid var(--border);
}

.mobile-menu-link:last-child {
  border-bottom: none;
}

.mobile-menu-link.active {
  color: var(--primary);
}

/* ================================
   MAIN CONTENT LAYOUT
================================ */
.main-content {
  padding-top: 72px;
  height: 100vh;
  overflow: hidden;
}

.search-layout {
  display: flex;
  height: calc(100vh - 72px);
}

/* ================================
   FILTER SIDEBAR — always a fixed drawer at every screen size
================================ */
.filter-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 90vw;
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-xl);
}

.filter-sidebar.show {
  transform: translateX(0);
}

/* Dim overlay behind the filter drawer */
.filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1999;
}

.filter-overlay.show {
  display: block;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  padding-top: 28px;
  border-bottom: 1px solid var(--border);
}

.filter-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-header h2 i {
  color: var(--primary);
}

/* Subtitle under "Filtros" heading clarifying they apply to all searches */
.filter-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.filter-close {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 44px;
  height: 44px;
}

.filter-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.filter-section {
  margin-bottom: 28px;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-section-title i {
  font-size: 1rem;
  color: var(--primary);
}

.filter-group {
  margin-bottom: 16px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.filter-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  min-height: 48px;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.filter-select:hover {
  border-color: var(--border-focus);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

/* Filter Button Group */
.btn-group-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-filter {
  flex: 1;
  min-width: 48px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-body);
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-filter:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Filter Actions — two-button layout (Aplicar + Limpiar) */
.filter-actions {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ================================
   MAP AREA
================================ */
.map-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Toolbar hint — one-liner explaining the three search methods */
.toolbar-hint {
  padding: 6px 24px 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-hint i {
  color: var(--accent);
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Map Toolbar */
.map-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Map Wrapper */
.map-wrapper {
  flex: 1;
  position: relative;
}

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

/* Freehand draw canvas — sits above the map, hidden until draw mode */
.draw-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  display: none;
  cursor: crosshair;
  touch-action: none; /* prevent page scroll on mobile while drawing */
}
.draw-canvas.active {
  display: block;
}

/* Instruction text: desktop vs mobile variants */
.instruction-mobile { display: none; }
@media (max-width: 768px) {
  .instruction-desktop { display: none; }
  .instruction-mobile  { display: inline; }
}

/* Map Instruction Overlay */
.map-instruction {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  display: none;
  align-items: center;
  gap: 10px;
}

.map-instruction.show {
  display: flex;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ================================
   RESULTS PANEL
================================ */
.results-panel {
  /* Default (≥1280px): wide 2-col panel */
  width: 460px;
  flex-shrink: 0;
  background: var(--bg-white);
  border-left: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}

/* Laptop / medium desktop: narrower 1-col panel */
@media (max-width: 1280px) and (min-width: 1025px) {
  .results-panel {
    width: 360px;
  }
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-light);
}

.results-title h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.results-title h3 i {
  color: var(--primary);
}

.results-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.results-count strong {
  color: var(--accent);
  font-weight: 700;
}

.results-close {
  display: none; /* shown on mobile only */
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.results-close:hover {
  color: var(--text-dark);
}

.results-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-content: flex-start;
}

.results-list > .empty-state,
.results-list > .loading-state {
  flex: 1 1 100%;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 40px 20px;
  text-align: center;
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.empty-icon i {
  font-size: 2rem;
  color: var(--text-muted);
}

.empty-state h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 260px;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Tablet & mobile: results panel slides up from bottom */
@media (max-width: 1024px) {
  .results-panel {
    display: none; /* hidden until search produces results */
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom));
    width: 100%;
    max-height: 62vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-left: none;
    border-top: 1px solid var(--border);
    animation: slideUp 0.3s ease;
  }

  .results-panel.show {
    display: flex;
  }

  /* Show close button on tablet/mobile */
  .results-close {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .results-list {
    padding: 12px;
    gap: 12px;
  }
}

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

/* ================================
   PROPERTY CARDS (map panel overrides for pc-card)
================================ */
.pc-card {
  flex: 0 0 calc(50% - 8px); /* 2-col at ≥1280px */
  min-width: 0;
}

@media (max-width: 1280px) {
  .pc-card {
    flex: 0 0 100%;
  }
}


/* ================================
   NOTIFICATIONS DROPDOWN
================================ */
.notifications-dropdown {
  position: relative;
}

.btn-notifications {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  color: var(--text-body);
}

.btn-notifications:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.notifications-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  z-index: 1000;
  display: none;
}

.notifications-menu.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  color: var(--text-dark);
}

.notifications-header a {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.notifications-header a:hover {
  text-decoration: underline;
}

.notifications-content {
  max-height: 360px;
  overflow-y: auto;
}

.notifications-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.notifications-empty i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
  opacity: 0.5;
}

.notifications-empty p {
  font-size: 0.9rem;
}

.notification-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.notification-item:hover {
  background: var(--bg-light);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 14px;
  flex-shrink: 0;
}

.notification-dot.seen {
  background: var(--text-muted);
  opacity: 0.3;
}

.notification-info {
  flex: 1;
}

.notification-name {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 3px;
}

.notification-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ================================
   MODALS
================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 24px;
}

.modal-overlay.show {
  display: flex;
}

.modal-container {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.3s ease;
}

.modal-container.modal-lg {
  max-width: 600px;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(-20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h5 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h5 i {
  color: var(--accent);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal-body {
  padding: 24px;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-light);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.filters-preview {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.filter-tag {
  display: inline-block;
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin: 3px;
  font-size: 0.8rem;
  color: var(--text-body);
}

/* ================================
   ZONES LIST (MANAGE MODAL)
================================ */
.zone-item {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.zone-item:last-child {
  border-bottom: none;
}

.zone-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 14px;
  flex-shrink: 0;
}

.zone-status.active {
  background: var(--success);
}

.zone-status.inactive {
  background: var(--text-muted);
  opacity: 0.3;
}

.zone-info {
  flex: 1;
}

.zone-name {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.zone-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.zone-actions {
  display: flex;
  gap: 8px;
}

.zone-actions button {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  color: var(--text-body);
}

.zone-actions button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.zone-actions .btn-delete:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.zones-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.zones-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  opacity: 0.4;
}

/* ================================
   MAP MARKERS
================================ */
.price-marker {
  background: var(--accent);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  position: relative;
}

.price-marker::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--accent);
}

.price-marker:hover {
  background: var(--primary);
  transform: scale(1.05);
}

.price-marker:hover::after {
  border-top-color: var(--primary);
}

/* Google Maps Info Window */
.gm-style .gm-style-iw-c {
  padding: 0 !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
}

.gm-style .gm-style-iw-d {
  overflow: hidden !important;
}

.gm-style .gm-style-iw-tc {
  display: none;
}

.info-window {
  min-width: 220px;
  padding: 14px;
}

.info-window-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.info-window-title {
  font-size: 0.9rem;
  color: var(--text-body);
  margin-bottom: 10px;
}

.info-window-features {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ================================
   SCROLLBAR
================================ */
.results-list::-webkit-scrollbar,
.filter-body::-webkit-scrollbar,
.notifications-content::-webkit-scrollbar {
  width: 6px;
}

.results-list::-webkit-scrollbar-track,
.filter-body::-webkit-scrollbar-track,
.notifications-content::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 3px;
}

.results-list::-webkit-scrollbar-thumb,
.filter-body::-webkit-scrollbar-thumb,
.notifications-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.results-list::-webkit-scrollbar-thumb:hover,
.filter-body::-webkit-scrollbar-thumb:hover,
.notifications-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 1024px) {
  .container {
    padding: 0 16px;
  }

  .map-toolbar {
    padding: 12px 16px;
  }
}

@media (max-width: 768px) {
  .map-toolbar .btn span {
    display: none;
  }

  .map-toolbar .btn i {
    margin: 0;
  }
}

/* ================================
   PROPERTY HIGHLIGHT CARD
   (Shown when clicking "Ver en mapa")
================================ */
.property-highlight-card {
  position: absolute;
  width: 280px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: transform 0.3s ease, opacity 0.2s ease;
  pointer-events: none;
}

.property-highlight-card.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Arrow pointing down to marker */
.property-highlight-card::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--bg-white);
}

/* Close button */
.phc-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
  font-size: 0.7rem;
}

.phc-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Image section */
.phc-image {
  position: relative;
  height: 100px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  overflow: hidden;
}

.phc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phc-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phc-image-placeholder i {
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.3);
}

.phc-badges {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
}

.phc-badge {
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.phc-badge-operation {
  background: var(--accent);
  color: white;
}

.phc-badge-type {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
}

/* Content section */
.phc-content {
  padding: 12px;
}

.phc-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.phc-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.phc-location i {
  color: var(--accent);
  font-size: 0.7rem;
}

.phc-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 10px;
}

.phc-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.phc-features span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-body);
}

.phc-features i {
  color: var(--primary);
  font-size: 0.8rem;
}

.phc-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.phc-button:hover {
  background: var(--accent-hover);
}

.phc-button i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.phc-button:hover i {
  transform: translateX(3px);
}

/* Responsive */
@media (max-width: 480px) {
  .property-highlight-card {
    width: 260px;
  }

  .phc-image {
    height: 80px;
  }

  .phc-content {
    padding: 10px;
  }
}

/* ================================
   BOTTOM NAV
================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 6px 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  min-height: 48px;
  min-width: 48px;
  transition: color 0.2s ease;
}
.bottom-nav-item i {
  font-size: 1.35rem;
  line-height: 1;
}
.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--accent);
}
@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  body.map-page { padding-bottom: 0; }
}

/* ================================
   NL SEARCH BAR
================================ */
.nl-search-bar {
  padding: 10px 16px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}
.nl-search-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.nl-search-inner:focus-within {
  border-color: var(--primary);
}
.nl-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  border-radius: 50px;
  min-width: 0;
}
.nl-input::placeholder {
  color: var(--text-muted);
}
.nl-search-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  margin-right: 4px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.nl-search-icon:hover { background: var(--accent-hover); }

/* ================================
   PRICE BADGES (popups)
================================ */
.phc-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.price-badge--down {
  background: #dcfce7;
  color: #16a34a;
}

.price-badge--up {
  background: #fff7ed;
  color: #D97706;
}
