/* ===== Muse Cosmetics - Animations CSS ===== */

/* ===== Keyframe Animations ===== */

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Pulse */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 165, 116, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(212, 165, 116, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 165, 116, 0);
    }
}

/* Spin */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Float */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Shake */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Glow */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(212, 165, 116, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 165, 116, 0.8), 0 0 30px rgba(212, 165, 116, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(212, 165, 116, 0.5);
    }
}

/* Ripple Effect */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Progress Bar */
@keyframes progressBar {
    from {
        width: 0;
    }
}

/* Skeleton Loading */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Heartbeat */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

/* ===== Animation Classes ===== */

/* Fade In Up Variations */
.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up-delay-1 {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.fade-in-up-delay-2 {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.fade-in-up-delay-3 {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

/* Fade In Down Variations */
.fade-in-down {
    animation: fadeInDown 0.8s ease forwards;
}

.fade-in-down-delay-1 {
    animation: fadeInDown 0.8s ease 0.2s forwards;
    opacity: 0;
}

/* Fade In Left/Right */
.fade-in-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease forwards;
}

/* Scale In */
.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

/* Bounce Animation */
.bounce {
    animation: bounce 2s infinite;
}

.bounce-once {
    animation: bounce 1s ease;
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

.pulse-slow {
    animation: pulse 3s infinite;
}

/* Float Animation */
.float {
    animation: float 3s ease-in-out infinite;
}

.float-slow {
    animation: float 5s ease-in-out infinite;
}

/* Shake Animation */
.shake {
    animation: shake 0.5s ease;
}

/* Glow Animation */
.glow {
    animation: glow 2s ease infinite;
}

/* Spin Animation */
.spin {
    animation: spin 1s linear infinite;
}

.spin-slow {
    animation: spin 3s linear infinite;
}

/* Heartbeat */
.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* ===== Loading Animations ===== */

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(212, 165, 116, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 30px;
    height: 30px;
    border-width: 3px;
}

.spinner-lg {
    width: 80px;
    height: 80px;
    border-width: 7px;
}

/* Loading Dots */
.loading-dots {
    display: inline-flex;
    gap: 8px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: loadingDots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 15px;
}

.skeleton-image {
    height: 200px;
    margin-bottom: 15px;
}

/* ===== Button Animations ===== */

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-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;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Button Hover Lift */
.btn-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Button Shine Effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-shine:hover::before {
    left: 100%;
}

/* ===== Card Animations ===== */

/* Card Hover Lift */
.card-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Card Scale */
.card-scale {
    transition: transform 0.3s ease;
}

.card-scale:hover {
    transform: scale(1.03);
}

/* Card Glow */
.card-glow {
    transition: box-shadow 0.3s ease;
}

.card-glow:hover {
    box-shadow: 0 0 30px rgba(212, 165, 116, 0.4);
}

/* ===== Image Animations ===== */

/* Image Zoom */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s ease;
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* Image Slide */
.img-slide {
    overflow: hidden;
}

.img-slide img {
    transition: transform 0.5s ease;
}

.img-slide:hover img {
    transform: translateX(10px);
}

/* Image Rotate */
.img-rotate {
    transition: transform 0.5s ease;
}

.img-rotate:hover {
    transform: rotate(5deg) scale(1.05);
}

/* ===== Modal Animations ===== */

.modal {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== Notification Animations ===== */

.notification {
    animation: notificationSlideIn 0.4s ease;
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-hiding {
    animation: notificationSlideOut 0.4s ease forwards;
}

@keyframes notificationSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ===== Progress Bar Animations ===== */

.progress-bar {
    animation: progressBar 1s ease forwards;
}

/* ===== Carousel/Slider Animations ===== */

.carousel-slide {
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

.carousel-slide.prev {
    transform: translateX(-100%);
    opacity: 0;
}

.carousel-slide.active {
    transform: translateX(0);
    opacity: 1;
}

.carousel-slide.next {
    transform: translateX(100%);
    opacity: 0;
}

/* ===== Scroll Animations ===== */

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.8s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.9s; }
.stagger-children > *:nth-child(10) { animation-delay: 1s; }

/* ===== Hover Effects ===== */

/* Underline Slide */
.underline-slide {
    position: relative;
}

.underline-slide::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.underline-slide:hover::after {
    width: 100%;
}

/* Icon Bounce */
.icon-bounce {
    transition: transform 0.3s ease;
}

.icon-bounce:hover {
    transform: translateY(-5px);
}

/* Icon Rotate */
.icon-rotate {
    transition: transform 0.3s ease;
}

.icon-rotate:hover {
    transform: rotate(360deg);
}

/* Icon Scale */
.icon-scale {
    transition: transform 0.3s ease;
}

.icon-scale:hover {
    transform: scale(1.2);
}

/* ===== Special Effects ===== */

/* Parallax */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Gradient Animation */
.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Blur In */
.blur-in {
    animation: blurIn 0.8s ease forwards;
}

@keyframes blurIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* ===== Page Transitions ===== */

.page-transition {
    animation: pageFadeIn 0.5s ease;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Counter Animation ===== */

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Typing Effect ===== */

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* ===== Reduced Motion ===== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Utility Animation Classes ===== */

/* Delay Classes */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-1000 { animation-delay: 1s; }

/* Duration Classes */
.duration-300 { animation-duration: 0.3s; }
.duration-500 { animation-duration: 0.5s; }
.duration-700 { animation-duration: 0.7s; }
.duration-1000 { animation-duration: 1s; }
.duration-2000 { animation-duration: 2s; }

/* Infinite Animations */
.infinite { animation-iteration-count: infinite; }

/* Animation Timing */
.ease-in { animation-timing-function: ease-in; }
.ease-out { animation-timing-function: ease-out; }
.ease-in-out { animation-timing-function: ease-in-out; }
.linear { animation-timing-function: linear; }

/* ===== Hero Section Specific Animations ===== */

.hero-title {
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeInUp 1s ease 0.5s forwards;
    opacity: 0;
}

.hero-button {
    animation: fadeInUp 1s ease 0.7s forwards;
    opacity: 0;
}

/* ===== Product Card Animations ===== */

.product-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.product-card .product-image {
    overflow: hidden;
}

.product-card .product-image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: contain;
    object-position: center;
}

.product-card:hover .product-image img {
    transform: scale(1.04);
}

/* ===== Testimonial Animations ===== */

.testimonial-slide {
    animation: testimonialFade 0.6s ease;
}

@keyframes testimonialFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Badge Animations ===== */

.badge-pulse {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== Cart Animations ===== */

@keyframes cartShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.cart-shake {
    animation: cartShake 0.5s ease;
}

/* ===== Success Checkmark ===== */

@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.checkmark {
    stroke-dasharray: 100;
    animation: checkmark 0.8s ease forwards;
}