/* ===================================
   WMart.in - Advanced Enhancements
   =================================== */

/* Performance Optimizations */
img {
    content-visibility: auto;
}

/* Smooth page transitions */
body {
    animation: fadeInPage 0.5s ease-in;
}

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

/* Enhanced Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::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:hover::before {
    width: 300px;
    height: 300px;
}

/* Card Tilt Effect */
.product-card,
.service-card,
.feature-item {
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover,
.service-card:hover,
.feature-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
}

/* Gradient Text Animation */
@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background-size: 200% auto;
    animation: gradient-animation 3s ease infinite;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--secondary-color),
        var(--accent-color)
    );
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
    transition: transform 0.1s ease;
}

/* Improved Shadow Effects */
.nav-link:hover,
.btn:hover,
.product-card:hover,
.service-card:hover {
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

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

.ripple:active::after {
    width: 200px;
    height: 200px;
}

/* Enhanced Product Icon Animation */
.product-icon {
    position: relative;
}

.product-icon::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    background: linear-gradient(
        45deg,
        var(--primary-color),
        var(--secondary-color),
        var(--accent-color)
    );
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
    filter: blur(10px);
}

.product-card:hover .product-icon::before {
    opacity: 0.7;
}

/* Smooth Service Card Hover */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(37, 99, 235, 0.1) 0%,
        transparent 70%
    );
    transform: scale(0);
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scale(1);
}

/* Stats Counter Animation */
.stat-item h3 {
    transition: transform 0.3s ease;
}

.stat-item:hover h3 {
    transform: scale(1.1);
}

/* Navigation Underline Effect */
.nav-link {
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
    left: 0;
}

/* Footer Link Hover Effect */
.footer-column ul li a {
    position: relative;
    display: inline-block;
}

.footer-column ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-column ul li a:hover::after {
    width: 100%;
}

/* Social Icons Pulse Effect */
@keyframes social-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.social-links a:hover {
    animation: social-pulse 0.6s ease;
}

/* CTA Button Glow Effect */
.btn-primary {
    position: relative;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: linear-gradient(
        45deg,
        var(--primary-color),
        var(--secondary-color)
    );
    filter: blur(20px);
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::after {
    opacity: 0.6;
}

/* Form Input Focus Glow */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Back to Top Button Animation */
.back-to-top {
    animation: float-button 2s ease-in-out infinite;
}

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

/* Hero Title Typewriter Effect (Optional) */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Parallax Effect for Hero Shapes */
@media (prefers-reduced-motion: no-preference) {
    .hero-shape {
        will-change: transform;
    }
}

/* Enhanced Tag Hover */
.tag {
    transition: all var(--transition-fast);
    cursor: default;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Mobile Menu Slide Animation */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.nav-menu.active {
    animation: slideIn 0.3s ease forwards;
}

/* Product Features List Animation */
.product-features li {
    transition: transform 0.2s ease, color 0.2s ease;
}

.product-card:hover .product-features li {
    transform: translateX(5px);
    color: var(--primary-color);
}

/* Vision Mission Card Flip Effect */
.vm-card {
    perspective: 1000px;
}

/* Coming Soon Banner Pulse */
.coming-soon-banner {
    animation: banner-pulse 3s ease-in-out infinite;
}

@keyframes banner-pulse {
    0%, 100% {
        box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.1);
    }
    50% {
        box-shadow: 0 20px 40px -5px rgba(37, 99, 235, 0.3);
    }
}

/* Improved Dark Mode Transitions */
[data-theme="dark"] * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Section Reveal Animation */
@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    animation: reveal 0.8s ease;
}

/* Floating Animation for Icons */
@keyframes float-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.product-icon i,
.service-card i {
    animation: float-icon 3s ease-in-out infinite;
}

/* Print Optimization */
@media print {
    .navbar,
    .floating-chat,
    .back-to-top,
    .theme-toggle,
    .mobile-toggle,
    .hero-background,
    .scroll-indicator {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}