/* ====================================
   CSS ANIMATIONS - Animaciones y Transiciones
   DRESS - Custom Apparel & Accessories
   ==================================== */

/* ====================================
   ANIMACIONES BASE
   ==================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@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 fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-15px);
    }
    70% {
        transform: translateY(-7px);
    }
    90% {
        transform: translateY(-3px);
    }
}

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

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes wiggle {
    0%, 7% {
        transform: rotateZ(0);
    }
    15% {
        transform: rotateZ(-15deg);
    }
    20% {
        transform: rotateZ(10deg);
    }
    25% {
        transform: rotateZ(-10deg);
    }
    30% {
        transform: rotateZ(6deg);
    }
    35% {
        transform: rotateZ(-4deg);
    }
    40%, 100% {
        transform: rotateZ(0);
    }
}

/* ====================================
   ANIMACIONES ESPECÍFICAS DEL PRODUCTO
   ==================================== */
@keyframes productCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes productImageHover {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

@keyframes variantSelection {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 140, 66, 0);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 140, 66, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 140, 66, 0);
    }
}

@keyframes productAdded {
    0% {
        transform: scale(1);
        background-color: var(--background-light);
    }
    50% {
        transform: scale(1.05);
        background-color: rgba(255, 140, 66, 0.1);
    }
    100% {
        transform: scale(1);
        background-color: var(--background-light);
    }
}

/* ====================================
   ANIMACIONES DE LOADING
   ==================================== */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    0% {
        transform: rotate(360deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 140, 66, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 140, 66, 0.6);
    }
}

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes dots-loading {
    0%, 20% {
        color: rgba(255, 140, 66, 0.4);
        text-shadow:
            0.25em 0 0 rgba(255, 140, 66, 0.4),
            0.5em 0 0 rgba(255, 140, 66, 0.4);
    }
    40% {
        color: rgba(255, 140, 66, 0.6);
        text-shadow:
            0.25em 0 0 rgba(255, 140, 66, 0.4),
            0.5em 0 0 rgba(255, 140, 66, 0.4);
    }
    60% {
        text-shadow:
            0.25em 0 0 rgba(255, 140, 66, 0.6),
            0.5em 0 0 rgba(255, 140, 66, 0.4);
    }
    80%, 100% {
        text-shadow:
            0.25em 0 0 rgba(255, 140, 66, 0.6),
            0.5em 0 0 rgba(255, 140, 66, 0.6);
    }
}

/* ====================================
   ANIMACIONES DE HOVER Y INTERACCIÓN
   ==================================== */
@keyframes buttonHover {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-2px) scale(1.02);
    }
    100% {
        transform: translateY(-1px) scale(1.01);
    }
}

@keyframes buttonActive {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes filterActive {
    0% {
        transform: scale(1);
        box-shadow: none;
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(255, 140, 66, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 140, 66, 0.2);
    }
}

@keyframes categoryCardHover {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    100% {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 20px 40px rgba(255, 140, 66, 0.2);
    }
}

@keyframes navLinkHover {
    0% {
        width: 0;
        opacity: 0.5;
    }
    100% {
        width: 100%;
        opacity: 1;
    }
}

/* ====================================
   ANIMACIONES DE SLIDER
   ==================================== */
@keyframes slideTransition {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes dotActive {
    0% {
        transform: scale(1);
        background-color: rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: scale(1.2);
        background-color: var(--text-primary);
    }
    100% {
        transform: scale(1.2);
        background-color: var(--primary-color);
    }
}

/* ====================================
   ANIMACIONES DE FEATURE CARDS
   ==================================== */
@keyframes featureCardHover {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    100% {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 15px 30px rgba(255, 140, 66, 0.15);
    }
}

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

/* ====================================
   ANIMACIONES DE SCROLL
   ==================================== */
@keyframes scrollIndicator {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

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

/* ====================================
   ANIMACIONES DE NOTIFICACIONES
   ==================================== */
@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes notificationPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ====================================
   UTILIDADES DE ANIMACIÓN
   ==================================== */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

.bounce {
    animation: bounce 1s ease-in-out;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

.wiggle {
    animation: wiggle 1s ease-in-out;
}

.spin {
    animation: spin 1s linear infinite;
}

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

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* ====================================
   DELAYS DE ANIMACIÓN
   ==================================== */
.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-900 {
    animation-delay: 0.9s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* ====================================
   DURACIONES PERSONALIZADAS
   ==================================== */
.duration-fast {
    animation-duration: 0.2s;
}

.duration-normal {
    animation-duration: 0.3s;
}

.duration-slow {
    animation-duration: 0.6s;
}

.duration-slower {
    animation-duration: 1s;
}

.duration-slowest {
    animation-duration: 1.5s;
}

/* ====================================
   EASING FUNCTIONS
   ==================================== */
.ease-in {
    animation-timing-function: ease-in;
}

.ease-out {
    animation-timing-function: ease-out;
}

.ease-in-out {
    animation-timing-function: ease-in-out;
}

.ease-in-back {
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ease-out-back {
    animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ease-in-out-back {
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ====================================
   ESTADOS INTERACTIVOS CON ANIMACIONES
   ==================================== */
.product-card.animate-in {
    animation: productCardSlideIn 0.6s ease-out forwards;
}

.product-card.hover-effect:hover {
    animation: categoryCardHover 0.3s ease-out forwards;
}

.filter-btn.animate-active {
    animation: filterActive 0.3s ease-out forwards;
}

.feature-card.animate-hover:hover {
    animation: featureCardHover 0.4s ease-out forwards;
}

.feature-icon.animate-bounce:hover {
    animation: iconBounce 0.6s ease-out;
}

.variant-option.animate-selected {
    animation: variantSelection 0.3s ease-out;
}

.btn.animate-hover:hover {
    animation: buttonHover 0.3s ease-out;
}

.btn.animate-active:active {
    animation: buttonActive 0.1s ease-out;
}

.nav-link.animate-hover:hover::after {
    animation: navLinkHover 0.3s ease-out;
}

/* ====================================
   ANIMACIONES DE SCROLL
   ==================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease-out;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease-out;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ====================================
   LOADING STATES ANIMADOS
   ==================================== */
.skeleton-loading {
    background: linear-gradient(90deg, var(--background-dark) 25%, var(--background-light) 50%, var(--background-dark) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.shimmer-effect {
    background: linear-gradient(90deg, transparent, rgba(255, 140, 66, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.dots-loading {
    animation: dots-loading 1.4s infinite;
}

.dots-loading::after {
    content: '';
    animation: dots-loading 1.4s infinite;
}

/* ====================================
   PAUSE/RESUME ANIMATIONS
   ==================================== */
.paused {
    animation-play-state: paused !important;
}

.running {
    animation-play-state: running !important;
}

/* ====================================
   ACCESIBILIDAD - 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;
    }

    .fade-in,
    .fade-in-up,
    .fade-in-down,
    .fade-in-left,
    .fade-in-right,
    .slide-in-up,
    .slide-in-down,
    .slide-in-left,
    .slide-in-right,
    .scale-in,
    .bounce-in {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }

    .hover-effect:hover,
    .animate-hover:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .spin,
    .spin-reverse,
    .pulse,
    .bounce,
    .wiggle,
    .pulse-glow {
        animation: none !important;
    }

    .skeleton-loading,
    .shimmer-effect {
        animation: none !important;
        background: var(--background-dark) !important;
    }
}