/* ============================================================
   BR Propiedades — Listing Page CSS
   Med Toledo Agency 2026
   Complementa property.css (tokens y base ya están ahí)
   ============================================================ */

/* ── Reveal animation ────────────────────────────────── */
.br-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.br-reveal.br-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   NAVBAR — sobreescribir para la página de listado
   (ya existe en property.css, esto solo añade lo necesario)
   ═══════════════════════════════════════════════════════ */
.br-listing-page .br-navbar {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.br-listing-page .br-navbar.br-nav-scrolled {
  background: var(--c-dark);
  border-bottom-color: transparent;
  box-shadow: 0 2px 20px rgba(0,0,0,0.35);
}


/* ═══════════════════════════════════════════════════════
   1. HERO
   ═══════════════════════════════════════════════════════ */
.br-listing-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.br-listing-hero-bg {
  position: absolute;
  inset: 0;
}
.br-listing-hero-bg--dark {
  background: var(--c-dark);
}
.br-listing-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  transition: transform 8s ease;
}
.br-listing-hero:hover .br-listing-hero-bg img {
  transform: scale(1.0);
}
.br-listing-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20,17,12,0.50) 0%,
    rgba(20,17,12,0.65) 50%,
    rgba(20,17,12,0.78) 100%
  );
}

.br-listing-hero-content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: 80px;
}

.br-listing-hero-title {
  font-family: var(--f-serif);
  font-size: clamp(52px, 8vw, 110px);
  font-weight: 300;
  color: var(--c-white);
  line-height: 1.0;
  margin-bottom: 48px;
  letter-spacing: -0.01em;
}
.br-listing-hero-title em {
  font-style: italic;
  color: var(--c-gold-light);
}


/* ═══════════════════════════════════════════════════════
   BUSCADOR (Inmuebles24-style)
   ═══════════════════════════════════════════════════════ */
.br-searchbox {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0,0,0,0.32);
  max-width: 1060px;
  width: 100%;
}

/* Tabs Renta / Comprar */
.br-search-tabs {
  display: flex;
  padding: 0 0 0 0;
  background: var(--c-dark);
}
.br-stab {
  padding: 14px 28px;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  text-transform: uppercase;
}
.br-stab:hover {
  color: rgba(255,255,255,0.85);
}
.br-stab--active {
  color: var(--c-gold-light);
  border-bottom-color: var(--c-gold);
}

/* Campos */
.br-search-fields {
  display: flex;
  align-items: stretch;
}

.br-sfield {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 28px;
  flex: 1;
}
.br-sfield--sep {
  border-left: 1px solid #E8E4DE;
}
.br-sfield--btn {
  flex: 0 0 auto;
  padding: 0;
}
.br-sfield--tipo {
  min-width: 200px;
  flex: 0 0 240px;
}

.br-sfield-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-mid);
  margin-bottom: 4px;
  display: block;
}
.br-sfield-input {
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--c-dark);
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}
.br-sfield--tipo .br-sfield-input {
  cursor: pointer;
}
.br-sfield-input::placeholder {
  color: var(--c-mid);
}

.br-search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 40px;
  height: 100%;
  min-height: 76px;
  background: var(--c-gold);
  color: #fff;
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.br-search-btn:hover {
  background: var(--c-dark);
}


/* ═══════════════════════════════════════════════════════
   2. CATEGORÍAS
   ═══════════════════════════════════════════════════════ */
.br-listing-cats {
  background: var(--c-bg);
  padding-block: var(--sp-xl);
}

.br-cats-header {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.br-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.br-cat-card {
  position: relative;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4/3;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.br-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.18);
}

.br-cat-img {
  position: absolute;
  inset: 0;
}
.br-cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.br-cat-card:hover .br-cat-img img {
  transform: scale(1.06);
}
.br-cat-img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--c-bg-alt);
}
.br-cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,17,12,0.82) 0%, rgba(20,17,12,0.1) 60%);
}

.br-cat-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px 16px;
  z-index: 2;
}
.br-cat-name {
  display: block;
  font-family: var(--f-sans);
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.02em;
}
.br-cat-count {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-top: 3px;
}


/* ═══════════════════════════════════════════════════════
   3. GRID DE PROPIEDADES
   ═══════════════════════════════════════════════════════ */
.br-listing-props {
  background: var(--c-bg-alt);
  padding-block: var(--sp-xl);
}

.br-props-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 56px);
  flex-wrap: wrap;
}
.br-props-count {
  font-size: var(--t-small);
  color: var(--c-mid);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Filtros activos */
.br-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
}
.br-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--c-dark);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 2px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.br-filter-tag:hover { opacity: 0.75; }
.br-filter-tag span { font-size: 14px; line-height: 1; }
.br-filter-clear {
  font-size: 12px;
  color: var(--c-mid);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 4px;
}
.br-filter-clear:hover { color: var(--c-dark); }

/* Grid de cards */
.br-prop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ─── CARD ─────────────────────────────────────────── */
.br-prop-card {
  background: var(--c-white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
  display: flex;
  flex-direction: column;
}
.br-prop-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.14);
  transform: translateY(-3px);
}

/* Slider de fotos */
.br-card-slider {
  position: relative;
  overflow: hidden;
  height: 220px;
  flex-shrink: 0;
}
.br-card-slides {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94);
}
.br-card-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
}
.br-card-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.br-card-slide--placeholder {
  background: var(--c-bg-alt);
}

/* Flechas del slider */
.br-card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.88);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, background 0.2s;
  z-index: 3;
  color: var(--c-dark);
}
.br-prop-card:hover .br-card-arrow {
  opacity: 1;
}
.br-card-prev { left: 10px; }
.br-card-next { right: 10px; }
.br-card-arrow:hover { background: #fff; }

/* Contador */
.br-card-counter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 10px;
  z-index: 3;
  letter-spacing: 0.06em;
}

/* Badges sobre la imagen */
.br-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  z-index: 3;
}
.br-card-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
}
.br-card-badge--op {
  background: var(--c-gold);
  color: #fff;
}
.br-card-badge--tipo {
  background: rgba(26,24,20,0.7);
  color: rgba(255,255,255,0.9);
}

/* Cuerpo de la card */
.br-card-body {
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.br-card-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--c-mid);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.br-card-location svg { flex-shrink: 0; color: var(--c-gold); }

.br-card-title {
  font-family: var(--f-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--c-dark);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.br-card-price {
  font-family: var(--f-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--c-dark);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.br-card-price-detail {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--c-mid);
  margin-left: 4px;
}

.br-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.br-card-spec {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--c-mid);
}
.br-card-spec svg { flex-shrink: 0; color: var(--c-gold); }

.br-card-desc {
  font-size: 13px;
  color: var(--c-mid);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.br-card-cta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-top: auto;
  transition: color 0.2s;
}
.br-prop-card:hover .br-card-cta {
  color: var(--c-dark);
}

/* Sin resultados */
.br-no-results {
  text-align: center;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.br-no-results svg { opacity: 0.6; }
.br-no-results h3 {
  font-family: var(--f-serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--c-dark);
}
.br-no-results p {
  color: var(--c-mid);
  font-size: var(--t-body);
  max-width: 360px;
}
.br-no-results-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  background: var(--c-gold);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.2s;
}
.br-no-results-btn:hover { background: var(--c-dark); }

/* Paginación */
.br-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--c-light);
}
.br-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-dark);
  border: 1px solid var(--c-light);
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.br-pagination .page-numbers:hover,
.br-pagination .page-numbers.current {
  background: var(--c-gold);
  color: #fff;
  border-color: var(--c-gold);
}
.br-pagination .page-numbers.prev,
.br-pagination .page-numbers.next {
  letter-spacing: 0.04em;
  font-size: 13px;
}


/* ═══════════════════════════════════════════════════════
   4. AGENTES
   ═══════════════════════════════════════════════════════ */
.br-listing-agents {
  background: var(--c-bg);
  padding-block: var(--sp-xl);
}

.br-agents-header {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.br-agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 32px 24px;
}

.br-agent-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.br-agent-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--c-gold);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.br-agent-item:hover .br-agent-photo {
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.br-agent-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.br-agent-photo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--c-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-mid);
}

.br-agent-name {
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--c-dark);
}
.br-agent-cargo {
  font-size: 12px;
  color: var(--c-gold);
  letter-spacing: 0.08em;
  font-weight: 500;
  text-transform: uppercase;
}

.br-agent-contacts {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 2px;
}
.br-agent-contact-link {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-light);
  border-radius: 50%;
  color: var(--c-mid);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.br-agent-contact-link:hover {
  background: var(--c-gold);
  color: #fff;
  border-color: var(--c-gold);
}


/* ═══════════════════════════════════════════════════════
   5. PARALLAX + CONTACTO
   ═══════════════════════════════════════════════════════ */
.br-listing-cta {
  position: relative;
  padding-block: var(--sp-xl);
  background: var(--c-dark);
  overflow: hidden;
}

.br-cta-parallax-bg {
  position: absolute;
  inset: 0;
  background-image: var(--parallax-img);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
@media (max-width: 900px) {
  .br-cta-parallax-bg { background-attachment: scroll; }
}

.br-cta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,17,12,0.80);
  z-index: 1;
}

.br-cta-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}

.br-cta-text { }

.br-cta-form { }
.br-cta-form iframe {
  display: block;
}
.br-cta-form-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 32px;
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 12px;
}
.br-cta-form-placeholder p {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  text-align: center;
}


/* ═══════════════════════════════════════════════════════
   6. SEO ANTE-FOOTER
   ═══════════════════════════════════════════════════════ */
.br-listing-seo {
  background: var(--c-bg);
  padding-block: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--c-light);
}

.br-seo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

.br-seo-heading {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-dark);
  margin-bottom: 20px;
}

.br-seo-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.br-seo-col ul li a {
  font-size: 13px;
  color: var(--c-mid);
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1.4;
}
.br-seo-col ul li a:hover {
  color: var(--c-gold);
}

.br-seo-about {
  margin-top: 20px;
  font-size: 12px;
  color: var(--c-mid);
  line-height: 1.6;
}


/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
  .br-prop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .br-seo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .br-cta-inner {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {

  /* Hero */
  .br-listing-hero-title {
    font-size: clamp(44px, 12vw, 64px);
  }

  /* Buscador */
  .br-searchbox {
    max-width: 100%;
  }
  .br-search-fields {
    flex-direction: column;
  }
  .br-sfield {
    padding: 12px 16px;
    border-left: none !important;
    border-top: 1px solid #E8E4DE;
  }
  .br-sfield:first-child { border-top: none; }
  .br-sfield--btn {
    padding: 0;
  }
  .br-search-btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    border-radius: 0;
  }
  .br-sfield--tipo {
    flex: 0 0 auto;
    min-width: unset;
  }

  /* Categorías */
  .br-cats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Grid propiedades */
  .br-prop-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .br-card-slider {
    height: 200px;
  }

  /* Agentes */
  .br-agents-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 16px;
  }
  .br-agent-photo {
    width: 100px;
    height: 100px;
  }

  /* CTA */
  .br-cta-inner {
    gap: 40px;
  }

  /* SEO */
  .br-seo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* Paginación */
  .br-pagination {
    gap: 6px;
  }
  .br-pagination .page-numbers {
    min-width: 38px;
    height: 38px;
    font-size: 13px;
  }
}

/* ── Small mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .br-cats-grid {
    grid-template-columns: 1fr;
  }
  .br-agents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .br-seo-grid {
    grid-template-columns: 1fr;
  }
  .br-props-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
