/* =========================================
   1. FUENTES Y VARIABLES GLOBALES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Montserrat:wght@300;400;600&display=swap');

/* === SCROLL DE LA PÁGINA WEB (Elegante) === */
::-webkit-scrollbar { 
    width: 12px; 
    background: #0f081a; 
}
::-webkit-scrollbar-thumb { 
    background: #d4af37; 
    border-radius: 6px; 
    border: 3px solid #0f081a;
}
::-webkit-scrollbar-thumb:hover {
    background: #eab308;
}
.no-scrollbar::-webkit-scrollbar { display: none !important; }
.no-scrollbar { -ms-overflow-style: none !important; scrollbar-width: none !important; }

.custom-scroll::-webkit-scrollbar { width: 5px; display: block; }
.custom-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.custom-scroll::-webkit-scrollbar-thumb { background: #d4af37; border-radius: 4px; }

/* =========================================
   ESTILOS DEL AURA (Mouse Follower)
   ========================================= */
#aura {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: fixed;
    z-index: 9999;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, rgba(255, 215, 0, 0) 70%);
    border: 1px solid rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    pointer-events: none;
    transition: transform 0.15s ease-out, width 0.1s, height 0.1s;
}

.cursor-aura-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.15) 0%, rgba(88, 28, 135, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9998;
}

:root {
    --oro: #d4af37;
    --lila-profundo: #1a0f2e;
    --lila-medio: #2d1b4d;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--lila-profundo);
    color: white;
    overflow-x: hidden;
}

/* =========================================
   2. TIPOGRAFÍA Y TEXTOS
   ========================================= */
h1, h2, h3, .font-serif {
    font-family: 'Cinzel', serif;
}

.gold-text {
    color: #eab308;
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* =========================================
   3. FONDOS Y DEGRADADOS ESPECIALES
   ========================================= */
.bg-gold-gradient {
    background: linear-gradient(45deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
}

/* =========================================
   4. EFECTOS MÁGICOS (Cursor y Animaciones)
   ========================================= */
.cursor-aura {
    width: 20px;
    height: 20px;
    background: rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 15px var(--oro);
    transition: transform 0.1s ease, width 0.2s, height 0.2s;
}

.modal-enter {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* =========================================
   5. AJUSTES RESPONSIVOS EXTRA Y SCROLLBAR
   ========================================= */
.oculto { display: none !important; }
.mostrado { display: flex !important; opacity: 1 !important; }
.hidden { display: none; }

.carta-container {
    perspective: 1000px;
    cursor: pointer;
    margin: 0 auto;
}

.carta-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.volteada {
    transform: rotateY(180deg);
}

.carta-frente, .carta-atras {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.carta-frente {
    background: linear-gradient(to bottom right, #3b0764, #000);
    border: 2px solid #ca8a04;
    z-index: 2;
}

.carta-atras {
    background: white;
    border: 4px solid #eab308;
    transform: rotateY(180deg);
    z-index: 1;
    overflow: hidden;
}

#modalHistoria.mostrado {
    display: flex !important;
    opacity: 1 !important;
}
#modalHistoriaContent {
    max-height: 90vh;
    overflow-y: auto;
}

.btn-regalo-especial {
    cursor: pointer;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
    animation: simple-pulse 3s infinite;
}

.btn-regalo-especial:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 0 25px rgba(234, 179, 8, 0.8);
    border-color: #ffffff;
}

.btn-regalo-especial .flash-ray {
    position: absolute;
    top: -50%;
    left: -150%;
    width: 60px;
    height: 200%;
    background: rgba(255, 255, 255, 0.9);
    transform: rotate(35deg);
    filter: blur(4px);
    animation: flash-animation 4s infinite;
}

@keyframes flash-animation {
    0% { left: -150%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

@keyframes simple-pulse {
    0% { box-shadow: 0 0 5px rgba(234, 179, 8, 0.4); }
    50% { box-shadow: 0 0 15px rgba(234, 179, 8, 0.6); }
    100% { box-shadow: 0 0 5px rgba(234, 179, 8, 0.4); }
}

/* =========================================
   6. NUEVO BOTÓN WHATSAPP + ETIQUETA FLASH
   ========================================= */
.whatsapp-container {
    z-index: 10000;
}

.whatsapp-float {
    width: 65px;
    height: 65px;
    background-color: rgba(37, 211, 102, 0.85); 
    border-radius: 50%;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(4px);
}

.flash-tag-floating {
    position: absolute;
    bottom: 75px; 
    right: 0;     
    background-color: rgba(220, 38, 38, 0.9); 
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    animation: flotar-suave 3s infinite ease-in-out;
}

.flash-tag-floating::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 25px; 
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: rgba(220, 38, 38, 0.9) transparent transparent transparent;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: rgba(37, 211, 102, 1);
}

@keyframes flotar-suave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Animación para el bocadillo de bienvenida */
.show-welcome-msg {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* =========================================
   9. EFECTO DORADO Y ESCALA EN PAGOS
   ========================================= */
.bg-white\/10 {
    transition: all 0.3s ease-in-out; 
}

.bg-white\/10:hover {
    transform: scale(1.1); 
    background-color: rgba(212, 175, 55, 0.15) !important;
    border-color: #eab308 !important;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
}

.bg-white\/10:hover svg, 
.bg-white\/10:hover img {
    filter: drop-shadow(0 0 5px rgba(234, 179, 8, 0.5));
}

/* =========================================
   10. ESTILOS DEL MODAL DE RESERVA (CALENDARIO)
   ========================================= */
.dia-cal.seleccionado {
    background-color: var(--oro);
    color: #1a0f2e;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    transform: scale(1.1);
}

.btn-hora.seleccionada {
    background-color: var(--oro);
    color: #1a0f2e !important;
    border-color: var(--oro);
    font-weight: bold;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.btn-confirmar-activo {
    background: linear-gradient(45deg, #bf953f, #aa771c) !important;
    color: #1a0f2e !important;
    cursor: pointer !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4) !important;
    transform: scale(1.05);
}

#selectorHoras {
    overflow-y: auto; 
}

/* =========================================
   11. FIX SCROLL Y STICKY HEADERS
   ========================================= */
#modalReservaContent {
    overflow: hidden !important; 
}

.columna-derecha-scroll {
    overflow-y: auto;
    height: 100%;
    position: relative;
}

.sticky-top-mes {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: #0f081a; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    margin-bottom: 0 !important;
    border-radius: 0 0 8px 8px;
    padding-right: 60px !important; 
}

.sticky-top-dias {
    position: sticky;
    top: 40px; 
    z-index: 40;
    background-color: #0f081a;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hora-oculta-sos { display: none; }
.btn-ver-mas-sos { grid-column: 1 / -1; margin-bottom: 15px; padding: 8px 0; background: rgba(212, 175, 55, 0.1); border: 1px dashed #d4af37; border-radius: 8px; color: #d4af37; font-family: 'Montserrat', sans-serif; font-size: 10px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.3s; }
.btn-ver-mas-sos:hover { background: #d4af37; color: #1a0f2e; border-style: solid; }

/* =========================================
   14. EFECTO CRISTAL (GLASSMORPHISM)
   ========================================= */
.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* =========================================
   15. CORRECCIÓN PESTAÑAS Y CHECKBOX
   ========================================= */
#tabLogin, #tabRegistro {
    outline: none !important; 
    transition: all 0.3s ease;
    border-bottom-width: 2px; 
}

#tabLogin:not(.text-yellow-500), #tabRegistro:not(.text-yellow-500) {
    border-bottom-color: transparent !important;
    opacity: 0.6;
}
#tabLogin:not(.text-yellow-500):hover, #tabRegistro:not(.text-yellow-500):hover {
    opacity: 1;
    color: white;
}

.check-mayor {
    accent-color: #d4af37; 
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* =========================================
   16. ESTILOS TIENDA DIGITAL
   ========================================= */
.producto-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.15);
    border-color: #d4af37;
}
.producto-card:hover .icono-producto {
    transform: scale(1.1);
}

/* =========================================
   VELA ALQUÍMICA (VERSIÓN 2.0 - REALISTA)
   ========================================= */
.vela-container {
    position: relative;
    width: 16px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
    margin-bottom: 4px;
}
.vela-cera { position: absolute; bottom: 0; left: 0; width: 100%; height: 16px; border-radius: 2px; box-shadow: inset -2px 0 3px rgba(0,0,0,0.4); }
.cera-roja { background: linear-gradient(to right, #b91c1c, #ef4444); } 
.cera-blanca { background: linear-gradient(to right, #9ca3af, #f3f4f6); } 
.cera-azul { background: linear-gradient(to right, #1e40af, #60a5fa); } 
.cera-dorada { background: linear-gradient(to right, #b45309, #fbbf24); } 
.cera-violeta { background: linear-gradient(to right, #6b21a8, #a855f7); } 
.cera-verde { background: linear-gradient(to right, #15803d, #4ade80); } 
.vela-mecha { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); width: 2px; height: 4px; background: #000; border-radius: 1px; z-index: 1; }
.vela-llama { position: absolute; bottom: 19px; left: 50%; transform: translateX(-50%); width: 8px; height: 12px; background: radial-gradient(ellipse at bottom, rgba(255,255,255,1) 20%, rgba(255,255,0,1) 50%, rgba(255,140,0,0.9) 100%); border-radius: 50% 50% 20% 20%; box-shadow: 0 0 8px rgba(255, 215, 0, 0.6); animation: fuegoVivo 0.15s infinite alternate; transform-origin: center bottom; z-index: 2; }
.vela-humo { position: absolute; bottom: 28px; left: 50%; width: 2px; height: 10px; background: rgba(200, 200, 200, 0.3); border-radius: 50%; filter: blur(2px); opacity: 0; animation: subirHumo 2.5s infinite linear; pointer-events: none; }
@keyframes fuegoVivo { 0% { transform: translateX(-50%) scale(1); opacity: 1; } 100% { transform: translateX(-50%) scale(0.9, 1.1) rotate(1deg); opacity: 0.9; } }
@keyframes subirHumo { 0% { transform: translateX(-50%) translateY(0) scale(1); opacity: 0; } 20% { opacity: 0.4; } 100% { transform: translateX(-50%) translateY(-25px) scale(3); opacity: 0; } }

/* =========================================
   INCIENSO ALQUÍMICO
   ========================================= */
.incienso-container { position: relative; width: 4px; height: 40px; display: inline-block; vertical-align: middle; margin: 0 15px; }
.incienso-varilla { width: 2px; height: 100%; background-color: #5d4037; margin: 0 auto; border-radius: 2px; position: relative; }
.incienso-punta { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background-color: #ff4500; border-radius: 50%; box-shadow: 0 0 4px #ff8c00, 0 0 8px #ff4500; animation: arder 1.5s infinite alternate; }
.incienso-humo { position: absolute; top: -10px; left: 50%; width: 2px; height: 40px; background: linear-gradient(to top, rgba(200,200,200,0.4), rgba(200,200,200,0)); filter: blur(2px); transform-origin: bottom center; animation: humoSinuoso 4s infinite linear; pointer-events: none; }
@keyframes arder { 0% { opacity: 0.8; box-shadow: 0 0 2px #ff8c00; } 100% { opacity: 1; box-shadow: 0 0 6px #ff4500; } }
@keyframes humoSinuoso { 0% { transform: translateX(-50%) scaleY(0.5) skewX(0deg); opacity: 0; } 20% { opacity: 0.6; } 50% { transform: translateX(-60%) scaleY(1.5) skewX(10deg); } 100% { transform: translateX(-40%) scaleY(3) skewX(-10deg) translateY(-30px); opacity: 0; } 

}

/* ============================================================
   🔥 MODO MÓVIL (MAX 768px) - HORAS IZQUIERDA Y PAGOS DERECHA 🔥
   ============================================================ */
@media (max-width: 768px) {
    
    /* 1. Ajuste general del modal para ganar espacio */
    #modalReservaContent, #modalFormulario > div {
        padding: 6px !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        max-height: 96vh !important;
        width: 98% !important;
    }

    /* Reducir espacio superior (Títulos y Precios) */
    #contenedorTipoReserva { margin-bottom: 2px !important; }
    h2, h3 { font-size: 14px !important; margin-bottom: 2px !important; }
    .duracion-texto { font-size: 11px !important; margin: 0 !important; }
    #reservaPrecio { font-size: 16px !important; margin: 0 !important; }

    /* Calendario compacto */
    #seccionCalendario { margin-bottom: 2px !important; }
    #gridCalendario { gap: 1px !important; }
    #gridCalendario div { padding: 4px 0 !important; font-size: 11px !important; }

    /* =======================================================
       LAS 4 COLUMNAS Y LOS PAGOS A LA DERECHA (INTACTO)
       ======================================================= */
    .btn-hora {
        padding: 6px 1px !important;
        font-size: 10px !important;
        letter-spacing: -0.2px !important;
    }

    .btn-pago-compacto {
        padding: 8px 2px !important;
        font-size: 9px !important;
        margin-bottom: 4px !important;
    }
    .btn-pago-compacto svg {
        width: 12px !important;
        height: 12px !important;
    }

    #btnConfirmarCita {
        padding: 10px 2px !important;
        font-size: 10px !important;
        margin-top: 4px !important;
    }

    /* APRETAR TEXTO DE LA HORA (INTACTO) */
    #resumenHoraLocal > div {
        padding: 4px !important;
        margin-top: 2px !important;
        padding-top: 2px !important;
    }
    #resumenHoraLocal .flex-row {
        flex-wrap: nowrap !important;
        gap: 4px !important;
    }
    #resumenHoraLocal span {
        font-size: 11px !important;
        letter-spacing: 0px !important;
        white-space: nowrap !important;
    }

    /* =======================================================
       🔥 FORMULARIO FINAL (ARREGLO DE PUNTOS Y CAJAS) 🔥
       ======================================================= */
    
    /* Obligamos al 100% de ancho SOLO a cajas de texto reales, protegiendo los botones de marcar */
    #modalFormulario input:not([type="radio"]):not([type="checkbox"]), 
    #modalFormulario select {
        padding: 8px !important;
        margin-bottom: 6px !important;
        font-size: 12px !important;
        width: 100% !important;
    }

    /* Los botones redondos (radio) y cuadrados (checkbox) se quedan en su tamaño pequeñito y alineados */
    #modalFormulario input[type="radio"], 
    #modalFormulario input[type="checkbox"] {
        width: auto !important;
        margin: 0 4px 0 0 !important;
        display: inline-block !important;
    }

    #modalFormulario label { margin-bottom: 2px !important; font-size: 11px !important; }

    /* Arreglo del Bloque Resumen: Quitamos las 2 columnas para que nada se aplaste */
    #bloqueResumen .bg-purple-900\/20 {
        display: flex !important;
        flex-direction: column !important; /* Ahora van en filas completas */
        padding: 8px !important;
    }
    
    #bloqueResumen .bg-purple-900\/20 > div {
        width: 100% !important; /* Se estira a todo el ancho disponible */
        font-size: 11px !important;
        margin-bottom: 4px !important;
    }

    /* Protegemos que la caja amarilla de conexión se expanda bien */
    #bloqueResumen .bg-purple-900\/20 > div > div {
        width: 100% !important;
    }

    #bloqueBotonesFinales {
        padding: 8px 0 !important;
        margin-top: auto !important;
        position: sticky !important;
        bottom: -2px !important;
        background: #1a0f2e !important;
        z-index: 100 !important;
    }
    #btnFinalizarReserva { width: 100% !important; padding: 12px !important; font-size: 13px !important; }
}

/* =========================================
   PÉNDULO HEBREO ANIMADO
   ========================================= */
.pendulo-box {
    position: relative;
    width: 30px;
    height: 45px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
}
.pendulo-hilo {
    position: absolute;
    top: -10px;
    left: 50%;
    width: 2px;
    height: 25px;
    background: #d4af37; /* Hilo dorado */
    transform-origin: top center;
    animation: balanceoPendulo 2.5s ease-in-out infinite alternate;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}
.pendulo-cilindro {
    position: absolute;
    top: 25px;
    left: -7px;
    width: 16px;
    height: 24px;
    background: linear-gradient(to right, #5c3a21, #a67b5b, #5c3a21); /* Efecto madera lisa */
    border-radius: 2px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.6), inset 0 0 4px rgba(0,0,0,0.5);
}
.pendulo-etiqueta {
    position: absolute;
    top: 6px;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.85); /* Etiqueta blanca de las letras hebreas */
    border-top: 1px solid rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pendulo-etiqueta::after {
    content: '|||'; /* Simula las letras hebreas */
    color: #000;
    font-size: 6px;
    font-weight: bold;
    letter-spacing: 1px;
    transform: rotate(90deg);
}
@keyframes balanceoPendulo {
    0% { transform: rotate(-30deg); }
    100% { transform: rotate(30deg); }
}