/* =========================================
   GEOKATU - VARIABLES BASE Y SISTEMA ÁUREO
   ========================================= */
:root {
    --naranja: #ff6b00; 
    --bg-oscuro: #0a0a0c; 
    --glass-bg: rgba(20, 20, 25, 0.75); 
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Proporción Áurea Tipográfica (Base 16px * 1.618) */
    --texto-sm: 10px; 
    --texto-base: 16px; 
    --texto-h3: 26px; 
    --texto-h1: 42px;
    
    /* Escala Fibonacci Espaciados */
    --sp-micro: 8px; 
    --sp-sm: 13px; 
    --sp-md: 21px; 
    --sp-lg: 34px; 
    --sp-xl: 55px;
}

body, html { 
    margin: 0; 
    padding: 0; 
    width: 100%; 
    font-family: 'Segoe UI', sans-serif; 
    background: var(--bg-oscuro); 
    color: white; 
    transition: color 0.4s ease; 
}

/* 🚑 CIRUGÍA: Desvinculamos el mapa del body para evitar el colapso en móviles */
#mapa-qrpido {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 1;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 🛡️ BLINDAJE INTELIGENTE: Bloquea el scroll SOLO en la pantalla del mapa (index.html) */
body:has(#mapa-qrpido), html:has(#mapa-qrpido) {
    height: 100% !important;
    overflow: hidden !important;
}

/* === Ocultar X nativa de Leaflet para evitar choques === */
.leaflet-popup-close-button { display: none !important; }

/* === UI CAMALEÓNICA (PLATA DE JOYERÍA PARA MAPAS OSCUROS) === */
body.ui-light { --glass-bg: rgba(215, 220, 225, 0.85); --glass-border: rgba(255, 255, 255, 0.6); color: #222; }
body.ui-light .search-bar { color: #222; font-weight: 500; }
body.ui-light .search-bar::placeholder { color: rgba(0,0,0,0.5); }
body.ui-light .btn-lupa { color: var(--naranja); }
body.ui-light .search-wrapper { background: linear-gradient(135deg, rgba(235,240,245,0.95) 0%, rgba(205,210,215,0.9) 100%); box-shadow: 0 6px 15px rgba(0,0,0,0.2), inset 0 2px 5px rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.6); }
body.ui-light .btn-login, body.ui-light .btn-compartir, body.ui-light .btn-flotante-gps { background: linear-gradient(135deg, rgba(240,245,250,0.95) 0%, rgba(210,215,220,0.9) 100%); box-shadow: 0 6px 10px rgba(0,0,0,0.2), inset 0 2px 5px rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.5); color: #222; }
body.ui-light .tag-pill { background: linear-gradient(135deg, rgba(240,245,250,0.8) 0%, rgba(210,215,220,0.8) 100%); color: #444; border-color: rgba(255,255,255,0.5); box-shadow: 0 4px 6px rgba(0,0,0,0.1), inset 0 1px 3px rgba(255,255,255,0.7); font-weight: bold; }
body.ui-light .tag-pill:hover { background: rgba(250, 252, 255, 0.9); }
body.ui-light .tag-pill.activa { background: var(--naranja); color: white; border-color: var(--naranja); box-shadow: 0 0 10px rgba(255,107,0,0.4); }
body.ui-light .popup-title { color: #222; text-shadow: none !important; }
body.ui-light .texto-piedra { background: linear-gradient(135deg, #666 0%, #222 50%, #000 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: none; }
body.ui-light .input-login { background: rgba(0,0,0,0.05); color: #222; border-color: rgba(0,0,0,0.2); }
body.ui-light .btn-submenu { color: #222; border-color: rgba(0,0,0,0.1); }
body.ui-light .submenu-llave { background: linear-gradient(135deg, rgba(235,240,245,0.98) 0%, rgba(205,210,215,0.95) 100%); box-shadow: 0 10px 20px rgba(0,0,0,0.2), inset 0 2px 5px rgba(255,255,255,0.9); }
body.ui-light details { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); }
body.ui-light details p { color: #555; }
body.ui-light hr { border-color: rgba(0,0,0,0.1) !important; }
body.ui-light .map-tag { background: linear-gradient(135deg, rgba(240,245,250,0.8) 0%, rgba(210,215,220,0.8) 100%); color: #555; border-color: rgba(255,255,255,0.5); box-shadow: 0 4px 6px rgba(0,0,0,0.1), inset 0 1px 3px rgba(255,255,255,0.7); }
body.ui-light .map-tag.active { border-color: var(--naranja); color: white; background: var(--naranja); font-weight: bold; box-shadow: none; }
body.ui-light .leaflet-popup-content-wrapper { background: linear-gradient(135deg, rgba(235,240,245,0.98) 0%, rgba(205,210,215,0.95) 100%); border: 1px solid rgba(255,255,255,0.7); box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 2px 10px rgba(255,255,255,0.8); }
body.ui-light .leaflet-popup-tip { background: rgba(205, 210, 215, 0.95); }
body.ui-light .bottom-sheet-contenido { background: linear-gradient(135deg, rgba(235,240,245,0.98) 0%, rgba(205,210,215,0.95) 100%); border-top: 1px solid var(--naranja); box-shadow: inset 0 2px 15px rgba(255,255,255,0.9); }
body.ui-light .drag-handle { background: rgba(0,0,0,0.2); }
body.ui-light .btn-ubicacion { background: rgba(0,0,0,0.05); color: #444; border-color: rgba(0,0,0,0.2); }
body.ui-light .select-glass { color: #222; background: rgba(255,255,255,0.5); border-color: rgba(0,0,0,0.2); font-weight: bold; }
body.ui-light .select-glass option { background: white; color: black; }

/* === UI SUPERIOR === */
.top-ui { position: absolute; left: 50%; top: 15px; transform: translate3d(-50%, -85px, 0); width: 92%; max-width: 500px; z-index: 1000; opacity: 0; transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s; will-change: transform, opacity; backface-visibility: hidden; -webkit-backface-visibility: hidden; perspective: 1000px; }
.top-ui.ui-visible { opacity: 1; transform: translate3d(-50%, 0, 0); }
.header-row { display: flex; gap: 10px; align-items: flex-start; width: 100%; }
.search-wrapper { position: relative; flex: 1; background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-radius: 34px; border: 1px solid var(--glass-border); padding: var(--sp-micro) var(--sp-md); display: flex; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: 0.4s; overflow: hidden; height: 55px; box-sizing: border-box; }
.search-bar { width: 100%; border: none; background: transparent; color: white; outline: none; transition: 0.3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; touch-action: pan-x; }
.search-bar:focus { text-overflow: clip; overflow-x: auto; }
.search-bar::placeholder { color: rgba(255,255,255,0.6); font-style: italic; }
.filtros-inmuebles { display: none; width: 100%; gap: 5px; animation: fadeIn 0.4s; }
.filtros-inmuebles.activos { display: flex; }
.select-glass { flex: 1; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); color: white; border-radius: 15px; padding: 5px; font-size: 12px; outline: none; appearance: none; text-align: center; }
.select-glass option { background: var(--bg-oscuro); color: white; }
.btn-lupa { background: transparent; border: none; color: rgba(255,255,255,0.7); font-size: 18px; cursor: pointer; outline: none; transition: 0.3s; padding: 0 5px; }
.btn-lupa:hover { color: var(--naranja); transform: scale(1.1); }
.tags-container { position: relative; display: flex; gap: 8px; padding-top: 10px; overflow-x: auto; scrollbar-width: none; }
.tags-container::-webkit-scrollbar { display: none; }
.tag-pill { background: rgba(20, 20, 25, 0.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.15); color: #a1a1aa; padding: var(--sp-micro) var(--sp-sm); border-radius: 21px; font-size: 13px; white-space: nowrap; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: var(--sp-micro); box-shadow: 0 4px 6px rgba(0,0,0,0.1), inset 0 1px 1px rgba(255,255,255,0.1); }
.tag-pill:hover { background: rgba(20, 20, 25, 0.6); color: #ffffff; }
.tag-pill.activa { background: var(--naranja); color: white; font-weight: bold; border-color: var(--naranja); box-shadow: 0 0 10px rgba(255,107,0,0.4); }
.shimmer-box { position: relative; overflow: hidden; background: rgba(255,255,255,0.05) !important; color: transparent !important; border-color: transparent !important; pointer-events: none; }
.shimmer-box::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); animation: shimmer 1.5s infinite; }
@keyframes shimmer { 100% { left: 100%; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* === BOTONES LLAVE Y LOGIN === */
.contenedor-llave { position: relative; flex-shrink: 0; }
.btn-login { background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 20px; cursor: pointer; color: white; box-shadow: 0 6px 10px rgba(0,0,0,0.3), inset 0 2px 2px rgba(255,255,255,0.1); transition: 0.3s; }
.submenu-llave { position: absolute; top: 55px; right: 0; background: var(--glass-bg); backdrop-filter: blur(15px); border: 1px solid var(--glass-border); border-radius: 15px; padding: 10px; display: flex; flex-direction: column; gap: 8px; width: 140px; opacity: 0; pointer-events: none; transform: translateY(-10px); transition: 0.3s; box-shadow: 0 10px 20px rgba(0,0,0,0.5); z-index: 2000; }
.submenu-llave.activo { opacity: 1; pointer-events: all; transform: translateY(0); }
.btn-submenu { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: white; padding: 8px; border-radius: 8px; font-weight: bold; font-size: 12px; cursor: pointer; transition: 0.3s; text-transform: uppercase; }
.btn-submenu:hover { background: rgba(255,107,0,0.2); border-color: var(--naranja); color: var(--naranja); }
#btn-cargar-zona { position: absolute; top: 165px; left: 50%; transform: translateX(-50%); z-index: 1000; background: linear-gradient(45deg, var(--naranja), #ffcc00); color: black; font-weight: 900; text-transform: uppercase; padding: 12px 25px; border-radius: 25px; border: none; box-shadow: 0 5px 15px rgba(255,107,0,0.5); cursor: pointer; display: none; transition: 0.3s; letter-spacing: 1px; white-space: nowrap; }

/* === POPUPS DEL MAPA === */
.leaflet-popup-content-wrapper {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 0;
    overflow: hidden;
    transition: transform 0.4s ease;
}
.leaflet-popup-content { margin: 0; width: 164px !important; }
.leaflet-popup-tip { background: var(--glass-bg); transition: 0.4s; }
.popup-portada { width: 100%; height: 95px; object-fit: cover; border-bottom: 2px solid var(--naranja); box-sizing: border-box; }
.popup-info { padding: 0 15px 20px 15px; text-align: center; position: relative; box-sizing: border-box; }
.btn-compartir { position: absolute; top: var(--sp-sm); right: var(--sp-sm); background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.2); color: white; border-radius: 50%; width: var(--sp-lg); height: var(--sp-lg); display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.3s; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.btn-compartir:hover { background: var(--naranja); border-color: var(--naranja); transform: scale(1.1); }
.btn-fav-popup { position: absolute; top: var(--sp-sm); left: var(--sp-sm); background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.2); color: white; border-radius: 50%; width: var(--sp-lg); height: var(--sp-lg); display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.3s; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,0.5); font-size: 14px; }
.btn-fav-popup:hover { transform: scale(1.1); }
.popup-logo { width: 90px; height: 90px; border-radius: 50%; border: 2px solid var(--naranja); margin-top: -45px; background: var(--bg-oscuro); position: relative; z-index: 2; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.5); flex-shrink: 0; }
.btn-catalogo { display: block; width: 100%; box-sizing: border-box; background: var(--naranja); color: white; text-decoration: none; padding: 12px 0; border-radius: 8px; font-weight: bold; font-size: 13px; margin-top: 15px; letter-spacing: 1px; }
.badge-fuera-zona { background: rgba(255,0,0,0.8); color: white; font-size: var(--texto-sm); padding: 3px 8px; border-radius: 10px; font-weight: bold; margin-bottom: 5px; display: inline-block; letter-spacing: 0.5px; }

/* === FILTROS INFERIORES DEL MAPA === */
.map-options { position: absolute; bottom: 15px; left: 0; width: 100%; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; z-index: 1000; padding: 0 10px; box-sizing: border-box; transition: transform 0.4s; }
.map-tag { background: rgba(10, 10, 15, 0.6); backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.05); padding: 5px 10px; border-radius: 12px; font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: #999; cursor: pointer; transition: 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.1), inset 0 1px 1px rgba(255,255,255,0.1); }
.map-tag.active { border-color: var(--naranja); color: white; background: var(--naranja); font-weight: bold; box-shadow: none; }

/* === PANTALLA DE CARGA === */
#pantalla-carga { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-oscuro); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.5s; }
@keyframes latidoNeon { 0% { opacity: 0.6; text-shadow: 0 0 5px var(--naranja); } 50% { opacity: 1; text-shadow: 0 0 15px var(--naranja), 0 0 30px var(--naranja); transform: scale(1.02); } 100% { opacity: 0.6; text-shadow: 0 0 5px var(--naranja); } }
.texto-palpitante { color: #fdfdfd; animation: latidoNeon 1.5s infinite; letter-spacing: 4px; font-size: var(--texto-sm); font-weight: 900; text-transform: uppercase; margin-top: var(--sp-micro); }
.logo-palpitante { animation: latidoNeon 1.5s infinite; animation-delay: 0.75s; }
.texto-piedra { font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; margin: 0; background: linear-gradient(135deg, #777777 0%, #ffffff 50%, #333333 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.8)); }
.popup-title-wrapper { margin: 2px auto; position: relative; z-index: 3; text-align: center; }
.popup-title { margin: 0; font-size: 16px; line-height: 1.1; color: #fdfdfd; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }

/* Estrellas 3D Universales */
.estrellas { color: #FFD700; font-size: 11px; margin: 0; text-shadow: 1px 1px 0 rgba(204,170,0,0.6), -1px -1px 0 rgba(255,238,102,0.4), 2px 2px 2px rgba(0,0,0,0.8); letter-spacing: 2px; }

/* === BOTÓN GPS FLOTANTE Y PUNTO AZUL === */
.btn-flotante-gps { position: fixed; bottom: 80px; right: 20px; background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); color: white; border-radius: 50%; width: 45px; height: 45px; display: flex; justify-content: center; align-items: center; font-size: 20px; cursor: pointer; box-shadow: 0 6px 10px rgba(0,0,0,0.3), inset 0 2px 2px rgba(255,255,255,0.1); z-index: 900; transition: 0.3s; }
.btn-flotante-gps:active { transform: scale(0.9); }
.toast-fantasma { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(10, 10, 15, 0.9); backdrop-filter: blur(15px); border: 1px solid var(--naranja); color: white; padding: 15px 30px; border-radius: 30px; z-index: 4000; font-weight: bold; font-size: 14px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 15px rgba(255,107,0,0.3); opacity: 0; transition: opacity 0.4s ease; pointer-events: none; white-space: nowrap; }

.punto-azul { width: 16px; height: 16px; background: #00aaff; border-radius: 50%; border: 2px solid white; margin-top: -8px; margin-left: -8px; position: relative; }
.punto-azul::after { content: ''; position: absolute; top: -2px; left: -2px; width: 16px; height: 16px; border-radius: 50%; background: #00aaff; animation: pulso-azul 2s infinite ease-out; z-index: -1; pointer-events: none; will-change: transform, opacity; }
@keyframes pulso-azul { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(3.5); opacity: 0; } }

/* === ONBOARDING (TOUR) === */
#tour-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 9000; display: none; opacity: 0; transition: 0.5s; backdrop-filter: blur(3px); }
body.tour-active #tour-overlay { display: block; opacity: 1; pointer-events: all; }
body.tour-active .top-ui { z-index: 9001; }
body.tour-active .btn-flotante-gps { z-index: 9001; }
body.tour-active .search-wrapper:not(.tour-highlight-z),
body.tour-active .contenedor-llave:not(.tour-highlight-z),
body.tour-active .tags-container:not(.tour-highlight-z),
body.tour-active .btn-flotante-gps:not(.tour-highlight-z) {
    filter: brightness(0.3) grayscale(0.5); pointer-events: none;
}
.tour-tooltip { position: absolute; z-index: 9999 !important; background: rgba(10,10,15,0.95); border: 1px solid var(--naranja); padding: 15px; border-radius: 15px; text-align: center; color: white; box-shadow: 0 10px 30px rgba(0,0,0,0.9); display: none; opacity: 0; transition: 0.3s; flex-direction: column; gap: 10px; }
.tour-tooltip.activo { display: flex; opacity: 1; }
.tour-highlight-z { z-index: 9002 !important; outline: 3px dashed #FFD700 !important; outline-offset: 4px; border-radius: inherit; box-shadow: 0 0 20px rgba(255,215,0,0.8) !important; opacity: 1 !important; filter: none !important; pointer-events: none; }
#tour-step-1 { top: 90px; left: 50%; transform: translateX(-50%); width: 250px; }
#tour-step-1::before { content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 15px; height: 15px; background: rgba(10,10,15,0.95); border-top: 1px solid var(--naranja); border-left: 1px solid var(--naranja); }
#tour-step-2 { bottom: 140px; right: 20px; width: 220px; }
#tour-step-2::before { content: ''; position: absolute; bottom: -8px; right: 15px; transform: rotate(225deg); width: 15px; height: 15px; background: rgba(10,10,15,0.95); border-bottom: 1px solid var(--naranja); border-right: 1px solid var(--naranja); }
#tour-step-3 { top: 90px; right: 15px; width: 200px; }
#tour-step-3::before { content: ''; position: absolute; top: -8px; right: 25px; transform: rotate(45deg); width: 15px; height: 15px; background: rgba(10,10,15,0.95); border-top: 1px solid var(--naranja); border-left: 1px solid var(--naranja); }
#tour-step-4 { top: 130px; left: 50%; transform: translateX(-50%); width: 250px; }
#tour-step-4::before { content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 15px; height: 15px; background: rgba(10,10,15,0.95); border-top: 1px solid var(--naranja); border-left: 1px solid var(--naranja); }
.btn-tour { background: var(--naranja); border: none; color: white; padding: 8px; border-radius: 20px; font-weight: bold; cursor: pointer; text-transform: uppercase; font-size: 11px; pointer-events: all; }

/* === MODALES GLOBALES === */
.bottom-sheet-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 10000; display: flex; justify-content: center; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.bottom-sheet-overlay.activo { opacity: 1; pointer-events: all; }
.bottom-sheet-contenido { width: 92%; max-width: 500px; background: var(--glass-bg); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border-radius: 34px; padding: var(--sp-md) var(--sp-lg) var(--sp-lg) var(--sp-lg); transform: translate3d(0, 150%, 0); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); border: 1px solid var(--glass-border); box-sizing: border-box; max-height: 65vh; overflow-y: auto; touch-action: pan-y; margin-bottom: 20px; box-shadow: 0 15px 40px rgba(0,0,0,0.8); will-change: transform; backface-visibility: hidden; -webkit-backface-visibility: hidden; perspective: 1000px; }
.bottom-sheet-overlay.activo .bottom-sheet-contenido { transform: translate3d(0, 0, 0); }
.drag-handle { width: 50px; height: 5px; background: rgba(255,255,255,0.3); border-radius: 5px; margin: 0 auto 20px auto; cursor: grab; }

.input-login { width: 100%; background: rgba(0,0,0,0.6); border: 1px solid var(--glass-border); color: white; padding: 15px; border-radius: 12px; margin-bottom: 15px; outline: none; box-sizing: border-box; font-size: 15px; }
.btn-auth { width: 100%; padding: 15px; border-radius: 12px; border: none; font-weight: 900; cursor: pointer; margin-bottom: 10px; text-transform: uppercase; }
.btn-ingresar { background: var(--naranja); color: white; }
.btn-registrar { background: transparent; color: var(--naranja); border: 1px solid var(--naranja); }

details { background: rgba(0,0,0,0.4); margin-bottom: 10px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.05); text-align: left; overflow: hidden; transition: 0.3s; }
summary { padding: 15px; font-size: 14px; font-weight: 900; cursor: pointer; color: var(--naranja); outline: none; text-transform: uppercase; letter-spacing: 1px; user-select: none; }
summary::-webkit-details-marker { display: none; }
details p { padding: 0 15px 15px; margin: 0; font-size: 12px; color: #aaa; line-height: 1.5; }
details[open] { background: rgba(20,20,25,0.8); border-color: rgba(255,107,0,0.3); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }

.btn-contacto { width: 100%; padding: 12px; border: none; border-radius: 8px; font-weight: bold; margin-bottom: 10px; cursor: pointer; text-transform: uppercase; font-size: 12px; color: white; }
.btn-pedir { display: block; width: 100%; background: var(--naranja); color: white; font-size: 16px; border: none; padding: 15px; border-radius: 30px; font-weight: 900; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 5px 15px rgba(255,107,0,0.4); transition: 0.3s; margin-top: 15px; text-decoration: none; }
.btn-pedir:active { transform: scale(0.95); }
.btn-ubicacion { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: bold; border-radius: 25px; padding: 10px 20px; font-size: 13px; cursor: pointer; transition: 0.3s; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: #aaa; text-transform: uppercase; letter-spacing: 1px; width: 100%; }
.btn-ubicacion:active { transform: scale(0.95); }
.btn-mapa { border-color: rgba(0, 255, 255, 0.2); color: #0ff; }

/* === PANELES Y ACORDEÓN CRISTAL (RADAR) === */
#contenedor-troya { position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 400px; z-index: 1000; display: none; }
.banner-troya { width: 100%; border-radius: 15px; box-shadow: 0 10px 20px rgba(0,0,0,0.5); border: 2px solid var(--glass-border); cursor: pointer; }
.btn-cerrar-troya { position: absolute; top: -10px; right: -10px; background: var(--naranja); border-radius: 50%; width: 25px; height: 25px; text-align: center; line-height: 25px; font-weight: bold; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.5); }

.panel-cristal { background: rgba(10, 10, 12, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid var(--glass-border); border-radius: 20px; margin-top: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); overflow: hidden; transition: 0.4s ease; position: relative; z-index: 900; }
.panel-seccion { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.panel-seccion:last-child { border-bottom: none; }
.contenido-colapsable { max-height: 400px; opacity: 1; transition: max-height 0.5s ease-in-out, opacity 0.4s ease, padding 0.5s ease; overflow-x: auto; scrollbar-width: none; }
.contenido-colapsable::-webkit-scrollbar { display: none; }
.colapsado .contenido-colapsable { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; margin: 0; border: none; }
.btn-toggle-panel { width: 100%; background: transparent; border: none; color: #888; padding: 5px; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: 0.3s; }
.btn-toggle-panel svg { transition: transform 0.4s ease; width: 20px; height: 20px; }
.colapsado .btn-toggle-panel svg { transform: rotate(180deg); }
.vitrina-row { display: flex; gap: 15px; }
.vitrina-card { flex-shrink: 0; width: 140px; background: rgba(0,0,0,0.5); border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); text-decoration: none; color: white; display: flex; flex-direction: column; }
.vitrina-img { width: 100%; height: 90px; object-fit: cover; }
.vitrina-info { padding: 10px; font-size: 11px; }
.vitrina-titulo { margin: 0 0 5px 0; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vitrina-precio { color: var(--naranja); font-weight: 900; margin: 0; font-size: 13px; }
.btn-cerrar-panel { position: absolute; top: var(--sp-sm); right: var(--sp-sm); background: transparent; border: none; color: #888; font-size: 16px; cursor: pointer; z-index: 10; transition: 0.3s; padding: 0; line-height: 1; }
.btn-cerrar-panel:hover { color: var(--naranja); transform: scale(1.1); }
#panel-filtros { padding-right: calc(var(--sp-sm) + 20px); }

/* === INTERFAZ HÍBRIDA (INMUEBLES) === */
.bottom-sheet-hibrido { position: fixed; bottom: 50px; left: 0; width: 100%; z-index: 1000; padding: 10px 15px; box-sizing: border-box; display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; transition: transform 0.4s ease, opacity 0.4s; pointer-events: none; }
.bottom-sheet-hibrido::-webkit-scrollbar { display: none; }
.bottom-sheet-hibrido.activo { display: flex !important; pointer-events: all; }
.tarjeta-hibrida { flex-shrink: 0; width: 240px; background: var(--glass-bg); backdrop-filter: blur(15px); border: 2px solid; border-radius: 15px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 20px rgba(0,0,0,0.5); cursor: pointer; pointer-events: all; transition: 0.3s; position: relative; }
.tarjeta-hibrida:active { transform: scale(0.95); }
.tarjeta-hibrida-img { width: 100%; height: 110px; object-fit: cover; border-bottom: 1px solid rgba(255,255,255,0.1); }
.tarjeta-hibrida-info { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.tarjeta-hibrida-titulo { margin: 0; font-size: 14px; font-weight: 900; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.tarjeta-hibrida-nicho { margin: 0; font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.btn-fav-card { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.3); border-radius: 50%; width: 32px; height: 32px; display: flex; justify-content: center; align-items: center; font-size: 14px; cursor: pointer; transition: 0.3s; z-index: 10; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.btn-fav-card:hover { transform: scale(1.1); }

/* === EFECTOS GLOBALES DEL MAPA === */
.pin-moneda-magica { border: 3px solid #FFD700 !important; box-shadow: 0 4px 8px rgba(255,165,0,0.5) !important; animation: flotarMoneda 2.5s infinite ease-in-out; transform-origin: center center; will-change: transform; }
.pin-moneda-magica::before { content: ''; position: absolute; top: -6px; left: -6px; right: -6px; bottom: -6px; border-radius: 50%; border: 2px solid rgba(255,215,0,0.6); z-index: -1; animation: latidoMagico 2s infinite; pointer-events: none; will-change: transform, opacity; }
@keyframes flotarMoneda { 0% { transform: translateY(0px); } 50% { transform: translateY(-6px); } 100% { transform: translateY(0px); } }
@keyframes latidoMagico { 0% { transform: scale(0.9); opacity: 0.8; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes saltoMoneda { 0% { transform: translateY(0px) scale(1); } 40% { transform: translateY(-40px) scale(1.2); } 100% { transform: translateY(0px) scale(1); } }
@keyframes saltoCorazon { 0% { transform: translateY(0px) scale(1); } 40% { transform: translateY(-25px) scale(1.4) rotateY(180deg); } 100% { transform: translateY(0px) scale(1) rotateY(360deg); } }

/* === ZOOM SEMÁNTICO ESTRICTO === */
.pin-wrapper { 
    will-change: transform, opacity; 
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease; 
    transform-origin: center bottom; 
}
#mapa-qrpido[data-zoom="18"] .pin-wrapper:not(.pin-moneda-magica) { transform: scale(1.0); opacity: 1; pointer-events: all; }
#mapa-qrpido[data-zoom="18"] .pin-moneda-magica { transform: scale(1.2); z-index: 1000; pointer-events: all; }
#mapa-qrpido[data-zoom="17"] .pin-wrapper:not(.pin-moneda-magica) { transform: scale(0.618); opacity: 1; pointer-events: all; }
#mapa-qrpido[data-zoom="17"] .pin-moneda-magica { transform: scale(0.75); z-index: 1000; pointer-events: all; }
#mapa-qrpido[data-zoom="16"] .pin-wrapper:not(.pin-moneda-magica) { transform: scale(0.382); opacity: 0.95; pointer-events: all; }
#mapa-qrpido[data-zoom="16"] .pin-moneda-magica { transform: scale(0.5); z-index: 1000; pointer-events: all; }
#mapa-qrpido[data-zoom="15"] .pin-wrapper:not(.pin-moneda-magica) { transform: scale(0.236); opacity: 0.85; pointer-events: none; }
#mapa-qrpido[data-zoom="15"] .pin-moneda-magica { transform: scale(0.3); z-index: 1000; pointer-events: none; }

/* 🎮 Efecto Texto Flotante Videojuego */
@keyframes flotarRetro {
    0% { transform: translate(-50%, 0px); }
    50% { transform: translate(-50%, -6px); }
    100% { transform: translate(-50%, 0px); }
}

.texto-retro-flotante {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #FFD700;
    font-weight: 900;
    font-size: 11px;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 2px 0 #000, 2px 0 0 #000;
    animation: flotarRetro 2s ease-in-out infinite;
    z-index: 10;
    pointer-events: none;
}

/* 🌸 PROTOCOLO NIEVES: PRUEBA DE ESTRÉS GPU */
.pin-nieves-hardware {
    border-radius: 50%;
    will-change: transform;
    transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
}

.animacion-baile {
    will-change: transform; 
    animation: baileMatriz 1.2s infinite alternate cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center bottom;
}

@keyframes baileMatriz {
    0% { transform: translate3d(0, 0, 0) scale(1) rotate(-8deg); filter: drop-shadow(0 5px 5px rgba(255,107,0,0.5)); }
    100% { transform: translate3d(0, -20px, 0) scale(1.15) rotate(8deg); filter: drop-shadow(0 20px 15px rgba(255,107,0,0.8)); }
}

/* === 📍 MOTOR GEOMÉTRICO DE PINES (AJUSTE MILIMÉTRICO FINAL) === */
.pin-wrapper {
    position: relative; display: inline-flex; width: 50px; height: 50px; 
    transition: all 0.3s ease; z-index: 10;
    filter: drop-shadow(0px 6px 8px rgba(0,0,0,0.6));
    justify-content: center; align-items: center;
    --rotacion: 0deg; 
}

/* 1. Esfera Perfecta */
.forma-esfera { background: transparent !important; border: none !important; }
.forma-esfera img { 
    border-radius: 50% !important; border: 2px solid var(--color-main, #ff6b00) !important; 
    box-sizing: border-box !important; width: 50px !important; height: 50px !important; 
    position: absolute !important; top: 0 !important; left: 0 !important;
    transform: none !important; margin: 0 !important; padding: 0 !important;
}

/* 2. Gota Clásica */
.forma-gota { background: transparent !important; border: none !important; border-radius: 0 !important; }
.forma-gota::before {
    content: ""; position: absolute; inset: 0;
    background: var(--color-main, #ff6b00);
    clip-path: path('M 25 50 C 25 50 8 32 8 17 C 8 7.6 15.6 0 25 0 C 34.4 0 42 7.6 42 17 C 42 32 25 50 25 50 Z');
    z-index: -1;
    transform: scale(1.1); 
}
.forma-gota img { 
    width: 40px !important; height: 40px !important; 
    position: absolute !important; top: 2px !important; left: 4px !important; 
    clip-path: path('M 21 42 C 21 42 6.7 26.8 6.7 14.2 C 6.7 6.3 13.1 0 21 0 C 28.9 0 35.3 6.3 35.3 14.2 C 35.3 26.8 21 42 21 42 Z') !important;
    border: none !important; border-radius: 0 !important;
    transform: scale(1.1) !important;
    margin: 0 !important; padding: 0 !important;
}

/* 3. Triángulo */
.forma-triangulo { background: transparent !important; border: none !important; border-radius: 0 !important; }
.forma-triangulo::before {
    content: ""; position: absolute; inset: 0;
    clip-path: polygon(10% 0%, 90% 0%, 100% 10%, 55% 95%, 50% 100%, 45% 95%, 0% 10%);
    background: var(--color-main, #ff6b00); z-index: -1;
}
.forma-triangulo img { 
    clip-path: polygon(10% 0%, 90% 0%, 100% 10%, 55% 95%, 50% 100%, 45% 95%, 0% 10%) !important; 
    width: 86% !important; height: 86% !important; 
    position: absolute !important; top: 4% !important; left: 7% !important;
    border-radius: 0 !important; border: none !important; transform: none !important; margin: 0 !important; padding: 0 !important;
}

/* 4. Hoja Orgánica */
.forma-hoja { 
    background: transparent !important; border: none !important; border-radius: 0 !important; 
    --rotacion: 15deg; 
    transform: rotate(15deg);
}
.forma-hoja::before {
    content: ""; position: absolute; inset: 0;
    background: var(--color-main, #ff6b00);
    clip-path: path('M 25 50 C 0 35 5 15 25 0 C 45 25 40 45 25 50 Z');
    z-index: -1;
}
.forma-hoja img { 
    width: 44px !important; height: 44px !important; 
    position: absolute !important; top: 3px !important; left: 3px !important; 
    clip-path: path('M 22 44 C 0 30.8 4.4 13.2 22 0 C 39.6 22 35.2 39.6 22 44 Z') !important;
    border: none !important; border-radius: 0 !important; 
    transform: none !important; margin: 0 !important; padding: 0 !important;
}

/* 5. Flor (Girasol 🌻) */
.forma-flor { background: transparent !important; border: none !important; border-radius: 0 !important; }
.forma-flor::before {
    content: ""; position: absolute; width: 75px; height: 75px; top: -12.5px; left: -12.5px;
    background: linear-gradient(to bottom, #FFD700 0%, #FFD700 76%, #4CAF50 77%, #2E7D32 100%);
    clip-path: polygon(50% 100%, 53% 75%, 50% 82%, 65% 70%, 58% 65%, 75% 68%, 68% 58%, 85% 60%, 75% 50%, 95% 45%, 80% 40%, 95% 25%, 78% 28%, 85% 10%, 70% 18%, 65% 0%, 58% 12%, 50% 0%, 42% 12%, 35% 0%, 30% 18%, 15% 10%, 22% 28%, 5% 25%, 20% 40%, 5% 45%, 25% 50%, 15% 60%, 32% 58%, 25% 68%, 42% 65%, 35% 70%, 50% 82%, 47% 75%);
    z-index: -1;
}
.forma-flor img { 
    border-radius: 50% !important; border: 2px solid #5d4037 !important; 
    box-sizing: border-box !important; 
    width: 42px !important; height: 42px !important; 
    position: absolute !important; top: -3px !important; left: 4px !important;
    transform: none !important; margin: 0 !important; padding: 0 !important;
}

/* 🏃 Animaciones Limpias */
@keyframes salto { 0%, 100% { transform: translateY(0) rotate(var(--rotacion)); } 50% { transform: translateY(-10px) rotate(var(--rotacion)); } }
.anim-salto { animation: salto 1.5s infinite ease-in-out; }

@keyframes flotar { 0%, 100% { transform: translateY(0) rotate(var(--rotacion)); } 50% { transform: translateY(-5px) rotate(var(--rotacion)); } }
.anim-flotar { animation: flotar 2.5s infinite ease-in-out; }

@keyframes latido { 0%, 100% { transform: scale(1) rotate(var(--rotacion)); } 50% { transform: scale(1.1) rotate(var(--rotacion)); } }
.anim-latido { animation: latido 1.2s infinite ease-in-out; }

/* 🌸 Emojis Tamaño Doble y Posiciones Matemáticas Universales */
.pin-wrapper[data-emoji]::after {
    content: attr(data-emoji); position: absolute;
    font-size: 26px !important; z-index: 20; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
    display: flex; align-items: center; justify-content: center;
}

.pin-wrapper[data-anclaje="anclaje-arriba"]::after { top: -20px; left: 50%; margin-left: -13px; }
.pin-wrapper[data-anclaje="anclaje-esquina"]::after { top: -10px; right: -10px; }
.pin-wrapper[data-anclaje="anclaje-montura"]::after { bottom: -20px; left: 50%; margin-left: -14px; font-size: 32px !important; z-index: -1; }

.forma-triangulo[data-anclaje="anclaje-arriba"]::after { top: -20px !important; }
.forma-flor[data-anclaje="anclaje-arriba"]::after { top: -32px !important; } 
.forma-gota[data-anclaje="anclaje-arriba"]::after { top: -24px !important; margin-left: -16px !important; }
/* =========================================================================
   GEOKATU - INTEGRACIÓN LIMPIA DE PINES EN INDEX (DELEGA A PINES.CSS)
   ========================================================================= */
.maplibregl-marker {
    overflow: visible !important;
    cursor: pointer;
}

/* El mapa permite ver los pines a tamaño completo en cualquier nivel de zoom */
#mapa-qrpido .pin-wrapper {
    transform-origin: bottom center;
    overflow: visible !important;
}
/* =========================================================
   INSIGNIA SUTIL SEMÁFORO DE CONFIANZA EN POPUP
   ========================================================= */
.semaforo-badge-btn {
    position: absolute;
    top: 10px;
    left: 48px; /* Ubicado entre el botón de favoritos y el de compartir */
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.2s ease, background 0.2s;
}

.semaforo-badge-btn:active {
    transform: scale(0.9);
}

.semaforo-luz-svg {
    width: 14px;
    height: 14px;
    filter: drop-shadow(0 0 4px currentColor);
}

/* Tooltip sutil que se desvanece a los 6 segundos */
.semaforo-tooltip {
    position: absolute;
    top: 42px;
    left: 10px;
    right: 10px;
    background: rgba(15, 15, 20, 0.96);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    z-index: 50;
    pointer-events: none;
    opacity: 1;
    animation: desvanecerSemaforo 6s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes desvanecerSemaforo {
    0% { opacity: 0; transform: translateY(-4px); }
    10% { opacity: 1; transform: translateY(0); }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-4px); visibility: hidden; }
}
