/* ===== Custom Styles for Mei Shen Ginseng ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #fdf0ec;
}

::-webkit-scrollbar-thumb {
    background: #c11f46;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9e1639;
}

/* Hero animations */
.hero-badge {
    animation: fadeInUp 0.8s ease-out both;
}

.hero-badge span:first-child {
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Intersection Observer animations */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(254, 247, 245, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .font-display {
    color: #1a1a2e !important;
}

.nav-scrolled .text-neutral-600 {
    color: #4a5568 !important;
}

.nav-scrolled .menu-line {
    background: #1a1a2e !important;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, color 0.3s ease-out;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Product card hover */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(193, 31, 70, 0.15);
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #fce7eb 0%, #faddd4 100%);
}

/* Selection color */
::selection {
    background: #c11f46;
    color: #fef7f5;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .group:hover .group-hover\:scale-110 {
        transform: none;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-display {
        line-height: 1.1;
    }
}

/* Print styles */
@media print {
    nav, #contact, .cta-banner {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
