/* ============================================
   REMAX SEARCH SHORTCODE - RE/MAX Metropolitana
   Estilos basados en la guía oficial
   Soporta múltiples layouts y estilos
   ============================================ */

/* Variables de la guía de estilos RE/MAX */
:root {
    --remax-blue: #003DA5;
    --remax-blue-dark: #002764;
    --remax-red: #E11B22;
    --remax-red-dark: #DC1C2E;
    --text-dark: #0f172a;
    --text-gray: #475569;
    --text-gray-light: #64748b;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-surface: #f8fafc;
    --border-color: #e5e7eb;
    --border-radius-md: 10px;
    --border-radius-lg: 12px;
    --border-radius-full: 999px;
}

/* ============================================
   BUSCADOR PRINCIPAL (ESTILO 1)
   ============================================ */
.mt-search {
    --gap: 12px;
    --radius: 12px;
    --border: #e5e7eb;
    --fg: #0f172a;
    --muted: #64748b;
    --bg: #ffffff;
    --surface: #f8fafc;
    --primary: #003DA5;           /* ← Cambiado a RE/MAX Blue */
    --primary-ink: #ffffff;
    
    margin: 24px auto;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--fg);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.06);
    width: 55%;
    font-family: 'Poppins', sans-serif;
}

.mt-search__title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--fg);
}

.mt-search__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mt-search__clear {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--muted);
    padding: 10px 14px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.mt-search__clear:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
}

.mt-search__submit {
    background: var(--primary);
    color: var(--primary-ink);
    border: 0;
    border-radius: var(--border-radius-md);
    padding: 12px 24px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0, 61, 165, 0.25);
    transition: all 0.3s ease;
}

.mt-search__submit:hover {
    background: var(--remax-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 61, 165, 0.3);
}

.mt-search__form {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
}

/* ============================================
   STATUS TABS (VENTA/ALQUILER/TODOS)
   ============================================ */
.mt-search__status {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: var(--surface);
    padding: 4px;
    border-radius: var(--border-radius-full);
}

.mt-search__status .segmented {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.mt-search__status .segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mt-search__status .segmented span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--border-radius-full);
    color: var(--muted);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mt-search__status .segmented span:hover {
    color: var(--primary);
}

.mt-search__status .segmented input:checked + span {
    background: var(--bg);
    border: 2px solid var(--primary);
    box-shadow: 0 2px 6px rgba(0, 61, 165, 0.1);
    color: var(--primary);
}

/* ============================================
   CHIPS (FILTROS ACTIVOS)
   ============================================ */
.mt-search__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.mt-search__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 2px solid var(--primary);
    color: var(--fg);
    padding: 6px 12px;
    border-radius: var(--border-radius-full);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.mt-search__chip button {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mt-search__chip button:hover {
    color: var(--remax-red-dark);
}

/* ============================================
   FILTROS
   ============================================ */
.mt-search__filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
}

.mt-search__filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mt-search__filter label {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.mt-search select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat right 12px center;
    background-size: 16px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-md);
    padding: 12px 40px 12px 14px;
    min-height: 44px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: var(--fg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.mt-search select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 61, 165, 0.1);
}

.mt-search select:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.mt-search__spinner {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.mt-select-wrap {
    position: relative;
}

.mt-select-wrap .mt-search__spinner {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0;
    display: none;
}

.mt-select-wrap .mt-search__spinner.is-active {
    display: inline-block;
    animation: mtspin 0.8s linear infinite;
}

@keyframes mtspin {
    0% { transform: translateY(-50%) rotate(0); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.mt-search__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .mt-search__form {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .mt-search__filters {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* ============================================
   FILTROS AVANZADOS
   ============================================ */
.mt-search__adv-toggle {
    background: transparent;
    border: 2px dashed var(--border);
    color: var(--muted);
    padding: 10px 16px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    width: fit-content;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.mt-search__adv-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface);
}

.mt-search__advanced {
    border: 2px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    background: var(--surface);
    margin-top: 16px;
}

.mt-advanced__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.mt-advanced__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mt-advanced__label {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--fg);
    font-size: 14px;
}

.mt-advanced__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ============================================
   AMENIDADES
   ============================================ */
.mt-amenities {
    max-height: none;
}

.mt-amenities .mt-adv-tag {
    display: none;
}

.mt-amenities.show-all .mt-adv-tag {
    display: inline-flex;
}

.mt-amenities .mt-adv-tag:nth-child(-n+10) {
    display: inline-flex;
}

.mt-amenities__more {
    background: transparent;
    border: 2px dashed var(--border);
    color: var(--muted);
    padding: 8px 16px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    margin-top: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mt-amenities__more:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface);
}

.mt-adv-chip {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.mt-adv-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.mt-adv-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mt-adv-chip input:checked + span {
    background: var(--primary);
    color: var(--primary-ink);
    border-color: var(--primary);
    box-shadow: 0 6px 14px rgba(0, 61, 165, 0.25);
}

.mt-adv-chip span:hover {
    border-color: var(--primary);
    background: var(--surface);
}

.mt-adv-chip input:focus + span {
    box-shadow: 0 0 0 3px rgba(0, 61, 165, 0.3);
}

/* Tags de amenidades */
.mt-adv-tag {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.mt-adv-tag span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--border-radius-full);
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.mt-adv-tag input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mt-adv-tag input:checked + span {
    background: var(--primary);
    color: var(--primary-ink);
    border-color: var(--primary);
    box-shadow: 0 6px 14px rgba(0, 61, 165, 0.25);
}

.mt-adv-tag span:hover {
    border-color: var(--primary);
    background: var(--surface);
}

.mt-adv-tag input:focus + span {
    box-shadow: 0 0 0 3px rgba(0, 61, 165, 0.3);
}

.mt-advanced__construction {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mt-advanced__currency {
    display: flex;
    gap: 12px;
}

.mt-advanced__prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.price-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mt-price {
    border: 2px solid var(--border);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    transition: all 0.2s ease;
}

.mt-price:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 61, 165, 0.1);
}

/* ============================================
   SECCIÓN DE AMENIDADES
   ============================================ */
.mt-amenities-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.mt-amenities-section .mt-amenities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.mt-amenities-search {
    margin: 8px 0 12px;
}

.mt-amenities-search input {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    transition: all 0.2s ease;
}

.mt-amenities-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 61, 165, 0.1);
}

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

@media (max-width: 768px) {
    .mt-search {
        width: 100%;
    }
    
    .mt-properties {
        padding: 0 12px;
    }
}

/* ============================================
   LISTADO DE PROPIEDADES
   ============================================ */
.mt-properties {
    --gap: 16px;
    --border: #e5e7eb;
    margin: 20px auto;
    width: 100%;
}

.mt-props__summary {
    margin: 8px 0 12px;
    color: var(--text-gray-light);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.mt-props__topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 8px 0 12px;
}

.mt-props__sort select {
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-md);
    padding: 10px 36px 10px 12px;
    min-height: 40px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--bg-white) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat right 10px center;
    background-size: 16px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   GRID DE PROPIEDADES
   ============================================ */
.mt-props__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.mt-prop {
    border: 2px solid var(--border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.04);
    transition: all 0.3s ease;
}

.mt-prop:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 61, 165, 0.15);
    border-color: var(--remax-blue);
}

.mt-prop__media {
    position: relative;
}

.mt-prop__slider {
    position: relative;
}

.mt-prop__media img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: none;
}

.mt-prop__media img.is-active {
    display: block;
}

.mt-prop__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-full);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mt-prop__nav:hover {
    background: var(--remax-blue);
    border-color: var(--remax-blue);
}

.mt-prop__nav:hover svg {
    color: white;
}

.mt-prop__nav.prev {
    left: 8px;
}

.mt-prop__nav.next {
    right: 8px;
}

.mt-prop__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: flex;
    gap: 6px;
    justify-content: center;
}

.mt-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--border-radius-full);
    border: 1px solid white;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
}

.mt-dot.is-active {
    background: var(--remax-blue);
    border-color: var(--remax-blue);
}

.mt-prop__body {
    padding: 16px;
}

.mt-prop__price {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: var(--text-dark);
}

.mt-prop__meta {
    color: #334155;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    margin-top: 4px;
}

.mt-prop__code {
    color: var(--text-gray-light);
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    margin-top: 2px;
}

.mt-prop__facts {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    color: var(--text-gray);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
}

.mt-prop__facts .mt-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 6px;
    color: var(--remax-blue);
}

/* ============================================
   PAGINACIÓN
   ============================================ */
.mt-props__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 32px 0;
    gap: 8px;
}

.mt-props__pagination a {
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-md);
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mt-props__pagination a:hover {
    background: var(--remax-blue);
    border-color: var(--remax-blue);
    color: white;
    transform: translateY(-2px);
}

.mt-props__pagination .nums {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mt-props__pagination .num {
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-md);
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-decoration: none;
    min-width: 40px;
    text-align: center;
    transition: all 0.3s ease;
}

.mt-props__pagination .num:hover {
    background: var(--bg-light);
    border-color: var(--remax-blue);
    color: var(--remax-blue);
}

.mt-props__pagination .num.is-current {
    background: var(--remax-blue);
    color: white;
    border-color: var(--remax-blue);
    pointer-events: none;
}

.mt-props__pagination .sep {
    display: inline-flex;
    align-items: center;
    color: var(--text-gray-light);
    padding: 0 6px;
}

@media (min-width: 768px) {
    .mt-properties {
        width: 80%;
    }
    
    .mt-props__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mt-prop__media img {
        height: 220px;
    }
}

/* ============================================
   LAYOUT CON SIDEBAR
   ============================================ */
.mt-props-layout {
    width: 100%;
    margin: 20px auto;
    display: block;
    padding-left: 12px;
}

@media (min-width: 992px) {
    .mt-props-layout--aside {
        display: grid;
        grid-template-columns: 380px 1fr;
        gap: 32px;
        align-items: start;
        padding-left: 32px;
        padding-right: 32px;
    }
    
    .mt-props-layout--aside .mt-props-layout__aside {
        position: sticky;
        top: 16px;
        height: fit-content;
    }
    
    .mt-props-layout--aside .mt-search {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
        padding: 25px;
    }
    
    .mt-props-layout--aside .mt-props-layout__main {
        min-width: 0;
    }
    
    .mt-props-layout--aside .mt-properties {
        width: 100% !important;
        margin: 20px 0;
    }
    
    .mt-props-layout--aside .mt-props__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mt-props-layout--aside .mt-prop__media img {
        height: 260px;
    }
}

/* Filtros en sidebar: todo en una columna */
.mt-props-layout--aside .mt-search__filters {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
}

.mt-props-layout--aside .mt-search__adv-toggle {
    display: none !important;
}

.mt-props-layout--aside #mt-advanced {
    display: block !important;
}

.mt-props-layout--aside .mt-advanced__grid {
    grid-template-columns: 1fr !important;
    gap: 25px;
}

.mt-props-layout--aside .mt-advanced__group {
    gap: 15px;
}

.mt-props-layout--aside .mt-search__status {
    width: 100%;
}

.mt-props-layout--aside .mt-search .choices {
    width: 100%;
}

.mt-props-layout--aside .mt-search .choices__inner {
    width: 100%;
}

.mt-props-layout--aside .mt-search .mt-price {
    width: 100%;
}

/* ============================================
   ESTILO 2: BÚSQUEDA SIMPLIFICADA
   ============================================ */
.mt-search--style-2 {
    max-width: 800px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    margin: 0 auto;
}

.mt-search-simple {
    position: relative;
    width: 100%;
}

.mt-search-simple__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.mt-search-simple__input-wrapper:focus-within {
    border-color: var(--remax-blue);
    box-shadow: 0 4px 16px rgba(0, 61, 165, 0.2);
}

.mt-search-simple__icon {
    color: var(--remax-red);
    margin-right: 12px;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

.mt-search-simple__input {
    flex: 1;
    border: 0;
    outline: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: var(--fg);
    background: transparent;
}

.mt-search-simple__input::placeholder {
    color: var(--muted);
}

.mt-search-simple__clear {
    background: transparent;
    color: var(--text-gray-light);
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 6px;
    border-radius: var(--border-radius-md);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mt-search-simple__clear svg {
    width: 18px;
    height: 18px;
}

.mt-search-simple__clear:hover {
    background: var(--bg-surface);
    color: var(--remax-red);
}

.mt-search-simple__clear[hidden] {
    display: none;
}

.mt-search-simple__submit {
    background: var(--remax-blue);
    color: white;
    border: 0;
    border-radius: var(--border-radius-md);
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mt-search-simple__submit svg {
    width: 20px;
    height: 20px;
}

.mt-search-simple__submit:hover {
    background: var(--remax-blue-dark);
    transform: scale(1.05);
}

.mt-search-simple__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
}

.mt-autocomplete__item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
    font-family: 'Poppins', sans-serif;
}

.mt-autocomplete__item:last-child {
    border-bottom: 0;
}

.mt-autocomplete__item:hover,
.mt-autocomplete__item--active {
    background: var(--surface);
}

.mt-autocomplete__text {
    font-size: 14px;
    color: var(--fg);
}

.mt-autocomplete__empty {
    padding: 16px 14px;
    text-align: center;
    color: var(--muted);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
}

.mt-autocomplete__loading {
    padding: 16px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
}

.mt-autocomplete__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #f3f4f6;
    border-top-color: var(--remax-blue);
    border-radius: 50%;
    animation: mt-spin 0.8s linear infinite;
}

@keyframes mt-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   CAMPO UNIFICADO INLINE (SIDEBAR)
   ============================================ */
.mt-search-simple-inline {
    position: relative;
    width: 100%;
}

.mt-search-simple-inline__wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.mt-search-simple-inline__wrapper:focus-within {
    border-color: var(--remax-blue);
    box-shadow: 0 0 0 3px rgba(0, 61, 165, 0.1);
}

.mt-search-simple-inline__icon {
    color: var(--remax-red);
    margin-right: 8px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.mt-search-simple-inline__input {
    flex: 1;
    border: 0;
    outline: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: var(--fg);
    background: transparent;
    width: 100%;
}

.mt-search-simple-inline__input::placeholder {
    color: var(--muted);
}

.mt-search-simple-inline__clear {
    background: transparent;
    color: var(--text-gray-light);
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 4px;
    border-radius: var(--border-radius-md);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mt-search-simple-inline__clear svg {
    width: 16px;
    height: 16px;
}

.mt-search-simple-inline__clear:hover {
    background: var(--bg-surface);
    color: var(--remax-red);
}

.mt-search-simple-inline__clear[hidden] {
    display: none;
}

.mt-search-simple-inline__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin-top: 2px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
}

.mt-search-simple-inline__dropdown .mt-autocomplete__item {
    padding: 12px 14px;
}

.mt-search-simple-inline__dropdown .mt-autocomplete__text {
    font-size: 14px;
}

/* ============================================
   CHOICES.JS OVERRIDE - COLORES RE/MAX
   ============================================ */

/* Sobrescribir estilos de Choices.js para usar colores RE/MAX */
.choices__list--multiple .choices__item {
    background-color: var(--remax-blue) !important;
    border: 1px solid var(--remax-blue) !important;
    color: white !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    border-radius: var(--border-radius-full) !important;
    padding: 6px 14px !important;
}

.choices__list--multiple .choices__item.is-highlighted {
    background-color: var(--remax-blue-dark) !important;
    border-color: var(--remax-blue-dark) !important;
}

.choices__button {
    background-image: none !important;
    background-color: transparent !important;
    border: none !important;
    color: transparent !important;
    font-size: 0 !important;
    font-weight: bold !important;
    padding: 0 6px !important;
    opacity: 1 !important;
    line-height: 1 !important;
    text-indent: 0 !important;
    width: auto !important;
    height: auto !important;
}

.choices__button::before {
    content: "×" !important;
    color: #ffffff !important;
    font-size: 16px !important;
    display: inline-block !important;
    font-weight: bold !important;
}

.choices__button:hover::before {
    opacity: 0.8 !important;
}

.choices__inner {
    background-color: white !important;
    border: 2px solid var(--border-color) !important;
    border-radius: var(--border-radius-md) !important;
    min-height: 44px !important;
    padding: 8px 12px !important;
    font-family: 'Poppins', sans-serif !important;
}

.is-focused .choices__inner,
.is-open .choices__inner {
    border-color: var(--remax-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 61, 165, 0.1) !important;
}

.choices__list--dropdown {
    border: 2px solid var(--border-color) !important;
    border-radius: var(--border-radius-md) !important;
    background-color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.choices__list--dropdown .choices__item--selectable {
    font-family: 'Poppins', sans-serif !important;
    padding: 10px 14px !important;
    color: var(--text-dark) !important;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: var(--bg-surface) !important;
    color: var(--remax-blue) !important;
}

.choices__list--dropdown .choices__item--selectable[aria-selected="true"] {
    background-color: var(--remax-blue) !important;
    color: white !important;
}

.choices__placeholder {
    color: var(--text-gray-light) !important;
    opacity: 1 !important;
}

.choices__input {
    font-family: 'Poppins', sans-serif !important;
    color: var(--text-dark) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .mt-search--style-2 {
        max-width: 100%;
        padding: 0 12px;
    }
    
    .mt-search-simple__input {
        font-size: 16px;
    }
    
    .mt-search-simple__input-wrapper {
        padding: 14px 12px;
        min-height: 52px;
    }
    
    .mt-search-simple__submit {
        padding: 12px 14px;
    }
    
    .mt-search-simple__submit svg {
        width: 18px;
        height: 18px;
    }
    
    .mt-search-simple__icon {
        width: 20px;
        height: 20px;
    }
}
