/* Estilos de la página Marketplace (extraídos de marketplace.php). Se cargan después del resto de hojas para mantener la cascada. */
/* ===== Marketplace · sistema visual FDA CRM ===== */
:root {
    --fda-navy: #2d515c;
    --fda-navy-deep: #274952;
    --fda-navy-soft: #456873;
    --fda-orange: #ff7148;
    --fda-sage: #91a68f;
    --fda-cream: #e7cb95;
    --fda-card-border: #315a64;
}

.market-card {
    width: 100%;
    max-width: 308px;
    border-radius: 17px;
    overflow: hidden;
    background: var(--fda-navy);
    border: 1px solid var(--fda-card-border);
    box-shadow: 0 12px 28px rgba(34, 64, 72, .20);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.market-card:hover{
    transform: translateY(-2px);
    border-color: var(--fda-orange);
    box-shadow: 0 16px 32px rgba(34, 64, 72, .28);
}

/* En esta vista solo se usa Marketplace, ocultamos la navegación superior */
.header-inner-wrap .main-menu,
.header-inner-wrap .header-right {
    display: none !important;
}

.header-inner-wrap {
    justify-content: flex-start !important;
}

/* Cabecera compartida con index.php */
#header-main .tf-container.xl { width: min(1180px, calc(100% - 48px)); max-width: none; padding: 0; }
#header-main .header-inner-wrap { min-height: 76px; gap: 32px; }
#header-main .header-logo img { width: 104px; height: auto; }
#header-main .market-header-nav { display: flex !important; align-items: center; gap: 27px; margin-left: auto; color: #667a7e; font-size: 14px; font-weight: 700; }
#header-main .market-header-nav a:hover, #header-main .market-header-nav a.is-active { color: var(--fda-navy-deep); }
#header-main .market-header-cta { display: inline-flex !important; align-items: center; gap: 9px; padding: 12px 16px; border-radius: 10px; color: #fff; background: var(--fda-orange); font-size: 14px; font-weight: 700; box-shadow: 0 8px 18px rgba(255, 113, 72, .22); }
#header-main .market-header-cta:hover { color: #fff; background: #ec5e39; }

.market-hero{
    height: 200px;
    background-position: center;
    background-size: cover;
    position: relative;
    background-color: #fff;
}

.market-badge-bono{
    position:absolute; top:12px; left:12px;
    background: var(--fda-orange);
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: .78rem;
    white-space: nowrap;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 7px 14px rgba(255, 113, 72, .28);
    border: 0;
    z-index: 3;
}

.market-badge-destacado{
    position:absolute; top:12px; right:12px;
    display:inline-flex; align-items:center; gap:6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: .78rem;
    line-height: 1;
    color: #fff;
    background: var(--fda-sage);
    box-shadow: 0 7px 14px rgba(47, 78, 88, .22);
    border: 0;
    z-index: 3;
    user-select:none;
    white-space:nowrap;
}

.market-badge-destacado--cyber {
    background: var(--fda-cream);
    color: var(--fda-navy-deep);
}

.market-body{
    padding: 14px 14px 12px;
    color: #fff;
    background: var(--fda-navy);
}

.market-pills{
    display:flex; gap:10px; align-items:center; flex-wrap:wrap;
}
.market-pill{
    display:inline-flex; align-items:center; gap:6px;
    background: rgba(255,255,255,.10); color: #fff;
    padding:6px 12px; border-radius: 999px;
    font-weight:600; font-size:.78rem; line-height:1;
    border: 1px solid rgba(255,255,255,.16);
}
.market-pill--entrega.inmediata,
.market-pill--entrega.verde { background: var(--fda-cream); color: var(--fda-navy-deep); border-color: var(--fda-cream); }
.market-pill--entrega.blanco { background: #f6f3ec; color: var(--fda-navy-deep); border-color: #f6f3ec; }

.market-title{ font-weight:800; font-size:1.05rem; letter-spacing:.2px; color:#fff; margin-top:10px; }
.market-sub{ color:rgba(255,255,255,.79); font-size:.9rem; margin-top:2px; display:flex; align-items:center; gap:8px; }
.market-value{ display:block; margin-top:6px; font-weight:800; font-size:1.08rem; color:#fff; }
.market-cuota{ margin:6px 0 10px; color:rgba(255,255,255,.84); font-size:.92rem; }

.market-specs{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.market-spec{
    display:inline-flex; align-items:center; gap:6px;
    padding:6px 10px; border-radius:10px;
    background: var(--fda-navy-soft); border:1px solid rgba(255,255,255,.22); color:#fff;
    font-weight:600; font-size:.86rem;
}

/* link sin romper el theme */
.market-card-link{ display:block; text-decoration:none; color:inherit; }

.property-list .market-card {
    width: 100%;
    max-width: none;
}

.property-list .market-hero {
    height: clamp(165px, 12vw, 210px);
}

.property-list .market-body {
    padding: 13px 14px 14px;
}

.property-list .market-badge-bono,
.property-list .market-badge-destacado {
    padding: 7px 11px;
    font-size: 11px;
}

.property-list .market-pill {
    padding: 6px 11px;
    font-size: 11px;
}

.property-list .market-title {
    margin-top: 8px;
    font-size: clamp(15px, 1.05vw, 17px);
}

.property-list .market-sub,
.property-list .market-value,
.property-list .market-cuota {
    font-size: clamp(12px, 0.9vw, 15px);
}

.property-list .market-spec {
    font-size: 11.5px;
    padding: 5px 9px;
}

.market-badge-bono,
.market-badge-destacado { font-size: 12px; }

.market-pill { font-size: 12px; }

.market-title { font-size: 16px; }
.market-sub   { font-size: 13px; }
.market-value { font-size: 16px; }
.market-cuota { font-size: 13px; }

.market-spec  { font-size: 12.5px; }

.market-spec i.fa {
    font-size: 12px;
    line-height: 1;
}

.d-none-dorm {
    display: none !important;
}

.d-none-ban {
    display: none !important;
}

.d-none-uf {
    display: none !important;
}

@media (min-width: 992px) {
    .section-property-map .wrap-map {
        width: 40% !important;
        flex: 0 0 40%;
    }

    .section-property-map .content-right {
        width: 60%;
        flex: 0 0 60%;
        padding: 39px 32px 47px 32px;
    }
}

.property-list.isotope-enabled {
    display: block !important;
    position: relative;
    width: 100%;
}

.property-list.isotope-enabled .card-propiedad-enlace {
    width: auto;
    box-sizing: border-box;
    margin-bottom: 0;
}

.property-list.isotope-enabled .card-propiedad-enlace::after {
    content: "";
    display: block;
    height: 20px;
}

/* ===== Fix popup map ===== */
.infoBox,
.map-box,
.map-box > div,
.map-listing-item{
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Evita “aire” extra por estilos del theme dentro del popup */
.map-listing-item .market-card { margin: 0; }
.map-listing-item .market-body { padding-bottom: 12px; } /* mismo que listado */
.map-listing-item .market-specs { margin-bottom: 0; }
.map-listing-item .market-cuota { margin-bottom: 10px; } /* igual al listado */

.market-card-link--map { cursor: pointer; }

.market-filters .market-select2 {
    width: 100%;
}

.market-filters-loading {
    display: none;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 4px;
    color: #5f687b;
    font-size: 14px;
    font-weight: 600;
}

/* La carga del marketplace se comunica únicamente con el loader principal. */
#marketFiltersLoading { display: none !important; }

.market-filters-loading__spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #d9dee8;
    border-top-color: var(--fda-orange);
    animation: market-spin .8s linear infinite;
}

@keyframes market-spin {
    to { transform: rotate(360deg); }
}

.wg-filter.style-3 .form-title.style-2.market-filters[data-market-ready="0"] .market-filters-loading {
    display: inline-flex;
}

.wg-filter.style-3 .form-title.style-2.market-filters[data-market-ready="0"] > :not(.market-filters-loading) {
    display: none !important;
}

.market-filters .select2-container {
    width: 100% !important;
}

.market-filters .select2-container--default .select2-selection--multiple {
    min-height: 48px;
    height: auto;
    border: 1px solid #d7dce5;
    border-radius: 12px;
    background: #fff;
    padding: 6px 8px 4px;
    display: block;
}

.market-filters .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    white-space: normal;
}

.market-filters .select2-container--default .select2-selection--multiple .select2-selection__choice {
    float: none;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 6px;
    background: #fff2ed;
    border: 1px solid #ffc0ad;
    border-radius: 999px;
    color: #bd4a2d;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px 4px 8px;
    line-height: 1.2;
}

.market-filters .select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    order: 1;
    padding: 0 !important;
    color: inherit;
}

.market-filters .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    -webkit-appearance: none !important;
    appearance: none !important;
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    margin-right: 0 !important;
    margin-left: 6px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-shadow: none !important;
    overflow: hidden;
    cursor: pointer;
    font-family: Arial, sans-serif !important;
}

.market-filters .select2-container--default .select2-selection--multiple .select2-selection__choice__remove span {
    display: none !important;
}

.market-filters .select2-container--default .select2-selection--multiple .select2-selection__choice__remove::after {
    content: "x" !important;
    display: block !important;
    color: #bd4a2d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    font-family: Arial, sans-serif !important;
}

.market-filters .select2-container--default .select2-selection--multiple .select2-search--inline {
    float: none;
}

.market-filters .select2-container--default .select2-selection--multiple .select2-search__field {
    margin: 0 !important;
    height: 32px;
    line-height: 1.3;
    padding: 4px 2px !important;
    min-width: 70px !important;
    color: #737b8c !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
}

.market-filters .select2-container--default .select2-selection--multiple .select2-search__field::placeholder {
    color: #737b8c !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    opacity: 1 !important;
}

.market-filters .select2-dropdown {
    border: 1px solid #d7dce5;
    border-radius: 12px;
    overflow: hidden;
}

.market-filters .select2-search--dropdown .select2-search__field {
    border: 1px solid #d7dce5;
    border-radius: 8px;
}

.market-applied-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.market-applied-filters__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.market-applied-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff2ed;
    border: 1px solid #ffc0ad;
    border-radius: 999px;
    color: #bd4a2d;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    padding: 5px 10px;
}

.market-applied-filter__remove {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    border: 0;
    background: transparent;
    background-image: none !important;
    color: transparent !important;
    font-size: 0 !important;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif !important;
    box-shadow: none !important;
    text-shadow: none !important;
    overflow: hidden;
}

.market-applied-filter__remove::after {
    content: "x" !important;
    display: block !important;
    color: #bd4a2d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    font-family: Arial, sans-serif !important;
}

.market-results-count {
    color: #2c2e33;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
}

.section-property-map .content-right .box-title h2 {
    font-size: 34px;
    line-height: 42px;
}

#chipDormitorios,
#chipBanos {
    min-height: 48px !important;
    height: auto !important;
    border-radius: 12px !important;
    padding: 6px 8px !important;
    align-items: flex-start !important;
    align-content: flex-start !important;
}

#chipDormitorios .chip,
#chipBanos .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff2ed;
    color: #bd4a2d;
    border: 1px solid #ffc0ad;
    border-radius: 999px;
    padding: 4px 10px 4px 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

#chipDormitorios .chip-x,
#chipBanos .chip-x {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    border: 0;
    background: transparent;
    background-image: none !important;
    color: transparent !important;
    font-size: 0 !important;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif !important;
    box-shadow: none !important;
    text-shadow: none !important;
    overflow: hidden;
}

#chipDormitorios .chip-x::after,
#chipBanos .chip-x::after {
    content: "x" !important;
    display: block !important;
    color: #bd4a2d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    font-family: Arial, sans-serif !important;
}

#chipDormitorios .chip-x::before,
#chipBanos .chip-x::before,
.market-applied-filter__remove::before,
.market-filters .select2-container--default .select2-selection--multiple .select2-selection__choice::before,
.market-filters .select2-container--default .select2-selection--multiple .select2-selection__choice::after,
.market-filters .select2-container--default .select2-selection--multiple .select2-selection__choice__remove::before {
    content: none !important;
    display: none !important;
}

.market-applied-filter__remove,
.market-filters .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    -webkit-appearance: none !important;
    appearance: none !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    font-family: Arial, sans-serif !important;
    font-style: normal !important;
    line-height: 1 !important;
    padding: 0 !important;
    text-shadow: none !important;
}

#chipDormitorios .chip-placeholder,
#chipBanos .chip-placeholder {
    color: #737b8c;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    padding: 4px 2px;
}

/* ===== Superficie, filtros y mapa · FDA CRM ===== */
body,
#wrapper,
.main-content,
.section-property-map {
    background: #f7f5f0;
}

#header-main {
    background: #fff;
    border-bottom: 1px solid #e5e8e7;
    box-shadow: 0 2px 10px rgba(39, 73, 82, .05);
}

#header-main .header-inner-wrap {
    min-height: 78px;
}

.section-property-map .content-right {
    background: #f7f5f0;
}

/* El filtro se integra a la superficie del listado, sin tarjeta blanca aparte. */
.wg-filter.style-3 .form-title.style-2.market-filters {
    background: transparent !important;
    border-radius: 0;
}

.market-results-count,
.section-property-map .content-right .box-title h2,
.price-filter__label,
.price-filter__value {
    color: var(--fda-navy-deep);
}

.market-results-count {
    font-weight: 800;
    letter-spacing: .01em;
}

.section-property-map .content-right .box-title h2 {
    font-weight: 800;
    letter-spacing: -.02em;
}

.market-filters .select2-container--default .select2-selection--multiple,
#chipDormitorios,
#chipBanos,
.box-title .nice-select {
    background: #f1efe8 !important;
    border-color: #d6dee0 !important;
    box-shadow: none;
}

.market-filters .select2-container--default .select2-selection--multiple:hover,
.market-filters .select2-container--default.select2-container--open .select2-selection--multiple,
#chipDormitorios:hover,
#chipBanos:hover,
.box-title .nice-select:hover,
.box-title .nice-select.open {
    border-color: var(--fda-navy-soft) !important;
}

.market-filters .select2-container--default .select2-selection--multiple .select2-search__field,
.market-filters .select2-container--default .select2-selection--multiple .select2-search__field::placeholder,
#chipDormitorios .placeholder,
#chipBanos .placeholder,
.box-title .nice-select > span {
    color: #657688 !important;
    font-weight: 600 !important;
}

.market-filters .select2-dropdown,
.market-filters .select2-search--dropdown .select2-search__field,
#dropDormitorios,
#dropBanos {
    background: #f7f5f0 !important;
    border-color: #d6dee0 !important;
}

#ufRangeSlider.noUi-target {
    background: #d7dfe0 !important;
}

#ufRangeSlider .noUi-connect {
    background: var(--fda-navy-deep) !important;
}

#ufRangeSlider.noUi-horizontal .noUi-handle {
    background: #fff !important;
    border-color: var(--fda-navy-deep) !important;
}

.box-title .nice-select {
    color: var(--fda-navy-deep);
    border-radius: 12px;
}

.box-title .nice-select .list {
    border: 1px solid #d6dee0;
    box-shadow: 0 12px 24px rgba(39, 73, 82, .12);
}

.box-title .nice-select .option:hover,
.box-title .nice-select .option.focus,
.box-title .nice-select .option.selected.focus {
    background: #fff0eb;
    color: #bd4a2d;
}

.section-property-map .wrap-map {
    background: #e8ece8;
    border-right: 1px solid #dce2df;
}

.section-property-map .map-marker-container {
    --Primary: var(--fda-navy-deep);
    --Sub-primary-2: rgba(39, 73, 82, .22);
}

.section-property-map .map-marker-container.is-proyecto {
    --Primary: #365e68;
    --Sub-primary-2: rgba(54, 94, 104, .22);
}

.section-property-map .map-marker-container.clicked {
    --Primary: var(--fda-orange);
    --Sub-primary-2: rgba(255, 113, 72, .28);
}

.section-property-map .marker-card .face {
    border-color: #fff;
    box-shadow: 0 2px 7px rgba(39, 73, 82, .24);
}

.section-property-map .marker-container {
    width: 34px;
    height: 34px;
    top: 20px;
    left: 12px;
}

.section-property-map .marker-card .face {
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 14px;
}

/* Los marcadores permanecen estáticos; sin ondas/palpitación visual. */
.section-property-map .marker-card .face::before,
.section-property-map .marker-card .face::after {
    display: none;
    animation: none;
}

#map .gm-style .gm-control-active,
#map .gm-style .gm-fullscreen-control {
    border-radius: 8px !important;
}

#map .gm-style .gm-control-active:hover {
    background: #fff0eb !important;
}

@media (max-width: 767.98px) {
    #header-main .tf-container.xl { width: calc(100% - 32px); }
    #header-main .row { margin-right: 0; margin-left: 0; }
    #header-main .col-12 { padding-right: 0; padding-left: 0; }
    #header-main .market-header-nav { display: none !important; }
    #header-main .market-header-cta { margin-left: auto; padding: 10px 12px; font-size: 12px; }
    #header-main .header-inner-wrap { min-height: 66px; }
    #header-main .header-logo img { width: 86px; }

    .property-list .market-hero {
        height: 215px;
    }

    .property-list .market-body {
        padding: 14px 16px 15px;
    }

    .property-list .market-title {
        font-size: 17px;
    }
}


/* Estado de error del catálogo */
/* Más específico que las reglas !important de css/styles.css para estos bloques. */
.wg-filter.style-3 .form-title.style-2.market-filters.is-unavailable .filters-row,
.wg-filter.style-3 .form-title.style-2.market-filters.is-unavailable .price-filter,
.wg-filter.style-3 .form-title.style-2.market-filters.is-unavailable .market-applied-filters { display: none !important; }

.market-error {
    padding: 24px 20px;
    border: 1px dashed #d6ded8;
    border-radius: 14px;
    background: #fafbf9;
    color: var(--fda-navy-soft);
    text-align: center;
}
.market-error p { margin: 0 0 12px; }
.market-error__retry {
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--fda-orange);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.market-error__retry:hover { background: #ec5e39; }
.market-error__retry:focus-visible { outline: 2px solid var(--fda-navy); outline-offset: 3px; }

/* ===== Integración de arriendos (desde main) ===== */

/* Marcadores del mapa sin halo ni pulsación. */
.map-marker-container .marker-card .face::before,
.map-marker-container .marker-card .face::after {
    content: none !important;
    display: none !important;
    animation: none !important;
    box-shadow: none !important;
}

/* Pestañas Comprar / Rentas sobre los filtros. */
.market-tabs {
    display: inline-flex;
    align-items: stretch;
    gap: 3px;
    margin: 0 0 16px;
    padding: 4px;
    background: #fff;
    border: 1px solid #cfe0dc;
    border-radius: 11px;
}
.market-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 9px 15px;
    color: var(--fda-navy-deep);
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.market-tabs a:hover { color: var(--fda-navy); background: #f4f6f5; }
.market-tabs a:focus-visible { outline: 2px solid var(--fda-orange); outline-offset: 2px; }
.market-tabs a.is-active { color: #fff; background: var(--fda-orange); box-shadow: 0 3px 8px rgba(255, 113, 72, .24); }
@media (max-width: 575px) {
    .market-tabs a { min-width: 73px; padding: 9px 11px; font-size: 12px; }
}

/* Filtros y listado en modo arriendos. */
body[data-market-tab="rentas"] .market-filters-loading { display: none !important; }
body[data-market-tab="rentas"] .market-filters > :not(.market-filters-loading) { display: block !important; }
body[data-market-tab="rentas"] .wg-filter.style-3 .form-title.style-2.market-filters .filters-row {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px;
}
body[data-market-tab="rentas"] .market-filters .filter-slot > select {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0 38px 0 14px;
    color: #526376;
    background: #fff;
    border: 1px solid #d7dce5;
    border-radius: 12px;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
body[data-market-tab="rentas"] #ufRangeSlider.is-disabled {
    opacity: .35;
    pointer-events: none;
}
body[data-market-tab="rentas"] .market-filters .chip-input {
    min-height: 48px;
    padding: 7px 12px;
    background: #fff;
    border: 1px solid #d7dce5;
    border-radius: 12px;
}
body[data-market-tab="rentas"] .property-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}
body[data-market-tab="rentas"] .property-list .card-propiedad-enlace { width: 100%; }
body[data-market-tab="rentas"] .property-list .market-card { width: 100%; max-width: none; }
@media (max-width: 1180px) {
    body[data-market-tab="rentas"] .wg-filter.style-3 .form-title.style-2.market-filters .filters-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    body[data-market-tab="rentas"] .property-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    body[data-market-tab="rentas"] .property-list { grid-template-columns: 1fr; }
}
.renta-chip-option {
    margin: 4px;
    padding: 6px 10px;
    color: #315964;
    background: #fff;
    border: 1px solid #d6e2df;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.renta-chip-option.is-active { color: #fff; background: #264f5d; border-color: #264f5d; }
.renta-chip-option:focus-visible { outline: 2px solid var(--fda-orange); outline-offset: 2px; }

/* ===== Filtros: estilo único para Comprar y Rentas ===== */
/* Todos los controles (Select2, chips, selects nativos y orden) comparten fondo blanco,
   borde, altura, flecha y estado activo, para que se lean como un solo sistema. */
.market-filters {
    --fda-filter-border: #cfd8da;
    --fda-filter-text: var(--fda-navy-deep);
    --fda-filter-muted: #5f7179;
    --fda-filter-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23456873' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.market-filters .select2-container--default .select2-selection--multiple,
.market-filters #chipDormitorios,
.market-filters #chipBanos,
.market-filters .filter-slot > select,
body[data-market-tab="rentas"] .market-filters .filter-slot > select,
body[data-market-tab="rentas"] .market-filters .chip-input {
    min-height: 48px !important;
    padding: 6px 40px 6px 14px !important;
    background-color: #fff !important;
    background-image: var(--fda-filter-chevron) !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 12px 8px !important;
    border: 1px solid var(--fda-filter-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(39, 73, 82, .04) !important;
    color: var(--fda-filter-text) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.market-filters #chipDormitorios,
.market-filters #chipBanos,
body[data-market-tab="rentas"] .market-filters .chip-input {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.market-filters .filter-slot > select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
}

/* Textos de ayuda legibles (antes se veían como deshabilitados). */
.market-filters .select2-container--default .select2-selection--multiple .select2-search__field,
.market-filters .select2-container--default .select2-selection--multiple .select2-search__field::placeholder,
.market-filters #chipDormitorios .placeholder,
.market-filters #chipBanos .placeholder,
.market-filters #chipDormitorios .chip-placeholder,
.market-filters #chipBanos .chip-placeholder {
    color: var(--fda-filter-muted) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

/* Hover y foco. */
.market-filters .select2-container--default .select2-selection--multiple:hover,
.market-filters #chipDormitorios:hover,
.market-filters #chipBanos:hover,
.market-filters .filter-slot > select:hover {
    border-color: var(--fda-navy-soft) !important;
}
.market-filters .select2-container--default.select2-container--focus .select2-selection--multiple,
.market-filters .select2-container--default.select2-container--open .select2-selection--multiple,
.market-filters #chipDormitorios:focus-visible,
.market-filters #chipBanos:focus-visible,
.market-filters #chipDormitorios[aria-expanded="true"],
.market-filters #chipBanos[aria-expanded="true"],
.market-filters .filter-slot > select:focus-visible {
    border-color: var(--fda-navy) !important;
    box-shadow: 0 0 0 3px rgba(45, 81, 92, .14) !important;
    outline: none;
}

/* Filtro con algo seleccionado: borde naranja. */
.market-filters .select2-selection--multiple:has(.select2-selection__choice),
.market-filters #chipDormitorios:has(.chip),
.market-filters #chipBanos:has(.chip),
.market-filters .filter-slot > select.has-value {
    border-color: var(--fda-orange) !important;
    box-shadow: 0 0 0 1px var(--fda-orange) !important;
}

/* Desplegables de chips con el mismo lenguaje visual. */
.market-filters #dropDormitorios,
.market-filters #dropBanos {
    background: #fff !important;
    border: 1px solid var(--fda-filter-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 24px rgba(39, 73, 82, .12) !important;
}

/* Orden de resultados: sin texto montado sobre la flecha. */
.box-title .nice-select.list-sort {
    width: auto !important;
    min-width: 210px;
    height: 48px;
    padding: 0 44px 0 16px !important;
    display: inline-flex;
    align-items: center;
    background: #fff !important;
    border: 1px solid #cfd8da !important;
    white-space: nowrap;
}
.box-title .nice-select.list-sort::after { right: 18px !important; }
.box-title .nice-select.list-sort > span.current {
    color: var(--fda-navy-deep) !important;
    font-size: 15px;
    font-weight: 600 !important;
}
.box-title .nice-select.list-sort .list { left: auto; right: 0; min-width: 100%; }
.box-title .nice-select.list-sort:focus-visible { outline: 2px solid var(--fda-navy); outline-offset: 2px; }

/* Precio sin rango (un solo valor): se muestra el valor sin deslizador. */
.price-filter.is-single #ufRangeSlider { display: none !important; }

/* Ajuste fino: misma línea base y color de ayuda en todos los controles. */
.market-filters #chipDormitorios .placeholder,
.market-filters #chipBanos .placeholder,
.market-filters #chipDormitorios .chip-placeholder,
.market-filters #chipBanos .chip-placeholder {
    padding: 0 !important;
    line-height: 1.2 !important;
}
/* Centrado vertical real del texto en Select2 y en los chips. */
.market-filters .select2-container--default .select2-selection--multiple,
.market-filters #chipDormitorios,
.market-filters #chipBanos {
    display: flex !important;
    align-items: center !important;
}
.market-filters .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    flex: 1 1 auto;
    min-height: 0;
}
.market-filters .select2-container--default .select2-selection--multiple .select2-search--inline,
.market-filters .select2-container--default .select2-selection--multiple .select2-search__field {
    display: block !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 22px !important;
}
/* Select nativo sin valor elegido: el texto es una ayuda, no un valor. */
.market-filters .filter-slot > select:has(option:checked[value=""]) {
    color: var(--fda-filter-muted) !important;
}
.market-filters .filter-slot > select option { color: var(--fda-navy-deep); }
.market-filters #chipDormitorios,
.market-filters #chipBanos,
body[data-market-tab="rentas"] .market-filters .chip-input {
    align-content: center !important;
}
.market-filters #chipDormitorios > *,
.market-filters #chipBanos > * { align-self: center !important; }
.market-filters .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    justify-content: flex-start !important;
    text-align: left !important;
}
.market-filters .select2-container--default .select2-selection--multiple .select2-search--inline { flex: 1 1 auto; }
.market-filters .select2-container--default .select2-selection--multiple .select2-search__field {
    width: 100% !important;
    text-align: left !important;
}
/* Select2 coloca la lista de elegidos y el buscador como hermanos: la lista sólo ocupa su contenido. */
.market-filters .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    flex: 0 1 auto !important;
    width: auto !important;
}
.market-filters .select2-container--default .select2-selection--multiple .select2-selection__rendered:empty { display: none !important; }

/* Estados vacíos: catálogo sin propiedades y filtros sin resultados. */
.market-empty,
.market-no-results {
    grid-column: 1 / -1;
    margin: 4px 0 0;
    padding: 28px 24px;
    border: 1px solid #d6dee0;
    border-radius: 14px;
    background: #fff;
    color: var(--fda-navy-soft);
    text-align: center;
}
.market-empty p,
.market-no-results p { margin: 0 0 12px; font-size: 15px; }
.market-empty__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fda-orange);
    font-weight: 700;
    text-decoration: none;
}
.market-empty__link:hover,
.market-empty__link:focus-visible { color: var(--fda-navy); text-decoration: underline; }

/* Texto de los chips sin montarse sobre la flecha cuando la columna es angosta. */
.market-filters #chipDormitorios .placeholder,
.market-filters #chipBanos .placeholder,
.market-filters #chipDormitorios .chip-placeholder,
.market-filters #chipBanos .chip-placeholder {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.market-filters .filter-slot,
.market-filters .filter-chip-field { min-width: 0; }

/* En Arrendar, las reglas de pestaña fuerzan los filtros visibles: en error o catálogo vacío se ocultan igual. */
body[data-market-tab="rentas"] .wg-filter.style-3 .form-title.style-2.market-filters.is-unavailable .filters-row,
body[data-market-tab="rentas"] .wg-filter.style-3 .form-title.style-2.market-filters.is-unavailable .price-filter,
body[data-market-tab="rentas"] .wg-filter.style-3 .form-title.style-2.market-filters.is-unavailable .market-applied-filters {
    display: none !important;
}
