/**
 * Fashion Trends Homepage - Animations
 */

/* Base animation settings */
.fth-animate-fadeIn,
.fth-animate-fadeInUp,
.fth-animate-fadeInDown,
.fth-animate-fadeInLeft,
.fth-animate-fadeInRight,
.fth-animate-zoomIn,
.fth-animate-slideIn,
.fth-animate-bounce,
.fth-animate-pulse {
    opacity: 0;
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Trigger animations when in viewport */
.fth-in-view.fth-animate-fadeIn {
    animation-name: fthFadeIn;
}

.fth-in-view.fth-animate-fadeInUp {
    animation-name: fthFadeInUp;
}

.fth-in-view.fth-animate-fadeInDown {
    animation-name: fthFadeInDown;
}

.fth-in-view.fth-animate-fadeInLeft {
    animation-name: fthFadeInLeft;
}

.fth-in-view.fth-animate-fadeInRight {
    animation-name: fthFadeInRight;
}

.fth-in-view.fth-animate-zoomIn {
    animation-name: fthZoomIn;
}

.fth-in-view.fth-animate-slideIn {
    animation-name: fthSlideIn;
}

.fth-in-view.fth-animate-bounce {
    animation-name: fthBounce;
}

.fth-in-view.fth-animate-pulse {
    animation-name: fthPulse;
    animation-iteration-count: infinite;
    animation-duration: 2s;
}

/* Keyframes */
@keyframes fthFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

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

@keyframes fthZoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fthSlideIn {
    from {
        opacity: 0;
        transform: translateY(100px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fthBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes fthPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hover animations */
@keyframes fthFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fthShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes fthGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(232, 118, 143, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(232, 118, 143, 0.6);
    }
}

@keyframes fthWiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-3deg);
    }
    75% {
        transform: rotate(3deg);
    }
}

/* Utility animation classes */
.fth-hover-float:hover {
    animation: fthFloat 1s ease-in-out infinite;
}

.fth-hover-shake:hover {
    animation: fthShake 0.5s ease-in-out;
}

.fth-hover-glow:hover {
    animation: fthGlow 1.5s ease-in-out infinite;
}

.fth-hover-wiggle:hover {
    animation: fthWiggle 0.5s ease-in-out;
}

/* Card lift effect */
.fth-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fth-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(232, 118, 143, 0.2);
}

/* Image zoom on hover */
.fth-hover-zoom img {
    transition: transform 0.5s ease;
}

.fth-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Text underline animation */
.fth-hover-underline {
    position: relative;
}

.fth-hover-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--fth-brand);
    transition: width 0.3s ease;
}

.fth-hover-underline:hover::after {
    width: 100%;
}

/* Ticker animation */
@keyframes fth-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Counter animation */
@keyframes fthCountUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delays */
.fth-stagger-1 { animation-delay: 0.1s; }
.fth-stagger-2 { animation-delay: 0.2s; }
.fth-stagger-3 { animation-delay: 0.3s; }
.fth-stagger-4 { animation-delay: 0.4s; }
.fth-stagger-5 { animation-delay: 0.5s; }
.fth-stagger-6 { animation-delay: 0.6s; }

/* Slider animations */
@keyframes fthSlideLeft {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fthSlideRight {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Spin animation */
@keyframes fthSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fth-spin {
    animation: fthSpin 1s linear infinite;
}

/* Scale animation */
@keyframes fthScaleUp {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Ripple effect */
@keyframes fthRipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.fth-ripple {
    position: relative;
    overflow: hidden;
}

.fth-ripple::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
}

.fth-ripple:active::after {
    animation: fthRipple 0.6s ease-out;
}

/* Loading skeleton animation */
@keyframes fthShimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.fth-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 2000px 100%;
    animation: fthShimmer 2s infinite linear;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fth-animate-fadeIn,
    .fth-animate-fadeInUp,
    .fth-animate-fadeInDown,
    .fth-animate-fadeInLeft,
    .fth-animate-fadeInRight,
    .fth-animate-zoomIn,
    .fth-animate-slideIn,
    .fth-animate-bounce,
    .fth-animate-pulse {
        animation: none;
        opacity: 1;
    }
    
    .fth-ticker-wrapper {
        animation: none;
    }
}
