/* =========================
   Filtros — Estilo minimal
   ========================= */
:root{
  --ui-text: #1a1a1a;
  --ui-muted: #555;
  --ui-border: #111;   /* negro para líneas/contornos */
  --ui-bg: #fff;
}

/* Contenedor de los filtros */
.filtros-wrap{
  align-items: flex-start;
}

/* Título de cada filtro */
.filter-label{
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  color: var(--ui-text);
  margin-bottom: 10px;
  text-align: left;
}

/* =========================
   Select subrayado + chevron
   ========================= */
.select-underline{
  position: relative;
}
.select-underline select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--ui-border);
  padding: 8px 28px 8px 0;
  background: transparent;
  color: var(--ui-muted);
  font-size: 18px;
  line-height: 1.2;
  outline: none;
}
.select-underline::after{
  content: "";
  position: absolute;
  right: 2px;
  top: calc(50% + 2px);
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--ui-border);
  border-bottom: 2px solid var(--ui-border);
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

/* =========================
   Chips cuadrados (Dorms/Baños)
   ========================= */
.chips{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.chips .chip{
  border: 1px solid var(--ui-border);
  background: var(--ui-bg);
  color: var(--ui-text);
  padding: 10px 14px;
  min-width: 54px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  border-radius: 0px;       /* cuadrado con radio leve */
  cursor: pointer;
  user-select: none;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.chips .chip:hover{
  transform: translateY(-1px);
}
.chips .chip.active{
  background: var(--ui-border);
  color: #fff;
}

/* =========================
   Slider doble — estilo negro
   ========================= */
.slider{
  position: relative;
  height: 28px;
  margin-top: 12px;
}

/* Línea base (fondo) */
.slider .track{
  position: absolute;
  top: 80%;
  left: 0; right: 0;
  height: 2px;
  background: var(--ui-border);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

/* Tramo activo entre los dos thumbs */
.slider .range{
  position: absolute;
  top: 80%;
  height: 2px;
  background: var(--ui-border);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

/* Inputs superpuestos ocupan todo el área, pero NO capturan eventos */
.slider input[type=range]{
  position: absolute;
  inset: 0;               /* left:0; right:0; top:0; bottom:0; */
  width: 100%;
  background: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  pointer-events: none;   /* CLAVE en slider doble */
  z-index: 2;
}

/* Ocultar pista nativa; usamos .track/.range */
input[type=range]::-webkit-slider-runnable-track{ background: transparent; height: 2px; }
input[type=range]::-moz-range-track{ background: transparent; height: 2px; }

/* Thumb negro circular — SÓLO el pulgar captura eventos */
input[type=range]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  background: #000;
  border-radius: 50%;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;   /* eventos sólo en el pulgar */
}
input[type=range]::-moz-range-thumb{
  width: 18px; height: 18px;
  background: #000;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  pointer-events: auto;
}

/* Etiquetas UF debajo del slider */
.uf-labels{
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 16px;
  color: var(--ui-text);
}

/* (opcional) evita que el scroll robe el gesto en mobile */
#ufMin, #ufMax{ touch-action: none; }

/* z-index por defecto igual para ambos */
#ufMin, #ufMax{ z-index: 2; }

/* =========================
   Ajustes responsivos suaves
   ========================= */
@media (min-width: 992px){
  .filtros-wrap > [class*="col-"]{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
}

/* --- Toggle filtros solo en mobile --- */
@media (max-width: 767.98px){
  .btn-filter-mobile {
        display: inline-flex;
        align-items: start;
        gap: 8px;
        border: none;
        background: #000;
        color: #fff;
        padding: 10px 14px;
        border-radius: 0;
        font-weight: 300;
        font-size: 16px;
        line-height: 1;
        margin: 0;
        margin-bottom: 22px;
        text-transform: uppercase;
    }

  /* Por defecto, filtros ocultos en mobile */
  .filtros-wrap{ display: none; }
  .filtros-wrap.is-open{ display: flex; } /* row usa flex */
}

@media (min-width: 768px){
  .btn-filter-mobile{ display: none !important; }
  .filtros-wrap{ display: flex !important; }
}
