/* ============================================
   BLUR & FOCUS ANIMATIONS
   ============================================ */

/* Default blur state for products */
.product-card {
    position: relative;
}

.product-image img {
    filter: blur(8px);
    opacity: 0.6;
    transition: filter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s ease;
}

/* Focus state on hover */
.product-card:hover .product-image img {
    filter: blur(0px);
    opacity: 1;
}

/* Alternative: Smooth stagger animation for featured products */
@keyframes fadeBlur {
    from {
        filter: blur(8px);
        opacity: 0.6;
    }
    to {
        filter: blur(0px);
        opacity: 1;
    }
}

@keyframes focusHover {
    0% {
        filter: blur(0px);
        opacity: 1;
    }
    100% {
        filter: blur(0px);
        opacity: 1;
    }
}

/* Product card entrance animation */
.product-card {
    animation: slideIn 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for multiple products */
.products-grid .product-card:nth-child(1) { animation-delay: 0.1s; }
.products-grid .product-card:nth-child(2) { animation-delay: 0.2s; }
.products-grid .product-card:nth-child(3) { animation-delay: 0.3s; }
.products-grid .product-card:nth-child(4) { animation-delay: 0.4s; }
.products-grid .product-card:nth-child(5) { animation-delay: 0.5s; }
.products-grid .product-card:nth-child(6) { animation-delay: 0.6s; }
.products-grid .product-card:nth-child(7) { animation-delay: 0.7s; }
.products-grid .product-card:nth-child(8) { animation-delay: 0.8s; }
.products-grid .product-card:nth-child(9) { animation-delay: 0.9s; }
.products-grid .product-card:nth-child(10) { animation-delay: 1s; }
.products-grid .product-card:nth-child(n+11) { animation-delay: 1.1s; }

/* ============================================
   BUTTON HOVER ANIMATIONS
   ============================================ */

.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   CATEGORY CARD ANIMATIONS
   ============================================ */

.category-card {
    transform-origin: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.category-icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
}

.category-card:hover .category-icon {
    transform: scale(1.2) rotate(5deg);
}

/* ============================================
   HERO SECTION ANIMATIONS
   ============================================ */

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.hero-content {
    animation: slideInLeft 0.8s ease-out;
}

.hero-image {
    animation: slideInRight 0.8s ease-out;
}

.hero-phone {
    animation: float 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* ============================================
   SECTION ANIMATIONS
   ============================================ */

.categories {
    animation: fadeIn 0.8s ease-out;
}

.featured {
    animation: fadeIn 0.8s ease-out;
}

.why-different {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   TEXT ANIMATIONS
   ============================================ */

.hero-content h1 {
    animation: slideInLeft 0.8s ease-out;
}

.hero-content p {
    animation: slideInLeft 0.8s ease-out;
    animation-delay: 0.1s;
}

.hero-content .btn {
    animation: slideInLeft 0.8s ease-out;
    animation-delay: 0.2s;
}

/* ============================================
   TAB ANIMATIONS
   ============================================ */

.tab-content {
    animation: fadeIn 0.5s ease-out;
}

/* ============================================
   FORM ANIMATIONS
   ============================================ */

.form-group {
    animation: slideInLeft 0.5s ease-out forwards;
    opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   SCROLLING ANIMATIONS
   ============================================ */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll animations for product cards */
.scroll-animate {
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
}

/* ============================================
   HOVER SCALE ANIMATIONS
   ============================================ */

.product-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* ============================================
   ARTICLE CARD ANIMATIONS
   ============================================ */

.article-card {
    overflow: hidden;
}

.article-image {
    transition: transform 0.4s ease;
}

.article-card:hover .article-image {
    transform: scale(1.05);
}

/* ============================================
   FOOTER ANIMATIONS
   ============================================ */

.footer-section a {
    position: relative;
    transition: color 0.3s ease;
}

.footer-section a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.footer-section a:hover::after {
    width: 100%;
}

/* ============================================
   LOADING ANIMATION
   ============================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================
   BREADCRUMB ANIMATIONS
   ============================================ */

.breadcrumb a {
    transition: color 0.3s ease;
    position: relative;
}

.breadcrumb a:hover {
    color: #1d4ed8;
}

/* ============================================
   MODAL/OVERLAY ANIMATIONS
   ============================================ */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */

/* Global smooth transition for most elements */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Disable transitions for blur/filter animations */
.product-image img {
    transition: filter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s ease,
                transform 0.3s ease;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .product-image img {
        filter: blur(0px) !important;
        opacity: 1 !important;
    }
}
