:root { --brand-blue: #0A84FF; --brand-orange: #ff9f0a; --brand-red: #FF453A; --brand-green: #30D158; --brand-purple: #bf5af2; }
body, html { margin: 0; padding: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Poppins", sans-serif; overflow: hidden; background-color: #f5f5f7; -webkit-font-smoothing: antialiased;}
.mapa-layout { display: flex; height: 100vh; width: 100vw; position: relative; }
.map-container { flex-grow: 1; position: relative; height: 100%; width: 100%; }
#map { width: 100%; height: 100%; }

.top-floating-bar { position: absolute; top: 20px; left: 20px; right: 20px; z-index: 1010; display: flex; align-items: flex-start; gap: 15px; pointer-events: none; flex-direction: column; }
.top-floating-bar > * { pointer-events: auto; }
.top-search-row { display: flex; align-items: flex-start; gap: 15px; width: 100%; }

.btn-volver-global { display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; gap: 8px; background: rgba(44, 62, 80, 0.95); backdrop-filter: blur(25px); border-radius: 30px; color: #ffffff; box-shadow: 0 0 20px rgba(0, 195, 255, 0.3); text-decoration: none; font-size: 0.9rem; font-weight: 600; border: 1px solid rgba(0, 195, 255, 0.4); transition: all 0.2s; white-space: nowrap; height: 48px; box-sizing: border-box; }
.btn-volver-global:hover { background: rgba(44, 62, 80, 1); }
.btn-volver-global:active { transform: scale(0.96); }

.buscador-mapa-wrapper { flex-grow: 1; max-width: 400px; min-width: 0; display: flex; flex-direction: column; gap: 8px; position: relative; }
.input-mapa-visual { position: relative; width: 100%; display: flex; align-items: center; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-radius: 30px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); border: 1px solid rgba(255, 255, 255, 0.9); overflow: hidden; transition: all 0.3s ease; box-sizing: border-box; padding-left: 15px; height: 48px; }
.input-mapa-visual:focus-within { box-shadow: 0 6px 25px rgba(10, 132, 255, 0.3); border-color: #0A84FF; }
.input-mapa-visual i.fa-search { color: #0A84FF; font-size: 1rem; pointer-events: none; transition: all 0.3s ease; flex-shrink: 0; }
.input-mapa-visual input { width: 100%; background: transparent; border: none; color: #1d1d1f; padding: 12px 40px 12px 10px; font-family: 'Poppins', sans-serif; font-size: 0.95rem; outline: none; box-sizing: border-box; height: 100%; }
.input-mapa-visual input::placeholder { color: #86868b; }

.btn-clear-search { position: absolute; right: 15px; color: #86868b; cursor: pointer; display: none; font-size: 1.1rem; transition: 0.2s; z-index: 10; pointer-events: auto; }
.btn-clear-search:hover { color: #FF453A; transform: scale(1.1); }

#toast-no-results { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); background: rgba(29, 29, 31, 0.85); backdrop-filter: blur(10px); color: white; padding: 12px 24px; border-radius: 30px; font-size: 1rem; font-family: 'Poppins', sans-serif; font-weight: 500; pointer-events: none; opacity: 0; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 1000; box-shadow: 0 10px 30px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 10px; text-align: center; }
#toast-no-results.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
#toast-no-results i { color: #FF453A; font-size: 1.2rem; }

.sidebar { position: absolute; top: 80px; left: 20px; width: 320px; max-height: calc(100vh - 100px); background: rgba(44, 62, 80, 0.95); backdrop-filter: blur(25px); border: 1px solid rgba(0, 195, 255, 0.3); border-radius: 24px; box-shadow: 0 0 30px rgba(0, 195, 255, 0.4); z-index: 1000; display: flex; flex-direction: column; overflow: hidden; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.sidebar-header { padding: 20px; background: rgba(0, 0, 0, 0.2); border-bottom: 1px solid rgba(255, 255, 255, 0.1); position: relative; text-align: center; }
.sidebar-header h2 { margin: 0; font-size: 1.2rem; color: #ffffff; font-weight: 600; }
.btn-cerrar-movil { display: none; }
.lista-filtros { flex-grow: 1; overflow-y: auto; padding: 15px 15px 40px 15px; scroll-behavior: smooth; }
.lista-filtros::-webkit-scrollbar { width: 0px; background: transparent; }

.item-filtro { display: flex; align-items: center; gap: 12px; padding: 12px 15px; cursor: pointer; border-radius: 14px; transition: 0.2s; margin-bottom: 5px; color: #ecf0f1; font-size: 0.95rem; font-weight: 500; }
.item-filtro:hover { background: rgba(255, 255, 255, 0.1); }
.item-filtro.activo { background: rgba(0, 195, 255, 0.2); color: #ffffff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); border: 1px solid rgba(0, 195, 255, 0.3); }
.color-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }

/* Fila de Acciones Rápidas bajo la Navbar en Móviles */
.top-map-actions-row { display: none; }

@media (max-width: 768px) {
    .extra-cat-mobile { display: none; }
    .btn-toggle-cats { display: flex !important; justify-content: center; background: rgba(10, 132, 255, 0.1); border: 1px dashed rgba(10, 132, 255, 0.4); color: #0A84FF; font-weight: 600; margin-top: 10px; }
    .btn-toggle-cats:hover { background: rgba(10, 132, 255, 0.2); }
    
    /* Revelar barra de acciones bajo el buscador en móvil */
    .top-map-actions-row {
        display: flex;
        width: 100%;
        justify-content: space-evenly;
        align-items: center;
        margin-top: 5px; /* MÁS CERCA DE LA BARRA DE BÚSQUEDA */
        pointer-events: auto;
        gap: 8px; /* Separación equitativa */
    }

    /* BOTONES DE LOCALIZAR Y LIMPIAR TIPO PASTILLA RECTANGULAR */
    .btn-top-action {
        height: 34px; /* AJUSTADO A 34PX */
        width: 100%; 
        padding: 0;
        border-radius: 12px; /* SQUIRCLE AJUSTADO PARA 34px */
        font-family: 'Poppins', sans-serif;
        font-size: 1.1rem; /* ICONO AJUSTADO AL NUEVO ALTO */
        font-weight: 600;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        border: 1px solid transparent;
        white-space: nowrap;
        flex: 1;
    }
    .btn-top-action span { display: none; }

    .btn-top-gps { background: rgba(255, 255, 255, 0.95); color: #1d1d1f; border-color: rgba(255, 255, 255, 0.8); }
    body.dark-theme .btn-top-gps { background: rgba(30, 41, 59, 0.95); color: #ffffff; border-color: rgba(255, 255, 255, 0.15); }
    .btn-top-gps.gps-activo { color: #0A84FF !important; border-color: #0A84FF !important; animation: pulse-blue 2s infinite; }

    .btn-top-clean { background: rgba(255, 69, 58, 0.15); color: #FF453A; border-color: rgba(255, 69, 58, 0.3); }
    body.dark-theme .btn-top-clean { background: rgba(255, 69, 58, 0.2); color: #FF453A; border-color: rgba(255, 69, 58, 0.4); }
    .btn-top-action:active { transform: scale(0.95); }

    /* ==========================================
        AJUSTES EXCLUSIVOS MÓVIL PARA MENÚ FLOTANTE 
        ========================================== */
    .top-map-actions-row .mobile-menu-trigger {
        flex: 1; 
        display: flex;
        align-items: center;
        justify-content: center;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        width: auto !important;
        box-shadow: none !important;
        background: transparent !important;
        transform: none !important;
    }

    .top-map-actions-row .mobile-menu-trigger .pill-btn.menu-btn {
        height: 34px !important;
        width: 100% !important; /* Deja que tome el espacio disponible */
        min-width: 44px !important; /* Garantiza un ancho mínimo para que no colapse a una línea */
        border-radius: 12px !important;
        font-size: 1.1rem !important;
        display: flex !important; /* Fuerza flexbox */
        align-items: center !important; /* Centra verticalmente */
        justify-content: center !important; /* Centra horizontalmente */
        padding: 0 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.8) !important;
        background: rgba(255, 255, 255, 0.95) !important;
        color: #1d1d1f !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    }

    /* Verifica que el ícono sea visible */
    .top-map-actions-row .mobile-menu-trigger .pill-btn.menu-btn i {
        display: block !important;
        margin: 0 !important; 
    }

    body.dark-theme .top-map-actions-row .mobile-menu-trigger .pill-btn.menu-btn {
        background: rgba(30, 41, 59, 0.95) !important;
        color: #ffffff !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
    }

    .top-map-actions-row .mobile-menu-trigger .pill-btn.menu-btn span { display: none !important; }
    .top-map-actions-row .mobile-menu-trigger .pill-btn.menu-btn i { margin: 0 !important; }
    .top-map-actions-row .mobile-menu-trigger .pill-btn.back-btn,
    .top-map-actions-row .mobile-menu-trigger .divider { display: none !important; }
    
    .top-map-actions-row .mobile-menu-trigger:active .pill-btn.menu-btn {
        transform: scale(0.95) !important;
    }

    /* Fix de despliegue Animado: Menu Desplegable Mobile */
    .mobile-horizontal-menu {
        top: calc(env(safe-area-inset-top, 20px) + 120px) !important;
        bottom: auto !important;
        left: 50% !important;
        position: fixed !important;
        z-index: 1020 !important;
        margin: 0 !important;
        
        /* ANIMACIÓN FLUIDA PARA QUE NO SE TRABE */
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateX(-50%) scale(0.9) translateY(-10px) !important;
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0.3s !important;
        pointer-events: none !important;
    }
    .mobile-horizontal-menu.active {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(-50%) scale(1) translateY(0) !important;
        pointer-events: auto !important;
    }
    
    /* ==========================================
        BOTÓN CATEGORÍAS MÓVIL (CENTRO ABAJO)
        ========================================== */
    .btn-flotante-categorias {
        display: flex; align-items: center; justify-content: center; gap: 10px; 
        position: absolute; bottom: calc(env(safe-area-inset-bottom, 20px) + 50px); 
        left: 50%; transform: translateX(-50%); z-index: 999; 
        background: rgba(44, 62, 80, 0.95); color: #fff; 
        border: 1px solid rgba(0, 195, 255, 0.4); box-shadow: 0 0 20px rgba(0, 195, 255, 0.4); 
        padding: 12px 25px; border-radius: 30px; font-size: 1rem; font-weight: 600; 
        cursor: pointer; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); white-space: nowrap; min-width: 160px; 
    }
    .btn-flotante-categorias.oculto { transform: translateX(-50%) translateY(150px); opacity: 0; pointer-events: none; }
    html.is-android .btn-flotante-categorias { bottom: calc(env(safe-area-inset-bottom, 24px) + 65px); }

    .controles-mapa { display: none !important; }
    #btn-alis-trigger { bottom: calc(env(safe-area-inset-bottom, 20px) + 25px); right: 20px; transform-origin: bottom right; }
    #alis-chat-interface { bottom: calc(env(safe-area-inset-bottom, 20px) + 85px) !important; right: 20px !important; width: calc(100% - 40px) !important; max-width: 400px; height: 60vh; transform-origin: bottom right; }
    html.is-android #btn-alis-trigger { bottom: calc(env(safe-area-inset-bottom, 24px) + 40px); }
    .top-floating-bar { top: calc(env(safe-area-inset-top, 20px) + 15px); left: 15px; right: 15px; width: calc(100% - 30px); box-sizing: border-box; gap: 8px; }
    .top-search-row { gap: 10px; }
    .btn-volver-global { display: flex !important; padding: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.2rem; flex-shrink: 0; }
    .btn-volver-global span { display: none; }
    .buscador-mapa-wrapper { flex-grow: 1; max-width: 100%; }
    .sidebar { top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-height: 60vh; border-radius: 24px 24px 0 0; border-bottom: none; transform: translateY(110%); padding-bottom: env(safe-area-inset-bottom); z-index: 3000; }
    .sidebar.expandido { transform: translateY(0); }
    .btn-cerrar-movil { display: block; background: none; border: none; color: #fff; font-size: 1.5rem; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); cursor: pointer; opacity: 0.8; transition: 0.2s; }
    .btn-cerrar-movil:hover { opacity: 1; }
    #panel-ruta { top: calc(env(safe-area-inset-top, 20px) + 80px); left: 50%; transform: translateX(-50%); right: auto; width: calc(100% - 30px); max-width: 400px; padding: 15px; }
}

@media (min-width: 769px) { 
    .btn-toggle-cats { display: none !important; } 
    .extra-cat-mobile { display: flex !important; } 
    .controles-mapa { bottom: 120px; right: 20px; }
    #btn-alis-trigger { bottom: 35px; right: 20px; transform-origin: bottom right; }
    #alis-chat-interface { bottom: 100px !important; right: 85px !important; left: auto !important; width: 350px !important; height: 550px !important; max-height: 80vh !important; transform-origin: bottom right; }

    /* ==========================================
MENÚ HORIZONTAL DESPLEGABLE (Glassmorphism Puro)
========================================== */
.mobile-horizontal-menu {
display: flex !important; position: fixed; bottom: calc(95px + env(safe-area-inset-bottom, 0px)); left: 50%;
transform: translateX(-50%) translateY(20px) scale(0.95); 
width: max-content !important; /* <--- CLAVE PARA QUE NO SE APLASTE */
max-width: calc(100vw - 40px); /* Evita que se salga de la pantalla */
background-color: var(--menu-color-bg) !important; 
backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); 
border: 1px solid var(--menu-color-border);
border-radius: 20px; padding: 15px; gap: 15px; overflow-x: auto; scroll-snap-type: x mandatory;
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2); z-index: 9999; opacity: 0; pointer-events: none;
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); -ms-overflow-style: none; scrollbar-width: none;
flex-wrap: nowrap !important; /* <--- CLAVE PARA QUE LOS ICONOS NO SE APILEN VERTICALMENTE */
}
    .btn-flotante-categorias { display: none; } /* Ocultar el nuevo botón móvil en desktop */
}

.controles-mapa { position: absolute; bottom: 90px; right: 20px; z-index: 990; display: flex; flex-direction: column; gap: 15px; }
.btn-flotante { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); color: #1d1d1f; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.8); transition: all 0.2s; }
.btn-flotante:hover { transform: scale(1.05); }
.btn-gps.gps-activo { color: #0A84FF; animation: pulse-blue 2s infinite; }
@keyframes pulse-blue { 0% { box-shadow: 0 0 0 0 rgba(10, 132, 255, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(10, 132, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(10, 132, 255, 0); } }

#panel-ruta { display: none; position: absolute; top: 20px; right: 20px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(25px); border-radius: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); z-index: 1000; border: 1px solid rgba(255, 255, 255, 0.6); padding: 15px; min-width: 260px; max-width: 320px; }
.header-ruta { display: flex; align-items: center; width: 100%; justify-content: space-between; }
.header-ruta h3 { margin: 0; color: #1d1d1f; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.btn-cerrar-ruta { background: rgba(255, 69, 58, 0.1); color: #FF453A; border: none; padding: 8px 16px; border-radius: 20px; font-weight: 600; cursor: pointer; transition: 0.2s; font-size: 0.9rem; }
.btn-cerrar-ruta:hover { background: rgba(255, 69, 58, 0.2); transform: scale(1.05); }

.gm-style-iw { border-radius: 16px !important; padding: 0 !important; }
.gm-style-iw-d { 
    overflow-y: auto !important; 
    overflow-x: hidden !important;
    max-height: 60vh !important; 
    scrollbar-width: none !important; 
    -ms-overflow-style: none !important; 
}
.gm-style-iw-d::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
.gm-style-iw-tc { display: none !important; }

.popup-custom { width: 260px; text-align: center; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Poppins", sans-serif; }
.popup-header { height: 120px; background-size: cover; background-position: center; border-bottom: 2px solid #f5f5f7; }
.popup-body { padding: 15px; }

.popup-title { font-weight: 700; color: #000000; font-size: 1.1rem; margin-bottom: 5px; display: flex; align-items: center; justify-content: center; gap: 5px; line-height: 1.2; flex-direction:column;}
.popup-desc { font-size: 0.8rem; color: #000000; margin-bottom: 10px; display: block; font-weight: 500; }
.badge-domicilio { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; margin-bottom: 10px; }

.btn-ruta-inteligente { display: block; background: linear-gradient(135deg, #1d1d1f 0%, #434345 100%); color: #ffffff !important; text-decoration: none; padding: 12px; border-radius: 30px; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; width: 100%; transition: 0.2s; box-sizing: border-box; box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.btn-ruta-inteligente:hover { background: linear-gradient(135deg, #000000 0%, #2c2c2e 100%); transform: translateY(-2px); }

.modal-glass-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(15px); z-index: 4000; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity 0.3s; }

/* Modal Glass Azul y Sin Barra de Scroll */
.modal-glass-content { 
    background: rgba(225, 240, 255, 0.85); 
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); 
    border-radius: 25px 25px 0 0; width: 100%; max-width: 600px; 
    max-height: 85vh; overflow-y: auto; padding: 25px; 
    box-shadow: 0 -10px 40px rgba(10, 132, 255, 0.2); 
    position: relative; animation: slideUp 0.3s; color: #000000; 
    border-top: 1px solid rgba(10, 132, 255, 0.3); 
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.modal-glass-content::-webkit-scrollbar { display: none; }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.btn-cerrar-glass { position: absolute; top: 15px; right: 20px; background: rgba(0,0,0,0.05); border: none; width: 35px; height: 35px; border-radius: 50%; color: #000000; font-size: 1.2rem; cursor: pointer; transition: 0.3s; }
.btn-cerrar-glass:hover { background: rgba(231,76,60,0.8); color: white; }

.modal-header-info { text-align: center; margin-bottom: 20px; }
.modal-header-info img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid #bf5af2; margin-bottom: 10px; }
.modal-header-info h2 { margin: 0; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; gap: 5px; color: #000000;}
.modal-header-info p { color: #000000; margin: 5px 0 0 0; font-size: 0.95rem; font-weight: 500;}

.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.action-btn { padding: 12px 20px; border-radius: 30px; text-align: center; text-decoration: none; font-weight: 600; font-size: 0.95rem; color: #ffffff !important; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.3s ease; border: none; cursor: pointer;}
.action-btn i { font-size: 1.2rem; }
.action-btn:active { transform: scale(0.96); }

.btn-wa { background: linear-gradient(135deg, #25d366 0%, #128c7e 100%); box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3); }
.btn-call { background: linear-gradient(135deg, #1d1d1f 0%, #434345 100%); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); }
.btn-fb { background: #0a84ff; box-shadow: 0 8px 20px rgba(10, 132, 255, 0.3); }
.btn-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); box-shadow: 0 8px 20px rgba(214, 36, 159, 0.3); }

.btn-ubicar { background: linear-gradient(135deg, #1d1d1f 0%, #434345 100%); color: #ffffff !important; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); width: 100%; border-radius: 30px; padding: 14px; font-weight: 600; border: none; cursor: pointer; font-size: 1rem; display: flex; justify-content: center; align-items: center; gap: 8px; transition: all 0.3s ease; }
.btn-ubicar:active { transform: scale(0.96); }

.modal-desc { background: rgba(0,0,0,0.04); padding: 15px; border-radius: 12px; font-size: 0.9rem; line-height: 1.5; margin-bottom: 20px; color: #000000; }
.modal-desc strong { color: #000000; }

.seccion-galeria-modal h3 { font-size: 1.1rem; margin-bottom: 15px; color: #000000; font-weight: 700; }
.galeria-scroll-modal { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 15px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.galeria-scroll-modal::-webkit-scrollbar { display: none; }
.img-galeria-modal { width: 130px; height: 130px; object-fit: cover; border-radius: 18px; scroll-snap-align: start; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); flex-shrink: 0; cursor: pointer; transition: transform 0.2s; border: 1px solid rgba(0,0,0,0.1); }
.img-galeria-modal:active { transform: scale(0.95); }

.carrusel-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.95); z-index: 5000; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; flex-direction: column; }
.carrusel-img-container { width: 100%; flex-grow: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; position: relative; }
.img-carrusel-activa { max-width: 95%; max-height: 85vh; object-fit: contain; border-radius: 12px; transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); user-select: none; -webkit-user-drag: none; cursor: zoom-in;}
.img-carrusel-activa.zoomed { cursor: grab; }
.img-carrusel-activa.zoomed:active { cursor: grabbing; }
.btn-cerrar-carrusel { position: absolute; top: calc(env(safe-area-inset-top, 20px) + 15px); right: 20px; background: rgba(255, 255, 255, 0.15); border: none; color: white; width: 45px; height: 45px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; z-index: 5010; transition: 0.2s; }
.btn-cerrar-carrusel:active { background: rgba(255, 255, 255, 0.4); transform: scale(0.9); }
.carrusel-controles-inferiores { position: absolute; bottom: calc(env(safe-area-inset-bottom, 20px) + 20px); left: 0; width: 100%; display: flex; justify-content: center; gap: 40px; z-index: 5010; }
.btn-nav-carrusel { background: rgba(255, 255, 255, 0.15); border: none; color: white; width: 55px; height: 55px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.btn-nav-carrusel:active { background: rgba(255, 255, 255, 0.3); transform: scale(0.9); }

/* Dark Mode Restored Buttons */
.btn-darkmode-map { background: rgba(44, 62, 80, 0.9); color: #fff; border-color: rgba(0,0,0,0.2); }
body.dark-theme .btn-darkmode-map { background: rgba(255, 255, 255, 0.15); color: #ff9f0a; border-color: rgba(255,255,255,0.2); }

.btn-clean-map { background: rgba(255, 69, 58, 0.15); color: #FF453A; border-color: rgba(255, 69, 58, 0.3); }
body.dark-theme .btn-clean-map { background: rgba(255, 69, 58, 0.2); color: #FF453A; border-color: rgba(255, 69, 58, 0.4); }

body.dark-theme .btn-flotante { background: rgba(28, 28, 30, 0.95); color: #ffffff; border-color: rgba(255, 255, 255, 0.2); }
body.dark-theme #panel-ruta { background: rgba(28, 28, 30, 0.95); border-color: rgba(255, 255, 255, 0.1); color: #ffffff; }
body.dark-theme .header-ruta h3, body.dark-theme #info-destino-ruta h4 { color: #ffffff !important; }
body.dark-theme .modal-glass-content { background: rgba(10, 30, 50, 0.85); border-top: 1px solid rgba(10, 132, 255, 0.4); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6); color: #ffffff; }
body.dark-theme .modal-header-info h2, body.dark-theme .modal-header-info p, body.dark-theme .modal-desc, body.dark-theme .modal-desc strong, body.dark-theme .seccion-galeria-modal h3 { color: #ffffff; }
body.dark-theme .btn-cerrar-glass { color: #ffffff; background: rgba(255, 255, 255, 0.1); }
body.dark-theme .btn-cerrar-glass:hover { background: rgba(231,76,60,0.8); }
body.dark-theme .popup-custom, body.dark-theme .popup-title, body.dark-theme .popup-desc { color: #ffffff !important; background: #1c1c1e !important; }
body.dark-theme .gm-style .gm-style-iw-c { background-color: #1c1c1e !important; }
body.dark-theme .popup-header { border-bottom: 2px solid #2c2c2e; }
body.dark-theme .gm-ui-hover-effect { filter: invert(1) brightness(200%); }
body.dark-theme .badge-flexible { color: #ffffff !important; background: rgba(255, 255, 255, 0.15) !important; border-color: rgba(255, 255, 255, 0.3) !important; }