/* ============================================
   KickVault - Shared Animation Styles
   ============================================ */

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Animation Timing Variables */
:root {
    --transition-fast: 150ms;
    --transition-normal: 300ms;
    --transition-slow: 500ms;
    --transition-slower: 700ms;
    --easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   Keyframe Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(13, 242, 89, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(13, 242, 89, 0.6);
    }
}

/* ============================================
   Utility Animation Classes
   ============================================ */

.animate-fade-in {
    animation: fadeIn 0.6s var(--easing-smooth) forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s var(--easing-smooth) forwards;
}

.animate-slide-down {
    animation: slideDown 0.5s var(--easing-smooth) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s var(--easing-smooth) forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* Stagger delays for sequential animations */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

.stagger-6 {
    animation-delay: 0.6s;
}

/* ============================================
   Enhanced Navigation Styles
   ============================================ */

/* Navbar scroll behavior */
.navbar-hidden {
    transform: translateY(-100%);
    transition: transform var(--transition-normal) var(--easing-smooth);
}

.navbar-visible {
    transform: translateY(0);
    transition: transform var(--transition-normal) var(--easing-smooth);
}

/* Active link underline animation */
nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #0df259;
    transition: width var(--transition-normal) var(--easing-smooth),
        left var(--transition-normal) var(--easing-smooth);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
    left: 0;
}

/* Logo hover animation */
.logo-container {
    transition: transform var(--transition-normal) var(--easing-bounce);
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo-container:hover .logo-icon {
    animation: bounce 0.6s var(--easing-bounce);
}

/* ============================================
   Button Enhancements
   ============================================ */

.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal) var(--easing-smooth);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px rgba(13, 242, 89, 0.3);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

/* Ripple effect */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   Product Card Enhancements
   ============================================ */

.product-card {
    transition: all var(--transition-normal) var(--easing-smooth);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.product-card img {
    transition: transform var(--transition-slow) var(--easing-smooth);
}

.product-card:hover img {
    transform: scale(1.1);
}

/* Quick view button slide-in */
.quick-view-btn {
    transform: translateY(100%);
    transition: transform var(--transition-normal) var(--easing-smooth);
}

.product-card:hover .quick-view-btn {
    transform: translateY(0);
}

/* Badge animations */
.badge-new {
    animation: pulse 2s ease-in-out infinite;
}

.badge-limited {
    background: linear-gradient(90deg,
            rgba(255, 215, 0, 0.8) 0%,
            rgba(255, 215, 0, 1) 50%,
            rgba(255, 215, 0, 0.8) 100%);
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
}

/* ============================================
   Shopping Cart Badge Animation
   ============================================ */

.cart-badge {
    animation: pulse 2s ease-in-out infinite;
}

.cart-icon:hover .cart-badge {
    animation: bounce 0.6s var(--easing-bounce);
}

/* ============================================
   Input & Form Enhancements
   ============================================ */

input,
textarea,
select {
    transition: all var(--transition-normal) var(--easing-smooth);
}

input:focus,
textarea:focus,
select:focus {
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgba(13, 242, 89, 0.2);
}

/* Search bar animation */
.search-bar {
    transition: all var(--transition-normal) var(--easing-smooth);
}

.search-bar:focus-within {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(13, 242, 89, 0.2);
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s var(--easing-smooth),
        transform 0.8s var(--easing-smooth);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Loading States
   ============================================ */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* ============================================
   Hover Glow Effects
   ============================================ */

.glow-on-hover {
    transition: all var(--transition-normal) var(--easing-smooth);
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(13, 242, 89, 0.4),
        0 0 40px rgba(13, 242, 89, 0.2);
}

/* ============================================
   Page Entrance Animation
   ============================================ */

body {
    animation: fadeIn 0.5s var(--easing-smooth);
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Cart & Glass Panel Styles (from code.html)
   ============================================ */

.glass-panel {
    background: rgba(16, 34, 22, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(13, 242, 89, 0.1);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #28392e;
    border-radius: 10px;
}