/* goodhappy 瑜旅行行李箱 - Custom Styles */

/* ================================
   Base Styles
================================ */
:root {
    --transition-fast: 200ms ease-out;
    --transition-normal: 300ms ease-out;
    --transition-slow: 400ms ease-out;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================
   Navigation Styles
================================ */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dark #navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
    color: #475569;
    dark-color: #94A3B8;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: #2563EB;
}

.dark .nav-link:hover {
    color: #60A5FA;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2563EB;
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

.dark .nav-link::after {
    background-color: #60A5FA;
}

/* Mobile Menu Animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

#mobileMenu.open {
    max-height: 300px;
}

/* ================================
   Product Card Styles
================================ */
.product-card {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .product-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.product-card img {
    transition: transform var(--transition-slow);
}

.product-card:hover img {
    transform: scale(1.05);
}

/* ================================
   Button Styles
================================ */
.btn-primary {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

/* ================================
   Form Styles
================================ */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.dark input:focus,
.dark textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* ================================
   Animations
================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

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

/* ================================
   Scrollbar Styles
================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

.dark ::-webkit-scrollbar-track {
    background: #1E293B;
}

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

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748B;
}

/* ================================
   Selection Styles
================================ */
::selection {
    background-color: #BFDBFE;
    color: #1E3A8A;
}

.dark ::selection {
    background-color: #1E40AF;
    color: #FFFFFF;
}

/* ================================
   Utility Classes
================================ */
.text-balance {
    text-wrap: balance;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dark .glass-effect {
    background: rgba(15, 23, 42, 0.8);
}

/* ================================
   Image Loading States
================================ */
img[lazy] {
    opacity: 0;
    transition: opacity var(--transition-normal);
}

img[lazy].loaded,
img:not([lazy]) {
    opacity: 1;
}

/* ================================
   Responsive Adjustments
================================ */
@media (max-width: 640px) {
    .hero-title {
        font-size: 3rem;
        line-height: 1.1;
    }
}

/* ================================
   Dark Mode Specific
================================ */
.dark body {
    background-color: #020617;
}

.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
    color: #F8FAFC;
}

/* Ensure text contrast in dark mode */
.dark .text-dark-600 {
    color: #94A3B8;
}

.dark .text-dark-500 {
    color: #64748B;
}

/* ================================
   Print Styles
================================ */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
}
