/* ========================================
   Nutrition Center Plus — Custom Styles
   Premium Dark Luxury Theme
   ======================================== */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d0618;
}
::-webkit-scrollbar-thumb {
    background: #4a0e6b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6b21a8;
}

/* Selection */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(13, 6, 24, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(168, 85, 247, 0.1), 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled nav {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

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

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

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Hamburger */
.menu-line {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

#mobileMenu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: auto;
}

/* ========================================
   Scroll Reveal Animations
   ======================================== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Only apply animation when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal[data-revealed="false"] {
        opacity: 0;
        transform: translateY(32px);
    }
    
    .scroll-reveal[data-revealed="true"] {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: always visible if JS disabled */
.no-js .scroll-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Gold shimmer accent line
   ======================================== */
.gold-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.4), transparent);
    border: none;
}

/* ========================================
   Card hover glow effects
   ======================================== */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, 0.06) 0%, transparent 70%);
}

.product-card:hover::after {
    opacity: 1;
}

/* ========================================
   Input focus glow
   ======================================== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.08);
}

/* ========================================
   Button ripple effect
   ======================================== */
button, a {
    position: relative;
    overflow: hidden;
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.15;
    }
}

/* ========================================
   Print styles
   ======================================== */
@media print {
    #navbar, #mobileMenu, .scroll-reveal {
        display: none !important;
    }
    
    body {
        background: white;
        color: #1a0a2e;
    }
    
    a {
        color: #4a0e6b;
    }
}
