/* ================= SLIDER ================= */
#trainSlider{
    position: fixed;
    top: 55px;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 10px;
}

/* ================= SCROLL ================= */
.slider-container{
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.slider-container::-webkit-scrollbar{
    display: none;
}

/* ================= CARD ================= */
.train-card{
    min-width: 230px;
    background: #ffffff;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: 0.25s ease;
}

#lokoCardBox{
    outline: none !important;
    border: none !important;
}

@media (max-width:768px){

    .train-card{
        padding:10px;
        border-radius:12px;
    }

}
.train-card:hover{
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

/* ================= HEADER ================= */
.train-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
    color: #111827;
}

/* ================= BADGE ================= */
.badge-normal{
    background: #e7f8ef;
    color: #16a34a;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}

/* ================= TITLE ================= */
.train-title{
    font-size:20px;
    font-weight:800;
    letter-spacing:-0.3px;
    margin-top: 4px;
    color: #111827;
}

/* ================= ROUTE ================= */
.train-route{
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

/* ================= TIME ================= */
.train-time{
    font-size: 12px;
    margin-top: 4px;
    color: #374151;
}

/* ================= BUTTON ================= */
.train-btn{
    margin-top: 10px;
    background: #2563eb;
    color: white;
    text-align: center;
    padding: 7px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: 0.2s;
}

.train-btn:hover{
    background: #1d4ed8;
}

.slider-container{
    scroll-snap-type: x mandatory;
}

.train-card{
    scroll-snap-align: start;
}

.train-card{
    cursor: default;
}

.train-btn{
    cursor: pointer;
}

/* ================= POSITION ================= */
:root{
    --loko-top: 160px; /* 🔥 ubah ini kalau mau naik/turun */
}

#lokoCardBox{
    position: fixed;

    bottom: 60px;
    left: 12px;
    right: 12px; /* 🔥 biar bisa slide */

    z-index: 4000;

    display: flex;
    flex-direction: row; /* 🔥 horizontal */

    gap: 10px;

    overflow-x: auto;
    scroll-behavior: smooth;
}

/* hilangkan scrollbar */
#lokoCardBox::-webkit-scrollbar{
    display: none;
}

/* MOBILE */
@media (max-width: 768px){

    #lokoCardBox{
        bottom: 74px;

        left:12px;
        right:12px;

        gap:10px;

        z-index:4000;
    }

}
/* ================= CARD ================= */
.loko-card{
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 14px;

    min-width: 260px;
    max-width: 320px;

    box-shadow: 0 8px 22px rgba(0,0,0,0.25);
    border: 1px solid rgba(0,0,0,0.05);

    font-family: 'Inter', sans-serif;
    transition: all .2s ease;

    cursor: default;
}

.loko-card:hover{
    transform: translateY(-2px);
}

/* ================= CONTENT ================= */
.loko-inline{
    display: flex;
    align-items: center;
    gap: 6px;

    font-size: 14px;
    font-weight: 600;
    color: #1f2937;

    overflow: hidden;
}

/* TEXT KA */
.loko-text{
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* LOKOMOTIF */
.loko-code{
    color: #2563eb;
    font-weight: 700;
    flex-shrink: 0;
}

/* SEPARATOR */
.loko-sep{
    color: #9ca3af;
}

/* ================= OPTIONAL SMOOTH ================= */
.loko-card{
    backdrop-filter: blur(2px);
}

/* =========================
   MOBILE FIX
========================= */
@media (max-width:768px){
    
        /* =========================
       MOBILE TRAIN CARD FIX
    ========================= */
    .train-card{
        min-width: 180px;
        padding:12px;
    }
    
    .train-title{
        font-size:16px;
        line-height:1.2;
    }
    
    .train-route{
        font-size:11px;
    }
    
    .train-time{
        font-size:11px;
    }
    
    .train-btn{
        height:40px;
        font-size:13px;
    }
    
    .product-btn{
        width:52px;
        height:40px;
    
        font-size:12px;
    }

}

/* =========================
   ACTION WRAP
========================= */
.train-action{
    margin-top:8px;

    display:flex;
    align-items:center;
    gap:8px;
}

/* =========================
   DETAIL BUTTON
========================= */
.train-btn{
    flex:1;

    height:44px;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    border-radius:14px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );

    color:white;

    font-size:14px;
    font-weight:700;

    cursor:pointer;

    position:relative;
    overflow:hidden;

    box-shadow:
        0 10px 24px rgba(37,99,235,0.35);

    transition:all .25s ease;
}

/* glossy shine */
.train-btn::before{
    content:'';

    position:absolute;
    top:0;
    left:-120%;

    width:80%;
    height:100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,0.35),
            transparent
        );

    transform:skewX(-20deg);

    transition:.7s;
}

.train-btn:hover::before{
    left:140%;
}

.train-btn:hover{
    transform:
        translateY(-2px)
        scale(1.01);

    box-shadow:
        0 16px 32px rgba(37,99,235,0.45);
}

/* arrow animasi */
.train-btn .arrow{
    transition:.2s;
}

.train-btn:hover .arrow{
    transform:translateX(4px);
}

/* =========================
   PRODUCT BUTTON
========================= */
.product-btn{
    position:relative;
    
    margin-top:6px;

    width:58px;
    height:42px;

    flex-shrink:0;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:14px;

    background:
        linear-gradient(
            135deg,
            #ff9800,
            #ff5722
        );

    text-decoration:none;

    font-size:14px;
    font-weight:700;

    overflow:hidden;

    box-shadow:
        0 8px 20px rgba(255,87,34,0.45);

    transition:all .25s ease;
}

/* glow */
.product-glow{
    position:absolute;

    width:70px;
    height:70px;

    background:
        radial-gradient(
            rgba(255,255,255,0.45),
            transparent 70%
        );

    animation:pulseGlow 2s infinite;
}

/* hover */
.product-btn:hover{
    transform:
        translateY(-2px)
        scale(1.08);

    box-shadow:
        0 12px 28px rgba(255,87,34,0.6);
}

/* glow anim */
@keyframes pulseGlow{

    0%{
        transform:scale(0.8);
        opacity:.7;
    }

    50%{
        transform:scale(1.2);
        opacity:1;
    }

    100%{
        transform:scale(0.8);
        opacity:.7;
    }

}

.product-btn::before{
    content:'';

    position:absolute;
    inset:-2px;

    border-radius:16px;

    background:
        linear-gradient(
            45deg,
            rgba(255,255,255,.7),
            transparent,
            rgba(255,255,255,.4)
        );

    opacity:.35;

    animation:borderGlow 3s linear infinite;
}

@keyframes borderGlow{
    0%{
        transform:rotate(0deg);
    }
    100%{
        transform:rotate(360deg);
    }
}

.badge-live{
    background:#dcfce7;
    color:#16a34a;

    padding:4px 10px;

    border-radius:999px;

    font-size:11px;
    font-weight:700;

    animation:pulseLive 1.5s infinite;
}

@keyframes pulseLive{
    0%{ opacity:1; }
    50%{ opacity:.6; }
    100%{ opacity:1; }
}

.train-live-text{
    margin-top:6px;

    font-size:11px;
    font-weight:600;

    color:#2563eb;
}

