/* Special Animations for Shop Bán Acc HOÀNG NAM */

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 2s linear infinite;
}

/* Scale Animation */
@keyframes scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.scale {
    animation: scale 2s ease-in-out infinite;
}

/* Slide In Animations */
@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 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;
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.8s ease-out;
}

/* Fade Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.fade-out {
    animation: fadeOut 0.5s ease-out;
}

/* Bounce Animations */
@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 bounceOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    25% {
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(0.3);
        opacity: 0;
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

.bounce-out {
    animation: bounceOut 0.6s ease-in;
}

/* Flash Sale Special Effects */
@keyframes flash {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.5;
    }
}

.flash {
    animation: flash 1s ease-in-out infinite;
}

@keyframes fire {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(5deg);
    }
    50% {
        transform: scale(1.05) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

.fire-effect {
    animation: fire 2s ease-in-out infinite;
}

/* Product Card Hover Effects */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(244, 115, 185, 0.3);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

/* Button Hover Effects */
.btn-primary, .btn-buy {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before, .btn-buy::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before, .btn-buy:hover::before {
    left: 100%;
}

/* Loading Spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Typing Effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--primary-color);
    }
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Particle Effect */
@keyframes particle {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: particle 2s linear infinite;
}

/* Neon Glow */
@keyframes neon {
    0%, 100% {
        text-shadow: 0 0 5px var(--primary-color),
                     0 0 10px var(--primary-color),
                     0 0 15px var(--primary-color),
                     0 0 20px var(--primary-color);
    }
    50% {
        text-shadow: 0 0 2px var(--primary-color),
                     0 0 5px var(--primary-color),
                     0 0 8px var(--primary-color),
                     0 0 12px var(--primary-color);
    }
}

.neon-text {
    animation: neon 2s ease-in-out infinite alternate;
}

/* Gradient Background Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-bg {
    background: linear-gradient(-45deg, var(--primary-color), var(--primary-sub), #ff6b9d, #ff8fab);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
}

/* Countdown Timer Effects */
.time-unit {
    position: relative;
    overflow: hidden;
}

.time-unit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.time-unit:hover::before {
    left: 100%;
}

/* Success Message Animation */
@keyframes successPop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.success-pop {
    animation: successPop 0.6s ease-out;
}

/* Notification Badge Pulse */
@keyframes badgePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.badge.pulse {
    animation: badgePulse 1s ease-in-out infinite;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects for Quick Links */
.quick-link {
    position: relative;
    overflow: hidden;
}

.quick-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.quick-link:hover::before {
    left: 100%;
}

/* Special Effects for Flash Sale */
.flash-sale .section-title {
    position: relative;
}

.flash-sale .section-title::after {
    content: '🔥';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    animation: fire 2s ease-in-out infinite;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .floating {
        animation: none;
    }
    
    .glow {
        animation: none;
    }
    
    .scale {
        animation: none;
    }
    
    .fire-effect {
        animation: none;
    }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid var(--primary-color);
    }
    
    .btn-primary, .btn-buy {
        border: 2px solid var(--primary-color);
    }
}

/* Print Styles */
@media print {
    .floating, .glow, .scale, .fire-effect,
    .slide-in-left, .slide-in-right, .slide-in-up, .slide-in-down,
    .bounce-in, .bounce-out, .flash, .neon-text,
    .gradient-bg, .success-pop, .badge.pulse {
        animation: none !important;
    }
    
    .product-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
} 