/* Properties Catalog & Interactive Map Split Layout */

.re-split-container {
  display: flex;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.re-cards-column {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}
.re-map-column {
  flex: 1.1;
  position: relative;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.re-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.re-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}
.re-card.is-highlighted {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #2563eb;
}
.mapboxgl-popup-content {
  border-radius: 12px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid #e2e8f0;
  width: 250px;
}
.mapboxgl-popup-close-button {
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  top: 6px;
  right: 6px;
  z-index: 10;
}
.price-marker {
  background: #ffffff;
  border: 2px solid #2563eb;
  color: #1e293b;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease;
}
.price-marker:hover,
.price-marker.is-active {
  background: #2563eb;
  color: #ffffff;
  transform: scale(1.15);
  z-index: 10;
}
.price-marker.deal-sale {
  border-color: #16a34a;
}
.price-marker.deal-sale:hover {
  background: #16a34a;
}
.price-marker.deal-daily {
  border-color: #d97706;
}
.price-marker.deal-daily:hover {
  background: #d97706;
}
.map-hover-pin {
  width: 24px;
  height: 24px;
  pointer-events: none;
  position: relative;
}
.map-hover-pin-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background: #2563eb;
  border: 2px solid #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 2;
}
.map-hover-pin-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  border: 3px solid #2563eb;
  background: rgba(37, 99, 235, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: mapHoverPulse 1.4s infinite ease-out;
  z-index: 1;
}
@keyframes mapHoverPulse {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* Zero double-scrolling desktop styles when map is visible */
@media (min-width: 901px) {
  html.re-split-active,
  body.re-split-active {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
  }
  body.re-split-active > footer.footer {
    display: none !important;
  }
  body.re-split-active main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body.re-split-active .re-page-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0 !important;
  }
  body.re-split-active .re-filter-toolbar {
    flex-shrink: 0;
  }
  body.re-split-active .re-split-container {
    flex: 1;
    min-height: 0;
    height: 100%;
    margin-bottom: 0;
  }
  body.re-split-active .re-cards-column {
    height: 100%;
    overflow-y: auto;
  }
  body.re-split-active .re-map-column {
    height: 100%;
  }
}

/* Grid Mode (when map is hidden) */
.re-split-container.is-grid-mode {
  display: block !important;
  height: auto !important;
  min-height: auto !important;
  overflow: visible !important;
}
.is-grid-mode .re-map-column {
  display: none !important;
}
.is-grid-mode .re-cards-column {
  overflow: visible !important;
  height: auto !important;
  padding-right: 0 !important;
  max-width: 100% !important;
}
.is-grid-mode .re-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)) !important;
  gap: 1rem !important;
  margin: 0 !important;
}
.is-grid-mode .re-card-col {
  width: 100% !important;
  padding: 0 !important;
}
.is-grid-mode .re-inner-footer {
  display: none !important;
}

@media (max-width: 900px) {
  .re-split-container {
    display: block;
    height: auto;
  }
  .re-map-column {
    height: 380px;
    margin-bottom: 1.5rem;
    position: relative;
    top: 0;
  }
  .mobile-view-map .re-cards-column {
    display: none;
  }
  .mobile-view-map .re-map-column {
    display: block;
    height: calc(100vh - 210px);
  }
  .mobile-view-list .re-map-column {
    display: none;
  }
  .mobile-view-list .re-cards-column {
    display: block;
  }
}
.floating-toggle-btn {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  border-radius: 9999px;
}

/* Hybrid Advanced Filters Panel */
.re-advanced-filters-panel {
  display: none;
}
.re-filter-chevron {
  transition: transform 0.2s ease;
  display: inline-block;
}
.re-toggle-pill {
  user-select: none;
  cursor: pointer;
}

/* Desktop: Collapsible inline drawer */
@media (min-width: 901px) {
  .re-advanced-filters-panel.is-open {
    display: block;
    margin-top: 0.65rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    animation: filterDrawerOpen 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .re-advanced-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .re-filter-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
}

/* Mobile: Native-like bottom sheet modal */
@media (max-width: 900px) {
  .re-advanced-filters-panel {
    display: none !important;
  }
  .re-advanced-filters-panel.is-mobile-open {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 1040 !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }
  .re-advanced-filters-inner {
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.2);
    animation: sheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .re-advanced-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
  }
  .re-advanced-filters-body {
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  .re-filter-group-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
  .re-advanced-filters-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    gap: 0.75rem;
  }
}

@keyframes filterDrawerOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
