.fuzzy-search {
  position: relative;
  border-radius: 28px;
  padding: clamp(0.85rem, 1.2vw, 1.2rem);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 35px 60px rgba(24, 23, 18, 0.15);
  overflow: visible;
}

.fuzzy-search::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(212, 138, 92, 0.3), transparent 55%);
  pointer-events: none;
}

.fuzzy-search__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fuzzy-search--hero {
  max-width: 1080px;
  margin: 0 auto 1.05rem;
  color: #2d2a32;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.fuzzy-search--hero::before {
  display: none;
}

.fuzzy-search--inline {
  box-shadow: 0 20px 44px rgba(30, 22, 18, 0.10);
  background: #fff;
  border: 1px solid rgba(176, 90, 43, 0.14);
  margin-bottom: 1.5rem;
}

body[data-page="propiedades"] .fuzzy-search--inline {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  overflow: visible;
  margin: 0 auto;
  max-width: 1060px;
  padding: 0;
  z-index: 1;
}

body[data-page="propiedades"] .fuzzy-search--inline::after {
  display: none;
}

body[data-page="propiedades"] .fuzzy-search--inline .fuzzy-search__body {
  gap: 1rem;
}

body[data-page="propiedades"] .fuzzy-search--inline .fuzzy-search__input-wrapper {
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

body[data-page="propiedades"] .fuzzy-search--inline .fuzzy-search__input-wrapper i {
  color: #b05a2b;
}

body[data-page="propiedades"] .fuzzy-search--inline .fuzzy-search__input-wrapper input[type="search"] {
  font-size: 1.08rem;
  font-weight: 500;
}

body[data-page="propiedades"] .fuzzy-search--inline .fuzzy-search__status {
  color: rgba(255, 255, 255, 0.9);
}

body[data-page="propiedades"] .fuzzy-search--inline .fuzzy-search__submit {
  border-radius: 999px;
  padding: 0.9rem 1.9rem;
  box-shadow: 0 18px 35px rgba(176, 90, 43, 0.38);
}

body[data-page="propiedades"] .fuzzy-search--inline .fuzzy-search__filters-toggle {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(176, 90, 43, 0.25);
  color: #6a4027;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__form--redirect {
  gap: 0.35rem;
}


body[data-page="home"] .fuzzy-search--hero .fuzzy-search__input-wrapper {
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 1);
  box-shadow: inset 0 2px 5px rgba(31, 21, 15, 0.13), 0 10px 24px rgba(0, 0, 0, 0.2);
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__input-wrapper i {
  color: #c4623a;
  font-size: 1.15rem;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__input-wrapper input[type="search"] {
  font-family: var(--font-sans);
  font-weight: 500;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__controls {
  margin-top: 0.2rem;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters {
  margin-top: 0.1rem;
  padding: 0;
  width: 100%;
  min-width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
}

@media (min-width: 1024px) {
  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters {
    scrollbar-gutter: stable both-edges;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters.is-open {
    overflow: visible;
  }

  body[data-page="home"] {
    overflow-y: scroll;
  }
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters.is-open {
  width: 100%;
  min-width: 100%;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters > * {
  min-height: 40px;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters-toggle,
body[data-page="home"] .fuzzy-search--hero .fuzzy-search__submit {
  border-radius: 999px;
  font-weight: 700;
  min-height: 42px;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters-toggle {
  border-color: rgba(196, 98, 58, 0.28);
  display: none;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__controls {
  justify-content: flex-end;
}

@media (min-width: 769px) {
  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters-row {
    flex-direction: row;
    align-items: flex-end;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters {
    order: 1;
    flex: 1;
    width: auto;
    min-width: 0;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__controls {
    order: 2;
    margin-top: 0;
    flex-shrink: 0;
  }
}

body[data-page="home"] .fuzzy-search__active-filters {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, black 92%, transparent 100%);
}

body[data-page="home"] .fuzzy-search__active-filters::-webkit-scrollbar {
  display: none;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__submit {
  background: linear-gradient(135deg, #c4623a, #a24a29);
  box-shadow: 0 10px 20px rgba(164, 74, 41, 0.32);
}

/* Each hero filter renders as its own solid "card" (wrapper) so the field
   never floats transparently over the hero photo -- the label and the
   select-like input share the card's own background instead of carrying
   individual borders/backgrounds. */
body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filter-wrapper {
  background: var(--color-bg-surface);
  border-radius: 16px;
  padding: 8px 14px 12px;
  box-shadow: 0 6px 16px rgba(24, 23, 18, 0.1);
  gap: 2px;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters {
  align-items: flex-end;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters input,
body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters .fuzzy-autocomplete input,
body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters select {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 20px 0 0;
  color: var(--color-text-dark);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238C3E22' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 14px;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters input:hover,
body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters .fuzzy-autocomplete input:hover,
body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters select:hover {
  border-color: transparent;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters input:focus,
body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters .fuzzy-autocomplete input:focus,
body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters select:focus {
  border-color: transparent;
  box-shadow: none;
  outline: none;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-cta-main-active);
  line-height: 1.2;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.fuzzy-search--inline::before {
  display: none;
}

.fuzzy-search__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.75rem;
  margin: 0;
  color: #ac8a6d;
}

.fuzzy-search__title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  color: #241f1c;
}

.fuzzy-search__description {
  margin: 0;
  color: #5a5550;
  font-size: 1rem;
}

.fuzzy-search__form {
  width: 100%;
}

.fuzzy-search__form--redirect {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fuzzy-search__panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fuzzy-search__filters-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fuzzy-search__actions {
  display: flex;
  justify-content: flex-start;
  margin-top: -0.1rem;
  gap: 0.5rem;
}

.fuzzy-search__submit--inline {
  min-height: 40px;
  padding: 0.65rem 1.1rem;
}

.fuzzy-search__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.6rem;
}

.fuzzy-search__controls--no-filters {
  justify-content: flex-end;
}

.fuzzy-search--hero .fuzzy-search__status {
  color: rgba(255, 255, 255, 0.92);
}

.fuzzy-search--hero .fuzzy-search__filters-toggle {
  background: rgba(255, 255, 255, 0.9);
}

.fuzzy-search--hero .fuzzy-search__input-wrapper {
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.fuzzy-search--hero .fuzzy-search__input-wrapper i {
  color: #b05a2b;
}

.fuzzy-search--hero .fuzzy-search__input-wrapper input[type="search"] {
  font-size: 1.08rem;
  font-weight: 500;
}

.fuzzy-search--hero .fuzzy-search__submit {
  border-radius: 999px;
  padding: 0.9rem 1.9rem;
  box-shadow: 0 18px 35px rgba(176, 90, 43, 0.38);
}

.fuzzy-search__filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  background: rgba(255, 249, 243, 0.92);
  border: 1px solid rgba(176, 90, 43, 0.14);
  border-radius: 16px;
  padding: 0.9rem;
  overflow: visible;
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease;
}

.fuzzy-search__filters.is-open {
  max-height: 640px;
  opacity: 1;
  transform: translateY(0);
}

.fuzzy-search__filters[hidden] {
  display: grid !important;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.fuzzy-search__filters > * {
  min-height: 42px;
}

.fuzzy-search__price-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.fuzzy-search__surface-row {
  display: contents;
}

.fuzzy-search__currency-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.fuzzy-search__currency-option {
  height: 42px;
  border: 1px solid rgba(36, 31, 32, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #302a27;
  font-size: 0.86rem;
  font-weight: 700;
}

.fuzzy-search__currency-option.is-active {
  background: linear-gradient(135deg, #d48a5c, #b05a2b);
  border-color: transparent;
  color: #fff;
}

.fuzzy-search__filter-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: relative;
  z-index: auto;
}

.fuzzy-search__filter-wrapper:focus-within {
  z-index: 1200;
}

.fuzzy-search__filter-label {
  font-size: 0.75rem;
  color: #666;
  font-weight: 500;
  padding-left: 1px;
  line-height: 1.05;
}

@media (min-width: 769px) {
  .fuzzy-search__filter-label {
    color: #4a3d34;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  }

  .fuzzy-search__filters {
    gap: 0.45rem;
    padding: 0.72rem;
  }

  .fuzzy-search__price-row {
    gap: 0.45rem;
  }

  .fuzzy-search__surface-row {
    gap: 0.45rem;
  }

  .fuzzy-search__filters > * {
    min-height: 38px;
  }

  .fuzzy-search__filters .fuzzy-autocomplete,
  .fuzzy-search__filters .fuzzy-autocomplete input,
  .fuzzy-search__filters input[type="text"],
  .fuzzy-search__filters input[type="number"],
  .fuzzy-search__currency-option,
  .fuzzy-search__checkbox {
    min-height: 38px;
    height: 38px;
  }
}

@media (min-width: 769px) {
  /* Compact home hero filters: just Operación/Tipo/Departamento/Zona (see
     $compactFilters in FuzzySearch.php), laid out as an even flex row that
     shares space with the "Buscar" button in .fuzzy-search__filters-row.
     Each field shrinks (flex:1, min-width:0) to fit whatever room is left
     after the button, instead of forcing a fixed width that overflows the
     panel -- a 12-column grid tuned for the old, much larger filter set
     used to live here and no longer matches what actually renders. Kept
     from 769px up (not just desktop) so the tablet range doesn't regress
     to a stacked layout. */
  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters,
  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters.is-open {
    display: flex;
    width: auto;
    min-width: 0;
    padding: 0;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filter-wrapper {
    flex: 1;
    min-width: 0;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filter-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters .fuzzy-autocomplete,
  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters .fuzzy-autocomplete input {
    width: 100%;
    min-width: 0;
    height: 24px;
    min-height: 24px;
    border-radius: 0;
    font-size: 15px;
    font-weight: 700;
  }
}

.fuzzy-search__filters .fuzzy-autocomplete {
  height: 42px;
}

.fuzzy-search__filters .fuzzy-autocomplete input {
  border: 1px solid rgba(36, 31, 32, 0.12);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
  color: #302a27;
  background: #fff;
  width: 100%;
  height: 36px;
  cursor: pointer;
}

.fuzzy-search__filters .fuzzy-autocomplete input:focus {
  border-color: rgba(176, 90, 43, 0.6);
  box-shadow: 0 0 0 2px rgba(176, 90, 43, 0.1);
}

.fuzzy-search__filters .fuzzy-autocomplete input:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  border-color: rgba(36, 31, 32, 0.08);
}

.fuzzy-search__filters select,
.fuzzy-search__filters input[type="number"] {
  border: 1px solid rgba(36, 31, 32, 0.12);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
  color: #302a27;
  background: #fff;
  width: 100%;
  height: 42px;
}

.fuzzy-search__filters .bootstrap-select {
  width: 100% !important;
}

.fuzzy-search__filters .bootstrap-select .dropdown-toggle {
  border: 1px solid rgba(36, 31, 32, 0.12);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
  color: #302a27;
  background: #fff;
}

.fuzzy-search__filters .bootstrap-select.dropup .dropdown-menu,
.fuzzy-search__filters .bootstrap-select .dropdown-menu {
  top: calc(100% + 4px) !important;
  bottom: auto !important;
  margin-top: 0;
  z-index: 1055;
}

.fuzzy-search__filters input[type="text"] {
  border: 1px solid rgba(36, 31, 32, 0.12);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
  color: #302a27;
  background: #fff;
  width: 100%;
  height: 42px;
}

.fuzzy-autocomplete {
  position: relative;
}

.fuzzy-autocomplete__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid rgba(36, 31, 32, 0.14);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  z-index: 1300;
  overflow-y: auto;
  max-height: 400px;
}

.fuzzy-autocomplete__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 0.5rem 0.65rem;
  font-size: 0.88rem;
  color: #2f2722;
  cursor: pointer;
}

.fuzzy-autocomplete__item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fuzzy-autocomplete__badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  color: #b05a2b;
  background: rgba(176, 90, 43, 0.12);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.fuzzy-autocomplete__item:hover {
  background: #fff2e7;
}

.fuzzy-autocomplete__item.is-selected {
  background: rgba(176, 90, 43, 0.12);
  color: #b05a2b;
  font-weight: 500;
}

.fuzzy-autocomplete__item.is-selected::before {
  content: "✓ ";
}

.fuzzy-autocomplete__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.fuzzy-autocomplete__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(176, 90, 43, 0.12);
  color: #6a4027;
  border: 1px solid rgba(176, 90, 43, 0.25);
  border-radius: 999px;
  padding: 0.15rem 0.45rem 0.15rem 0.55rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.fuzzy-autocomplete__chip:hover {
  background: rgba(176, 90, 43, 0.2);
}

.fuzzy-autocomplete__chip i {
  font-size: 0.7rem;
  opacity: 0.7;
}

.fuzzy-search__filters-toggle {
  align-self: flex-start;
  border: 1px solid rgba(176, 90, 43, 0.25);
  border-radius: 999px;
  background: #fff;
  color: #6a4027;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fuzzy-search__filters-toggle.is-open {
  background: linear-gradient(135deg, #d48a5c, #b05a2b);
  color: #fff;
  border-color: transparent;
}

.fuzzy-search__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(36, 31, 32, 0.12);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
  color: #302a27;
  background: #fff;
  min-height: 42px;
  width: 100%;
}

.fuzzy-search__clear-filters {
  grid-column: 1 / -1;
  border: 1px solid rgba(176, 90, 43, 0.45);
  border-radius: 12px;
  background: #fff;
  color: #8b6a57;
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 42px;
  height: 42px;
  width: 100%;
  margin-top: 0.3rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fuzzy-search__clear-filters:hover {
  background: #b05a2b;
  color: #fff;
  border-color: transparent;
}

.fuzzy-search__fixed-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.fuzzy-search__fixed-filters small {
  color: #746860;
  font-weight: 600;
}

.fuzzy-search__fixed-filter-chip {
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.74rem;
  background: #fff;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.fuzzy-search__active-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.fuzzy-search__active-filters::-webkit-scrollbar {
  display: none;
}

.fuzzy-search__active-chip {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  border-radius: 999px;
  padding: 0.2rem 0.52rem;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  box-shadow: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.fuzzy-search__active-chip span {
  font-size: 0.82rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.fuzzy-search__active-chip:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.fuzzy-search__submit {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #cf6b2f, #8f3f1e);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 0.7rem 1.3rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(73, 31, 14, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.fuzzy-search__submit-label {
  transition: opacity 0.2s ease;
}

.fuzzy-search__submit i {
  font-size: 1.25rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fuzzy-search__submit:disabled {
  cursor: not-allowed;
  opacity: 0.92;
  box-shadow: 0 8px 16px rgba(34, 22, 16, 0.18);
  color: rgba(255, 255, 255, 0.98);
  background: linear-gradient(135deg, rgba(212, 138, 92, 0.9), rgba(176, 90, 43, 0.86));
}

.fuzzy-search__submit:not(:disabled):hover,
.fuzzy-search__submit:not(:disabled):focus {
  transform: translateY(-2px);
  box-shadow: 0 24px 42px rgba(73, 31, 14, 0.45);
  filter: brightness(1.08);
}

.fuzzy-search__spinner {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: transparent;
  display: none;
  animation: fuzzy-spinner 0.8s linear infinite;
}

.fuzzy-search__submit.is-loading .fuzzy-search__spinner {
  display: inline-flex;
}

.fuzzy-search__submit.is-loading .fuzzy-search__submit-label {
  opacity: 0.85;
}

.fuzzy-search__submit.is-loading i {
  opacity: 0.75;
  transform: translateX(4px);
}

.properties-search-feedback {
  margin: 0.35rem 0 0.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 1.2rem;
}

.properties-search-feedback.is-info {
  color: #835638;
}

.properties-search-feedback.is-success {
  color: #2f6b3f;
}

.properties-search-feedback.is-muted {
  color: #6d6d6d;
}

.properties-search-feedback.is-warning {
  color: #9a4f19;
}

.fuzzy-search__label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #493f38;
}

.fuzzy-search__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px solid rgba(176, 90, 43, 0.16);
  border-radius: 20px;
  background: #fff;
  padding: 0.45rem 0.6rem 0.45rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fuzzy-search__input-wrapper:focus-within {
  border-color: #b05a2b;
  box-shadow: 0 0 0 5px rgba(176, 90, 43, 0.14);
}

.fuzzy-search__input-wrapper i {
  font-size: 1.35rem;
  color: #c3b9af;
}

.fuzzy-search__input-wrapper input[type="search"] {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.04rem;
  padding: 0.68rem 0.5rem 0.68rem 0.9rem;
  font-family: inherit;
  color: #231f20;
}

.fuzzy-search__input-wrapper input[type="search"]::-webkit-search-decoration,
.fuzzy-search__input-wrapper input[type="search"]::-webkit-search-cancel-button,
.fuzzy-search__input-wrapper input[type="search"]::-webkit-search-results-button,
.fuzzy-search__input-wrapper input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.fuzzy-search__input-wrapper input[type="search"]:focus {
  outline: none;
}

.fuzzy-search__clear {
  border: none;
  background: transparent;
  color: #9a938f;
  font-size: 1.15rem;
  padding: 0.35rem;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.fuzzy-search__clear:hover,
.fuzzy-search__clear:focus {
  background: rgba(36, 31, 32, 0.06);
}

.fuzzy-search.is-filled .fuzzy-search__clear {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.fuzzy-search__status {
  font-size: 0.9rem;
  color: #665c56;
  margin-top: 0.35rem;
}

.fuzzy-search__status:empty {
  display: none;
}

.fuzzy-search__status--error,
body[data-page="propiedades"] .fuzzy-search--inline .fuzzy-search__status--error {
  color: #c4623a;
  font-weight: 600;
}

[data-fixed-filter-input].fuzzy-search__field--error {
  border-color: #c4623a !important;
  box-shadow: 0 0 0 1px #c4623a !important;
}

.fuzzy-search__results {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fuzzy-search__result a {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(36, 31, 32, 0.08);
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.fuzzy-search__result a:hover,
.fuzzy-search__result a:focus {
  border-color: #d48a5c;
  transform: translateY(-2px);
  box-shadow: 0 16px 25px rgba(39, 34, 30, 0.08);
}

.fuzzy-search__thumb {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.fuzzy-search__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f4f1ed;
}

.fuzzy-search__match {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(20, 20, 20, 0.8);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.fuzzy-search__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.fuzzy-search__title {
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
  color: #241f1c;
}

.fuzzy-search__meta {
  margin: 0;
  color: #6c6560;
  font-size: 0.9rem;
}

.fuzzy-search__tags {
  color: #9a8c82;
}

.fuzzy-search__price {
  font-weight: 600;
  color: #d48a5c;
}

.fuzzy-search__empty {
  font-size: 0.95rem;
  color: #6b6661;
}

.fuzzy-search__helper {
  margin: 0;
  color: #93887f;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.fuzzy-search__more-filters-toggle {
  display: none;
}

.fuzzy-search__submit-btn {
  display: none;
}

.fuzzy-search__extra-filters {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.fuzzy-search__advanced-filters {
  display: contents;
}

.fuzzy-search__advanced-filters[hidden] {
  display: none;
}

@media (max-width: 768px) {
  .fuzzy-search {
    padding: 1.25rem;
    border-radius: 22px;
  }

  body[data-page="home"] .fuzzy-search {
    padding: 0.45rem;
    border-radius: 16px;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__input-wrapper {
    min-height: 46px;
    width: 100%;
    border-radius: 999px;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__input-wrapper input[type="search"],
  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters {
    width: 100%;
  }

body[data-page="home"] .fuzzy-search__active-filters {
  display: none;
}

body[data-page="home"] .fuzzy-search--hero .fuzzy-search__controls {
    display: none;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters-toggle {
    display: none;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters {
    order: 2;
    width: 100%;
    margin: 0;
    padding: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    box-sizing: border-box;
    gap: 0.35rem;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters > * {
    min-height: 0;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__input-wrapper {
    min-height: 42px;
    width: 100%;
    border-radius: 999px;
    flex-wrap: nowrap;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__input-wrapper input[type="search"] {
    width: auto;
    min-width: 60px;
    text-overflow: ellipsis;
  }

  body[data-page="home"] .fuzzy-search__active-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, black 92%, transparent 100%);
  }

  body[data-page="home"] .fuzzy-search__active-filters::-webkit-scrollbar {
    display: none;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__actions {
    width: 100%;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__submit {
    display: none;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__more-filters-toggle {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    padding: 0.38rem;
    margin-top: 0.25rem;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__extra-filters {
    display: none;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__extra-filters.is-open {
    display: contents;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__submit-btn {
    display: block;
    grid-column: 1 / -1;
    width: auto;
    min-width: 150px;
    max-width: 220px;
    margin: 8px auto 0;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #d3875e, #c4623a);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__form--redirect {
    gap: 0.35rem;
  }

  .fuzzy-search__input-wrapper {
    flex-wrap: wrap;
    padding: 0.25rem 0.5rem;
  }

  .fuzzy-search__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .fuzzy-search__actions,
  .fuzzy-search__filters-toggle,
  .fuzzy-search__submit {
    width: 100%;
  }

  .fuzzy-search__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    /* overflow-x: hidden mixed with overflow-y: visible computes the
       y-axis to "auto" per spec, turning this into a scroll container
       that clips the departamento/zona autocomplete dropdowns. Use a
       single "visible" (as elsewhere) and rely on min-width: 0 on the
       grid items to prevent horizontal overflow instead. */
    overflow: visible;
    width: 100%;
    min-width: 0;
  }

  .fuzzy-search__price-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .fuzzy-search__surface-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.10rem;
  }

  .fuzzy-search__extra-filters {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .fuzzy-search__currency-option {
    height: 34px;
    font-size: 0.8rem;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filter-wrapper {
    padding: 4px 8px 5px;
    border-radius: 10px;
    gap: 0;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filter-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters .fuzzy-autocomplete {
    height: auto;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters input,
  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__filters .fuzzy-autocomplete input {
    font-size: 16px;
    font-weight: 700;
    height: auto;
    min-height: 0;
    line-height: 1.15;
    padding: 1px 16px 1px 0;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__extra-filters.is-open input[type="number"] {
    font-size: 16px;
    padding: 0.35rem 0.5rem;
  }

  .fuzzy-search__input-wrapper input[type="search"],
  .fuzzy-search__filters input,
  .fuzzy-search__filters select,
  .fuzzy-search__filters textarea,
  .fuzzy-search__filters .bootstrap-select .dropdown-toggle {
    font-size: 16px;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__extra-filters.is-open .fuzzy-search__checkbox {
    padding: 0.35rem 0.5rem;
    min-height: 34px;
    height: 34px;
    font-size: 0.9rem;
    line-height: 1;
  }

  body[data-page="home"] .fuzzy-search--hero .fuzzy-search__extra-filters.is-open .fuzzy-search__currency-option {
    font-size: 0.8rem;
    padding: 0.25rem 0.35rem;
  }

  .fuzzy-search__filter-wrapper {
    overflow: visible;
  }

  .fuzzy-search__thumb {
    width: 74px;
    height: 74px;
  }

  .fuzzy-search__result a {
    flex-direction: column;
  }

  .fuzzy-search__info {
    width: 100%;
  }
}

@keyframes fuzzy-spinner {
  100% {
    transform: rotate(360deg);
  }
}

.fuzzy-search__multi-filter-chips {
  display: none !important;
}

.fuzzy-search__chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.fuzzy-search__chips-row:not(:empty) {
  display: flex;
}

.fuzzy-search__chips-row[hidden] {
  display: none;
}
