#como-llegar{
position: absolute; bottom: 40px; left: 40%; transform: translateX(-50%);
    z-index: 1001; background: white; padding: 10px 20px; border-radius: 20px;
    font-weight: 800; cursor: pointer; border: none; box-shadow: 0 4px 15px rgba(0,0,0,0.2);

}

#recenter-map {
position: absolute; bottom: 40px; left: 50.5%; transform: translateX(-50%);
    z-index: 1001; background: white; padding: 10px 20px; border-radius: 20px;
    font-weight: 800; cursor: pointer; border: none; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#toggle-3d { 
    position: absolute; bottom: 40px; left: 60%; transform: translateX(-50%);
    z-index: 1001; background: white; padding: 10px 20px; border-radius: 20px;
    font-weight: 800; cursor: pointer; border: none; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
/* Atacamos las dos clases que identificaste en tu imagen */
.maplibregl-mobile-message,
.maplibregl-cooperative-gestures-screen span {
    font-size: 0 !important; /* Escondemos el inglés */
    color: transparent !important;
    position: relative;
}

/* Insertamos el español mediante un pseudo-elemento */
.maplibregl-mobile-message::before,
.maplibregl-cooperative-gestures-screen span::before {
    content: "Para mover el mapa, utiliza dos dedos" !important;
    font-size: 16px !important; /* Devolvemos el tamaño al texto nuevo */
    color: white !important;
    display: block;
    text-align: center;
    visibility: visible;
    padding: 20px;
    line-height: 1.4;
}


/* Estilo general del contador */
#lotes-contador-text {
    font-size: 11px;
    color: #2f855a; /* Un verde oscuro profesional */
    letter-spacing: -0.3px;
}

/* --- BASE (PC Y GENERAL) --- */

#dcm-main-wrapper {
    position: relative; width: 100%; height: 600px;
    background: #000; overflow: hidden;
    font-family: 'Barlow', sans-serif;
}

#map-container { width: 100%; height: 100%; }

#dcm-sidebar {
    position: absolute; top: 20px; right: 20px; width: 300px;
    background: white; z-index: 1; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); padding: 25px;
    transition: transform 0.4s ease;
}



.map-legend { 
    position: absolute; bottom: 25px; left: 20px; z-index: 1000; 
    background: white; padding: 12px; border-radius: 8px; font-size: 11px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); font-weight: 600; z-index: 1 !important; 
}

.dot { height: 8px; width: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.disp { background: #28a745; } .apar { background: #ffc107; } .vend { background: #dc3545; }

.lote-header h3 { margin: 0; color: #1a2b4e; font-weight: 800; font-size: 1.4rem; }
.info-grid { display: grid; gap: 10px; margin: 15px 0; }
.info-card { background: #f8fafc; padding: 15px; border-radius: 10px; text-align: center; border: 1px solid #e2e8f0; }
.info-card span { font-size: 11px; color: #718096; font-weight: 700; display: block; }
.info-card strong { font-size: 20px; color: #1a2b4e; font-weight: 800; }
.status-pill { padding: 12px; border-radius: 10px; text-align: center; font-weight: 800; }

/* Ocultar elementos de móvil en PC */
#dcm-info-trigger, .close-sidebar, .mobile-pull-tab { display: none; }

/* --- AJUSTES PARA MOBILE (MAX 768px) --- */
@media (max-width: 768px) {
    
    /* 1. Botón 3D arriba a la izquierda */
    #toggle-3d {
        top: 15px; bottom: auto; left: 15px;
        transform: none; padding: 8px 15px; font-size: 12px; z-index: 1;
    }
    
     #recenter-map {
        top: 67px; bottom: auto; left: 15px;
        transform: none; padding: 8px 15px; font-size: 12px; z-index: 1;
    }

    #como-llegar{
top: 15px; bottom: auto; left: 105px;
        transform: none; padding: 8px 15px; font-size: 12px; z-index: 1;

    }

    /* 2. Leyenda arriba a la derecha */
    .map-legend {
        top: 15px; bottom: auto; left: auto; right: 15px;
        padding: 8px 12px; display: flex; gap: 10px; flex-direction: column; /* Cambiamos a columna para que el contador quepa arriba */
        align-items: flex-start;
        gap: 5px;
    }
    .map-legend div { margin-bottom: 0; }
    
    #lotes-contador-text {
        font-size: 12px;
        color: #1a2b4e;
        width: 100%;
    }


    /* 3. Botón de Info (Derecha central) */
    #dcm-info-trigger { 
        display: flex !important;
        position: absolute; right: 0; top: 50%; 
        transform: translateY(-50%); 
        background: #1a2b4e; color: white; padding: 15px 8px; 
        border-radius: 10px 0 0 10px; z-index: 1; 
        font-size: 11px; writing-mode: vertical-rl; cursor: pointer;
    }

    /* 4. Sidebar desde abajo */
    #dcm-sidebar { 
        top: auto; bottom: 0; right: 0; left: 0; 
        width: 100%; transform: translateY(100%); 
        border-radius: 20px 20px 0 0; padding: 35px 20px 20px; z-index: 9991;
    }

    #dcm-sidebar.open { transform: translateY(0); }

    /* Elementos de control del sidebar móvil */
    .close-sidebar { 
        display: block !important; position: absolute; 
        top: 15px; right: 20px; font-size: 28px; 
        color: #1a2b4e; cursor: pointer; line-height: 1; z-index: 1002;
    }

    .mobile-pull-tab { 
        display: block; width: 40px; height: 4px; 
        background: #e2e8f0; margin: -20px auto 15px; border-radius: 2px; 
    }

    /* Ajuste de cards en móvil para que ocupen menos espacio vertical */
    .info-grid { grid-template-columns: 1fr 1fr; }
    .info-card { padding: 10px; }
    .info-card strong { font-size: 16px; }
}