/* Listado y ficha */

.nav__links a.nav__active { color: var(--text); }

.property-card--link .property-card__link-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.property-card--link .property-card__link-wrap:hover {
  text-decoration: none;
}

.property-card--link .property-card__link {
  display: none;
}

/* --- Listado layout --- */

.listing-page {
  padding: calc(var(--nav-h) + 2rem) clamp(1.25rem, 4vw, 3rem) 4rem;
  max-width: 1280px;
  margin: 0 auto;
}

.listing-head {
  margin-bottom: 2rem;
}

.listing-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.listing-head p { color: var(--text-muted); margin: 0; }

.listing-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .listing-layout {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }
}

.filters-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.filters-panel h2 {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.filters-panel label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.filters-panel select,
.filters-panel input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg-elevated, #0e141c);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filters-panel select:focus,
.filters-panel input:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.filter-tab {
  flex: 1;
  padding: 0.5rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.filter-tab.is-active {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
}

.filters-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-filter {
  width: 100%;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-filter--primary {
  background: var(--accent);
  color: var(--bg-deep);
}

.btn-filter--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-align: center;
  text-decoration: none;
}

.listing-results__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.listing-count strong { color: var(--text); }

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 999px;
}

.listing-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
  .listing-grid { grid-template-columns: repeat(3, 1fr); }
}

.listing-empty {
  grid-column: 1 / -1;
  padding: 3rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination .is-current {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
}

/* --- Ficha --- */

.detail-page {
  padding: calc(var(--nav-h) + 1.5rem) clamp(1.25rem, 4vw, 3rem) 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.detail-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

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

.detail-hero {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .detail-hero { grid-template-columns: 1.2fr 1fr; }
}

.detail-gallery {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.detail-gallery__main {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
  display: block;
}

.detail-gallery__main--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: linear-gradient(145deg, #1a3a52, #0d1f2d);
}

.detail-gallery__thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
}

.detail-gallery__thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.detail-gallery__thumb.is-active {
  border-color: var(--accent);
}

.detail-summary h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.detail-price {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 1rem;
  color: var(--accent);
}

.detail-location {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.detail-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.detail-agent {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.detail-agent h3 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.detail-agent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.detail-body {
  margin-top: 2rem;
}

.detail-body h2 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: var(--accent);
}

.detail-body p {
  color: var(--text-muted);
  line-height: 1.7;
}

.amenities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.amenities-list li {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.detail-facts {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin-top: 2rem;
}

.detail-fact {
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.detail-fact span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.detail-fact strong {
  font-size: 1rem;
}

:root {
  --bg-elevated: #0e141c;
}

/* Flash */

.site-flash {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}

.site-flash p { margin: 0; }

.site-flash--success {
  background: rgba(62, 232, 176, 0.12);
  color: var(--accent);
  border-bottom: 1px solid rgba(62, 232, 176, 0.25);
}

.site-flash--error {
  background: rgba(240, 180, 41, 0.12);
  color: #f0b429;
  border-bottom: 1px solid rgba(240, 180, 41, 0.35);
}

/* Inquiry form */

.section--contact .section__inner {
  max-width: 560px;
}

.inquiry-form-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.inquiry-form-block h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.inquiry-form-block .muted { margin: 0 0 1.25rem; font-size: 0.9rem; }

.inquiry-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.inquiry-form input,
.inquiry-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.inquiry-form__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .inquiry-form__grid { grid-template-columns: 1fr 1fr; }
  .inquiry-form__grid label:last-child { grid-column: 1 / -1; }
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.contact-alt {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
}

/* Map */

.listing-map-section {
  margin-bottom: 2rem;
}

.listing-map-section__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.listing-map-section__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.listing-map-section__head .muted { font-weight: 400; color: var(--text-muted); }

.map-canvas {
  height: 360px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  z-index: 0;
}

.map-canvas--full {
  height: min(70vh, 640px);
}

.map-canvas--mini {
  height: 240px;
}

.map-page .listing-head { margin-bottom: 1rem; }

.map-legend {
  display: flex;
  gap: 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.map-marker-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.map-marker-dot--sale { background: var(--accent); }
.map-marker-dot--rent { background: var(--accent-warm); }

.map-marker {
  background: transparent !important;
  border: none !important;
}

.map-marker--pin .map-pin-svg {
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
}

.map-marker-dot--sale { background: var(--color-sale); }
.map-marker-dot--rent { background: var(--color-rent); }

/* Map hero (landing, debajo del nav) */

.map-hero {
  position: relative;
  margin-top: var(--nav-h);
  background: var(--bg-deep);
}

.map-hero__chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.map-hero__chrome > * {
  pointer-events: auto;
}

.map-hero__title-bar {
  max-width: 520px;
}

.map-hero__badge {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.map-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 400;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.map-hero__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.map-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(14, 20, 28, 0.82);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.map-filter-btn:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

.map-filter-btn.is-pressed {
  transform: scale(1.02);
  border-color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.map-filter-btn--sale.is-pressed {
  background: color-mix(in srgb, var(--color-sale) 35%, rgba(14, 20, 28, 0.9));
  color: #1a1400;
}

.map-filter-btn--rent.is-pressed {
  background: color-mix(in srgb, var(--color-rent) 40%, rgba(14, 20, 28, 0.9));
  color: #fff;
}

.map-filter-btn__pin {
  width: 10px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.map-filter-btn__pin--sale {
  background: var(--color-sale);
}

.map-filter-btn__pin--rent {
  background: var(--color-rent);
}

.map-hero__count {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  background: rgba(14, 20, 28, 0.65);
  border-radius: 8px;
}

.map-canvas--map-hero {
  width: 100%;
  height: min(58vh, 560px);
  min-height: 320px;
  border: none;
  border-radius: 0;
}

.map-hero-fallback {
  margin-top: var(--nav-h);
  margin-bottom: 2rem;
}

/* Propiedad seleccionada (mapa) — grande */

.property-selected {
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2rem;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-elevated, #0e141c) 100%);
}

.property-selected__label {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.property-selected__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.selected-panel {
  display: grid;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  .selected-panel {
    grid-template-columns: 1.15fr 1fr;
    min-height: 320px;
  }
}

.selected-panel__visual {
  min-height: 220px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .selected-panel__visual {
    min-height: 100%;
  }
}

.selected-panel__visual img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.selected-panel__placeholder {
  color: var(--text-muted);
  padding: 2rem;
  text-align: center;
}

.selected-panel__body {
  padding: 1.5rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.selected-panel__badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.selected-panel__badge {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 999px;
}

.selected-panel__badge--sale {
  background: var(--color-sale);
  color: #1a1400;
}

.selected-panel__badge--rent {
  background: var(--color-rent);
  color: #fff;
}

.selected-panel__type {
  font-size: 0.85rem;
  color: var(--text-muted);
  align-self: center;
}

.selected-panel__price {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.5rem;
  color: var(--accent);
  line-height: 1.1;
}

.selected-panel__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  line-height: 1.3;
}

.selected-panel__location,
.selected-panel__meta {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.selected-panel__cta {
  margin-top: 1rem;
  text-align: center;
  text-decoration: none;
  align-self: flex-start;
}

.property-selected.is-highlight .selected-panel {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}

/* Carrusel destacadas */

.section--featured {
  padding-top: 2rem;
}

.spotlight--carousel {
  max-width: 900px;
  margin: 0 auto;
}

.hero-intro__inner {
  max-width: 900px;
}

.hero-intro__lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.search-panel--compact {
  margin-bottom: 1.5rem;
}

.stats--inline {
  margin-top: 0;
}

.spotlight {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 100%;
}

.spotlight__visual {
  aspect-ratio: 16/10;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.spotlight__placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spotlight__body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.spotlight__badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.spotlight__badge {
  padding: 0.3rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 999px;
}

.spotlight__badge--sale {
  background: var(--color-sale);
  color: #1a1400;
}

.spotlight__badge--rent {
  background: var(--color-rent);
  color: #fff;
}

.spotlight__type {
  font-size: 0.75rem;
  color: var(--text-muted);
  align-self: center;
}

.spotlight__price {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 0.35rem;
  color: var(--accent);
}

.spotlight__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  line-height: 1.35;
}

.spotlight__location,
.spotlight__meta {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.spotlight__cta {
  margin-top: auto;
  margin-bottom: 1rem;
  text-align: center;
  text-decoration: none;
}

.spotlight__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.spotlight__arrow {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
}

.spotlight__dots {
  display: flex;
  gap: 0.35rem;
  flex: 1;
  justify-content: center;
}

.spotlight__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
}

.spotlight__dots button.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

.spotlight__hint {
  margin: 0;
  font-size: 0.8rem;
  text-align: center;
}

.hero-showcase__footer-link {
  text-align: center;
  margin: 1.25rem 0 0;
}

.filters-actions--top {
  position: sticky;
  top: calc(var(--nav-h) + 0.5rem);
  z-index: 5;
  background: var(--bg-card);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.footer__credit {
  width: 100%;
  text-align: center;
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer__credit a {
  color: var(--text-muted);
  text-decoration: underline;
}

.footer__inner {
  flex-direction: column;
  text-align: center;
}

.leaflet-popup-content {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0.65rem 0.85rem;
}

.leaflet-popup-content a { color: var(--accent); }

.map-popup-price {
  font-weight: 600;
  color: var(--text);
}
