/* Properties Catalog & Interactive Map Split Layout */

.re-split-container {
  display: flex;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.re-cards-column {
  flex: 0 0 38%;
  max-width: 38%;
  overflow-y: auto;
  padding-right: 0.5rem;
}
.re-map-column {
  flex: 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 .re-card-media {
  height: 145px;
}
.re-card .re-card-body {
  padding: 0.5rem 0.65rem;
}
.re-card .re-card-title {
  font-size: 0.85rem;
  line-height: 1.25;
}
.re-card .re-card-specs {
  font-size: 0.75rem;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.re-card .re-card-badges {
  font-size: 0.68rem;
  margin-bottom: 0.35rem;
}
.re-card .re-card-footer {
  padding-top: 0.35rem;
  font-size: 0.7rem;
}
.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;
}
.re-card.is-viewed {
  opacity: 0.82;
  background: #f8fafc;
}
.re-card.is-viewed .re-card-title a {
  color: #64748b !important;
}
.re-card.is-viewed:hover {
  opacity: 1;
}
.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); }
}

/* Responsive Property Show Layout */
@media (min-width: 769px) {
  .property-show-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas:
      "gallery sidebar"
      "desc    sidebar";
    gap: 1.5rem;
    align-items: start;
  }
  .property-show-gallery {
    grid-area: gallery;
  }
  .property-show-desc {
    grid-area: desc;
  }
  .property-show-sidebar {
    grid-area: sidebar;
  }
}

@media (max-width: 768px) {
  .property-show-grid {
    display: flex;
    flex-direction: column;
  }
  .property-show-gallery {
    order: 1;
  }
  .property-show-sidebar {
    order: 2;
  }
  .property-show-desc {
    order: 3;
  }
  .property-thumbnails-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding-bottom: 6px;
    margin-top: 0.5rem !important;
  }
  .property-thumbnails-row .column {
    flex: 0 0 68px !important;
    width: 68px !important;
    padding: 0 !important;
  }
}

/* Favorites System & Guest Toast */
.favorite-toggle-btn {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  z-index: 5;
}

.favorite-toggle-btn:hover {
  transform: scale(1.1);
  background: rgba(15, 23, 42, 0.85);
}

.favorite-toggle-btn.is-favorited {
  background: #ffffff !important;
  color: #ef4444 !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.favorite-show-btn.is-favorited {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #ef4444 !important;
}

@keyframes heartBounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  65% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.heart-bounce {
  animation: heartBounce 0.35s ease-in-out;
}

.favorites-guest-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideUpToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 420px;
  border: 1px solid #334155;
}

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

@media (max-width: 768px) {
  .favorites-guest-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

.fav-map-price-marker {
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid #2563eb;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 9999px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.fav-map-price-marker:hover, .fav-map-price-marker.is-active {
  background: #2563eb;
  color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
  z-index: 100;
}

.card-highlight-pulse {
  animation: pulseHighlight 2s ease-out;
}

@keyframes pulseHighlight {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); border-color: #2563eb; }
  50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); border-color: #2563eb; }
  100% { box-shadow: none; }
}


