/* ============================================================
   1. STAGGERED FADE-IN (Kad muncul satu-satu)
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-card {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}
/* Delay untuk setiap kad (buat 10 delay) */
.animate-card:nth-child(1) { animation-delay: 0.1s; }
.animate-card:nth-child(2) { animation-delay: 0.2s; }
.animate-card:nth-child(3) { animation-delay: 0.3s; }
.animate-card:nth-child(4) { animation-delay: 0.4s; }
.animate-card:nth-child(5) { animation-delay: 0.5s; }
.animate-card:nth-child(6) { animation-delay: 0.6s; }
.animate-card:nth-child(7) { animation-delay: 0.7s; }
.animate-card:nth-child(8) { animation-delay: 0.8s; }
.animate-card:nth-child(9) { animation-delay: 0.9s; }
.animate-card:nth-child(10){ animation-delay: 1.0s; }

/* ============================================================
   2. BUTTON RIPPLE (Air beriak)
   ============================================================ */
.btn-ripple {
    position: relative;
    overflow: hidden;
}
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%) scale(0);
    animation: rippleAnim 0.6s linear;
    pointer-events: none;
}
@keyframes rippleAnim {
    to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ============================================================
   3. SKELETON LOADING (Placeholder berkelip)
   ============================================================ */
.skeleton-box {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--border) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: 8px;
}
@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   4. MODAL SLIDE-UP & BACKDROP BLUR
   ============================================================ */
.swal2-show {
    animation: swalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
@keyframes swalSlideUp {
    0% { transform: translateY(100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
.swal2-container {
    backdrop-filter: blur(5px) !important;
    background: rgba(0,0,0,0.6) !important;
}

/* ============================================================
   5. BARBER TOOLS: GUNTING BERGERAK (Hover Butang)
   ============================================================ */
.btn-scissors {
    position: relative;
}
.btn-scissors i.fa-cut {
    transition: 0.3s;
}
.btn-scissors:hover i.fa-cut {
    animation: snipSnip 0.5s infinite alternate;
}
@keyframes snipSnip {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-15deg) scale(1.1); }
}

/* ============================================================
   6. FADE COMB (Sikat Menyisir - Kat Kad Barber)
   ============================================================ */
.barber-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}
.barber-card {
    position: relative;
    overflow: hidden;
}
.barber-card:hover::after {
    left: 150%;
    transition: 0.7s ease-in-out;
}

/* ============================================================
   7. RAZOR SLIDE (Pisau Cukur Kat Progress Bar)
   ============================================================ */
/* (Kita akan apply class ni melalui JavaScript nanti) */
.razor-slider {
    position: absolute;
    top: -10px;
    color: var(--gold);
    font-size: 1.2rem;
    transform: translateX(-50%);
    transition: left 0.5s ease-in-out;
    z-index: 10;
}

/* ============================================================
   8. BARBER POLE SPIN (Tiang Barbershop untuk Loading)
   ============================================================ */
.barber-pole-loading {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid var(--border);
    border-top-color: var(--gold);
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   9. SHAVING CREAM REVEAL (Busa Cukur)
   ============================================================ */
@keyframes shavingCream {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.sweet-alert-popup {
    animation: shavingCream 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}