/* Site foundation styles used on every page via base.html: the global
   body gradient, neon text glow, the fixed navbar and its dark dropdowns,
   and the full mobile-breakpoint ladder for the header. Dark/neon
   storefront aesthetic. */
        /* Base Styles */
        body {
            background: linear-gradient(135deg, #1a0033, #2a0077);
            color: #fff;
            font-family: 'Orbitron', sans-serif;
            overflow-x: hidden;
            padding-top: 80px;
        }

        /* Neon Text Effects */
        .neon-text {
            font-size: 3rem;
            font-weight: bold;
            text-shadow: 0 0 10px #ff00ff, 0 0 20px #00ffff, 0 0 30px #ff00ff;
            animation: neon-glow 1.5s ease-in-out infinite alternate;
        }

        @keyframes neon-glow {
            from {
                text-shadow: 0 0 5px #ff00ff, 0 0 10px #00ffff, 0 0 15px #ff00ff;
            }

            to {
                text-shadow: 0 0 10px #ff00ff, 0 0 20px #00ffff, 0 0 30px #ff00ff;
            }
        }

        /* Button styles are in components/buttons.css */

        /* Navbar Styles */
        .navbar {
            background: rgba(0, 0, 0, 0.8);
            box-shadow: 0 2px 15px rgba(255, 0, 255, 0.5);
            padding: 0.5rem 2rem;
        }

        .navbar .container-fluid {
            padding: 0;
        }

        .navbar-brand.neon-text {
            font-size: 1.8rem;
            padding: 0;
            margin-right: 2rem;
            letter-spacing: 1px;
        }

        .navbar-collapse {
            flex-grow: 0;
        }

        .navbar-nav {
            display: flex;
            align-items: center;
            margin: 0;
            padding: 0;
        }

        .nav-item {
            margin: 0 0.6rem;
        }

        .nav-link {
            padding: 0.7rem 0.4rem;
            font-size: 1.1rem;
            transition: all 0.3s ease;
            text-transform: none;
            letter-spacing: 0.5px;
        }

        .navbar-brand,
        .nav-link {
            color: #fff;
            text-shadow: 0 0 5px #ff00ff;
        }

        .navbar-brand:hover,
        .nav-link:hover {
            color: #00ffff;
            text-shadow: 0 0 10px #00ffff;
        }

        .dropdown-menu-dark {
            background: rgba(30, 0, 45, 0.95);
            border: 1px solid rgba(255, 0, 255, 0.3);
            box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
            margin-top: 0.5rem;
        }

        .dropdown-item {
            color: rgba(255, 255, 255, 0.9);
            padding: 0.6rem 1.2rem;
            transition: all 0.2s ease;
        }

        .dropdown-item:hover {
            background-color: rgba(255, 0, 255, 0.2);
            color: #00ffff;
        }

        .nav-link i {
            color: #fff;
            text-shadow: 0 0 5px #ff00ff;
        }

        .nav-link:hover i {
            color: #00ffff;
            text-shadow: 0 0 10px #00ffff;
        }

        /* Mobile styles */
        @media (max-width: 991.98px) {
            .navbar-collapse {
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: rgba(0, 0, 0, 0.95);
                padding: 1rem;
                border-bottom: 1px solid rgba(255, 0, 255, 0.3);
                box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
                z-index: 1000;
            }

            /* Ensure navbar has enough height */
            .navbar {
                min-height: 60px;
                padding: 0.4rem 0.8rem;
            }

            .nav-item {
                margin: 0.5rem 0;
                width: 100%;
            }

            .navbar-nav {
                align-items: flex-start;
                width: 100%;
            }

            .dropdown-menu-dark {
                background: rgba(20, 0, 30, 0.8);
                border: none;
                box-shadow: none;
                padding: 0.5rem;
                margin-left: 1rem;
            }

            /* Mobile header title styling */
            .d-flex.d-lg-none.align-items-center.w-100 .mobile-title {
                /* Increased specificity */
                font-size: clamp(1.4rem, 3.5vw, 1.6rem) !important;
                /* Increased size, dynamic scaling */
                color: #fff;
                text-shadow: 0 0 5px #ff00ff;
                transition: all 0.3s ease;
                padding: 0.4rem 0.5rem;
                /* Consistent padding to prevent shifting */
                font-weight: 500;
                letter-spacing: 0.5px;
                white-space: normal;
                /* Allow wrapping to prevent cutoff */
                overflow: visible;
                /* Remove overflow hiding */
                text-overflow: unset;
                /* Remove ellipsis */
                flex: 1;
                /* Allow it to take available space */
            }

            .mobile-title:hover {
                color: #00ffff;
                text-shadow: 0 0 10px #00ffff;
            }

            /* Ensure parent container has consistent padding */
            .d-flex.d-lg-none.align-items-center.w-100 {
                padding-left: 0.5rem;
                /* Consistent left padding */
                padding-right: 0.5rem;
                /* Consistent right padding */
            }

            /* Mobile cart and account icons */
            .mobile-icons {
                display: flex;
                align-items: center;
                gap: 6px;
                flex-shrink: 0;
            }

            .mobile-icon-link {
                color: #fff;
                font-size: 0.9rem;
                padding: 0.3rem;
                text-shadow: 0 0 5px #ff00ff;
                transition: all 0.3s ease;
                display: flex;
                align-items: center;
            }

            .mobile-icon-link i {
                font-size: 1.4rem;
                margin-right: 0;
            }

            .mobile-icon-link .cart-count {
                font-size: 0.8rem;
                margin-left: 2px;
            }

            /* Mobile hamburger button */
            .navbar-toggler {
                display: flex;
                align-items: center;
                justify-content: center;
                flex-shrink: 0;
                min-width: 36px;
                width: 36px;
                height: 36px;
                margin-left: 4px;
                z-index: 2;
                padding: 0;
                /* Remove default padding for better alignment */
                margin-bottom: 1px;
                /* Subtle tweak for vertical centering */
            }

            /* Borderless hamburger menu */
            .borderless-toggler {
                border: none;
                box-shadow: none;
            }

            .borderless-toggler:focus {
                box-shadow: none;
            }

            .navbar-toggler:focus {
                box-shadow: 0 0 0 0.15rem rgba(255, 0, 255, 0.5);
            }

            .mobile-icon-link:hover {
                color: #00ffff;
                text-shadow: 0 0 10px #00ffff;
            }

            .mobile-icons .dropdown {
                position: relative;
                z-index: 1050;
            }
        }

        /* Adjustments for intermediate screen sizes (e.g., Nest Hub at 1024px) */
        @media (min-width: 992px) and (max-width: 1024px) {
            .navbar {
                padding: 0.4rem 1.5rem;
                /* Slightly reduced padding */
            }

            .navbar-brand.neon-text {
                font-size: 1.6rem;
                /* Reduced size for better fit */
                margin-right: 1.5rem;
            }

            .nav-link {
                font-size: 1rem;
                /* Slightly smaller to avoid crowding */
                padding: 0.6rem 0.3rem;
            }

            .nav-item {
                margin: 0 0.4rem;
                /* Reduced spacing between items */
            }
        }

        /* Adjustments for smaller screens (e.g., iPhone 14 Pro Max at 430px) */
        @media (max-width: 576px) {
            .navbar {
                padding: 0.3rem 0.6rem;
                /* Reduce padding on smaller screens */
            }

            .d-flex.d-lg-none.align-items-center.w-100 .mobile-title {
                /* Increased specificity */
                font-size: clamp(1.2rem, 3.5vw, 1.4rem) !important;
                /* Adjusted for smaller screens, increased minimum */
                letter-spacing: 0.3px;
                /* Reduce letter spacing */
                padding: 0.3rem 0.4rem;
                /* Consistent padding */
            }

            .mobile-icons {
                gap: 8px;
                /* Increase gap for better spacing */
            }

            .mobile-icon-link i {
                font-size: 1.2rem;
                /* Slightly smaller icons */
            }

            .mobile-icon-link .cart-count {
                font-size: 0.7rem;
            }

            .navbar-toggler {
                min-width: 32px;
                width: 32px;
                height: 32px;
            }

            /* Hero section adjustments */
            .neon-text {
                font-size: 2rem;
                /* Scale down for smaller screens */
            }

            /* .btn-rave responsive styles are in components/buttons.css */

            /* Footer adjustments */
            .newsletter-form .form-control {
                padding: 8px 10px;
                font-size: 0.9rem;
            }

            .newsletter-form .btn-subscribe {
                padding: 0 12px;
            }
        }

        /* Ensure minimum size on very small screens (e.g., iPhone SE at 375px) */
        @media (max-width: 400px) {
            .d-flex.d-lg-none.align-items-center.w-100 .mobile-title {
                font-size: clamp(1.1rem, 3.5vw, 1.3rem) !important;
                /* Slightly smaller minimum for very small screens */
                padding: 0.3rem 0.3rem;
            }

            .mobile-icons {
                gap: 6px;
                /* Slightly smaller gap */
            }

            .mobile-icon-link i {
                font-size: 1.1rem;
                /* Even smaller icons */
            }

            .navbar-toggler {
                min-width: 30px;
                width: 30px;
                height: 30px;
            }
        }

        /* Adjust font size and layout at 320px to fit on a single line without overlap */
        @media (max-width: 320px) {
            .d-flex.d-lg-none.align-items-center.w-100 .mobile-title {
                font-size: clamp(0.9rem, 3vw, 1.1rem) !important;
                /* Smaller font size to fit on one line */
                letter-spacing: 0.1px;
                /* Reduce letter spacing to save space */
                padding: 0.2rem 0.2rem;
                /* Reduce padding to minimize width */
            }

            .d-flex.d-lg-none.align-items-center.w-100 {
                padding-left: 0.3rem;
                /* Slightly reduce padding */
                padding-right: 0.3rem;
            }

            .mobile-icons {
                gap: 4px;
                /* Smaller gap to save space */
            }

            .mobile-icon-link i {
                font-size: 1rem;
                /* Smaller icons to save space */
            }

            .mobile-icon-link .cart-count {
                font-size: 0.6rem;
                /* Smaller cart count text */
                margin-left: 1px;
            }

            .navbar-toggler {
                min-width: 28px;
                /* Slightly smaller hamburger button */
                width: 28px;
                height: 28px;
                margin-left: 2px;
                /* Reduce margin to save space */
            }
        }

        .d-flex.d-lg-none.align-items-center.w-100 {
            min-width: 0;
            align-items: center;
        }

        .mobile-icons {
            position: static;
        }

        .fade-out {
            opacity: 0;
            transition: opacity 1s;
        }
