/* Weapon filter animations */
.weapon-filter-hidden {
    display: none;
}

/* === TOP LAYOUT (inline) - Slide from LEFT === */
.weapon-filter-slide-in-left {
    display: block;
    animation: weaponSlideInFromLeft 0.3s ease-out forwards;
    overflow: hidden;
    /* Prevent layout shift during animation */
    position: absolute;
    left: 0;
    top: 0;
}

.weapon-filter-slide-in-left.animation-complete {
    /* After animation, restore normal flow */
    position: relative;
    left: auto;
    top: auto;
}

.weapon-filter-slide-out-left {
    animation: weaponSlideOutToLeft 0.25s ease-in forwards;
    overflow: hidden;
}

@keyframes weaponSlideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes weaponSlideOutToLeft {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-30px);
    }
}

/* === LEFT LAYOUT (sidebar) - Slide from TOP === */
.weapon-filter-slide-in-top {
    display: block;
    animation: weaponSlideInFromTop 0.3s ease-out forwards;
    overflow: hidden;
}

.weapon-filter-slide-out-top {
    animation: weaponSlideOutToTop 0.25s ease-in forwards;
    overflow: hidden;
}

@keyframes weaponSlideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

@keyframes weaponSlideOutToTop {
    0% {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
}

/* Legacy class for backward compatibility */
.weapon-filter-visible {
    display: block;
}

/* Card appearance animation when filters change */
.item-card {
    opacity: 0;
    animation: cardFadeInUp 0.4s ease-out forwards;
}

@keyframes cardFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for cards */
.item-card:nth-child(1) { animation-delay: 0s; }
.item-card:nth-child(2) { animation-delay: 0.05s; }
.item-card:nth-child(3) { animation-delay: 0.1s; }
.item-card:nth-child(4) { animation-delay: 0.15s; }
.item-card:nth-child(5) { animation-delay: 0.2s; }
.item-card:nth-child(6) { animation-delay: 0.25s; }
.item-card:nth-child(7) { animation-delay: 0.3s; }
.item-card:nth-child(8) { animation-delay: 0.35s; }
.item-card:nth-child(n+9) { animation-delay: 0.4s; }
