/* Pantalla del Cliente - Reset de contenedor */
.customer-display-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #0f172a;
    color: #f8fafc;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

/* Panel Izquierdo: Lista de Productos */
.display-left {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    background-color: #1e293b;
    border-right: 1px solid #334155;
    padding: 1.5rem;
    height: 100vh;
    box-sizing: border-box;
}

.display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #334155;
    margin-bottom: 1rem;
}

.display-brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #38bdf8;
}

.display-items-count {
    background-color: #334155;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.display-items-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.5rem;
}

.display-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #334155;
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
}

.item-meta {
    font-size: 0.9rem;
    color: #94a3b8;
}

.item-subtotal {
    font-size: 1.2rem;
    font-weight: 700;
    color: #38bdf8;
}

.empty-cart-msg {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #64748b;
    font-size: 1.2rem;
    font-style: italic;
}

/* Panel Derecho: Mensaje y Total */
.display-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    height: 100vh;
    box-sizing: border-box;
    background-color: #0f172a;
}

.welcome-box {
    text-align: center;
    margin-top: auto;
    margin-bottom: auto;
}

.welcome-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
}

.summary-box {
    background-color: #1e293b;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #334155;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.summary-divider {
    height: 1px;
    background-color: #334155;
    margin: 1rem 0;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f8fafc;
}

.total-big-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: #4ade80;
}

/* Reset total del Layout cuando la pantalla del cliente está activa */
body.customer-display-active,
body.customer-display-active #app-container,
body.customer-display-active #page-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
}

/* Ocultar cualquier botón hamburguesa o cabecera flotante */
body.customer-display-active header,
body.customer-display-active #sidebar,
body.customer-display-active .sidebar,
body.customer-display-active .hamburger,
body.customer-display-active .toggle-sidebar {
    display: none !important;
}

/* --- ESTILOS DE LA PANTALLA CLIENTE (AJUSTADOS Y COMPACTOS) --- */
.customer-display-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    box-sizing: border-box;
    background-color: #0f172a;
    color: #f8fafc;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Panel Izquierdo: Lista de Productos */
.display-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #1e293b;
    border-right: 1px solid #334155;
    padding: 1rem;
    box-sizing: border-box;
    height: 100vh;
}

.display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #334155;
    margin-bottom: 0.75rem;
}

.display-brand-title {
    font-size: clamp(1rem, 2vh, 1.4rem);
    font-weight: 800;
    color: #38bdf8;
}

.display-items-count {
    background-color: #334155;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: clamp(0.75rem, 1.5vh, 0.9rem);
    font-weight: 600;
}

.display-items-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.display-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #0f172a;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid #334155;
}

.item-name {
    font-size: clamp(0.85rem, 1.8vh, 1.1rem);
    font-weight: 600;
    color: #f1f5f9;
}

.item-meta {
    font-size: clamp(0.75rem, 1.4vh, 0.85rem);
    color: #94a3b8;
}

.item-subtotal {
    font-size: clamp(0.95rem, 2vh, 1.2rem);
    font-weight: 700;
    color: #38bdf8;
}

.empty-cart-msg {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #64748b;
    font-size: 1rem;
    font-style: italic;
}

/* Panel Derecho: Mensajes y Resumen */
.display-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    box-sizing: border-box;
    height: 100vh;
}

.welcome-box {
    text-align: center;
    margin: auto 0;
}

.welcome-title {
    font-size: clamp(1.4rem, 3.5vh, 2.2rem);
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 0.4rem;
}

.welcome-subtitle {
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    color: #94a3b8;
}

.summary-box {
    background-color: #1e293b;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border: 1px solid #334155;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    color: #cbd5e1;
    margin-bottom: 0.3rem;
}

.summary-divider {
    height: 1px;
    background-color: #334155;
    margin: 0.5rem 0;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: clamp(1.1rem, 2.2vh, 1.4rem);
    font-weight: 800;
    color: #f8fafc;
}

.total-big-amount {
    font-size: clamp(1.8rem, 4vh, 2.8rem);
    font-weight: 900;
    color: #4ade80;
}


/* ==================================================
   BRANDING LOGO VEXTO (CONTROL TOTAL DE TAMAÑO)
   ================================================== */

.brand-top-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 4rem !important; /* Separación con el texto "¡Gracias..." */
}

.vexto-logo-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem !important; /* Espaciado interno de la tarjeta */
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    animation: vextoFloatGlow 4s ease-in-out infinite alternate;
}

/* --- TAMAÑO NORMAL (Ventana del navegador restaurada) --- */
.vexto-logo-img {
    height: 75px !important; /* <--- Tamaño cuando la ventana NO es pantalla completa */
    max-height: none !important;
    width: auto !important;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
    transition: height 0.3s ease;
}

/* --- TAMAÑO EN PANTALLA COMPLETA (Activado con F11 o Fullscreen API) --- */
:fullscreen .vexto-logo-img,
:-webkit-full-screen .vexto-logo-img {
    height: 250px !important; /* <--- CAMBIA AQUÍ el tamaño gigante para Pantalla Completa */
}

:fullscreen .brand-top-bar,
:-webkit-full-screen .brand-top-bar {
    margin-bottom: 3.5rem !important; /* Más separación en pantalla completa */
}

:fullscreen .vexto-logo-wrapper,
:-webkit-full-screen .vexto-logo-wrapper {
    padding: 1.2rem 2.5rem !important; /* Marco más amplio en pantalla completa */
}

/* ANIMACIÓN DE RESPLANDOR Y FLOTADO */
@keyframes vextoFloatGlow {
    0% {
        transform: translateY(0px);
        box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15);
    }
    50% {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(56, 189, 248, 0.35);
    }
    100% {
        transform: translateY(0px);
        box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15);
    }
}

/* --- CALCULADORA DE CAMBIO EN CLIENTE --- */
.text-highlight {
    color: #f1f5f9;
    font-weight: 600;
}

.change-line {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    font-weight: 700;
}

.change-line.ok .change-amount {
    color: #4ade80;
    font-size: 1.3rem;
    font-weight: 800;
}

.change-line.pending .change-amount {
    color: #f87171;
    font-size: 1.1rem;
    font-weight: 700;
}

/* ==================================================
   ANIMACIÓN VEXTO: COREOGRAFÍA SINCRONIZADA
   ================================================== */

.vexto-car-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* 1. ISOTIPO / AUTO */
.vexto-car-runner {
    position: absolute;
    top: 36%;
    right: -300px;
    width: 170px;
    height: auto;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 25px rgba(56, 189, 248, 0.8));
    animation: vextoCarExtended 8.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    z-index: 10002;
}

/* Nubes de Polvo */
.dust-cloud {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(148, 163, 184, 0.7) 0%, rgba(51, 65, 85, 0) 70%);
    pointer-events: none;
    animation: dustPuff 0.85s ease-out forwards;
    z-index: 10001;
}

@keyframes dustPuff {
    0% { opacity: 0.85; transform: scale(0.3) translateY(0); }
    100% { opacity: 0; transform: scale(2.4) translateY(-25px); }
}

/* Movimiento del Isotipo */
@keyframes vextoCarExtended {
    0% { right: -250px; transform: translateY(0) rotate(-8deg) scale(0.9); }
    10% { right: 50vw; transform: translateX(50%) translateY(0) rotate(4deg) scale(1.1); }
    14% { right: 50vw; transform: translateX(50%) translateY(0) rotate(0deg) scale(1); }
    18% { right: 50vw; transform: translateX(50%) translateY(-35px) rotate(-6deg) scale(1.18); }
    22% { right: 50vw; transform: translateX(50%) translateY(0) rotate(2deg) scale(0.97); }
    
    /* Permanencia en centro */
    30% { transform: translateX(50%) translateY(-6px) rotate(-1deg) scale(1.02); }
    50% { transform: translateX(50%) translateY(4px) rotate(1deg) scale(1); }
    70% { transform: translateX(50%) translateY(-6px) rotate(-1deg) scale(1.02); }
    87% { right: 50vw; transform: translateX(50%) translateY(0) rotate(-10deg) scale(1.05); }

    /* Despegue en el segundo 7.2 (87.8% de 8.2s) */
    100% { right: 125vw; transform: translateY(-15px) rotate(-15deg) scale(1.25); }
}

/* 2. NOMBRE DE MARCA "VEXTO POS" (Sale junto al logo y se va con él) */
.vexto-brand-badge {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(14, 165, 233, 0.25);
    border: 1px solid #38bdf8;
    backdrop-filter: blur(8px);
    color: #38bdf8;
    padding: 0.6rem 2.2rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
    opacity: 0;
    z-index: 10000;
    /* Sale al segundo 0.8 y se va al segundo 7.2 disparado hacia la izquierda */
    animation: badgeSyncWithCar 8.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes badgeSyncWithCar {
    0%, 9% { opacity: 0; transform: translate(-50%, -20%) scale(0.7); }
    /* Aparece en el segundo 0.8 junto con el freno del auto */
    14% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
    18% { transform: translate(-50%, -50%) scale(1); }
    /* Mantiene posición mientras el auto flota */
    87% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    /* Sale disparado hacia la izquierda al mismo tiempo que el auto (segundo 7.2) */
    100% { opacity: 0; transform: translate(-250%, -50%) scale(0.8); }
}

/* 3. CARTEL DE AGRADECIMIENTO (Retrasado 1.5s -> Aparece al segundo 2.3 y dura hasta el final) */
.epic-sale-banner {
    position: absolute;
    top: 16%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(22, 101, 52, 0.95) 100%);
    border: 2px solid #4ade80;
    padding: 1.2rem 3rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(74, 222, 128, 0.5);
    opacity: 0;
    z-index: 10000;
    animation: bannerPopDelayed 8.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.epic-sale-banner h2 {
    margin: 0;
    color: #4ade80;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.6);
}

.epic-sale-banner p {
    margin: 0.3rem 0 0 0;
    color: #e2e8f0;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    font-weight: 600;
}

@keyframes bannerPopDelayed {
    /* Permanece oculto los primeros 2.3s (28% de 8.2s) */
    0%, 27% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); }
    /* Aparece en el segundo 2.3 */
    35% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    39% { transform: translate(-50%, -50%) scale(1); }
    /* Se queda 1 segundo más después de que el auto y el badge se van */
    92% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(0.85); }
}

/* Resplandor ambiental */
.car-flash-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(74, 222, 128, 0.15), rgba(56, 189, 248, 0.1), transparent 75%);
    pointer-events: none;
    animation: flashBg 8.2s ease-out forwards;
}

@keyframes flashBg {
    0%, 100% { opacity: 0; }
    10%, 92% { opacity: 1; }
}