a{
  text-decoration: none;
}

/* ============================================
   MAP PAGE STYLES - LUXURY DESIGN
   ============================================ */

/* ── Leaflet custom markers (pill + freccia) ── */
.map-marker-bubble {
  position: relative;
  display: inline-block;
  min-width: 58px;
  text-align: center;
  background: var(--color-ebony);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  border: 2px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
  will-change: transform;
}
/* Freccia verso il basso */
.map-marker-bubble::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid var(--color-ebony);
}
.map-marker-bubble:hover {
  background: var(--color-taupe);
  transform: scale(1.1);
  z-index: 9999;
}
.map-marker-bubble:hover::after {
  border-top-color: var(--color-taupe);
}

/* ── Leaflet popup ─────────────────────────── */
.map-popup {
  font-family: inherit;
  min-width: 180px;
}
.popup-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-ebony);
  margin-bottom: 4px;
}
.popup-address {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.popup-specs {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-taupe);
  margin-bottom: 8px;
}
.popup-link {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ebony);
  text-decoration: none;
  border-bottom: 1px solid var(--color-sand);
  padding-bottom: 1px;
}
.popup-link:hover {
  color: var(--color-taupe);
  border-color: var(--color-taupe);
}

/* CSS variable fallback for navbar height (overridden by JS) */
:root {
  --navbar-h: 70px;
}

/* Full-viewport layout pinned below the fixed navbar */
.map-page-layout {
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  z-index: 1;
  overflow: hidden;
}

/* Left panel: map fills 100% of layout height */
.map-panel {
  width: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--color-sand);
}

/* Right panel: flex column — filters sticky, results scroll */
.results-panel {
  width: 50%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-cream);
}

/* Sticky filters block at top of results panel */
.filters-panel-sticky {
  flex-shrink: 0;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-sand);
  padding: 1.25rem 1.5rem;
  z-index: 10;
}

/* Scrollable area for count/sort header + cards + pagination */
.results-scroll-area {
  flex: 1;
  overflow-y: auto;
}

.filters-main-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  align-items: flex-end;
}

/* Location expands to fill space */
.filters-main-row .filter-group-inline:first-child {
  flex: 1;
  min-width: 0;
}

.filters-advanced-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding-top 0.4s ease, margin-top 0.4s ease;
}

.filters-advanced-row.active {
  max-height: 600px;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--color-sand);
}

.filter-group-inline {
  display: flex;
  flex-direction: column;
}

.filter-label-inline {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-taupe);
  white-space: nowrap;
}

.filter-input-inline,
select.filter-input-inline,
#id_beds,
#id_baths,
#id_type {
  height: 2.625rem;
  padding: 0 0.875rem;
  border: 1px solid var(--color-sand);
  border-radius: 0.375rem;
  background: white;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  min-width: 80px;
}

.filter-input-inline:focus,
select.filter-input-inline:focus,
#id_beds:focus,
#id_baths:focus,
#id_type:focus {
  outline: none;
  border-color: var(--color-taupe);
  box-shadow: 0 0 0 3px rgba(140, 115, 85, 0.1);
}

.btn-search-inline {
  height: 2.625rem;
  padding: 0 1.5rem;
  background: var(--color-ebony);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-search-inline:hover {
  background: var(--color-taupe);
  transform: translateY(-2px);
}

.btn-advanced-toggle {
  height: 2.625rem;
  padding: 0 1.25rem;
  background: transparent;
  color: var(--color-taupe);
  border: 1px solid var(--color-sand);
  border-radius: 0.375rem;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-advanced-toggle:hover {
  background: var(--color-sand);
  border-color: var(--color-taupe);
}

.btn-reset-inline {
  padding: 0.625rem 1.25rem;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-sand);
  border-radius: 0.375rem;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  align-self: flex-end;
}

.btn-reset-inline:hover {
  background: var(--color-sand);
  color: var(--color-ebony);
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 0;
}

.checkbox-inline input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--color-sand);
  border-radius: 0.25rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: white;
  transition: all 0.3s ease;
  position: relative;
}

.checkbox-inline input[type="checkbox"]:checked {
  background: var(--color-taupe);
  border-color: var(--color-taupe);
}

.checkbox-inline input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.checkbox-inline span {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-ebony);
}

/* ── Advanced filter sections (rows within the collapsible area) ─ */
.filter-adv-section {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: flex-end;
  width: 100%;
}

.filter-adv-section + .filter-adv-section {
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px dashed var(--color-sand);
}

/* Group of pills side by side */
.filter-pill-group {
  display: flex;
  gap: 0.375rem;
}

/* ── FOR SALE / FOR RENT deal-type buttons ─────────────────── */
.filter-deal-btn {
  padding: 0.45rem 0.875rem;
  border: 1px solid var(--color-sand);
  border-radius: 2rem;
  background: white;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ebony);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}

.filter-deal-btn:hover {
  border-color: var(--color-taupe);
  background: var(--color-cream);
}

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

/* ── Checkbox-based toggle pills (Our Listings, Pool, WF) ───── */
.filter-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.875rem;
  border: 1px solid var(--color-sand);
  border-radius: 2rem;
  background: white;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ebony);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
  align-self: flex-end;
  line-height: 1;
  margin-bottom: 0;
}

.filter-toggle-pill input[type="checkbox"] {
  display: none;
}

.filter-toggle-pill:has(input:checked) {
  background: var(--color-ebony);
  border-color: var(--color-ebony);
  color: white;
}

.filter-toggle-pill:hover:not(:has(input:checked)) {
  border-color: var(--color-taupe);
  background: var(--color-cream);
}


/* Leaflet map fills the map panel */
#map {
  width: 100%;
  height: 100%;
}

/* Results count/sort bar — sticky within .results-scroll-area */
.results-header-sticky {
  background: var(--color-cream);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-sand);
  position: sticky;
  top: 0;
  z-index: 5;
}

.results-count-text {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
}

.sort-dropdown-compact {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-sand);
  border-radius: 0.375rem;
  background: white;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sort-dropdown-compact:focus {
  outline: none;
  border-color: var(--color-taupe);
}

/* Results use home-card-minimal.html - no custom styles needed */

/* Pagination Compact */
.pagination-compact {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
  padding: 1.5rem 1rem;
  flex-wrap: wrap;
}

.page-link-compact {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-sand);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-ebony);
  transition: all 0.3s ease;
  text-decoration: none;
}

.page-link-compact:hover,
.page-link-compact.active {
  background: var(--color-taupe);
  color: white;
  border-color: var(--color-taupe);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .map-page-layout {
    flex-direction: column;
    position: static;
    height: auto;
    overflow: visible;
    margin-top: var(--navbar-h);
  }

  .map-panel {
    width: 100%;
    height: 50vh;
    min-height: 300px;
    flex-shrink: 0;
  }

  .results-panel {
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .results-scroll-area {
    overflow-y: visible;
  }

  .filters-panel-sticky {
    padding: 1rem;
  }

  .filters-main-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group-inline {
    min-width: 100%;
  }

  .btn-search-inline,
  .btn-advanced-toggle,
  .btn-reset-inline {
    width: 100%;
  }
}

/* ── Favorite Button (card overlay) ─────────────────────────── */
.card-image-wrapper {
  position: relative;
}

.btn-favorite {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  line-height: 1;
}

.btn-favorite:hover {
  background: white;
  transform: scale(1.12);
}

.btn-favorite.is-favorited {
  color: #c0392b;
}

/* ── Favorite Button (detail page) ──────────────────────────── */
.btn-favorite-detail {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--color-taupe, #8e7f6e);
  color: var(--color-taupe, #8e7f6e);
  padding: 0.4rem 0.9rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
}

.btn-favorite-detail:hover,
.btn-favorite-detail.is-favorited {
  background: var(--color-taupe, #8e7f6e);
  color: white;
}

.btn-favorite-detail .fav-icon {
  font-size: 0.95rem;
}

/* ── Dashboard Layout ────────────────────────────────────────── */
.dashboard-wrapper {
  padding-top: var(--navbar-h, 80px);
  min-height: 100vh;
}

.dashboard-subnav {
  background: var(--color-ebony, #1a1a1a);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: var(--navbar-h, 70px);
  z-index: 900;
}

.dashboard-subnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0;
}

.dashboard-subnav-link {
  display: inline-block;
  padding: 1rem 1.5rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.dashboard-subnav-link:hover {
  color: rgba(255,255,255,0.9);
}

.dashboard-subnav-link.active {
  color: white;
  border-bottom-color: var(--color-taupe, #8e7f6e);
}

.dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.dashboard-card {
  background: #faf9f7;
  border: 1px solid var(--color-sand, #e8e0d5);
  padding: 2rem;
  border-radius: 2px;
}

.dashboard-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-taupe, #8e7f6e);
}

.dashboard-link-more {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-taupe, #8e7f6e);
  text-decoration: none;
  border-bottom: 1px solid var(--color-taupe, #8e7f6e);
  padding-bottom: 1px;
}

.dashboard-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  border: 1px dashed var(--color-sand, #e8e0d5);
}

.section-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-ebony, #1a1a1a);
}

/* ── Toast Alerts (fixed, auto-dismiss) ─────────────────────── */
.toast-alerts-container {
  position: fixed;
  top: calc(var(--navbar-h, 70px) + 1rem);
  right: 1.25rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
  width: calc(100vw - 2.5rem);
}

.alert-toast {
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ── Auth Pages (login / signup / logout) ────────────────────── */
.auth-page-wrapper {
  /*min-height: 100vh;*/
  padding-top: calc(var(--navbar-h, 70px) + 4rem);
  padding-bottom: 4rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.auth-box {
  width: 100%;
  max-width: 460px;
  padding: 2.5rem 2rem;
}

.auth-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--color-ebony, #1a1a1a);
}

.auth-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted, #888);
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

.auth-subtitle a {
  color: var(--color-taupe, #8e7f6e);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* btn-cta-luxury as block in auth context */
.auth-box .btn-cta-luxury {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 1.25rem;
}

/* secondary link button */
.auth-box .dashboard-link-more {
  display: inline-block;
  margin-top: 0.75rem;
}
