/* ============================================
   ADVANCED ANIMATIONS & EFFECTS
   انيميشنات وتأثيرات متقدمة للموقع
   ============================================ */

/* Smooth page transitions */
@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero element animations */
@keyframes heroGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.6));
    }
}

/* Button ripple effect */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Product card hover wave */
@keyframes waveHover {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Smooth scroll behavior for links */
@keyframes scrollToTop {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading skeleton animation */
@keyframes skeleton-loading {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Fade and slide animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Text reveal animation */
@keyframes textReveal {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

/* Price animation */
@keyframes priceFlip {
    0%, 100% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(180deg);
    }
}

/* Badge pulse */
@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* Cart icon animation */
@keyframes cartBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Smooth category icon animation */
@keyframes categoryRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced hover effects */
.enhanced-hover {
    position: relative;
    overflow: hidden;
}

.enhanced-hover::before {
    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;
}

.enhanced-hover:hover::before {
    width: 300px;
    height: 300px;
}

/* Gradient text animation */
.gradient-text-animated {
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    animation: gradientFlow 6s ease infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

/* Floating animation for images */
@keyframes floatImage {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(2deg);
    }
    66% {
        transform: translateY(-5px) rotate(-2deg);
    }
}

/* Icon bounce */
@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Smooth spotlight effect */
@keyframes spotlight {
    0% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    }
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }
}

/* Slide in from direction */
@keyframes slideFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered list animation */
.stagger-list li {
    animation: slideFromRight 0.6s ease forwards;
}

.stagger-list li:nth-child(1) { animation-delay: 0.1s; }
.stagger-list li:nth-child(2) { animation-delay: 0.2s; }
.stagger-list li:nth-child(3) { animation-delay: 0.3s; }
.stagger-list li:nth-child(4) { animation-delay: 0.4s; }
.stagger-list li:nth-child(5) { animation-delay: 0.5s; }

/* Smooth notification animation */
@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading dots animation */
@keyframes loadingDots {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

.loading-dots span {
    animation: loadingDots 1.4s infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Hover line effect */
@keyframes lineExpand {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Smooth color transition */
.color-transition {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transform animation */
@keyframes smoothTransform {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Checkmark animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 50;
        opacity: 0;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* Success icon animation */
@keyframes successIcon {
    0% {
        transform: scale(0) rotate(-45deg);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Product image zoom on hover */
.product-image-zoom {
    overflow: hidden;
    border-radius: 12px;
}

.product-image-zoom img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-image-zoom:hover img {
    transform: scale(1.2) rotate(2deg);
}

/* Category hover animation */
.category-hover-effect:hover {
    animation: waveHover 0.6s ease-in-out;
}

/* Button press animation */
.button-press {
    position: relative;
}

.button-press:active {
    animation: buttonPress 0.3s ease;
}

@keyframes buttonPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

/* Smooth modal animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Subtle bounce on load */
@keyframes subtleBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Fade and scale */
@keyframes fadeAndScale {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
