/* ==========================================================================
   TOKAPEDIDOS - SCROLL-WORLD (CÓMO FUNCIONA EL SISTEMA)
   Fondo Negro Oficial: #0B0B0B (Idéntico a Register / Login)
   Contenedor Sticky que permanece fijo en pantalla durante todo el recorrido
   ========================================================================== */

.scroll-world-container {
    position: relative;
    height: 320vh; /* Altura ideal para recorrer las 4 etapas fijas */
    background: #0B0B0B;
    background-image: radial-gradient(circle at 50% 50%, rgba(227, 4, 23, 0.12) 0%, #0B0B0B 75%);
    color: #FFFFFF;
    box-sizing: border-box;
}

/* Viewport Sticky que se fija al tope cuando el bloque ocupa toda la pantalla */
.scroll-world-viewport {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    background: transparent;
}

/* Glow Ambiental Rojo Oscuro */
.scroll-world-ambient-glow {
    position: absolute;
    width: 750px;
    height: 750px;
    background: radial-gradient(circle, rgba(227, 4, 23, 0.18) 0%, rgba(227, 4, 23, 0.04) 50%, transparent 75%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
}

/* ==========================================================================
   RESPLANDOR DEGRADADO ROJO Y NEGRO EN EL FOOTER DEL SCROLL-WORLD
   ========================================================================== */
.scroll-world-bleed-glow {
    position: absolute;
    bottom: -30px;
    left: -10%;
    width: 120%;
    height: 380px;
    background: radial-gradient(ellipse at 50% 100%, 
        rgba(255, 30, 50, 0.95) 0%, 
        rgba(227, 4, 23, 0.78) 32%, 
        rgba(150, 0, 15, 0.45) 58%, 
        rgba(11, 11, 11, 0) 82%
    );
    filter: blur(50px);
    pointer-events: none;
    z-index: 5;
    opacity: 0.95;
}

.scroll-world-bottom-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 260px;
    background: linear-gradient(to top, 
        rgba(227, 4, 23, 0.38) 0%, 
        rgba(140, 0, 14, 0.2) 40%, 
        transparent 100%
    );
    pointer-events: none;
    z-index: 4;
}

/* HUD Superior Informativo Fijo */
.scroll-world-hud-top {
    position: absolute;
    top: 5.5rem; /* Espacio para el navbar fijo en el tope */
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    text-align: center;
    pointer-events: none;
    width: 100%;
    max-width: 800px;
}

.hud-pill-badge {
    background: rgba(227, 4, 23, 0.2);
    border: 1px solid rgba(227, 4, 23, 0.4);
    color: #FF4D5E;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.35rem 1rem;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.hud-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.3px;
    transition: opacity 0.25s ease;
}

/* HUD Lateral: Indicador de Etapas / Paginación */
.scroll-world-hud-nav {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.hud-step-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #94A3B8;
    transition: all 0.3s ease;
    padding: 4px;
}

.hud-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.hud-step-label {
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    color: #FFFFFF;
}

.hud-step-btn:hover .hud-step-label,
.hud-step-btn.active .hud-step-label {
    opacity: 1;
    transform: translateX(0);
}

.hud-step-btn.active .hud-step-dot {
    background: #E30417;
    border-color: #E30417;
    box-shadow: 0 0 12px #E30417;
    transform: scale(1.3);
}

.hud-step-btn.active {
    color: #FFFFFF;
}

/* Escenario Central donde flotan las tarjetas */
.scroll-world-stage {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tarjetas de cada Estación: SIEMPRE CENTRADAS Y FIJAS DENTRO DEL BLOQUE */
.world-station {
    position: absolute;
    top: 54%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 90%;
    max-width: 960px;
    border-radius: 24px;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
    padding: 2.2rem;
    opacity: 0;
    pointer-events: none;
    filter: blur(4px);
    transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
    will-change: transform, opacity, filter;
    z-index: 5;
}

/* Estación Activa: Totalmente Visible, Nítida y Centrada */
.world-station.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0px);
    z-index: 10;
}

/* Layout interno de cada Estación */
.station-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.station-tag {
    color: #E30417;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.station-tag svg {
    width: 14px;
    height: 14px;
}

.station-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
}

.station-desc {
    font-size: 0.92rem;
    color: #CBD5E1;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.station-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
}

.station-highlight-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #E2E8F0;
}

.station-highlight-item svg {
    color: #10B981;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Mockups dentro de cada estación */
.station-mock-preview {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.mock-window-header {
    background: #161616;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #9CA3AF;
}

.mock-window-header .dots {
    display: flex;
    gap: 5px;
}

.mock-window-header .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.mock-content-body {
    padding: 1.25rem;
}

.pos-mini-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pos-mini-row {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
}

/* Teléfono en estación 2 */
.phone-mock-frame {
    max-width: 240px;
    margin: 0 auto;
    background: #161616;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    padding: 0.75rem;
}

.phone-screen-inner {
    background: #FFFFFF;
    color: #0F172A;
    border-radius: 20px;
    padding: 0.85rem;
    font-size: 0.75rem;
}

.phone-brand-title {
    font-weight: 800;
    color: #E30417;
    font-size: 0.85rem;
}

.phone-subdomain-pill {
    background: #F1F5F9;
    color: #64748B;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* KDS Monitor */
.kds-monitor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.kds-ticket-card {
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 0.75rem;
}

.kds-timer-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.timer-green { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.timer-amber { background: rgba(245, 158, 11, 0.2); color: #FBBF24; }

/* Mesas Mini */
.mesas-grid-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.mesa-cube {
    background: #181818;
    border-radius: 8px;
    padding: 0.6rem;
    text-align: center;
    font-size: 0.72rem;
    border: 1.5px solid transparent;
}

.mesa-cube.ocupada { border-color: #EF4444; color: #FCA5A5; }
.mesa-cube.libre   { border-color: #10B981; color: #6EE7B7; }
.mesa-cube.cuenta  { border-color: #F59E0B; color: #FCD34D; }

/* Elementos Flotantes */
.world-floating-pill {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 0.5rem 0.9rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #FFFFFF;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 20;
}

.pill-pos-1 { top: 18%; left: 6%; }
.pill-pos-2 { bottom: 10%; right: 8%; }
.pill-pos-3 { top: 22%; right: 8%; }

@media (max-width: 900px) {
    /* Ocultar pills flotantes 3D en mobile para evitar superposición con los títulos */
    .world-floating-pill {
        display: none !important;
    }

    .scroll-world-hud-top {
        top: 4.6rem;
        width: 92%;
        padding: 0 0.5rem;
    }

    .hud-pill-badge {
        font-size: 0.68rem;
        padding: 0.2rem 0.65rem;
        margin-bottom: 0.2rem;
    }

    .hud-title {
        font-size: 1.05rem;
        line-height: 1.25;
    }

    .scroll-world-hud-nav {
        display: none;
    }

    .world-station {
        top: 57%;
        width: 92%;
        max-width: 440px;
        padding: 1.1rem;
        border-radius: 20px;
        max-height: 70vh;
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .world-station::-webkit-scrollbar {
        display: none;
    }

    .station-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .station-tag {
        font-size: 0.68rem;
        margin-bottom: 0.25rem;
    }

    .station-title {
        font-size: 1.1rem;
        line-height: 1.25;
        margin-bottom: 0.35rem;
    }

    .station-desc {
        font-size: 0.78rem;
        line-height: 1.35;
        margin-bottom: 0.5rem;
    }

    .station-highlights {
        gap: 0.25rem;
        margin-bottom: 0.6rem;
    }

    .station-highlight-item {
        font-size: 0.74rem;
        line-height: 1.3;
    }

    .station-highlight-item svg {
        width: 13px;
        height: 13px;
        flex-shrink: 0;
    }

    .world-station .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 10px;
        width: 100%;
        justify-content: center;
    }

    .station-mock-preview {
        padding: 0.6rem;
    }

    .mock-window-header {
        font-size: 0.68rem;
        padding-bottom: 0.4rem;
        margin-bottom: 0.4rem;
    }

    .mini-pos-preview {
        padding: 0.5rem;
    }

    .pos-mini-row {
        font-size: 0.72rem;
        padding: 0.25rem 0;
    }

    .mesa-cubes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .mesa-cube {
        padding: 0.4rem 0.2rem;
        font-size: 0.7rem;
    }

    .mesa-cube small {
        font-size: 0.6rem;
    }
}
