/* ==========================================================================
   buscador.css · Buscador del listado (propiedades/index.html)
   Simple al empezar: operación, ubicación y cinco filtros básicos.
   Potente al profundizar: "Más filtros" abre un panel con el resto.
   ========================================================================== */

.fx-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

/* ---------- Panel principal ---------- */

.fx-panel {
  position: relative;
}

.fx-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
}

.fx-row + .fx-row {
  border-top: 1px solid var(--border);
}

.fx-row--main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  padding-top: 1.25rem;
}

.fx-row--mobile {
  display: none;
}

/* Operación: control segmentado */

.fx-seg {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  background: var(--white);
}

.fx-seg .fx-opt {
  min-height: 3rem;
  border: 0;
  border-radius: 0;
}

.fx-seg .fx-opt + .fx-opt {
  border-left: 1px solid var(--border);
}

.fx-ops .fx-opt {
  padding: 0 1.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
}

.fx-seg--small .fx-opt {
  min-height: 2.4rem;
  padding: 0 0.9rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Opción seleccionable (tipo, características, dormitorios…) */

.fx-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.65rem;
  padding: 0 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.2;
  text-align: left;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), opacity 0.3s var(--ease);
}

.fx-opt:hover:not(:disabled) {
  border-color: var(--ink);
}

.fx-opt[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-dark);
}

.fx-seg .fx-opt[aria-pressed="true"] + .fx-opt {
  border-left-color: var(--ink);
}

.fx-opt:disabled {
  color: var(--warm-gray);
  background: var(--off-white);
  border-color: var(--border);
  cursor: not-allowed;
}

.fx-opt__n {
  font-family: var(--font-data);
  font-size: 0.72rem;
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0;
  color: var(--muted);
}

.fx-opt__n:empty {
  display: none;
}

.fx-opt[aria-pressed="true"] .fx-opt__n {
  color: var(--on-dark-muted);
}

.fx-opt:disabled .fx-opt__n {
  color: var(--warm-gray);
}

.fx-opt:focus-visible,
.fx-pill:focus-visible,
.fx-more:focus-visible,
.fx-chip:focus-visible,
.fx-tool:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.fx-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Opciones de selección múltiple (tipo, características, servicios…):
   casilla con tilde que se marca y se desmarca */

.fx-grid .fx-opt {
  justify-content: flex-start;
  padding-left: 0.8rem;
}

.fx-grid .fx-opt::before {
  content: "";
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  border: 1px solid var(--border-strong);
  background: var(--white) no-repeat center / 0.8rem 0.8rem;
  transition: border-color 0.2s var(--ease);
}

.fx-grid .fx-opt[aria-pressed="true"]::before {
  border-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.4l3.3 3.2L13 4.6' fill='none' stroke='%231c1a16' stroke-width='2.2'/%3E%3C/svg%3E");
}

.fx-grid .fx-opt:disabled::before {
  border-color: var(--border);
  background-color: var(--off-white);
}

.fx-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  border: 0;
  background: none;
}

.fx-steps .fx-opt {
  min-width: 3.2rem;
  min-height: 2.65rem;
  border: 1px solid var(--border-strong);
  font-family: var(--font-data);
  font-variant-numeric: lining-nums;
}

.fx-steps .fx-opt + .fx-opt {
  border-left: 1px solid var(--border-strong);
}

.fx-steps .fx-opt[aria-pressed="true"] {
  border-color: var(--ink);
}

.fx-more-types {
  margin-top: 0.9rem;
}

.fx-more-types summary {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid currentColor;
  cursor: pointer;
  list-style: none;
}

.fx-more-types summary::-webkit-details-marker {
  display: none;
}

/* Ubicación con sugerencias */

.fx-where {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.fx-where__icon {
  position: absolute;
  left: 1rem;
  color: var(--muted);
  pointer-events: none;
}

.fx-where__input {
  width: 100%;
  min-height: 3rem;
  padding: 0 1rem 0 2.8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--off-white);
  font-size: 0.98rem;
  color: var(--ink);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.fx-where__input::placeholder {
  color: var(--muted);
}

.fx-where__input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--white);
}

.fx-suggest {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 45;
  max-height: 20rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.fx-suggest__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

.fx-suggest__item:hover,
.fx-suggest__item.is-active {
  background: var(--cream);
}

.fx-suggest__label {
  font-size: 0.95rem;
  color: var(--ink);
}

.fx-suggest__kind {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.fx-suggest__empty {
  padding: 0.8rem 1rem;
  font-size: 0.86rem;
  color: var(--muted);
}

/* Botones de la barra (Tipo, Precio, Dormitorios…) */

.fx-pop {
  position: relative;
}

.fx-pill,
.fx-more {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.4rem 0.9rem 0.4rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  text-align: left;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.fx-pill:hover,
.fx-more:hover,
.fx-pop.is-open .fx-pill {
  border-color: var(--ink);
}

.fx-pill__label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.fx-pill__value {
  display: block;
  max-width: 13rem;
  overflow: hidden;
  font-size: 0.9rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: lining-nums;
}

.fx-pill > .fx-pill__label + .fx-pill__value {
  margin-top: -0.05rem;
}

.fx-pill {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 0.7rem;
}

.fx-pill__label {
  grid-column: 1;
  grid-row: 1;
}

.fx-pill__value {
  grid-column: 1;
  grid-row: 2;
}

.fx-pill__chev {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 0.95rem;
  height: 0.95rem;
  color: var(--muted);
  transition: transform 0.3s var(--ease);
}

.fx-pop.is-open .fx-pill__chev {
  transform: rotate(180deg);
}

.fx-pill.is-set {
  border-color: var(--ink);
  background: var(--cream);
}

.fx-pill.is-set .fx-pill__value {
  font-weight: 600;
}

.fx-more {
  gap: 0.6rem;
  border-color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
}

.fx-more:hover {
  background: var(--ink);
  color: var(--on-dark);
}

.fx-see {
  gap: 0.4em;
}

.fx-see--bar {
  margin-left: auto;
  min-height: 3.25rem;
}

.fx-empty {
  border-top: 0;
  padding-top: 0.5rem;
}

.fx-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--black);
  font-family: var(--font-data);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: lining-nums tabular-nums;
}

.fx-badge[hidden] {
  display: none;
}

/* Ventanitas */

.fx-pop__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 40;
  width: min(24rem, calc(100vw - 2rem));
  padding: 1.35rem;
  background: var(--white);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  animation: fx-pop-in 0.25s var(--ease) both;
}

[data-pop="price"] .fx-pop__panel {
  width: min(28rem, calc(100vw - 2rem));
}

.fx-pop__panel.is-right {
  left: auto;
  right: 0;
}

.fx-pop__title {
  margin-bottom: 1rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}

.fx-pop__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.fx-pop__foot .button,
.fx-drawer__foot .button {
  min-height: 2.9rem;
  padding: 0 1.3rem;
}

@keyframes fx-pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.fx-link {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.12rem;
}

.fx-link:hover {
  color: var(--gold-text);
}

/* Precio */

.fx-price__cur {
  margin-bottom: 1rem;
}

.fx-price__cur[hidden] {
  display: none;
}

.fx-price__inputs,
.fx-range__inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 0.6rem;
}

.fx-price__sep {
  padding-bottom: 0.85rem;
  color: var(--muted);
}

.fx-field {
  position: relative;
  display: grid;
  gap: 0.35rem;
}

.fx-field__label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.fx-field input {
  width: 100%;
  min-height: 2.9rem;
  padding: 0 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-data);
  font-size: 1rem;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}

.fx-field input:focus {
  outline: none;
  border-color: var(--ink);
}

.fx-field__unit {
  position: absolute;
  right: 0.8rem;
  bottom: 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
  pointer-events: none;
}

.fx-range .fx-field input {
  padding-right: 2.4rem;
}

.fx-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.fx-quick[hidden] {
  display: none;
}

.fx-opt--quick {
  min-height: 2.3rem;
  padding: 0 0.75rem;
  font-size: 0.78rem;
  font-variant-numeric: lining-nums;
}

.fx-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.1rem;
  font-size: 0.84rem;
  color: var(--muted);
  cursor: pointer;
}

.fx-check input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
  accent-color: var(--ink);
}

/* ---------- Resultados: contador, orden y filtros activos ---------- */

.fx-status {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border-strong);
}

.fx-status__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.fx-status__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  min-width: 0;
}

.fx-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.fx-count {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.fx-count strong {
  font-family: var(--font-data);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 300;
  font-variant-numeric: lining-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.fx-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.fx-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.65rem;
  padding: 0 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.fx-tool:hover {
  border-color: var(--ink);
}

.fx-tool[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold-text);
}

.fx-tool[aria-pressed="true"] .fx-icon {
  fill: currentColor;
}

.fx-tool--filter {
  display: none;
}

.fx-tool[hidden],
.fx-saved[hidden] {
  display: none;
}

.fx-saved {
  position: relative;
}

.fx-saved__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 40;
  width: min(24rem, calc(100vw - 2rem));
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.fx-saved__list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fx-saved__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}

.fx-saved__list a {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
}

.fx-saved__list a:hover {
  color: var(--gold-text);
}

.fx-saved__remove {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--muted);
}

.fx-saved__note {
  margin-top: 0.75rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.fx-sort {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.fx-sort__label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.fx-sort select {
  min-height: 2.65rem;
  padding: 0 2.3rem 0 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.86rem;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.fx-sort__chev {
  position: absolute;
  right: 0.75rem;
  width: 0.9rem;
  height: 0.9rem;
  color: var(--muted);
  pointer-events: none;
}

.fx-active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  margin-top: 1rem;
}

.fx-active[hidden] {
  display: none;
}

.fx-active__label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.fx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fx-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.3rem;
  padding: 0 0.6rem 0 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--cream);
  font-size: 0.84rem;
  font-variant-numeric: lining-nums;
  color: var(--ink);
  white-space: nowrap;
  animation: fx-pop-in 0.25s var(--ease) both;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.fx-chip .fx-icon {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--muted);
}

.fx-chip:hover {
  border-color: var(--ink);
  background: var(--white);
}

.fx-chip:hover .fx-icon {
  color: var(--ink);
}

/* Sin resultados: sugerencias */

.fx-suggest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.fx-suggest-actions:empty {
  display: none;
}

.fx-suggest-btn {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  text-align: left;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.fx-suggest-btn span {
  font-size: 0.92rem;
  color: var(--ink);
}

.fx-suggest-btn small {
  font-family: var(--font-data);
  font-size: 0.76rem;
  font-variant-numeric: lining-nums;
  color: var(--muted);
}

.fx-suggest-btn:hover {
  border-color: var(--ink);
  background: var(--cream);
}

/* ---------- Panel de filtros (Más filtros / Filtrar) ---------- */

.fx-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.fx-drawer[hidden] {
  display: none;
}

.fx-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 12, 0.46);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.fx-drawer__sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(31rem, 100%);
  background: var(--off-white);
  box-shadow: -24px 0 60px -30px rgba(15, 14, 12, 0.5);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
}

.fx-drawer.is-open .fx-drawer__backdrop {
  opacity: 1;
}

.fx-drawer.is-open .fx-drawer__sheet {
  transform: none;
}

.fx-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.fx-drawer__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
}

.fx-drawer__close {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
}

.fx-drawer__close .fx-icon {
  width: 1.2rem;
  height: 1.2rem;
}

.fx-drawer__chips {
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.fx-drawer__chips[hidden] {
  display: none;
}

.fx-drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 1.5rem 1.5rem;
}

.fx-drawer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--white);
}

.fx-drawer__foot .button {
  flex: 1;
  max-width: 17rem;
}

.fx-sec {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
}

.fx-sec[hidden] {
  display: none;
}

.fx-sec__title {
  display: block;
  margin-bottom: 0.95rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink);
}

.fx-acc {
  padding: 0;
}

.fx-acc__summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.35rem 0;
  cursor: pointer;
  list-style: none;
}

.fx-acc__summary::-webkit-details-marker {
  display: none;
}

.fx-acc__summary .fx-sec__title {
  margin: 0;
}

.fx-acc__chev {
  margin-left: auto;
  width: 1rem;
  height: 1rem;
  color: var(--muted);
  transition: transform 0.3s var(--ease);
}

.fx-acc[open] .fx-acc__chev {
  transform: rotate(180deg);
}

.fx-acc__body {
  padding-bottom: 1.4rem;
}

.fx-range + .fx-range,
.fx-range + .fx-range__label {
  margin-top: 1.2rem;
}

.fx-range[hidden] {
  display: none;
}

.fx-range__label {
  margin-bottom: 0.6rem;
  font-size: 0.86rem;
  color: var(--ink);
}

.fx-sec .fx-where__input {
  background: var(--white);
}

/* ---------- Aviso con "Deshacer" ---------- */

.fx-snack {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: calc(100vw - 2rem);
  padding: 0.85rem 1rem 0.85rem 1.25rem;
  background: var(--black);
  color: var(--on-dark);
  font-size: 0.9rem;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.fx-snack.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.fx-snack[hidden] {
  display: none;
}

.fx-snack button {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.fx-snack button[hidden] {
  display: none;
}

/* ---------- Escritorio: los filtros básicos viven en la barra ---------- */

@media (min-width: 961px) {
  .fx-sec--primary {
    display: none;
  }
}

/* ---------- Tablet y celular ---------- */

@media (max-width: 1180px) {
  .fx-pill__value {
    max-width: 9rem;
  }

  .fx-see--bar {
    margin-left: 0;
  }
}

@media (max-width: 960px) {
  .fx-row--main {
    display: block;
    padding: 0.9rem 1rem;
  }

  .fx-row--main .fx-where,
  .fx-row--pills {
    display: none;
  }

  .fx-ops {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .fx-ops .fx-opt {
    flex-direction: column;
    gap: 0.1rem;
    min-height: 3.3rem;
    padding: 0 0.3rem;
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-align: center;
  }

  .fx-status {
    position: sticky;
    top: calc(var(--nav-height-compact) + env(safe-area-inset-top, 0px));
    z-index: 30;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0.75rem var(--gutter);
    background: var(--off-white);
  }

  .fx-tool--filter {
    display: inline-flex;
    min-height: 2.9rem;
    padding: 0 1.1rem;
    border-color: var(--black);
    background: var(--black);
    color: var(--on-dark);
  }

  .fx-tool--filter:hover {
    background: var(--dark-brown);
  }

  .fx-drawer__sheet {
    width: 100%;
    box-shadow: none;
  }

  .fx-sec .fx-ops .fx-opt {
    min-height: 3rem;
  }

  .fx-suggest {
    position: static;
    margin-top: 0.5rem;
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .fx-status__row {
    gap: 0.5rem;
  }

  .fx-status__lead {
    width: 100%;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .fx-count {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .fx-actions {
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .fx-actions .fx-tool {
    min-height: 2.5rem;
    padding: 0 0.65rem;
  }

  .fx-count strong {
    font-size: 1.3rem;
  }

  .fx-tools {
    width: 100%;
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .fx-tool {
    min-height: 2.9rem;
    padding: 0 0.75rem;
  }

  .fx-tool:not(.fx-tool--filter) > span:not(.fx-badge) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .fx-sort {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
  }

  .fx-sort select {
    width: 100%;
    min-height: 2.9rem;
    font-size: 0.82rem;
  }

  .fx-sort__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .fx-active {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .fx-active::-webkit-scrollbar {
    display: none;
  }

  .fx-active .fx-chips {
    flex-wrap: nowrap;
  }

  .fx-active__label {
    display: none;
  }

  .fx-active .fx-link {
    flex-shrink: 0;
  }

  .fx-drawer__head,
  .fx-drawer__chips,
  .fx-drawer__foot {
    padding-inline: 1.1rem;
  }

  .fx-drawer__body {
    padding-inline: 1.1rem;
  }

  .fx-snack {
    left: 1rem;
    right: 1rem;
    transform: translateY(12px);
  }

  .fx-snack.is-visible {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx-drawer__sheet,
  .fx-drawer__backdrop,
  .fx-pop__panel,
  .fx-chip,
  .fx-snack {
    transition: none;
    animation: none;
  }
}

/* ==========================================================================
   Diseño definitivo (C · minimal, elegido por Martín el 29/09)
   Sobre la base de arriba: panel blanco en ángulo recto, operación como
   pestañas con subrayado, filtros en una sola barra dividida por líneas
   finas y numerados 01–05, indicador dorado cuadrado y "Ver N" como
   bloque negro. Va al final para ganar sobre la base.
   ========================================================================== */

:root .fx-panel {
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 70px -50px rgba(15, 14, 12, 0.55);
}

/* ---------- Fila 1: operación + ubicación ---------- */

:root .fx .fx-row--main {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
}

:root .fx .fx-ops {
  border: 0;
  border-right: 1px solid var(--border);
  background: none;
}

:root .fx .fx-ops .fx-opt {
  position: relative;
  min-height: 4.1rem;
  padding: 0 1.35rem;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: var(--tracking-label);
}

:root .fx .fx-ops .fx-opt::after {
  content: "";
  position: absolute;
  left: 1.35rem;
  right: 1.35rem;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

:root .fx .fx-ops .fx-opt:hover:not(:disabled) {
  color: var(--ink);
}

:root .fx .fx-ops .fx-opt[aria-pressed="true"] {
  background: none;
  color: var(--ink);
}

:root .fx .fx-ops .fx-opt[aria-pressed="true"]::after {
  transform: scaleX(1);
}

:root .fx .fx-ops .fx-opt:disabled {
  background: none;
  color: var(--warm-gray);
}

:root .fx .fx-ops .fx-opt__n,
:root .fx .fx-ops .fx-opt[aria-pressed="true"] .fx-opt__n {
  color: var(--gold-text);
}

:root .fx .fx-ops .fx-opt:disabled .fx-opt__n {
  color: var(--warm-gray);
}

:root .fx .fx-row--main .fx-where__input {
  min-height: 4.1rem;
  padding-left: 3.3rem;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 1.02rem;
}

:root .fx .fx-row--main .fx-where__input:focus {
  background: var(--off-white);
  box-shadow: inset 0 -2px 0 var(--gold);
}

:root .fx .fx-row--main .fx-where__icon {
  left: 1.35rem;
}

/* ---------- Fila 2: consola de filtros ---------- */

:root .fx .fx-row--pills {
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  padding: 0;
  counter-reset: fx;
}

:root .fx .fx-row--pills > * + * {
  border-left: 1px solid var(--border);
}

:root .fx .fx-pop {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
}

:root .fx .fx-pop[hidden] {
  display: none;
}

:root .fx .fx-pill {
  width: 100%;
  min-height: 4.2rem;
  padding: 0.65rem 1rem 0.65rem 1.25rem;
  border: 0;
  border-radius: 0;
  background: none;
  transition: background-color 0.3s var(--ease);
}

:root .fx .fx-pill:hover,
:root .fx .fx-pop.is-open .fx-pill {
  background: var(--off-white);
}

:root .fx .fx-pill__label::before {
  counter-increment: fx;
  content: counter(fx, decimal-leading-zero);
  margin-right: 0.6rem;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--gold-text);
}

:root .fx .fx-pill__value {
  max-width: none;
}

:root .fx .fx-pill.is-set {
  background: none;
}

:root .fx .fx-pill.is-set .fx-pill__value::before {
  content: "";
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.5rem;
  background: var(--gold);
  vertical-align: 0.12em;
}

:root .fx .fx-more {
  flex: 0 0 auto;
  min-height: 4.2rem;
  padding: 0 1.4rem;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: none;
  color: var(--ink);
}

:root .fx .fx-more:hover {
  background: var(--ink);
  color: var(--on-dark);
}

:root .fx .fx-see--bar {
  flex: 0 0 auto;
  min-height: 4.2rem;
  margin: 0;
  padding: 0 1.8rem;
  border-radius: 0;
}

:root .fx .fx-row + .fx-row {
  border-top: 1px solid var(--border);
}

/* ---------- Ventanitas y panel: líneas finas, acento superior ---------- */

:root .fx-pop__panel,
:root .fx-saved__panel {
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--ink);
  box-shadow: 0 30px 60px -40px rgba(15, 14, 12, 0.5);
}

:root .fx .fx-pop__panel {
  top: 100%;
  left: -1px;
}

:root .fx .fx-pop__panel.is-right {
  left: auto;
  right: -1px;
}

:root .fx-suggest {
  border-top: 2px solid var(--ink);
}

:root .fx-opt {
  border-color: var(--border-strong);
  font-size: 0.84rem;
}

/* Dormitorios y baños: fila de celdas unidas */

:root .fx-steps {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  border: 1px solid var(--border-strong);
}

:root .fx-steps .fx-opt {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 0.5rem;
  border: 0;
}

:root .fx-steps .fx-opt:first-child,
:root .fx-steps .fx-opt:last-child {
  flex: 0 0 auto;
  padding: 0 0.9rem;
}

:root .fx-steps .fx-opt + .fx-opt {
  border-left: 1px solid var(--border);
}

:root .fx-steps .fx-opt[aria-pressed="true"] + .fx-opt {
  border-left-color: var(--ink);
}

:root .fx-steps .fx-opt:disabled {
  background: repeating-linear-gradient(135deg, var(--off-white) 0 6px, var(--white) 6px 12px);
}

/* Chips: contorno fino, sin relleno */

:root .fx-chip {
  min-height: 2.2rem;
  border-color: var(--ink);
  background: none;
  font-size: 0.8rem;
}

:root .fx-chip:hover {
  background: var(--ink);
  color: var(--on-dark);
}

:root .fx-chip:hover .fx-icon {
  color: var(--on-dark);
}

/* Panel lateral: secciones numeradas */

:root .fx-drawer__sheet {
  border-left: 1px solid var(--border-strong);
}

:root .fx-drawer__head {
  border-top: 2px solid var(--ink);
}

:root .fx-drawer__body {
  counter-reset: sec;
}

:root .fx-sec__title::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero) " — ";
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--gold-text);
}

:root .fx-status {
  border-bottom-color: var(--ink);
}

:root .fx-badge {
  border-radius: 0;
}

:root .fx-count strong {
  font-variant-numeric: tabular-nums;
}

/* ---------- Tablet y celular ---------- */

@media (max-width: 1180px) {
  :root .fx .fx-pill {
    padding-inline: 0.9rem;
  }

  :root .fx .fx-more {
    padding-inline: 1rem;
  }

  :root .fx .fx-see--bar {
    padding-inline: 1.2rem;
  }
}

@media (max-width: 960px) {
  :root .fx .fx-row--main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  :root .fx .fx-ops {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  :root .fx .fx-ops .fx-opt {
    flex-direction: column;
    gap: 0.15rem;
    min-height: 3.6rem;
    padding: 0 0.3rem;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
  }

  :root .fx .fx-ops .fx-opt::after {
    left: 0.6rem;
    right: 0.6rem;
  }

  :root .fx .fx-row--main .fx-where {
    display: flex;
    flex-wrap: wrap;
  }

  :root .fx .fx-row--main .fx-where__input {
    min-height: 3.5rem;
    font-size: 0.98rem;
  }

  :root .fx .fx-suggest {
    width: 100%;
    margin-top: 0;
  }
}
