.badge-status {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: 2;
    border-radius: 999px;
    background: var(--color-primary);
    padding: var(--space-1) var(--space-3);
    color: white;
    font-weight: 600;
    font-size: var(--text-micro);
    letter-spacing: 0.3px;
}

.map-container {
    position: relative !important;
    /* Base para el boton absoluto de pantalla completa */
    margin: 30px auto;
    border-radius: 20px;
    width: 100%;
    max-width: 1200px;
    overflow: visible !important;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.map-header-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    /* Regresamos a 2 columnas: Titulo | Opciones */
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 20px 20px 0 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    /* Para que el absoluto del boton se base aqui si es necesario */
}

.map-grid-col {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    /* Prohibido comprimirse */
}

.map-fullscreen-side {
    margin-right: -5px;
    /* Ajuste fino de cercanía */
}

.map-options-side {
    justify-content: flex-end;
    min-width: 44px;
    /* Espacio garantizado para el boton circular */
}

.map-title-side h3 {
    margin: 0;
    font-weight: 700;
    color: #1e293b;
    font-size: 1.5rem;
}

#map-fullscreen-btn {
    position: absolute !important;
    top: 100px !important;
    /* Saltamos la cabecera para flotar sobre el mapa */
    right: 20px !important;
    z-index: 999 !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.map-fullscreen-side {
    display: none;
    /* Ya no ocupa espacio en el grid */
}

.map-options-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-map-nav-opener {
    background: white;
    border: 1px solid #e2e8f0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #475569;
    padding: 0;
}

.btn-map-nav-opener:hover {
    background: #fdfdfd;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.map-nav-list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 8px;
    min-width: 240px;
    z-index: 1000;
    display: none;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
}

.map-nav-list.is-active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.map-nav-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #1e293b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.map-nav-list li a:hover {
    background: #f1f5f9;
}

.map-nav-list li a img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Ajustes al botón de pantalla completa para coherencia */
#map-fullscreen-btn {
    border-radius: 12px;
    height: 44px;
    padding: 0 16px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: none;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    max-width: fit-content;
}



/* Agrega aquí tus estilos para Móviles */
.metric-capsule {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.metric-capsule:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.metric-capsule svg {
    color: #64748b;
    stroke-width: 2.2;
}

.metric-capsule b {
    color: #0f172a;
}

.metric-capsule.is-new {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
}

.metric-capsule.is-new svg {
    color: #0369a1;
}

.metric-capsule.is-hot {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.metric-capsule.is-hot svg {
    color: #b91c1c;
}

.metric-capsule.is-favorite {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #e11d48;
}

.metric-capsule.is-favorite svg {
    color: #e11d48;
}

.metric-capsule small {
    background: #b91c1c;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 700;
    margin-left: 4px;
}

.description-text p {
    font-size: var(--text-sm);
}



.metric-capsule span,
.property-metrics-row span,
.property-metrics-row {
    font-size: 11px;
}

.property-amenidades {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.property-metrics-row {
    padding-bottom: 12px;
}

/* 2. TABLETS (Dispositivos pequeños/medianos)
   Se activa a partir de 768px. */
@media (min-width: 768px) {



    .tool-badge {

        display: none;
    }

    .tpl-gallery-infosell {
        width: calc(100vw - 480px);
        max-width: 100%;
    }

    .property-grid {
        gap: 30px;
    }

}

/* 3. LAPTOPS / ESCRITORIO (Dispositivos grandes)
   Se activa a partir de 1024px. */
@media (min-width: 1024px) {

    .property-metrics-row {
        padding-bottom: 0px;
    }

    .tpl-gallery-infosell {
        max-width: calc(100vw - 530px);
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    /* PRELOADER */
    #preloader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #f1f5eb;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999999;
        transition: opacity 0.6s ease, visibility 0.6s ease;
    }

    .preloader-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 200px;
        height: 200px;
    }

    .preloader-logo {
        width: 90px;
        height: auto;
        z-index: 10;
        animation: logo-float 2s ease-in-out infinite;
    }

    .pulse-wave {
        position: absolute;
        width: 80px;
        height: 80px;
        background-color: #6c757d;
        border-radius: 50%;
        opacity: 0;
        animation: material-pulse 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    }

    .delay-pulse {
        animation-delay: 1s;
    }

    @keyframes material-pulse {
        0% {
            transform: scale(0.8);
            opacity: 0.5;
        }

        100% {
            transform: scale(2.5);
            opacity: 0;
        }
    }

    @keyframes logo-float {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-5px);
        }
    }

    .preloader-hidden {
        opacity: 0 !important;
        visibility: hidden !important;
    }

    /* FAVORITO ANIMATIONS */
    .js-like-property {
        cursor: pointer;
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
        display: inline-block;
        user-select: none;
    }

    .js-like-property:hover {
        transform: rotate(15deg) scale(1.15);
        filter: brightness(1.1);
    }

    .js-like-property:active {
        transform: scale(0.9);
    }

    .fav-pulse-animation {
        animation: fav-pulse 0.4s linear;
    }

    @keyframes fav-pulse {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.4);
        }

        100% {
            transform: scale(1);
        }
    }

    /* MODALES GLOBALES */
    body.modal-open {
        overflow: hidden !important;
        touch-action: none;
        position: relative;
        width: 100vw;
    }

    .ubihome-modal {
        position: fixed;
        inset: 0;
        display: none;
        z-index: 999999;
    }

    .ubihome-modal.active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ubihome-modal-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        backdrop-filter: blur(3px);
    }

    .ubihome-modal-window {
        position: relative;
        background: #fff;
        padding: 30px;
        border-radius: 14px;
        width: 90%;
        max-width: 380px;
        text-align: center;
        z-index: 2;
        box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    }

    .ubihome-modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        border: none;
        background: none;
        font-size: 20px;
        cursor: pointer;
    }

    .btn-login-required {
        display: inline-block;
        margin-top: 15px;
        padding: 10px 18px;
        background: #0d6efd;
        color: white;
        border-radius: 6px;
        text-decoration: none;
    }

    /* PROPERTY METRICS BAR */
    .property-metrics-container {
        margin: 15px 0 0px 0;
    }

    .property-metrics-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .metric-capsule {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        background: white;
        border-radius: 25px;
        font-size: 13px;
        font-weight: 600;
        color: #555;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .metric-capsule:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .metric-capsule b {
        color: #111;
    }

    .metric-capsule.is-hot {
        background: #fff5f5;
        color: #e03131;
        border: 1px solid rgba(224, 49, 49, 0.15);
    }

    .metric-capsule svg {
        width: 16px;
        height: 16px;
        stroke-width: 2.5;
    }

    .metric-capsule {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        background: white;
        border-radius: 25px;
        font-size: 13px;
        font-weight: 600;
        color: #555;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .metric-capsule:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .metric-capsule b {
        color: #111;
    }

    .metric-capsule.is-hot {
        background: #fff5f5;
        color: #e03131;
        border: 1px solid rgba(224, 49, 49, 0.15);
    }

    .metric-capsule svg {
        width: 16px;
        height: 16px;
        stroke-width: 2.5;
    }

    /* Agrega aquí tus estilos para iPad Pro */
    .tpl-gallery-infosell {
        max-width: calc(100vw - 530px) !important;
    }

    .grid-agent {

        grid-template-columns: 160px 1fr !important;
    }

    .action-buttons-group {

        grid-template-columns: 130px 1fr;
        margin-bottom: 8px;
    }
}

/* 4. PANTALLAS EXTRA GRANDES (Monitores 4K/Widescreen)
   Se activa a partir de 1440px. */
@media (min-width: 1440px) {}

/* PREMIUM BLUEPRINTS MODAL */
.premium-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.premium-modal.active {
    display: flex;
}

.bp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.bp-modal-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 85vh;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: modal-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-slide-up {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bp-modal-content {
    display: grid !important;
    grid-template-columns: 78% 22%;
    height: 100% !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.blueprint-slider-side {
    background: #f8fafc;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blueprint-info-side {
    background: #fff;
    border-left: 1px solid #f1f5f9;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.blueprint-slider {
    width: 100%;
    height: 100%;
}

.blueprint-slider .plano-item {
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.blueprint-slider .plano-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

.blueprint-info-header {
    margin-bottom: 2rem;
}

.info-tag {
    display: inline-block;
    background: #f0fdf4;
    color: #166534;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.blueprint-info-side h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin: 0;
}

.blueprint-description-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    padding-right: 15px;
}

/* Custom Scrollbar */
.blueprint-description-scroll::-webkit-scrollbar {
    width: 4px;
}

.blueprint-description-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.blueprint-description-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.bp-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 100;
    background: #fff;
    border: 1px solid #e2e8f0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bp-modal-close:hover {
    background: #fff;
    color: #f43f5e;
    transform: rotate(90deg);
    border-color: #f43f5e;
}

.slider-nav-premium {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 1000;
}

.slider-nav-premium button {
    width: 56px;
    height: 56px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.slider-nav-premium button:hover {
    background: #145a37;
    color: #fff;
    border-color: #145a37;
    transform: translateY(-4px) scale(1.05);
}

/* BLUEPRINT BUTTON */
.btn-blueprint {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: var(--space-3) var(--space-4);
    font-weight: 600;
    font-size: var(--text-xs);
    width: 100%;
    transition: all 0.3s;
}

.btn-blueprint:hover {
    transform: translateY(-2px);
    background: #edf2f7;
}

.btn-blueprint svg {
    color: #145a37;
}

@media (max-width: 991px) {
    .premium-modal {
        padding: 0;
    }

    .bp-modal-container {
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        animation: modal-slide-up-mobile 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes modal-slide-up-mobile {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .bp-modal-content {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        overflow: hidden;
    }

    .blueprint-slider-side {
        width: 100% !important;
        height: 60vh !important;
        flex-shrink: 0;
        background: #f1f5f9;
        /* Un poco más oscuro para que resalte la info blanca abajo */
    }

    .blueprint-slider .plano-item {
        height: 60vh !important;
    }

    .blueprint-info-side {
        width: 100% !important;
        height: 40vh !important;
        border-left: none;
        border-top-left-radius: 30px;
        border-top-right-radius: 30px;
        background: #fff;
        padding: 2rem 1.5rem !important;
        /* Estilo Apple Sheet */
        margin-top: -30px;
        position: relative;
        z-index: 10;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
    }

    /* Indicador visual de que se puede hacer scroll o es un panel */
    .blueprint-info-side::before {
        content: "";
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #e2e8f0;
        border-radius: 10px;
    }

    .bp-modal-close {
        top: 20px !important;
        right: 20px !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(4px);
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
        z-index: 100;
    }

    .slider-nav-premium {
        bottom: calc(40vh + 15px) !important;
        /* Flota justo sobre el panel de info */
        gap: 15px !important;
        transform: translateX(-50%) !important;
        left: 50% !important;
    }

    .slider-nav-premium button {
        width: 48px !important;
        height: 48px !important;

    }

    .blueprint-info-header {
        margin-bottom: 1.5rem !important;
    }

    .blueprint-info-side h3 {
        font-size: 1.25rem !important;
    }

    .blueprint-description-scroll {
        font-size: 14px !important;
        padding-bottom: 40px;
        /* Espacio para que el texto no muera al final */
    }
}