:root {
    /* Brand Colors */
    --primary-color: #FFD700;
    --primary-hover: #E6C200;
    --accent-color: #FFC107;
    
    /* Neutral Colors - Light Mode */
    --text-main: #2C3E50;
    --text-secondary: #596575;
    --bg-main: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #E9ECEF;
    
    /* Navbar & Footer */
    --navbar-bg: rgba(33, 37, 41, 0.95);
    --navbar-text: #FFFFFF;
    --footer-bg: #1A1D20;
    --footer-text: #ADB5BD;

    /* Card & UI */
    --card-bg: #FFFFFF;
    --card-border: rgba(0,0,0,0.05);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
}

[data-bs-theme="dark"] {
    /* Neutral Colors - Dark Mode */
    --text-main: #E9ECEF;
    --text-secondary: #ADB5BD;
    --bg-main: #121212;
    --bg-secondary: #1E1E1E;
    --bg-tertiary: #2C2C2C;
    
    /* Navbar & Footer */
    --navbar-bg: rgba(18, 18, 18, 0.95);
    --navbar-text: #E9ECEF;
    --footer-bg: #000000;
    
    /* Card & UI */
    --card-bg: #1E1E1E;
    --card-border: rgba(255,255,255,0.05);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
}

/* Base Styles */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-bs-theme="dark"] body {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* Custom Utilities */
.bg-theme-primary {
    background-color: var(--primary-color) !important;
}

.text-theme-primary {
    color: var(--primary-color) !important;
}

.fw-semi-bold {
    font-weight: 600;
}

/* Navbar Modernization */
.navbar-custom {
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    transition: padding 0.3s ease;
}

.navbar-custom .navbar-brand {
    color: var(--primary-color);
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0 0.5rem;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--primary-color);
}

.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    height: 100vh; /* Full viewport height */
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 0;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Lighter overlay to show background image */
    background: linear-gradient(
        135deg, 
        rgba(0, 0, 0, 0.25) 0%, 
        rgba(0, 0, 0, 0.15) 50%,
        rgba(44, 62, 80, 0.2) 100%
    );
    z-index: 2;
}

/* Subtle particles container */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 3; /* Above overlay but below content */
    pointer-events: none;
}

/* Animated gradient border at bottom */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #fff, var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    z-index: 3;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.hero-content {
    position: relative;
    z-index: 4; /* Above overlay and particles */
    max-width: 900px;
    padding: 2rem;
}

.hero-content h1 {
    color: #FFFFFF !important;
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.8),
        -1px -1px 0 rgba(255, 215, 0, 0.3);
}

/* Hero title - always white with yellow glow */
.hero-title {
    color: #FFFFFF !important;
    text-shadow: 
        0 0 30px rgba(255, 215, 0, 0.5),
        2px 2px 8px rgba(0, 0, 0, 0.9),
        0 0 60px rgba(255, 215, 0, 0.3) !important;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* Hero badge/tagline */
.hero-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.9);
    color: #000;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    animation: fadeInDown 1s ease-out;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@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);
    }
}

/* Hero CTA buttons container */
.hero-buttons {
    /* No animation - simpler for older users */
}

.hero-buttons .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Hero outline button - visible background */
.hero-buttons .btn-outline-light {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.hero-buttons .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    border-color: #fff;
}

/* Simple shadow for primary CTA - no animation */\n.btn-glow {\n    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);\n}

/* Features strip at bottom of hero */
.hero-features {
    position: absolute;
    bottom: 100px; /* Higher position for browser toolbars */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 3rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem 2rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-size: 0.95rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero-feature i {
    font-size: 1.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Cards Modernization */
.card {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* Buttons */
.btn-primary, .btn-warning { /* Override bootstrap warning/primary for consistency if needed */
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 50px; /* Pill shape */
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover, .btn-warning:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 215, 0, 0.4);
}

.btn-outline-warning {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
}

.btn-outline-warning:hover {
    background-color: var(--primary-color);
    color: #000;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

/* Theme Toggle */
#theme-toggle {
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navbar-text);
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--primary-color);
}

/* Footer */
.footer-custom {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 4px solid var(--primary-color);
}

.footer-custom p {
    font-size: 0.9rem;
}

.footer-custom small {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.6;
}

/* Search Form in Navbar */
#product-search-form .form-control {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 20px 0 0 20px;
}

#product-search-form .form-control::placeholder {
    color: rgba(255,255,255,0.6);
}

#product-search-form .form-control:focus {
    background-color: rgba(255,255,255,0.2);
    box-shadow: none;
    border-color: var(--primary-color);
}

#product-search-form .btn {
    border-radius: 0 20px 20px 0;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .navbar-custom .nav-link::after {
        display: none;
    }
}

/* 
   -----------------------------------------
   STICKY HEADER CONTROLS IMPLEMENTATION
   -----------------------------------------
*/

#sticky-header {
    position: sticky;
    top: 80px; /* Offset for the sticky navbar */
    z-index: 1010; /* Lower than navbar (1020/1030) */
    background-color: var(--card-bg); /* Maintains white/dark mode compatibility */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease;
}

/* Ensure sticky header works within the card */
.card {
    overflow: visible;
}


/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}

.hover-scale {
    transition: transform 0.3s ease;
}
.hover-scale:hover {
    transform: scale(1.03);
}
.no-hover:hover {
    transform: none !important;
    box-shadow: var(--shadow-sm) !important;
}

/* Hero Enhancements */
.hero-title {
    font-size: 3.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-weight: 300;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.opacity-90 {
    opacity: 0.9;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Mobile Hero Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.25rem !important; /* Override fs-2 */
    }
    .hero-section {
        height: auto;
        min-height: 100vh; /* Full screen on mobile */
        padding-top: 5rem;
        padding-bottom: 8rem;
        background-attachment: scroll; /* Disable parallax on mobile for performance */
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-features {
        flex-direction: column;
        gap: 1rem;
        bottom: 20px;
    }
    .hero-buttons .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Animated Gradient Background */
.animated-gradient {
    background: linear-gradient(-45deg, #1a1a1a, #2c3e50, #000000, #434343);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Pulse Button Animation */
.btn-pulse {
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}