/* ===== MAP PAGE BASE V2 (IMMERSIVE PREMIUM) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body.page-map {
    font-family: 'Inter', sans-serif;
    background: #F8FAFC;
    color: #0F172A;
    margin: 0;
    overflow: hidden;
}
body.page-map main { padding: 0; }
body.page-map footer { display: none; }

/* Global Header over map (Deprecated - now using site-header) */

/* Map Layout */
.map-layout-v2 {
  display: block;
  height: calc(100vh - 60px); /* Fallback */
  height: calc(100dvh - 60px);
  width: 100%;
  position: relative;
  overscroll-behavior-y: none;
  touch-action: pan-x pan-y;
}

.map-fullscreen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100; /* Leaflet needs to be at bottom */
}

@media (min-width: 769px) {
  .map-fullscreen {
    left: 420px;
    width: calc(100% - 420px);
  }
}

/* Override Leaflet z-index to stay below UI */
.leaflet-top, .leaflet-bottom { z-index: 400 !important; }

/* ===== FLOATING SIDEBAR (DESKTOP) ===== */
.floating-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 420px;
  background: #FFFFFF;
  border-radius: 0;
  box-shadow: 4px 0 24px rgba(0,0,0,0.06);
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #E2E8F0;
}

.floating-sidebar__header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #FFFFFF;
  z-index: 10;
}

/* Premium Search */
.map-search-wrap { position: relative; width: 100%; display: flex; align-items: center; }
.map-search-input {
  width: 100%;
  height: 56px;
  padding: 0 48px 0 52px;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 500;
  color: #0F172A;
  background: #FFFFFF;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: inherit;
}
.map-search-input::placeholder { color: #94A3B8; font-weight: 400;}
.map-search-input:focus {
  outline: none;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1), 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.map-search-icon {
  position: absolute;
  left: 20px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}
.map-search-wrap:focus-within .map-search-icon { color: #2563EB; }

.map-search-btn {
  position: absolute;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.map-search-btn:hover { color: #2563EB; transform: scale(1.05); }


/* Quick Filters */
.map-quick-filters {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.map-quick-filters::-webkit-scrollbar { display: none; }
.quick-filter-pill {
  padding: 8px 16px;
  border: 1px solid #F1F5F9;
  border-radius: 12px;
  background: #F8FAFC;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.quick-filter-pill:hover { background: #F1F5F9; color: #0F172A; }
.quick-filter-pill.active { background: #0F172A; color: #FFFFFF; border-color: #0F172A; }
.quick-filter-pill.active span { color: #10B981 !important; }

/* Category Chips */
.map-chips-container { margin: 0; padding: 0; position: relative; }
.map-chips-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 8px;
  padding-bottom: 4px;
}
.map-chips-scroll::-webkit-scrollbar { display: none; }
.filter-chip {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: 24px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-chip:hover { color: #0F172A; background: rgba(0,0,0,0.02); }
.filter-chip:hover .filter-chip__icon { color: #0F172A; opacity: 1; }
.filter-chip--active {
  color: #FFFFFF;
  font-weight: 600;
  background: #3B82F6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.filter-chip--active:hover { color: #FFFFFF; background: #2563EB; }

.filter-chip__icon { 
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7; 
  transition: all 0.2s ease;
}
.filter-chip__icon svg {
  width: 18px;
  height: 18px;
}
.filter-chip--active .filter-chip__icon { opacity: 1; }

/* Toolbar */
.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.btn-more-filters, .custom-select-wrapper {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}
.btn-more-filters {
  gap: 8px;
}
.custom-select-wrapper {
  position: relative;
}
.btn-more-filters:hover, .custom-select-wrapper:hover {
  border-color: #CBD5E1; 
  background: #F8FAFC; 
}
.btn-more-filters:active, .custom-select-wrapper:active {
  transform: scale(0.98);
}
.custom-select-icon {
  position: absolute;
  right: 14px;
  pointer-events: none;
  color: #64748B;
}
.sort-select {
  font-size: 13px;
  font-weight: 600;
  padding-right: 24px;
  border: none;
  background: transparent;
  color: #0F172A;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.sort-select:hover { background: transparent; }

/* Sidebar Content */
.floating-sidebar__content {
  flex: 1;
  overflow-y: auto;
  position: relative;
  background: #F8FAFC;
}
.floating-sidebar__content::-webkit-scrollbar { width: 6px; }
.floating-sidebar__content::-webkit-scrollbar-track { background: transparent; }
.floating-sidebar__content::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 10px; }
.floating-sidebar__content::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
.sidebar-results-header {
  padding: 24px 24px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
}
.sidebar-list { list-style: none; padding: 0 24px 24px; margin: 0; display: flex; flex-direction: column; gap: 32px; }

/* ===== PREMIUM CARD V2 COMPACTA ===== */
.premium-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: all 0.2s ease;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.premium-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.premium-card__image-wrap {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #E2E8F0;
  flex-shrink: 0;
}
.premium-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.premium-card:hover .premium-card__img { transform: scale(1.04); }

.premium-card__rating-badge {
  display: none; /* Oculto en imagen, se pasa al texto si aplica */
}

.premium-card__save-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.premium-card__save-btn:hover svg { stroke: #EF4444; }
.premium-card__save-btn[data-saved="true"] svg { fill: #EF4444; stroke: #EF4444; }

.premium-card__info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.premium-card__header { display: flex; justify-content: space-between; align-items: flex-start; }
.premium-card__title {
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: inherit;
  line-height: 1.3;
}
.premium-card__meta { font-size: 13px; color: #64748B; display: flex; align-items: center; gap: 6px; }
.premium-card__pets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.premium-card__pets span {
  font-size: 11px;
  font-weight: 600;
  color: #10B981;
  background: #ECFDF5;
  padding: 2px 6px;
  border-radius: 4px;
}
.premium-card__price { margin-top: auto; font-size: 13px; font-weight: 600; color: #0F172A; }

/* Skeletons */
.skeleton-premium-card { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px;}
.skeleton-img { width: 100%; aspect-ratio: 4/3; border-radius: 16px; background: #E2E8F0; animation: pulse 1.5s infinite; }
.skeleton-info { display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 16px; border-radius: 4px; background: #E2E8F0; animation: pulse 1.5s infinite; }
.skeleton-line.title { width: 70%; height: 20px; }
.skeleton-line.sub { width: 40%; }
.skeleton-line.pets { width: 50%; height: 14px;}
@keyframes pulse { 0% {opacity: 1;} 50% {opacity: 0.6;} 100% {opacity: 1;} }

/* Empty state */
.sidebar-empty { padding: 48px 24px; text-align: center; }
.sidebar-empty__icon { color: #64748B; opacity: 0.4; margin-bottom: 16px; }
.sidebar-empty__title { font-weight: 600; font-size: 18px; color: #0F172A; margin: 0 0 8px 0; }
.sidebar-empty__sub { font-size: 14px; color: #64748B; margin-bottom: 24px; line-height: 1.5;}
.btn-load-more {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #0F172A;
  background: transparent;
  color: #0F172A;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}
.btn-load-more:hover { background: #F8FAFC; }

/* ===== PLACE DRAWER V2 ===== */
.place-drawer {
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: #FFFFFF;
  z-index: 2000;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  border-radius: 24px; /* Same as sidebar */
}
.place-drawer--open { left: 0; }
.place-drawer__close {
  position: absolute;
  top: 20px; left: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: #0F172A;
}
.place-drawer__close:hover { background: #fff; transform: scale(1.05); }

.drawer-hero { width: 100%; height: 300px; object-fit: cover; }
.drawer-body { padding: 24px; }
.drawer-title { font-size: 26px; font-weight: 700; color: #0F172A; margin: 0 0 8px 0; }
.drawer-meta { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #64748B; margin-bottom: 24px; }
.drawer-section { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #E2E8F0; }
.drawer-section h4 { font-size: 18px; font-weight: 600; color: #0F172A; margin: 0 0 16px 0; }
.drawer-actions { display: flex; gap: 12px; }
.drawer-btn { flex: 1; padding: 14px; border-radius: 12px; font-weight: 600; font-size: 15px; text-align: center; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px;}
.drawer-btn--primary { background: #3B82F6; color: white; }
.drawer-btn--primary:hover { background: #2563EB; }
.drawer-btn--outline { border: 1px solid #E2E8F0; color: #0F172A; }
.drawer-btn--outline:hover { background: #F8FAFC; }

/* ===== MAP CONTROLS ===== */
.map-floating-btn {
  position: absolute;
  z-index: 600;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 28px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  color: #0F172A;
  font-family: inherit;
}
.map-floating-btn:hover { transform: scale(1.03); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }

.map-floating-btn--locate {
  bottom: 40px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #3B82F6;
}

.map-floating-btn--list-toggle {
  display: none;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 28px;
  background: #0F172A;
  color: #fff;
  gap: 8px;
  border: none;
}
.map-floating-btn--list-toggle:hover { transform: translateX(-50%) scale(1.03); }

/* ===== PREMIUM CUSTOM MARKERS ===== */
.custom-pin span {
  transform: rotate(45deg);
  font-size: 18px;
  line-height: 1;
}
.custom-pin:hover, .custom-pin.active {
  transform: rotate(-45deg) scale(1.3);
  z-index: 1000 !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  border-width: 2px;
}
.leaflet-div-icon { background: transparent; border: none; }

/* LEAFLET POPUP MINI CARD V2 */
.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15) !important;
}
.leaflet-popup-content { margin: 0 !important; width: 260px !important; cursor: pointer; font-family: 'Inter', sans-serif !important;}
.leaflet-popup-close-button {
  width: 32px !important;
  height: 32px !important;
  background: rgba(255,255,255,0.9) !important;
  backdrop-filter: blur(4px);
  border-radius: 50% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  top: 10px !important; right: 10px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: #0F172A !important;
}
.map-popup-card { display: flex; flex-direction: column;}
.map-popup-card__img { width: 100%; height: 140px; object-fit: cover; }
.map-popup-card__info { padding: 16px; }
.map-popup-card__title { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: #0F172A; }
.map-popup-card__meta { font-size: 13px; color: #64748B; display: flex; justify-content: space-between; align-items: center;}
.map-popup-card__star { color: #0F172A; font-weight: 600; }

/* ===== MOBILE PREMIUM MAP EXPERIENCE ===== */
@media (max-width: 768px) {
  .floating-sidebar { display: none; }
  .map-floating-btn--list-toggle { display: none; }
  
  /* Floating Buttons */
  .map-floating-btn {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .map-floating-btn--locate {
    display: none !important;
  }
  .map-floating-btn--search-area {
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    color: #0F172A;
    white-space: nowrap;
    transition: opacity 0.3s, transform 0.3s;
  }

  /* Floating Search Wrap */
  .m-search-wrap {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .m-search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    height: 56px;
    padding: 0 8px 0 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  }
  .m-search-bar__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
  }
  .m-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    font-weight: 500;
    color: #0F172A;
    background: transparent;
    padding: 0;
  }
  .m-search-input::placeholder { color: #64748B; }
  .m-search-filter-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #F3F6FA;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0F172A;
    margin-left: 8px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
  }
  .m-search-filter-btn:active {
    background: #E2E8F0;
  }
  .m-filter-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
    border: 2px solid #F1F5F9;
  }
  .m-filter-badge[hidden] {
    display: none !important;
  }
  
  /* Category Chips under search */
  .m-search-cats {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px; /* Room for shadow */
    margin-bottom: -8px;
  }
  .m-search-cats::-webkit-scrollbar { display: none; }
  .m-cat-chip {
    background: #fff;
    border: 1px solid #E2E8F0;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(15,23,42,0.03);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .m-cat-chip--active {
    background: #3B82F6;
    color: #fff;
    border-color: #3B82F6;
  }
  .m-cat-chip--more {
    padding-right: 8px; /* Slight tweak for the chevron */
  }

  /* Filters Bottom Sheet */
  .m-filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2500;
  }
  .m-filters-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 28px 28px 0 0;
    z-index: 2600;
    display: flex;
    flex-direction: column;
    max-height: 82dvh;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .m-filters-sheet--open { transform: translateY(0); }
  
  .m-filters-sheet__handle {
    width: 40px;
    height: 4px;
    background: #E2E8F0;
    border-radius: 4px;
    margin: 12px auto 0;
  }
  
  .m-filters-sheet__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 16px;
    border-bottom: 1px solid #F1F5F9;
  }
  .m-filters-sheet__header h3 { margin: 0; font-size: 18px; font-weight: 700; color: #0F172A; }
  .m-filters-sheet__close { background: none; border: none; padding: 4px; display: flex; color: #64748B; }
  
  .m-filters-sheet__body {
    padding: 24px 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
  .m-filter-block h4 { margin: 0 0 16px 0; font-size: 16px; font-weight: 700; color: #0F172A; }
  .m-filter-pills { display: flex; flex-wrap: wrap; gap: 10px; }
  .m-filter-scroll-horizontal { 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    padding-bottom: 4px; 
    scrollbar-width: none; 
    margin-right: -20px; /* Extend scroll area to edge of screen */
    padding-right: 20px;
  }
  .m-filter-scroll-horizontal::-webkit-scrollbar { display: none; }
  .m-filter-scroll-horizontal .m-filter-pill { flex-shrink: 0; white-space: nowrap; }
  .m-filter-pill {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #E2E8F0;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
  }
  .m-filter-pill.active {
    background: #3B82F6;
    border-color: #3B82F6;
    color: #fff;
  }
  
  .m-filters-sheet__footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    gap: 12px;
  }
  
  .m-filters-sheet__footer .btn {
    flex: 1;
    height: 52px;
    border-radius: 14px;
    font-weight: 600;
  }
  .m-filters-sheet__footer .btn--ghost {
    border: 1px solid #E2E8F0;
    color: #0F172A;
  }
  .m-filters-sheet__footer .btn--primary {
    background: #1D4ED8; /* Reference image blue */
  }/* Mobile Map Popup */
  .m-map-popup {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
    left: 16px;
    right: 16px;
    background: #fff;
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
  }
  .m-map-popup[hidden] {
    display: none !important;
  }
  .m-map-popup__close { 
    position: absolute; 
    top: -16px; 
    right: -4px; 
    width: 40px; 
    height: 40px; 
    border-radius: 999px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: #FFFFFF; 
    border: 1px solid #E5E7EB; 
    box-shadow: 0 8px 20px rgba(15,23,42,0.10); 
    color: #0F172A; 
    cursor: pointer; 
    z-index: 100; 
    padding: 0; 
    outline: none;
    transition: transform 0.2s, background 0.2s;
  }
  .m-map-popup__close:active {
    background: #F3F4F6;
    transform: scale(0.95);
  }
  .m-map-popup__wrapper { display: flex; gap: 12px; align-items: center; width: 100%; }
  .m-map-popup__img-wrapper { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
  .m-map-popup__img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
  .place-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.2;
    color: #475569;
  }
  .place-rating-star { color: #F59E0B; font-size: 14px; }
  .place-rating-value { font-weight: 700; color: #0F172A; }
  .place-rating-count { color: #64748B; }
  .place-no-rating { margin-top: 4px; font-size: 13px; color: #64748B; font-style: italic; display: block; }
  
  .place-title-link {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #0F172A;
    text-decoration: none;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 2px 0;
    padding-right: 0;
    transition: color 0.2s;
  }
  .place-title-link:hover, .place-title-link:active {
    color: #2563EB;
  }

  .m-map-popup__info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding-right: 4px; }
  .m-map-popup__meta { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #64748B; flex-wrap: wrap; }
  .m-map-popup__cat { font-weight: 500; font-size: 12px; color: #64748B; }
  
  .m-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
  }
  .m-popup-directions-btn {
    height: 38px;
    padding: 0 16px;
    border-radius: 12px;
    background: #2563EB;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
  }
  .m-popup-directions-btn:active {
    background: #1D4ED8;
  }
  .m-popup-rate-link {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    text-decoration: none;
    transition: color 0.2s;
    padding: 2px 8px;
  }
  .m-popup-rate-link:active {
    color: #0F172A;
    text-decoration: underline;
  }
  .m-map-popup__rating { position: absolute; top: -6px; left: -6px; display: flex; align-items: center; gap: 2px; font-weight: 700; color: #1E293B; background: rgba(255,255,255,0.85); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); padding: 2px 6px; border-radius: 8px; font-size: 11px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border: 1px solid rgba(255,255,255,0.5); }

  /* Mobile Premium Bottom Sheet (Results) */
  .bottom-sheet {
    display: none !important;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-radius: 28px 28px 0 0;
    z-index: 2000;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
    height: 90dvh;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
    
    /* Default state (collapsed) - Raised by 65px to avoid bottom nav */
    transform: translateY(calc(100% - 90px - 65px - env(safe-area-inset-bottom))); 
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    touch-action: none;
  }
  
  .bottom-sheet[data-state="half"] { transform: translateY(45%); }
  .bottom-sheet[data-state="expanded"] { transform: translateY(0); }
  
  .bottom-sheet__handle-wrap {
    padding: 16px 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
    width: 100%;
    touch-action: none;
  }
  .bottom-sheet__handle {
    width: 48px; height: 5px;
    background: #CBD5E1;
    border-radius: 3px;
    margin-bottom: 12px;
  }
  .bottom-sheet__peek { padding: 0 24px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 4px; }
  .bottom-sheet__title { font-weight: 700; font-size: 16px; color: #0F172A;}
  .bottom-sheet__subtitle { font-size: 13px; color: #64748B; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 4px;}
  
  .bottom-sheet__content {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
    touch-action: pan-y;
  }
  
  .bottom-sheet__scroll { padding: 0 24px 24px; }
  
  .bottom-sheet__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }

  /* Compact Mobile Card */
  .premium-card {
    flex-direction: row;
    height: auto;
    padding: 12px;
    gap: 16px;
    border-radius: 20px;
    border: 1px solid #F1F5F9;
    box-shadow: none;
  }
  .premium-card__image-wrap {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 12px;
  }
  .premium-card__img { height: 100%; border-radius: 12px; }
  .premium-card__rating-badge { display: none; } /* Hide overlay rating */
  .premium-card__save-btn { display: none; }
  .premium-card__info { padding: 0; justify-content: center; }
  .premium-card__title { font-size: 15px; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;}
  .premium-card__meta { font-size: 13px; margin-bottom: 4px; }
  
  /* Inline rating for mobile */
  .m-inline-rating { font-size: 12px; font-weight: 600; color: #0F172A; display: flex; align-items: center; gap: 4px;}
  .m-inline-rating svg { width: 12px; height: 12px; color: #F59E0B; }
  .m-no-rating { font-size: 12px; color: #64748B; font-style: italic;}
  
  /* Make sure leaflet controls are above the collapsed bottom sheet AND the nav bar (90+65=155) */
  .leaflet-bottom { bottom: calc(155px + env(safe-area-inset-bottom)) !important; }
}

/* Autocomplete Premium */
.map-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0; right: 0;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 0 0 1px #E2E8F0;
  max-height: 340px;
  overflow-y: auto;
  z-index: 100;
}
.ac-item { padding: 14px 20px; display: flex; align-items: center; gap: 14px; cursor: pointer; border-bottom: 1px solid #F1F5F9; }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: #F8FAFC; }
.ac-item__icon { font-size: 20px; }
.ac-item__name { font-size: 15px; font-weight: 500; color: #0F172A; }
.ac-item__sub { font-size: 13px; color: #64748B; margin-top: 2px;}

/* Extra panels */

/* Premium Extra Filters */
.extra-filters-panel {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 24px;
  margin-top: 12px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 400px;
  overflow-y: auto;
}
.extra-filters-panel::-webkit-scrollbar { width: 6px; }
.extra-filters-panel::-webkit-scrollbar-track { background: transparent; }
.extra-filters-panel::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 10px; }
.extra-filters-panel::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.extra-filters__inner { display: flex; flex-direction: column; gap: 24px; }
.extra-filters__row { display: flex; flex-direction: column; gap: 12px; }
.filter-label { font-size: 15px; font-weight: 600; color: #0F172A; margin: 0; }

/* Premium Pills (Pets & Price) */
.premium-filter-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}
.premium-filter-pills--small { grid-template-columns: repeat(2, 1fr); }
.premium-pill { cursor: pointer; }
.premium-pill input { display: none; }
.premium-pill__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  color: #64748B;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-pill input:checked + .premium-pill__content {
  background: #EFF6FF;
  border-color: #2563EB;
  color: #1D4ED8;
  box-shadow: 0 0 0 1px #2563EB;
}
.premium-pill:hover .premium-pill__content { border-color: #CBD5E1; color: #0F172A; }

/* Premium Segmented Control (Size) */
.premium-segmented {
  display: flex;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 12px;
}
.premium-segmented__option { flex: 1; text-align: center; cursor: pointer; }
.premium-segmented__option input { display: none; }
.premium-segmented__option span {
  display: block;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  border-radius: 8px;
  transition: all 0.2s;
}
.premium-segmented__option input:checked + span {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

/* Actions */
.extra-filters__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid #F1F5F9;
}
.btn--secondary {
  background: transparent;
  border: 1px solid #E2E8F0;
  color: #0F172A;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn--secondary:hover { background: #F8FAFC; border-color: #CBD5E1; }
.btn--primary {
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn--primary:hover { background: #1D4ED8; }

/* ===== PREMIUM MAP PINS ===== */
.premium-pin {
  position: relative;
  width: 40px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}
.premium-pin:hover {
  transform: scale(1.1) translateY(-4px);
  z-index: 1000 !important;
}
.premium-pin.active {
  transform: scale(1.2) translateY(-6px);
  z-index: 1001 !important;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2));
}
.premium-pin__inner {
  width: 36px;
  height: 36px;
  background: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--pin-color, #3B82F6);
  color: var(--pin-color, #3B82F6);
  z-index: 2;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.premium-pin.active .premium-pin__inner {
  background: var(--pin-color, #3B82F6);
  color: #FFFFFF;
  border-color: #FFFFFF;
}
.premium-pin__tail {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid var(--pin-color, #3B82F6);
  z-index: 1;
}
.premium-pin.active .premium-pin__tail {
  border-top-color: #FFFFFF;
}

/* ===== CUSTOM SORT DROPDOWN ===== */
.custom-sort-dropdown {
  position: relative;
  display: inline-block;
}
.custom-sort-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #0F172A;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 44px; /* Same height as btn-more-filters */
  font-family: inherit;
}
.custom-sort-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}
.custom-sort-btn[aria-expanded="true"] {
  border-color: #94A3B8;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.custom-sort-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.04);
  border: 1px solid #E2E8F0;
  padding: 8px;
  margin: 0;
  list-style: none;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.custom-sort-list:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.custom-sort-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}
.custom-sort-list li:hover {
  background: #F1F5F9;
  color: #0F172A;
}
.custom-sort-list li[aria-selected="true"] {
  background: #EFF6FF;
  color: #2563EB;
}
.custom-sort-list li[aria-selected="true"] svg {
  color: #2563EB;
}
.custom-sort-list li svg {
  width: 18px;
  height: 18px;
  color: #64748B;
}

/* Toolbar adjustments */
.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px 16px;
}


/* Results header adjustment */
.sidebar-results-header {
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 16px;
}

.premium-pin.hovered {
  transform: scale(1.1) translateY(-4px);
  z-index: 1000 !important;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
}
.premium-pin.hovered .premium-pin__inner {
  border-color: var(--pin-color, #3B82F6);
  box-shadow: 0 0 0 2px rgba(255,255,255,1), 0 0 0 4px var(--pin-color, #3B82F6);
}

  .m-empty-card {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
    left: 16px;
    right: 16px;
    background: #fff;
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
  }
  .m-empty-card[hidden] {
    display: none !important;
  }
  .m-empty-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #F1F5F9;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .m-empty-card__content {
    flex: 1;
    min-width: 0;
  }
  .m-empty-card__title {
    margin: 0 0 2px 0;
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
  }
  .m-empty-card__sub {
    margin: 0;
    font-size: 13px;
    color: #64748B;
  }
  .m-empty-card__btn {
    background: #EEF5FF;
    color: #2563EB;
    border: none;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
  }
