/* ========================================
   SMOOTH ANIMATIONS & TRANSITIONS
   Global optimization untuk semua animasi
   ======================================== */

/* Enable hardware acceleration untuk animasi lebih smooth */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Base transition untuk semua interactive elements */
a, button, input, select, textarea {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth hover effects */
a:hover, button:hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card & Product animations - OPTIMIZED: remove will-change, simpler transform */
.product-item, 
.stat-card,
.card,
.role-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.product-item:hover,
.stat-card:hover,
.card:hover,
.role-card:hover {
    transform: translateY(-5px) !important;
}

/* Image zoom effect - OPTIMIZED: simpler transform */
.product-image,
img {
    transition: transform 0.3s ease !important;
}

.product-item:hover .product-image,
.image-holder:hover img {
    transform: scale(1.05) !important;
}

/* Button animations - OPTIMIZED */
.btn,
.btn-primary,
.btn-add-cart,
.btn-outline-dark,
.btn-outline-secondary {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.btn:hover,
.btn-primary:hover,
.btn-add-cart:hover {
    transform: translateY(-2px) !important;
}

/* Icon animations - SIMPLIFIED */
.btn-wishlist,
.bi,
i {
    transition: transform 0.2s ease !important;
}

.btn-wishlist:hover,
.bi:hover {
    transform: scale(1.1) !important;
}

/* Navigation animations - SIMPLIFIED */
.nav-link,
.sidebar .nav-link {
    transition: color 0.2s ease, background 0.2s ease !important;
}

.nav-link:hover,
.sidebar .nav-link:hover {
    /* Remove transform for better performance */
}

/* Form elements smooth focus - SIMPLIFIED */
.form-control,
.form-select,
input,
textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus {
    /* Remove transform for better performance */
}

/* Fade in animation untuk page load - DISABLED for performance */
/* @keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} */

/* Disable stagger animations - keep only hover effects */
/* .product-card,
.stat-card,
.card {
    animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.15s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.25s; }
.product-card:nth-child(5) { animation-delay: 0.3s; }
.product-card:nth-child(6) { animation-delay: 0.35s; }
.product-card:nth-child(7) { animation-delay: 0.4s; }
.product-card:nth-child(8) { animation-delay: 0.45s; } */

/* Smooth cloud animations - DISABLED for performance */
/* @keyframes smoothCloudFloat {
    0%, 100% { 
        transform: translate(0, 0);
    }
    50% { 
        transform: translate(20px, -10px);
    }
}

.cloud-overlay::before,
.cloud-overlay::after {
    animation: smoothCloudFloat 25s ease-in-out infinite !important;
} */

/* Modal & Dropdown smooth entrance - DISABLED, instant load */
/* .modal,
.dropdown-menu {
    animation: fadeInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
} */

/* Badge & Tag animations */
.category-badge,
.badge {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-badge:hover,
.badge:hover {
    transform: scale(1.1);
}

/* Shadow smooth transitions */
.shadow,
.shadow-sm,
.shadow-lg {
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Pagination smooth */
.pagination .page-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination .page-link:hover {
    transform: translateY(-2px);
}

/* Table row hover */
.table-hover tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-hover tbody tr:hover {
    transform: translateX(3px);
}

/* Skeleton loading shimmer - DISABLED for performance */
/* @keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton,
.loading {
    animation: shimmer 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
} */

/* Reduce motion untuk accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Performance optimization */
.product-item,
.stat-card,
.btn,
.product-image,
.nav-link {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
