
/* === ESTILOS GENERALES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    color: rgba(255, 241, 241, 0.918);
    height: 100vh;
    overflow: hidden;
    position: relative;
    background: transparent; /* ¡CRUCIAL! Elimina el fondo negro aquí */
}


/* === VIDEO DE FONDO GLOBAL RESPONSIVO (30%) === */
#video-fondo-responsivo {
    position: fixed;
    z-index: 1;
    pointer-events: none;
}

@media (orientation: landscape) {
    #video-fondo-responsivo {
        top: 0;
        left: 0;
        width: 30vw;
        height: 100vh;
        display: block;
    }
}
@media (orientation: portrait) {
    #video-fondo-responsivo {
        top: 0;
        left: 0;
        width: 100vw;
        height: 30vh;
        display: block;
    }
}
#video-fondo-responsivo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === IMAGEN DE FONDO PRINCIPAL (70%) === */
.image-background {
    position: fixed;
    top: 0;
    right: 0;
    width: 70vw;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    background: transparent; /* Asegura que no tenga fondo sólido */
}
.image-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (orientation: portrait) {
    .image-background {
        top: 30vh;
        left: 0;
        width: 100vw;
        height: 70vh;
    }
    .image-background img {
        object-fit: cover;
        object-position: top; /* Puedes ajustar esto según qué parte de la imagen quieras mostrar en vertical */
    }
}


/* === CONTENEDOR DEL MAIN CONTENT (70%) === */
.main-content-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 70vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}
@media (orientation: portrait) {
    .main-content-wrapper {
        top: 30vh;
        left: 0;
        width: 100vw;
        height: 70vh;
        justify-content: center;
        align-items: center; /* ✅ Cambiar de flex-end a center */
    }
}

/* === ELEMENTOS DECORATIVOS DENTRO DEL MAIN CONTENT WRAPPER (solo en el 60%) === */

/* Vapor */
.steam-effects {
    position: absolute;
    top: 0;
    right: 0;
    width: 60vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}
@media (orientation: portrait) {
    .steam-effects {
        top: 40vh;
        left: 0;
        width: 100vw;
        height: 60vh;
    }
}
.steam {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: steamRise 4s ease-in-out infinite;
    pointer-events: none;
}
.steam-1 { top: 20%; left: 20%; animation-delay: 0s; }
.steam-2 { top: 30%; right: 30%; animation-delay: 1s; }
.steam-3 { bottom: 20%; left: 30%; animation-delay: 2s; }
@keyframes steamRise {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.1; }
    50% { transform: translateY(-30px) scale(1.2); opacity: 0.3; }
}

/* Overlay oscuro (solo en el 60%) */
.overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 60vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.1);
    z-index: 3;
    pointer-events: none;
}
@media (orientation: portrait) {
    .overlay {
        top: 40vh;
        left: 0;
        width: 100vw;
        height: 60vh;
    }
}

/* Partículas flotantes (solo en el 60%) */
.floating-particles {
    position: absolute;
    top: 0;
    right: 0;
    width: 60vw;
    height: 100vh;
    pointer-events: none;
    z-index: 3;
}
@media (orientation: portrait) {
    .floating-particles {
        top: 40vh;
        left: 0;
        width: 100vw;
        height: 60vh;
    }
}
.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(45deg, #d9c4b8);
    border-radius: 50%;
    opacity: 0.6;
    animation: particleFloat 4s ease-in-out infinite;
    pointer-events: none;
}
.particle-1 { top: 10%; left: 15%; animation-delay: 0s; }
.particle-2 { top: 25%; right: 20%; animation-delay: 0.3s; }
.particle-3 { top: 40%; left: 25%; animation-delay: 0.6s; }
.particle-4 { top: 55%; right: 30%; animation-delay: 0.9s; }
.particle-5 { top: 70%; left: 35%; animation-delay: 1.2s; }
.particle-6 { top: 85%; right: 25%; animation-delay: 1.5s; }
.particle-7 { top: 15%; left: 70%; animation-delay: 1.8s; }
.particle-8 { top: 35%; right: 15%; animation-delay: 2.1s; }
.particle-9 { top: 50%; left: 80%; animation-delay: 2.4s; }
.particle-10 { top: 65%; right: 35%; animation-delay: 2.7s; }
.particle-11 { top: 80%; left: 15%; animation-delay: 3s; }
.particle-12 { top: 30%; left: 50%; animation-delay: 3.3s; }
@keyframes particleFloat {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.6; }
    50% { transform: translateY(-30px) scale(1.1); opacity: 0.8; }
}

.steam-effects,
.overlay,
.floating-particles
 {
    position: absolute;
    top: 0;
    right: 0;
    width: 70vw;
    height: 100vh;
    pointer-events: none;
    z-index: 5;
}
@media (orientation: portrait) {
    .steam-effects,
    .overlay,
    .floating-particles
     {
        top: 30vh;
        left: 0;
        width: 100vw;
        height: 70vh;
    }
}

/* === ESTILOS PARA EL CONTENIDO PRINCIPAL === */
.main-content {
    width: 90%;
    max-width: 700px;
    padding: 2rem;
    box-sizing: border-box;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centrar verticalmente */
    align-items: center;
    text-align: center;
    color: white;
    height: 100%; /* Asegurar que ocupe toda la altura del contenedor padre */
}

@media (orientation: portrait) {
    .main-content {
        width: 90%;
        padding: 2rem;
        box-sizing: border-box;
        pointer-events: auto;
        display: flex;
        flex-direction: column;
        justify-content: center; /* Centrar verticalmente */
        align-items: center;
        text-align: center;
        height: 100%; /* Asegurar que ocupe toda la altura del contenedor padre */
    }
}

/* Ajustar el contenido según la orientación */
.title-container {
    text-align: center;
    width: 100%;
    margin-bottom: 2rem;
}
.main-title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.word {
    font-weight: 900;
    font-size: clamp(1.5rem, 6vw, 3rem);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: wordAppear 1.5s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}
@media (max-width: 480px) {
    .word {
        font-size: clamp(3rem, 8vw, 6rem);
    }
}
.word-2 {
    background: #f2f2f2;
    -webkit-background-clip: text;
    background-clip: text;
    animation-delay: 0.5s;
}
.word-3 {
    background: #f2f2f2;
    -webkit-background-clip: text;
    background-clip: text;
    animation-delay: 0.8s;
}
@keyframes wordAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.subtitle-container {
    margin-top: 1.5rem;
    animation: fadeIn 2s ease-out 1s both;
}
.subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    background: #f2f2f2;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.divider {
    width: 8rem;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
    margin: 1rem auto;
    animation: pulse 2s ease-in-out infinite;
}
.interaction-indicator {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}
.coffee-cup-container {
    position: relative;
    margin-bottom: 1rem;
}
.coffee-cup {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto;
    animation: bounce 2s ease-in-out infinite;
}
.cup-steam {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}
.vapor {
    position: absolute;
    width: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    animation: vaporRise 2s ease-in-out infinite;
}
.vapor-1 { height: 1.5rem; left: -6px; animation-delay: 0s; }
.vapor-2 { height: 1.2rem; left: 0px; animation-delay: 0.3s; }
.vapor-3 { height: 0.8rem; left: 6px; animation-delay: 0.6s; }
@keyframes vaporRise {
    0% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-20px); }
}
.instruction-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.dots {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
}
.dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: dotBounce 1.5s ease-in-out infinite;
}
.dot-2 { animation-delay: 0.2s; }
.dot-3 { animation-delay: 0.4s; }
@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(1); }
    40% { transform: scale(1.2); }
}

/* === CONTROL DE PANTALLAS === */
/*Las pantallas de SELECCIÓN, CONFIRMACIÓN y PAGO mantienen la división 30%/70% */
.pantalla-seleccion,
.pantalla-confirmacion,
.pantalla-pago {
    display: none !important;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: absolute;
    top: 0;
    right: 0;
    width: 70vw;
    height: 100vh;
    z-index: 15;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}
@media (orientation: portrait) {
    .pantalla-seleccion,
    .pantalla-confirmacion,
    .pantalla-pago {
        top: 30vh;
        left: 0;
        width: 100vw;
        height: 70vh;
    }
}

/* === OPTIMIZACIÓN PARA PANTALLAS DE 19" (1440x900, 1280x1024, etc.) === */
@media (min-width: 1280px) and (max-width: 1600px) and (min-height: 900px) {
    
     .main-content {
        max-width: 700px; /* ✅ Asegurar ancho óptimo */
        padding: 2.5rem;
    }
    .main-title {
        max-width: 100%; /* ✅ Ocupar más ancho */
        text-align: center;
    }
    .main-title .word {
        font-size: 3.8rem; /* ✅ Tamaño más grande */
        line-height: 1.3;
    }
    .subtitle {
        font-size: 1.9rem;
        margin-top: 1rem;
        text-align: center;
    }
    .coffee-cup {
         width: 7.5rem;
        height: 7.5rem;
        font-size: 3.8rem;
    }
    .producto-confirmacion {
        width: 480px;
        min-height: 520px;
    }
    .carousel-item {
         width: 340px;
        height: 300px;
    }
    .item-image {
         width: 210px;
        height: 210px;
    }
    .pantalla-pago .precio-pago {
        font-size: 4rem;
    }
    /* Ajustes específicos para la pantalla de selección */
    .pantalla-seleccion {
        padding: 3rem; /* Aumentar el padding para mejor espaciado */
    }
    .pantalla-seleccion .titulo-principal {
        font-size: 3.8rem; /* Aumentar el tamaño del título */
        margin-bottom: 3rem; /* Aumentar el margen inferior */
    }
    .carousel-3d-container {
        height: 350px; /* Aumentar la altura del carrusel */
    }
    .carousel-item {
        width: 350px;
        height: 300px;
    }
    .item-image {
        width: 220px;
        height: 220px;
    }
    .item-title {
        font-size: 1.6rem; /* Aumentar el tamaño del título del producto */
    }
}

/* Las pantallas de PUBLICIDAD, DIVIDIDA y FINAL ocupan el 100% de la pantalla */
.pantalla-publicidad,
.pantalla-dividida,
.pantalla-final {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.pantalla-visible {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
}


/* === PANTALLA DE SELECCIÓN (CORREGIDA) === */
.pantalla-seleccion {
    /* Estilos comunes para ambos modos */
    background: linear-gradient(135deg, #f8e7ca, #e7d7bc, #f8e7ca);
    /* Eliminar min-height: 100vh para evitar que ocupe más de lo necesario */
    height: 100vh; /* Mantener la altura completa */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centrar verticalmente */
    align-items: center;
    padding: 2rem; /* Aumentar el padding para mejor espaciado */
    position: relative;
    overflow-x: hidden;
    font-family: 'Montserrat', sans-serif;
    /* Posicionamiento inicial */
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    /* ✅ Añadir esto para evitar problemas de renderizado */
    box-sizing: border-box;
}


/* Horizontal: 70% derecho */
@media (orientation: landscape) {
    .pantalla-seleccion {
        width: 70vw; /* Solo ocupa el 70% derecho */
        left: auto; /* Asegurarse de que no se desplace a la izquierda */
        right: 0; /* Fijar a la derecha */
        margin-left: 30vw; /* Empujar hacia la derecha para dejar espacio al video del 30% */
        justify-content: center;
        align-items: center;
        padding: 2rem; /* Aumentar padding para mejor espaciado */
        box-sizing: border-box;
        /* ✅ Añadir esto para centrar el contenido dentro del contenedor */
        text-align: center;
    }
    /* Ajustar el logo en modo horizontal */
    .pantalla-seleccion .logo-img {
        position: absolute;
        top: 1rem;
        left: 1rem;
        max-width: 120px;
        height: auto;
        z-index: 100;
        animation: fadeIn 1s ease-out;
    }
    /* Ajustar el título en modo horizontal */
    .pantalla-seleccion .titulo-principal {
        font-size: clamp(1.5rem, 4vw, 3rem);
        font-weight: 900;
        text-align: center;
        padding: 1rem;
        background: linear-gradient(45deg, #bf6e33, #D2691E, #CD853F);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        width: 100%; /* Ocupa el ancho completo del contenedor */
        max-width: 800px; /* Limitar el ancho máximo para evitar que sea demasiado grande */
        margin-bottom: 2rem;
        /* ✅ Forzar el texto a estar centrado */
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    /* Ajustar el carrusel en modo horizontal */
    .carousel-3d-section {
        width: 100%;
        position: relative;
        /* ✅ Centrar el carrusel dentro del contenedor */
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 1rem 0;
    }
    .carousel-3d-container {
        width: 100%;
        height: 320px;
        position: relative;
        margin: 0 auto;
        perspective: 4000px;
        overflow: visible;
    }
    .carousel-3d-track {
        position: absolute;
        top: 50%;
        left: 50%;
        transform-style: preserve-3d;
        transform: translate(-50%, -50%);
        transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
        height: 320px;
        width: 100%;
        max-width: 1400px;
    }
    .carousel-item {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 300px;
        height: 300px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 24px;
        background: linear-gradient(45deg, #bf7f5a, #59271c);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
        transform-style: preserve-3d;
        transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
        cursor: pointer;
        opacity: 0.7;
        z-index: 1;
        overflow: hidden;
    }
    .carousel-item.active {
        transform: translate(-50%, -50%) translateZ(200px) !important;
        opacity: 1;
        z-index: 100;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
        filter: brightness(1.1);
        animation: float 2.5s ease-in-out infinite;
    }
    @keyframes float {
        0%, 100% { transform: translate(-50%, -50%) translateZ(200px) translateX(0); }
        50% { transform: translate(-50%, -50%) translateZ(200px) translateX(-5px); }
    }
    .item-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        padding: 20px;
        text-align: center;
        position: relative;
        z-index: 2;
    }
    .item-image {
        width: 200px;
        height: 200px;
        object-fit: cover;
        border-radius: 15px;
        margin-bottom: 15px;
    }
    .item-title {
        font-size: 1.4rem;
        font-weight: 600;
        margin-bottom: 12px;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
        color: white;
    }
    /* Indicadores */
    .indicators {
        display: none;
        justify-content: center;
        gap: 15px;
        margin-top: 30px;
    }
    .indicator {
        width: 50px;
        height: 8px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.3);
        cursor: pointer;
        transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .indicator.active {
        background: linear-gradient(90deg, #bf7f5a, #a67721);
        transform: scale(1.2);
        box-shadow: 0 5px 20px rgba(161, 196, 253, 0.7);
        width: 70px;
    }
    .indicator:hover:not(.active) {
        background: rgba(255, 255, 255, 0.6);
        transform: scale(1.1);
    }
    /* Botón volver */
    .btn-casa-inicio {
        position: fixed;
        bottom: 20px;
        left: 20px;
        background: rgba(191, 127, 90, 0.9);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
        padding: 12px 18px;
        border-radius: 10px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        animation: pulse-casa 2s ease-in-out infinite;
        white-space: nowrap;
        min-width: auto;
    }
    .btn-casa-inicio:hover {
        background: rgba(89, 39, 28, 0.95);
        transform: scale(1.05) translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }
    @keyframes pulse-casa {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.02); }
    }
    @media (max-width: 768px) {
        .btn-casa-inicio {
            bottom: 15px;
            left: 15px;
            padding: 10px 15px;
            font-size: 1rem;
        }
    }
    @media (max-width: 480px) {
        .btn-casa-inicio {
            bottom: 10px;
            left: 10px;
            padding: 8px 12px;
            font-size: 0.9rem;
        }
    }
}
/* Vertical: 70% inferior */
@media (orientation: portrait) {
    .pantalla-seleccion {
        /* Posicionamiento: fijar en la parte inferior */
        top: 30vh; /* Empujar hacia abajo para dejar espacio al video del 30% superior */
        height: 70vh; /* Ocupar exactamente el 70% inferior */
        width: 100vw;
        margin: 0;
        padding: 1rem; /* Reducir el padding para evitar que el contenido se vaya abajo */
        box-sizing: border-box;
        /* ✅ Centrar el contenido verticalmente */
        justify-content: center;
        align-items: center;
        /* ✅ Asegurar que el texto esté centrado */
        text-align: center;
        /* ✅ Añadir esto para evitar que el contenido se desborde */
        overflow-y: auto;
    }
    /* Ajustar el logo en modo vertical */
    .pantalla-seleccion .logo-img {
        position: absolute;
        top: 1rem;
        left: 1rem;
        max-width: 120px;
        height: auto;
        z-index: 100;
        animation: fadeIn 1s ease-out;
    }
    /* Ajustar el título en modo vertical */
    .pantalla-seleccion .titulo-principal {
        font-size: clamp(1.5rem, 4vw, 3rem);
        font-weight: 900;
        text-align: center;
        padding: 1rem;
        background: linear-gradient(45deg, #bf6e33, #D2691E, #CD853F);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        width: 100%; /* Ocupa el ancho completo del contenedor */
        max-width: 800px; /* Limitar el ancho máximo para evitar que sea demasiado grande */
        margin-bottom: 1rem; /* Reducir el margen para evitar que se vaya abajo */
        /* ✅ Forzar el texto a estar centrado */
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    /* Ajustar el carrusel en modo vertical */
    .carousel-3d-section {
        width: 100%;
        position: relative;
        /* ✅ Centrar el carrusel dentro del contenedor */
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.5rem 0; /* Reducir el padding para evitar que se vaya abajo */
    }
    .carousel-3d-container {
        width: 100%;
        height: 300px; /* Reducir la altura para pantallas más pequeñas */
        position: relative;
        margin: 0 auto;
        perspective: 4000px;
        overflow: visible;
    }
    .carousel-3d-track {
        position: absolute;
        top: 50%;
        left: 50%;
        transform-style: preserve-3d;
        transform: translate(-50%, -50%);
        transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
        height: 300px; /* Reducir la altura para pantallas más pequeñas */
        width: 100%;
        max-width: 1400px;
    }
    .carousel-item {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 300px;
        height: 270px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 24px;
        background: linear-gradient(45deg, #bf7f5a, #59271c);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
        transform-style: preserve-3d;
        transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
        cursor: pointer;
        opacity: 0.7;
        z-index: 1;
        overflow: hidden;
    }
    .carousel-item.active {
        transform: translate(-50%, -50%) translateZ(200px) !important;
        opacity: 1;
        z-index: 100;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
        filter: brightness(1.1);
        animation: float 2.5s ease-in-out infinite;
    }
    @keyframes float {
        0%, 100% { transform: translate(-50%, -50%) translateZ(200px) translateX(0); }
        50% { transform: translate(-50%, -50%) translateZ(200px) translateX(-5px); }
    }
    .item-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        padding: 20px;
        text-align: center;
        position: relative;
        z-index: 2;
    }
    .item-image {
        width: 180px;
        height: 180px;
        object-fit: cover;
        border-radius: 15px;
        margin-bottom: 15px;
    }
    .item-title {
        font-size: 1.4rem;
        font-weight: 600;
        margin-bottom: 12px;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
        color: white;
    }
    /* Indicadores */
    .indicators {
        display: none;
        justify-content: center;
        gap: 15px;
        margin-top: 20px; /* Reducir el margen para evitar que se vaya abajo */
    }
    .indicator {
        width: 50px;
        height: 8px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.3);
        cursor: pointer;
        transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .indicator.active {
        background: linear-gradient(90deg, #bf7f5a, #a67721);
        transform: scale(1.2);
        box-shadow: 0 5px 20px rgba(161, 196, 253, 0.7);
        width: 70px;
    }
    .indicator:hover:not(.active) {
        background: rgba(255, 255, 255, 0.6);
        transform: scale(1.1);
    }
    /* Botón volver */
    .btn-casa-inicio {
        position: fixed;
        bottom: 10px; /* Ajustar la posición del botón para que no se vaya abajo */
        left: 10px; /* Ajustar la posición del botón para que no se vaya abajo */
        background: rgba(191, 127, 90, 0.9);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
        padding: 10px 15px; /* Reducir el padding para pantallas más pequeñas */
        border-radius: 10px;
        font-size: 1rem; /* Reducir el tamaño de la fuente para pantallas más pequeñas */
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        animation: pulse-casa 2s ease-in-out infinite;
        white-space: nowrap;
        min-width: auto;
    }
    .btn-casa-inicio:hover {
        background: rgba(89, 39, 28, 0.95);
        transform: scale(1.05) translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }
    @keyframes pulse-casa {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.02); }
    }
    @media (max-width: 768px) {
        .btn-casa-inicio {
            bottom: 15px;
            left: 15px;
            padding: 10px 15px;
            font-size: 1rem;
        }
    }
    @media (max-width: 480px) {
        .btn-casa-inicio {
            bottom: 10px;
            left: 10px;
            padding: 8px 12px;
            font-size: 0.9rem;
        }
    }
}

/* === PANTALLA DE CONFIRMACIÓN === */
.pantalla-confirmacion {
    background: linear-gradient(135deg, #f8e7ca, #e7d7bc, #f8e7ca);
}

/* === PANTALLA DE PAGO (REESTILIZADA) === */
.pantalla-pago {
    background:linear-gradient(135deg, #f8e7ca, #e7d7bc, #f8e7ca);
    font-family: 'Montserrat', sans-serif;
}
.pantalla-pago .logo-img {
    position: absolute;
    top: 1rem;
    left: 1rem;
    max-width: 120px;
    height: auto;
    z-index: 100;
    animation: fadeIn 1s ease-out;
}
.pantalla-pago .titulo-pago {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 4vw, 2.5rem);
    font-weight: 700;
    background: linear-gradient(45deg, #bf6e33, #D2691E, #CD853F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0 2rem;
    text-align: center;
    line-height: 1.3;
}
.pantalla-pago .mensaje-moneda {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.1rem;
    background: linear-gradient(45deg, #bf6e33, #D2691E, #CD853F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}
.pantalla-pago .precio-pago {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.8rem;
    font-weight: 800;
    color: #d4af37;
    margin: 1.2rem 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.1);
    animation: fadeIn 1s ease-out 0.5s both;
}
.zona-nfc {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.onda-nfc {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    animation: ondaPulsar 2s infinite;
    pointer-events: none;
}
.btn-pago-simple {
    background: linear-gradient(45deg, #bf7f5a, #59271c);
    border: 3px solid rgb(212, 175, 55);
    border-radius: 15px;
    padding: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-pago-simple:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}
.btn-pago-simple:active {
    transform: scale(0.95);
}
.btn-pago-simple .icono-pago {
    width: 150px;
    height: 150px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
/* Ajustar contenedor de iconos */
.iconos-pago {
    display: flex;
    gap: 30px;
    z-index: 2;
}
.icono-pago {
    width: 140px;
    height: 140px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    animation: fadeIn 1s ease-out 0.3s both;
}
@keyframes ondaPulsar {
    0% { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(1.4); opacity: 0; }
}
/* Responsive */
@media (max-width: 768px) {
    .btn-pago-simple .icono-pago {
        width: 80px;
        height: 80px;
    }
    .iconos-pago {
        gap: 20px;
    }
}
@media (max-width: 480px) {
    .btn-pago-simple .icono-pago {
        width: 60px;
        height: 60px;
    }
    .iconos-pago {
        gap: 15px;
    }
}

/* === PANTALLA DE PUBLICIDAD (REESTILIZADA) === */
.pantalla-publicidad {
    background: linear-gradient(135deg, #ffefd6, #f1e5d2, #ffefd6);
    font-family: 'Montserrat', sans-serif;
    padding: 2rem;
}
.pantalla-publicidad .logo-img {
    position: absolute;
    top: 1rem;
    left: 1rem;
    max-width: 120px;
    height: auto;
    z-index: 100;
    animation: fadeIn 1s ease-out;
}
.pantalla-publicidad .titulo-publicidad {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    background: linear-gradient(45deg, #bf6e33, #D2691E, #CD853F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0 1rem;
    text-align: center;
    line-height: 1.3;
}
.contador-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
}
.contador-visual .segundos {
    font-family: 'Montserrat', sans-serif;
    font-size: 4.5rem;
    font-weight: 800;
    color: #bf7f5a;
    text-shadow: 0 3px 8px rgba(0,0,0,0.1);
    animation: pulseContador 2s ease-in-out infinite;
}
.contador-visual .unidad {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    color: #7a5c48;
    margin-top: 0.5rem;
}
.pantalla-publicidad .mensaje-publicidad {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: #6b4f41;
    margin-top: 1.2rem;
    max-width: 500px;
    line-height: 1.5;
}
@keyframes pulseContador {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* === PANTALLA DIVIDIDA === */
.pantalla-dividida {
    display: none;
    background: #000;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 25;
}
.pantalla-dividida.pantalla-visible {
    display: flex !important;
}
.pantalla-dividida .video-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.pantalla-dividida .video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pantalla-dividida .mensaje-superpuesto {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 15px;
    color: white;
    text-align: center;
    max-width: 300px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 1s ease-out;
}
.pantalla-dividida .mensaje-superpuesto h2 {
    color: #ffcc00;
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}
.pantalla-dividida .mensaje-superpuesto p {
    margin: 8px 0;
    font-size: 1rem;
    line-height: 1.3;
}
.pantalla-dividida .qr-code {
    width: 100px;
    height: 100px;
    margin: 10px 0;
    border: 2px solid #ffcc00;
    border-radius: 8px;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* === PANTALLA FINAL (REESTILIZADA) === */
.pantalla-final {
    background: linear-gradient(135deg, #ffefd6, #f1e5d2, #ffefd6);
    font-family: 'Montserrat', sans-serif;
    padding: 2rem;
}
.pantalla-final .logo-img {
    position: absolute;
    top: 1rem;
    left: 1rem;
    max-width: 120px;
    height: auto;
    z-index: 100;
    animation: fadeIn 1s ease-out;
}
.pantalla-final .titulo-final {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    color: #59271c;
    margin: 1.5rem 0 1.2rem;
    text-align: center;
    line-height: 1.2;
    animation: fadeIn 1s ease-out;
}
.pantalla-final .mensaje-agradecimiento {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #bf7f5a;
    margin-top: 1.5rem;
    animation: fadeIn 1s ease-out 0.6s both;
}
.vapor-final-container {
    position: relative;
    width: 100%;
    height: 80px;
    margin: 1.5rem auto;
    display: flex;
    justify-content: center;
}
.vapor-final {
    position: absolute;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    animation: vaporRiseFinal 3s ease-in-out infinite;
}
.vapor-final::before,
.vapor-final::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    animation: vaporRiseFinal 3s ease-in-out infinite;
}
.vapor-final::before {
    left: -8px;
    height: 24px;
    animation-delay: 0.3s;
}
.vapor-final::after {
    right: -8px;
    height: 18px;
    animation-delay: 0.6s;
}
.vapor-final {
    left: 0;
    height: 30px;
}
@keyframes vaporRiseFinal {
    0% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-40px); }
}

/* === ESTILOS COMUNES PARA LOGOS === */
.pantalla-confirmacion .logo-img {
    position: absolute;
    top: 1rem;
    left: 1rem;
    max-width: 120px;
    height: auto;
    z-index: 100;
    animation: fadeIn 1s ease-out;
}

/* Botones */
.btn-confirmar, .btn-cancelar {
    padding: 1rem 2rem;
    margin: 0.5rem;
    border: none;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-confirmar {
    background: linear-gradient(45deg, #bf7f5a, #59271c);
    color: white;
}
.btn-confirmar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}
.btn-cancelar {
    background: linear-gradient(45deg, #bf7f5a, #59271c);
    color: white;
}
.btn-cancelar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Producto en confirmación */
.producto-confirmacion {
    text-align: center;
    background: linear-gradient(45deg, #bf7f5a, #59271c);
    padding: 2rem;
    border-radius: 1.5rem;
    margin: 2rem 0;
    width: 400px;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}
.producto-confirmacion img {
    width: 180px !important;
    height: 180px !important;
    object-fit: cover;
    border-radius: 15%;
    margin-bottom: 1.5rem;
}
.producto-confirmacion h2 {
    margin: 1rem 0;
    font-size: 2rem;
    color: #f2f2f2;
    line-height: 1.2;
    max-width: 100%;
    word-wrap: break-word;
}
.producto-confirmacion p {
    margin: 0.5rem 0;
    font-size: 1.3rem;
    color: #f2f2f2;
    line-height: 1.4;
    max-width: 100%;
    word-wrap: break-word;
}
#confirmacion-precio {
    font-size: 1.5rem !important;
    font-weight: 700;
    margin-top: 1rem;
    color: #ffd700 !important;
}
@media (max-width: 768px) {
    .producto-confirmacion {
        width: 350px;
        min-height: 420px;
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    .producto-confirmacion img {
        width: 150px !important;
        height: 150px !important;
    }
    .producto-confirmacion h2 {
        font-size: 1.5rem;
    }
}
@media (max-width: 480px) {
    .producto-confirmacion {
        width: 300px;
        min-height: 380px;
        padding: 1.2rem;
        margin: 1rem 0;
    }
    .producto-confirmacion img {
        width: 130px !important;
        height: 130px !important;
    }
    .producto-confirmacion h2 {
        font-size: 1.3rem;
    }
    .producto-confirmacion p {
        font-size: 1rem;
    }
}


/* === MODAL DE ESPERA DENTRO DE PANTALLA DE PAGO === */
.modal-espera-pago {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 300px;
}
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.modal-content h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.4em;
}
.modal-content p {
    margin: 0;
    color: #666;
    font-size: 1em;
}

/* === MENSAJE DE TRANSACCIÓN INCOMPLETA === */
.mensaje-incompleto {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 101;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
}
.mensaje-content {
    text-align: center;
    color: white;
    padding: 30px;
    background: rgba(255, 107, 107, 0.2);
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    border: 2px solid #ff6b6b;
}
.mensaje-content .icono-error {
    font-size: 2.5rem;
    margin-bottom: 15px;
}
.mensaje-content h3 {
    font-size: 1.6rem;
    margin: 0 0 10px;
    color: #ff6b6b;
}
.mensaje-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* === ALERTA DINÁMICA === */
.modal-alerta {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
}
.alerta-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: rgb(235, 142, 142);
    color: rgb(66, 60, 60);
    border-radius: 10px;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideInUp 0.3s ease-out, fadeOut 3s ease-out forwards;
}
.alerta-icono {
    font-size: 1.2rem;
    font-weight: bold;
}
.alerta-mensaje {
    flex: 1;
    text-align: center;
}
.alerta-error {
    background: #ff4d4d;
}
.alerta-success {
    background: #4caf50;
}
.alerta-info {
    background: #2196f3;
}
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* === BLOQUEO DE INTERACCIONES DURANTE TRANSICIONES === */
.pantalla-bloqueada {
    pointer-events: none !important;
    cursor: wait !important;
}
.capa-bloqueo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9999;
    pointer-events: all;
    display: none;
}
.capa-bloqueo.activa {
    display: block;
}

/* === ANIMACIONES === */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-30px); }
    70% { transform: translateY(-15px); }
    90% { transform: translateY(-4px); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes slideInFromTop {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .pantalla-seleccion {
        padding: 0.5rem;
        justify-content: flex-start;
        padding-top: 4rem;
    }
    .pantalla-seleccion .titulo-principal {
        font-size: clamp(1.3rem, 4vw, 2.5rem);
        margin-bottom: 1rem;
        padding: 1rem;
    }
    .pantalla-seleccion .logo-img {
        max-width: 120px;
        top: 0.8rem;
        left: 0.8rem;
    }
    .pantalla-dividida .mensaje-superpuesto {
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
        padding: 15px;
    }
    .pantalla-dividida .mensaje-superpuesto h2 {
        font-size: 1.3rem;
    }
    .pantalla-dividida .mensaje-superpuesto p {
        font-size: 0.9rem;
    }
    .pantalla-dividida .qr-code {
        width: 80px;
        height: 80px;
    }
    .carousel-3d-container {
        height: 300px;
    }
    .carousel-item {
        width: 280px;
        height: 240px;
    }
    .item-image {
        width: 150px;
        height: 150px;
    }
    .item-title {
        font-size: 1.2rem;
    }
}
@media (max-width: 480px) {
    .pantalla-seleccion {
        padding-top: 3rem;
    }
    .pantalla-seleccion .titulo-principal {
        padding: 2.5rem 0rem;
        margin-bottom: 0.8rem;
    }
    .pantalla-seleccion .logo-img {
        max-width: 90px;
        top: 0.5rem;
        left: 0.5rem;
    }
    .carousel-item {
        width: 240px;
        height: 220px;
    }
    .item-image {
        width: 130px;
        height: 130px;
    }
    .item-title {
        font-size: 1.1rem;
    }
    .controls {
        gap: 20px;
        margin-top: 30px;
    }
    .control-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    .pantalla-dividida .mensaje-superpuesto {
        bottom: 15px;
        left: 15px;
        right: 15px;
        padding: 12px;
    }
    .pantalla-dividida .mensaje-superpuesto h2 {
        font-size: 1.1rem;
    }
}

/* Estilos para la versión de la PWA */
.version-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(191, 127, 90, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-family: 'Montserrat', sans-serif;
    z-index: 1000;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.version-info:hover {
    opacity: 1;
}
