/* Advanced Animation Styles for Aishop */

/* AI Futuristic Background Animation */
.ai-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.ai-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(1);
    }
}

/* Hero Section Animations */
.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(99,102,241,0.95) 0%, rgba(139,92,246,0.95) 100%);
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        padding: 40px 0;
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 56px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 20px;
    animation: slideInLeft 1s ease;
}

.hero-subtitle {
    font-size: 24px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 15px;
    animation: slideInLeft 1.2s ease;
}

.hero-discount {
    display: inline-block;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 48px;
    font-weight: 900;
    padding: 20px 40px;
    border-radius: 20px;
    margin: 20px 0;
    box-shadow: 0 10px 40px rgba(239,68,68,0.4);
    animation: pulse 2s ease-in-out infinite, slideInRight 1s ease;
}

.hero-cta {
    margin-top: 30px;
    animation: fadeInUp 1.5s ease;
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.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;
}

.btn:active {
    transform: scale(0.95);
}

.btn-animated {
    animation: btnFloat 3s ease-in-out infinite;
}

@keyframes btnFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Logo Animation */
.logo-img {
    animation: logoSpin 20s linear infinite;
}

@keyframes logoSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.logo-text {
    position: relative;
    animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(99,102,241,0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(99,102,241,0.8));
    }
}

/* Card Animations */
.product-card,
.article-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.product-card:nth-child(1),
.article-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2),
.article-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3),
.article-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4),
.article-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Add to Cart Button Animation */
.btn-add-cart {
    position: relative;
    overflow: hidden;
}

.btn-add-cart::after {
    content: '\f07a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 24px;
    opacity: 0;
    transition: all 0.4s ease;
}

.btn-add-cart.added::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.btn-add-cart.added {
    background: var(--success);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(99,102,241,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@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);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Scale Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Price Animation */
.price-current {
    animation: priceGlow 2s ease-in-out infinite;
}

@keyframes priceGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(99,102,241,0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(99,102,241,0.6);
    }
}

/* Badge Animation */
.product-badge {
    animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239,68,68,0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(239,68,68,0);
    }
}

/* Hover Effects */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(99,102,241,0.5);
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Cart Icon Animation */
.cart-btn {
    animation: cartBounce 2s ease-in-out infinite;
}

@keyframes cartBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Search Bar Focus Animation */
.search-input:focus {
    animation: inputGlow 1s ease;
}

@keyframes inputGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99,102,241,0.4);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(99,102,241,0.2);
    }
}

/* Notification Animation */
.notification {
    animation: slideInRight 0.5s ease, slideOutRight 0.5s ease 3s forwards;
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Countdown Timer Animation */
.countdown-timer {
    animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: var(--danger);
    }
}

/* Success Checkmark Animation */
.checkmark {
    animation: checkmarkDraw 0.5s ease forwards;
}

@keyframes checkmarkDraw {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Mobile Menu Animation */
.mobile-menu-btn {
    transition: transform 0.3s ease;
}

.mobile-menu-btn.active {
    transform: rotate(90deg);
}

/* Parallax Effect */
.parallax {
    transition: transform 0.1s ease-out;
}

/* Typing Effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* Responsive Animations */
@media (max-width: 768px) {
    .hero-title {
        font-size: 28px !important;
        padding: 0 15px;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 16px !important;
        padding: 0 15px;
        text-align: center;
    }
    
    .hero-discount {
        font-size: 28px !important;
        padding: 12px 25px !important;
        margin: 15px 10px !important;
    }
    
    .hero-cta {
        padding: 0 15px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100% !important;
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Reduce animation intensity on mobile for performance */
    .product-card:hover,
    .article-card:hover {
        transform: translateY(-3px);
    }
    
    /* Disable complex animations on mobile */
    .particles {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 24px !important;
    }
    
    .hero-discount {
        font-size: 24px !important;
        padding: 10px 20px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


