/* ================================================
   HENDOSHI - NAVBAR
   ================================================

   Purpose: Complete navigation bar styling for the fixed top navbar,
            including desktop and mobile layouts, search, dropdowns,
            and icon badges.

   Contains:
   - Base navbar (fixed positioning, discount banner offset)
   - Navbar gradient underline accent (::after)
   - Solid navbar state (JS-toggled on scroll)
   - Dropdown submenu positioning (Hall of Fame sub-menu fix)
   - Light mode base overrides
   - Navbar container flex layout
   - Hamburger toggle button and desktop/mobile menu visibility
   - Brand logo (image and logo-text with skull icon)
   - Desktop navigation links (hover effects, animated underline)
   - Gradient text links (Sale, mobile, footer variants)
   - Logo text shimmer animation
   - Navbar right section (search + icons)
   - Desktop search form and floating search box
   - Nav icons (cart, wishlist, search) and badge counts
   - Theme toggle button
   - Navbar-right dropdown menus (user account)
   - Mobile icon cluster (show/hide, WCAG 2.5.5 touch targets)
   - Mobile slide-out menu panel and backdrop overlay
   - Mobile menu content (discount section, nav items, mobile search)

   Dependencies: variables.css
   Load Order: Load after foundation files
   ================================================ */

/* ========================================
   BASE NAVBAR
   ======================================== */

.navbar {
    z-index: 1001;
    position: fixed;
    top: 0;
    width: 100%;
    margin-top: 3rem;
    border-bottom: 1px solid rgba(255, 105, 180, 0.2);
    background: #000000;
    box-shadow: 0 4px 30px rgba(255, 20, 147, 0.15);
    transition: all 0.3s ease;
}

/* Adjust navbar when banner is dismissed */
.navbar.banner-dismissed {
    margin-top: 0;
}

/* Mobile navbar adjustment for banner (compact 2-line layout) */
@media (max-width: 768px) {
    .navbar {
        margin-top: 2.8rem; /* Compact 2-line banner on mobile */
    }
    /* .navbar.banner-dismissed margin-top: 0 - already handled by base rule above */
}

@media (max-width: 400px) {
    .navbar {
        margin-top: 2.5rem; /* Compact 2-line banner on very small screens */
    }
}

.navbar::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 20, 147, 0.5) 20%,
        var(--neon-pink) 50%,
        rgba(255, 20, 147, 0.5) 80%,
        transparent 100%
    );
    content: "";
}

/* ========================================
   SOLID NAVBAR STATE (JS-toggled on scroll)
   ======================================== */

/* Optionally make the navbar solid without changing global glassmorphism.
   Apply the `solid-navbar` class to the `.navbar` element (JS does this automatically).
   This preserves the global glassmorphism utilities while ensuring the
   navbar can display as a solid bar. */
body .navbar.solid-navbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    backdrop-filter: none;
    background: rgba(20, 20, 20, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* ========================================
   DROPDOWN SUBMENU POSITIONING
   ======================================== */

/* Dropdown submenu positioning - fixes Hall of Fame submenu cutoff */
.dropend .dropdown-menu {
    top: 0;
    right: auto;
    left: auto;
    margin-top: 0;
    margin-left: 0.125rem;
}

@media (min-width: 992px) {
    .dropend .dropdown-menu {
        left: 100%;
    }
}

@media (max-width: 991px) {
    body .dropend .dropdown-menu {
        position: static;
        margin-top: 0.5rem;
        margin-left: 1rem;
        transform: none;
        border-left: 2px solid rgba(255, 20, 147, 0.3);
    }
}

/* ========================================
   LIGHT MODE BASE OVERRIDES
   ======================================== */

:root.light-mode .navbar {
    border-bottom-color: rgba(231, 31, 127, 0.2);
    box-shadow: 0 4px 30px rgba(231, 31, 127, 0.1);
}

/* Override Bootstrap's navbar-dark class in light mode */
:root.light-mode .navbar,
:root.light-mode .navbar.navbar-dark {
    background: #ffffff;
}

/* ========================================
   NAVBAR CONTAINER LAYOUT
   ======================================== */

.navbar-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 0.5rem;
}

/* ========================================
   HAMBURGER TOGGLE (Mobile)
   ======================================== */

.navbar-burger {
    display: none;
    z-index: 1002;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.4rem;
    border: none;
    background: none;
    cursor: pointer;
}

.navbar-burger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--neon-pink);
    transition: all 0.3s ease;
}

.navbar-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.navbar-burger.active span:nth-child(2) {
    opacity: 0;
}

.navbar-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 991px) {
    .navbar-burger {
        display: flex;
    }

    body .desktop-menu {
        display: none;
    }
}

@media (min-width: 992px) {
    .navbar-burger,
    body .mobile-menu {
        display: none;
    }
}

/* ========================================
   BRAND LOGO
   ======================================== */

.navbar-brand {
    display: flex;
    align-items: center;
    order: 1;
}

.navbar-logo {
    width: auto;
    height: 40px;
    filter: drop-shadow(0 0 8px rgba(255, 20, 147, 0.3));
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 15px rgba(255, 20, 147, 0.6));
}

@media (max-width: 767px) {
    .navbar-logo {
        height: 32px;
    }
}

/* ========================================
   DESKTOP NAVIGATION LINKS
   ======================================== */

.desktop-menu {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    order: 2;
    margin: 0;
    margin-left: 1.5rem;
    padding: 0;
    gap: 0;
    list-style: none;
}

.desktop-menu .nav-item,
.navbar .nav-link {
    position: relative;
}

.navbar .nav-link {
    display: block;
    margin: 0;
    padding: 0.5rem 0.5rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 450;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.navbar .nav-link:hover {
    background: rgba(255, 20, 147, 0.1);
    color: var(--neon-pink);
}

/* Light mode overrides for navbar links */
:root.light-mode .navbar .nav-link {
    color: rgba(0, 0, 0, 0.9);
}

:root.light-mode .navbar .nav-link:hover {
    background: rgba(255, 20, 147, 0.1);
    color: var(--neon-pink);
}

/* Blue focus ring used on dropdown toggles in desktop menu — apply same visual to other desktop nav items */
.desktop-menu .nav-link:hover,
.desktop-menu .nav-link:focus,
.desktop-menu .nav-link:focus-visible,
.desktop-menu .nav-item.dropdown.show > .nav-link,
.desktop-menu .nav-link.nav-link-blue-focus {
    border-radius: 8px;
    outline: none;
    box-shadow:
        0 0 0 3px rgba(38, 121, 255, 0.18),
        0 4px 10px rgba(38, 121, 255, 0.06);
}

/* Animated underline effect */
.desktop-menu .nav-link::before {
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    border-radius: 2px;
    background: linear-gradient(90deg, var(--neon-pink), var(--electric-yellow));
    content: "";
    transition: all 0.3s ease;
}

.desktop-menu .nav-link:hover::before {
    width: calc(100% - 1.5rem);
}

.nav-link::after {
    display: none;
}

.nav-item .nav-link i {
    transition: transform 0.3s ease;
}

.nav-item .nav-link:hover i {
    transform: scale(1.15);
}

/* ========================================
   GRADIENT TEXT LINKS (Sale, footer, mobile)
   ======================================== */

/* Gradient text for special links like Sale */
.navbar .gradient-text {
    background: linear-gradient(
        135deg,
        var(--neon-pink) 0%,
        var(--electric-yellow) 50%,
        #ff6b6b 100%
    );
    -webkit-background-clip: text;
    position: relative;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.navbar .nav-link.gradient-text:hover,
.navbar .gradient-text:hover {
    background: linear-gradient(
        135deg,
        var(--electric-yellow) 0%,
        var(--neon-pink) 50%,
        #ff4757 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(255, 20, 147, 0.6));
}

/* Light mode gradient text - keep same gradient as dark mode */
:root.light-mode .navbar .gradient-text {
    background: linear-gradient(
        135deg,
        var(--neon-pink) 0%,
        var(--electric-yellow) 50%,
        #ff6b6b 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

:root.light-mode .navbar .gradient-text:hover {
    background: linear-gradient(
        135deg,
        var(--electric-yellow) 0%,
        var(--neon-pink) 50%,
        #ff4757 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(255, 20, 147, 0.6));
}

/* Mobile gradient text */
span.gradient-text-mobile {
    background: linear-gradient(
        135deg,
        var(--neon-pink) 0%,
        var(--electric-yellow) 50%,
        #ff6b6b 100%
    );
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

/* Footer gradient text */
.gradient-text-footer {
    background: linear-gradient(
        135deg,
        var(--neon-pink) 0%,
        var(--electric-yellow) 50%,
        #ff6b6b 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.gradient-text-footer:hover {
    background: linear-gradient(
        135deg,
        var(--electric-yellow) 0%,
        var(--neon-pink) 50%,
        #ff4757 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   LOGO TEXT & BRAND ANIMATION
   ======================================== */

/* Logo Text Styling */
.logo-text {
    position: relative;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: 3px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Style the skull icon in the logo to match the text */
.logo-text,
.logo-text .fa-skull {
    background: linear-gradient(135deg, #fff 0%, var(--neon-pink) 50%, var(--electric-yellow) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255, 20, 147, 0.5));
}
.logo-text .fa-skull {
    -webkit-text-fill-color: transparent;
    margin: 0 1px;
    transform: translateY(1px);
    font-size: inherit;
    vertical-align: baseline;
}

.logo-text:hover {
    transform: scale(1.02);
}

.logo-text:hover,
.logo-text:hover .fa-skull {
    filter: drop-shadow(0 0 20px rgba(255, 20, 147, 0.8));
}

/* Add subtle animation to logo */
@keyframes logo-shimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.navbar-brand:hover .logo-text,
.navbar-brand:hover .logo-text .fa-skull {
    background-size: 200% 200%;
    animation: logo-shimmer 2s ease infinite;
}

/* Light-mode: simplify navbar brand (HENDOSHI) — keep gradient only, remove animations/effects */
:root.light-mode .navbar-brand .logo-text,
:root.light-mode .navbar-brand .logo-text .fa-skull {
    /* start with no transform but allow smooth transform transitions on hover */
    transform: none;
    background: linear-gradient(135deg, var(--neon-pink) 0%, var(--electric-yellow) 100%);
    background-size: auto;
    text-shadow: none;
    animation: none;
    /* Keep the gradient text but remove heavy shadows/animations; allow transform transitions */
    filter: none;
    transition:
        transform 180ms ease,
        filter 180ms ease;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

:root.light-mode .navbar-brand .logo-text:hover,
:root.light-mode .navbar-brand .logo-text:hover .fa-skull {
    transform: translateY(-3px) scale(1.02);
    animation: none;
    /* Subtle moving effect on hover in light mode */
    filter: none;
}

/* ========================================
   NAVBAR RIGHT & SEARCH FORM
   ======================================== */

.navbar-right {
    display: flex;
    align-items: center;
    order: 3;
    margin-left: auto;
    gap: 0.5rem;
}

.search-form {
    position: relative;
    width: 220px;
}

@media (max-width: 991px) {
    .search-form {
        display: none;
    }

    .search-form.mobile-icon {
        display: flex;
        width: auto;
    }

    body .mobile-search-box .search-form {
        display: flex;
        position: relative;
        width: 100%;
    }
}

.search-form .search-wrapper {
    display: flex;
    position: relative;
    align-items: center;
}

.navbar .search-form .search-input {
    width: 100%;
    padding: 0.5rem 2.2rem 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
    color: var(--off-white);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-form .search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Style the native search cancel button (X) in webkit browsers */
.search-form .search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FF1493'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    background-size: 16px 16px;
    cursor: pointer;
}

.search-form .search-input::-webkit-search-cancel-button:hover {
    opacity: 0.8;
}

/* Prevent wrap and tighten spacing for medium screens */
@media (min-width: 992px) and (max-width: 1200px) {
    .navbar-container {
        gap: 0.15rem;
    }
    .logo-text {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }
    .navbar .nav-link {
        margin: 0;
        padding: 0.4rem 0.4rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }
    .search-form {
        width: 150px;
    }
    .navbar .search-input {
        padding: 0.3rem 1.8rem 0.3rem 0.6rem;
        font-size: 0.85rem;
    }
    .desktop-icons {
        gap: 0.3rem;
    }
    .nav-icon {
        font-size: 0.95rem;
    }
    .navbar-right {
        gap: 0.4rem;
    }
}

@media (min-width: 1201px) and (max-width: 1400px) {
    .navbar-container {
        gap: 0.3rem;
    }
    .logo-text {
        font-size: 1.7rem;
        letter-spacing: 2.5px;
    }
    .navbar .nav-link {
        margin: 0;
        padding: 0.45rem 0.45rem;
        font-size: 0.875rem;
    }
    .search-form {
        width: 170px;
    }
    .desktop-icons {
        gap: 0.4rem;
    }
    .nav-icon {
        font-size: 1rem;
    }
    .navbar-right {
        gap: 0.5rem;
    }
}
.navbar .search-form .search-input:focus {
    border-color: rgba(255, 20, 147, 0.5);
    outline: none;
    background: var(--border-glass-color);
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.15);
}

.search-form .search-btn {
    position: absolute;
    right: 0;
    padding: 0.25rem 0.6rem;
    border: none;
    background: transparent;
    color: var(--neon-pink);
    cursor: pointer;
    transition: all 0.3s;
}

.search-form .search-btn:hover {
    transform: scale(1.1);
    color: var(--electric-yellow);
}

/* ========================================
   NAV ICONS & BADGE COUNTS
   ======================================== */

.nav-icon {
    display: inline-block;
    position: relative;
    color: var(--off-white);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-icon:hover {
    transform: scale(1.1);
    color: var(--neon-pink);
}

.nav-icon .badge {
    display: flex;
    position: absolute;
    top: -6px;
    right: -6px;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    width: 15px;
    min-width: 15px;
    max-width: 15px;
    height: 15px;
    padding: 0;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.5rem;
    line-height: 1;
}

/* Override for vest/cart badges that need larger size with gradient */
.navbar .nav-icon .vest-count-badge,
.navbar .nav-icon .cart-count-badge {
    display: flex;
    top: -8px;
    right: -8px;
    align-items: center;
    justify-content: center;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    font-size: 0.55rem;
    line-height: 1;
}

/* Prevent downstream page styles from shifting the heart badge alignment */
.navbar .nav-icon .vest-count-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.desktop-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-icons {
    display: none;
    align-items: center;
    gap: 0;
}

/* ========================================
   FLOATING SEARCH BOX (Desktop)
   ======================================== */

/* Desktop Search Container with Floating Box */
.desktop-search-container {
    display: flex;
    position: relative;
    align-items: center;
}

@media (max-width: 991px) {
    .desktop-search-container {
        display: none;
    }
}

.desktop-search-container .search-toggle {
    padding: 0;
    border: none;
    background: none;
    color: var(--off-white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Light mode search icon */
.desktop-search-container .search-toggle:hover,
.desktop-search-container .search-toggle.active,
:root.light-mode .desktop-search-container .search-toggle {
    color: var(--neon-pink);
}

:root.light-mode .desktop-search-container .search-toggle:hover {
    color: var(--electric-yellow);
}

/* Ensure all navbar icon buttons use the same light-mode color so a single
   override won't leave one icon black. This keeps `nav-icon` consistent. */
:root.light-mode .nav-icon {
    color: var(--neon-pink);
}

:root.light-mode .nav-icon:hover {
    color: var(--electric-yellow);
}

.floating-search-box {
    visibility: hidden;
    z-index: 1002;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    padding: 1rem;
    transform: translateY(-10px) scale(0.95);
    border: 1px solid rgba(255, 105, 180, 0.25);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(255, 20, 147, 0.15);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-search-box,
.floating-search-box::before {
    position: absolute;
    background: rgba(20, 20, 20, 0.95);
}

.floating-search-box::before {
    top: -8px;
    right: 12px;
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
    border-top: 1px solid rgba(255, 105, 180, 0.25);
    border-left: 1px solid rgba(255, 105, 180, 0.25);
    content: "";
}

.floating-search-box.active {
    visibility: visible;
    transform: translateY(0) scale(1);
    opacity: 1;
}

.floating-search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.floating-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--off-white);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.floating-search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.floating-search-input:focus {
    border-color: rgba(255, 20, 147, 0.5);
    background: var(--border-glass-color);
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.15);
}

.floating-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--neon-pink);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.floating-search-btn:hover {
    transform: scale(1.05);
    background: var(--electric-yellow);
    color: var(--black);
}

/* Light mode floating search */
:root.light-mode .floating-search-box {
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(255, 20, 147, 0.1);
}

:root.light-mode .floating-search-box,
:root.light-mode .floating-search-box::before {
    border-color: rgba(255, 20, 147, 0.2);
    background: rgba(255, 255, 255, 0.98);
}

:root.light-mode .floating-search-input {
    border-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.04);
    color: #333;
}

:root.light-mode .floating-search-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

:root.light-mode .floating-search-input:focus {
    border-color: rgba(255, 20, 147, 0.4);
    background: rgba(0, 0, 0, 0.02);
}

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */

.theme-toggle {
    display: flex;
    align-items: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

/* Hide any injected text label inside theme toggles visually while
   keeping it accessible to screen readers. Ensures only the icon is shown. */
.theme-toggle span {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ========================================
   NAVBAR-RIGHT DROPDOWN MENUS
   ======================================== */

/* Dropdown menu in navbar */
.navbar .navbar-right .dropdown-toggle {
    padding: 0;
}

.navbar .navbar-right .dropdown-toggle,
.navbar .navbar-right .dropdown-toggle:hover,
.navbar .navbar-right .dropdown-toggle:focus,
.navbar .navbar-right .dropdown-toggle:active {
    border: none;
    outline: none;
    background: none;
    box-shadow: none;
}

.navbar-right .dropdown-toggle::after {
    display: none;
}

.navbar .navbar-right .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 200px;
    margin-top: 12px;
    inset: auto 0px auto auto;
    padding: 0.5rem;
    transform: none;
    border: 1px solid rgba(255, 105, 180, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    background: rgba(20, 20, 20, 0.95);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 20, 147, 0.1);
}

/* Add invisible bridge for navbar-right dropdowns */
.navbar-right .dropdown-menu::before {
    position: absolute;
    top: -15px;
    right: 0;
    left: 0;
    height: 15px;
    background: transparent;
    content: "";
}

.navbar-right .dropdown-item,
.navbar-right .menu-dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.65rem 1rem;
    gap: 0.75rem;
    border: none;
    border-radius: 8px;
    background: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.9rem;
    text-align: left;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.navbar-right .dropdown-item:hover,
.navbar-right .menu-dropdown-item:hover {
    background: rgba(255, 20, 147, 0.15);
    color: var(--neon-pink);
}

.navbar-right .dropdown-item i {
    width: 1.2rem;
    margin-right: 0.75rem;
    text-align: center;
}

.navbar-right .dropdown-divider {
    border-color: rgba(255, 20, 147, 0.3);
}

/* Hover dropdown behavior for desktop */
@media (min-width: 992px) {
    body .navbar-right .dropdown:hover > .dropdown-menu {
        display: block;
        top: 100%;
        right: 0;
        left: auto;
        transform: none;
    }

    body .desktop-menu .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
    }
}

/* Light mode dropdown styling */
:root.light-mode .navbar .navbar-right .dropdown-menu {
    border: 2px solid var(--neon-pink);
    background-color: white;
}

/* Force dark text for navbar-right dropdown items in light mode */
:root.light-mode .navbar .navbar-right .dropdown-item,
:root.light-mode .navbar .navbar-right .menu-dropdown-item {
    background: transparent;
    color: #000;
}

:root.light-mode .navbar .navbar-right .dropdown-item:hover,
:root.light-mode .navbar .navbar-right .menu-dropdown-item:hover {
    background-color: rgba(255, 20, 147, 0.1);
    color: var(--neon-pink);
}

:root.light-mode .navbar-right .dropdown-divider {
    border-color: rgba(255, 20, 147, 0.2);
}

/* ========================================
   MOBILE ICON CLUSTER
   ======================================== */

@media (max-width: 991px) {
    body .desktop-icons {
        display: none;
    }

    body .mobile-icons {
        display: flex;
    }

    .navbar-right {
        gap: 0.1rem;
    }

    .mobile-icons .nav-icon {
        padding: 0 0.1rem;
        font-size: 1rem;
        min-width: 32px;
    }

    /* Re-anchor vest badge to the icon glyph, not the wider touch-target container.
       The 32px min-width pushes right:-8px too far from the actual icon.
       Keep top:-8px to match the cart badge height. */
    .mobile-icons .nav-icon .vest-count-badge {
        right: 0;
        top: -8px;
    }
}

/* ========================================
   MOBILE MENU PANEL & OVERLAY
   ======================================== */

/* Mobile Menu */
.mobile-menu {
    display: none;
    z-index: 100000;
    position: fixed;
    top: 0;
    left: 0;
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh; /* Use dynamic viewport height for mobile */
    padding-top: 0;
    overflow-x: hidden;
    overflow-y: hidden; /* Let content-wrapper handle scrolling */
    transform: translateX(-100%);
    border-right: 1px solid rgba(255, 105, 180, 0.2);
    backdrop-filter: blur(20px);
    background: var(--charcoal);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    display: flex;
    transform: translateX(0);
}

:root.light-mode .mobile-menu {
    border-right-color: rgba(231, 31, 127, 0.2);
    background: var(--charcoal);
}

/* ========================================
   MOBILE MENU CONTENT
   ======================================== */

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: var(--padding-glass);
    padding-left: 10px;
    padding-block: 5px;
    border-bottom: 1px solid rgba(255, 20, 147, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

.menu-logo {
    text-decoration: none;
}

.menu-logo .logo-text {
    font-size: 1.5rem;
    /* Inherits gradient styling from main .logo-text */
}

.menu-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 20, 147, 0.3);
    border-radius: 50%;
    background: rgba(255, 20, 147, 0.1);
    color: var(--off-white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-close-btn:hover {
    transform: rotate(90deg);
    border-color: var(--neon-pink);
    background: rgba(255, 20, 147, 0.2);
    color: var(--neon-pink);
}

.menu-close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.mobile-menu-overlay {
    display: none;
    z-index: 99999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.menu-discount-section {
    position: relative;
    margin: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(255, 20, 147, 0.3);
    border-radius: var(--border-radius-glass);
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.15) 0%, rgba(255, 100, 100, 0.1) 100%);
    text-align: center;
}

.menu-discount-section::before {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    content: "";
    animation: discountShine 4s infinite;
}

@keyframes discountShine {
    0% {
        left: -100%;
    }
    50%,
    100% {
        left: 100%;
    }
}

.menu-discount-section .discount-text {
    margin-block: 0.35rem;
    color: var(--off-white);
    font-weight: 600;
    font-size: 0.9rem;
}

.menu-discount-section .discount-code {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.menu-discount-section .discount-code strong {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 20, 147, 0.2);
    color: var(--neon-pink);
    font-weight: 700;
}

.menu-top-icons {
    display: flex;
    justify-content: space-around;
    margin-bottom: 0;
    padding: 0.5rem 0.5rem;
    border-bottom: 1px solid rgba(255, 20, 147, 0.2);
    background: rgba(0, 0, 0, 0.15);
}

.menu-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    padding: 0.5rem;
    gap: 0.4rem;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--off-white);
    font-size: 0.7rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-icon:hover {
    background: rgba(255, 20, 147, 0.1);
    color: var(--neon-pink);
}

.menu-icon:active {
    transform: scale(0.95);
    background: rgba(255, 20, 147, 0.2);
}

.menu-icon i {
    font-size: 1.3rem;
}

.menu-content-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    min-height: 0; /* Allow shrinking for flex layout */
    overflow-x: hidden;
    overflow-y: auto;
}

.menu-main,
.menu-submenu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    padding-bottom: 1rem;
    transform: translateX(0);
    background-color: var(--charcoal);
    transition: transform 0.3s ease;
}

:root.light-mode .menu-main,
:root.light-mode .menu-submenu {
    background-color: #ffffff;
}

.menu-submenu {
    z-index: 2;
    transform: translateX(100%);
}

/* Utility Classes */
.menu-submenu.hidden,
.d-none {
    display: none;
}

.alert-card-info {
    border: 1px solid rgba(231, 31, 127, 0.3);
    background-color: rgba(231, 31, 127, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.checkout-header-spaced {
    margin-top: 3rem;
}

.btn-address-add {
    height: 38px;
    white-space: nowrap;
}

.btn-form-action,
.btn-form-cancel {
    padding: 0.375rem 1rem;
    white-space: nowrap;
}

/* Compact icon-only admin filter/export buttons */
.btn-form-action,
.btn-form-cancel,
.admin-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
}
.admin-filter-btn {
    width: 40px;
    min-width: 0;
    padding: 0;
}
.admin-filter-btn i {
    font-size: 0.95rem;
    line-height: 1;
}

/* Newsletter Form Validation */
.newsletter-error {
    display: none;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--neon-pink);
    border-radius: 4px;
    background-color: rgba(231, 31, 127, 0.1);
    color: var(--neon-pink);
    font-size: 0.875rem;
}

.newsletter-error.show {
    display: block;
}

.newsletter-form input.invalid {
    border-color: var(--neon-pink);
    box-shadow: 0 0 0 0.2rem rgba(231, 31, 127, 0.25);
}

.menu-items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu-item-group,
.menu-item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 20, 147, 0.1);
    background-color: transparent;
}

.menu-item-header {
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.menu-item-header,
.menu-item {
    display: block;
    color: var(--off-white);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-item {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-bottom: 1px solid rgba(255, 20, 147, 0.1);
    background: none;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: left;
}

/* .menu-item:hover - consolidated into compound selector .menu-item-header:hover, .menu-item:hover below */

.menu-item-divider {
    height: 1px;
    padding: 0;
    border: none;
}

.menu-theme-toggle {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: var(--padding-glass);
    gap: 0.75rem;
    border-bottom: none;
}

.menu-theme-toggle i {
    width: 20px;
    color: var(--neon-pink);
    font-size: 1.1rem;
    text-align: center;
}

.menu-item-trigger {
    flex: 1;
    cursor: pointer;
}

.menu-item-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px; /* Better touch target */
    padding: 0;
    border-bottom: 1px solid rgba(255, 20, 147, 0.1);
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-item-group:hover {
    background-color: rgba(255, 20, 147, 0.08);
}

.menu-item-group:active {
    background-color: rgba(255, 20, 147, 0.15);
}

.menu-item-group .menu-item-header {
    display: flex;
    flex: 1;
    align-items: center;
    margin: 0;
    padding: var(--padding-glass); /* Increased padding for better touch */
    gap: 0.75rem;
    border: none;
    border-bottom: none;
    background: none;
    color: var(--off-white);
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-align: left;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

/* Menu Item Icons */
.menu-item-icon {
    width: 20px;
    color: var(--neon-pink);
    font-size: 1rem;
    text-align: center;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.menu-item-group:hover .menu-item-icon {
    transform: scale(1.1);
    opacity: 1;
}

/* Sale Item Special Styling */
.menu-item-sale {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(255, 20, 147, 0.1) 0%, rgba(255, 100, 100, 0.1) 100%);
}

.menu-item-sale::before {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 20, 147, 0.2), transparent);
    content: "";
    animation: saleShimmer 3s infinite;
}

@keyframes saleShimmer {
    0% {
        left: -100%;
    }
    50%,
    100% {
        left: 100%;
    }
}

.menu-item-sale:hover {
    background: linear-gradient(90deg, rgba(255, 20, 147, 0.2) 0%, rgba(255, 100, 100, 0.2) 100%);
}

.menu-item-sale .sale-icon {
    color: #ff6b6b;
    animation: salePulse 1.5s ease-in-out infinite;
}

@keyframes salePulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.menu-item-sale .sale-text {
    background: linear-gradient(135deg, #ff6b6b, var(--neon-pink), #ff9a56);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.menu-item-group:hover .menu-item-header {
    color: var(--neon-pink);
}

.menu-item-group .menu-item-header:hover {
    background-color: rgba(255, 20, 147, 0.05);
    color: var(--neon-pink);
}

.menu-item-header {
    text-decoration: none;
}

.menu-item-arrow {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: var(--padding-glass);
    border: none;
    background: none;
    color: rgba(255, 20, 147, 0.6);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-item-group:hover .menu-item-arrow {
    transform: translateX(3px);
    color: var(--neon-pink);
}

/* Stagger Animation for Menu Items */
.menu-item-animate {
    transform: translateX(-20px);
    opacity: 0;
}

.mobile-menu.active .menu-item-animate {
    animation: menuItemSlideIn 0.4s ease forwards;
    animation-delay: calc(var(--item-index, 0) * 0.06s + 0.1s);
}

@keyframes menuItemSlideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.menu-item-header:hover,
.menu-item:hover {
    background-color: rgba(255, 20, 147, 0.05);
    color: var(--neon-pink);
}

.submenu-back {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 56px;
    padding: var(--padding-glass);
    gap: 0.75rem;
    border: none;
    border-bottom: 1px solid rgba(255, 20, 147, 0.3);
    background: linear-gradient(90deg, rgba(255, 20, 147, 0.15) 0%, rgba(0, 0, 0, 0.2) 100%);
    color: var(--off-white);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.submenu-back i {
    color: var(--neon-pink);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.submenu-back:hover {
    background: linear-gradient(90deg, rgba(255, 20, 147, 0.25) 0%, rgba(255, 20, 147, 0.1) 100%);
    color: var(--neon-pink);
}

.submenu-back:hover i {
    transform: translateX(-3px);
}

.submenu-back:active {
    background: linear-gradient(90deg, rgba(255, 20, 147, 0.3) 0%, rgba(255, 20, 147, 0.15) 100%);
}

.submenu-content {
    padding: 0;
}

.submenu-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: var(--padding-glass);
    gap: 0.75rem;
    border: none;
    border-bottom: 1px solid rgba(255, 20, 147, 0.1);
    background: none;
    color: var(--off-white);
    font-weight: 500;
    font-size: 0.95rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.submenu-item i {
    width: 20px;
    color: var(--neon-pink);
    text-align: center;
    opacity: 0.7;
}

.submenu-item:hover {
    padding-left: 1.5rem;
    background-color: rgba(255, 20, 147, 0.08);
    color: var(--neon-pink);
}

.submenu-item:hover i {
    opacity: 1;
}

.submenu-item:active {
    background-color: rgba(255, 20, 147, 0.15);
}

/* Submenu Item Animation */
.submenu-item-animate {
    transform: translateX(20px);
    opacity: 0;
}

.menu-submenu:not(.hidden) .submenu-item-animate {
    animation: submenuItemSlideIn 0.35s ease forwards;
    animation-delay: calc(var(--item-index, 0) * 0.05s + 0.1s);
}

@keyframes submenuItemSlideIn {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Submenu Trigger with Arrow */
.submenu-item.submenu-trigger {
    justify-content: flex-start;
}

.submenu-item.submenu-trigger span {
    flex: 1;
}

.submenu-arrow-icon {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.submenu-item.submenu-trigger:hover .submenu-arrow-icon {
    transform: translateX(3px);
    opacity: 1;
}

/* Force transparent backgrounds for menu buttons */
.menu-item-trigger,
.menu-item-header,
.menu-items button {
    background-color: transparent;
}

body.menu-open {
    overflow: hidden;
}

/* Mobile Menu Footer with Social Links */
.menu-footer {
    flex-shrink: 0;
    padding: 0.5rem;
    border-top: 1px solid rgba(255, 20, 147, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

.menu-social-links {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.menu-social-links .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 20, 147, 0.2);
    border-radius: 50%;
    background: rgba(255, 20, 147, 0.1);
    color: var(--off-white);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.menu-social-links .social-link:hover {
    transform: translateY(-3px);
    border-color: var(--neon-pink);
    background: rgba(255, 20, 147, 0.2);
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
    color: var(--neon-pink);
}

.menu-social-links .social-link:active {
    transform: translateY(-1px);
}

.menu-copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    text-align: center;
}

@media (max-width: 991px) {
    .navbar {
        min-height: 56px;
        padding: 0.25rem 0.5rem 0.25rem;
    }

    .navbar-container {
        align-items: center;
        min-height: 40px;
    }

    .navbar-burger {
        align-self: center;
    }

    .navbar-brand {
        display: flex;
        align-items: center;
    }

    .cart-icon {
        align-self: center;
    }

    .search-form {
        width: 200px;
    }

    .search-form .search-input {
        padding: 0.4rem 2rem 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Show mobile theme toggle in navbar and hide desktop toggle on small screens */
    #desktopThemeToggle {
        display: none;
    }

    #mobileThemeToggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .mobile-menu {
        display: none; /* Hidden by default, flex when active */
    }

    .mobile-menu.active {
        display: flex;
    }
}

@media (min-width: 992px) {
    /* Hide mobile-specific toggle on desktop */
    #mobileThemeToggle {
        display: none;
    }
}

@media (max-width: 600px) {
    .logo-text {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .search-form {
        display: none;
    }
}

@media (max-width: 450px) {
    .logo-text {
        font-size: 1.3rem;
        letter-spacing: 1.5px;
    }

    .navbar {
        min-height: 50px;
        padding: 0.6rem 0.15rem 0.4rem 0.15rem;
    }

    .navbar-container {
        min-height: 36px;
    }
}

/* Ensure Content Moderation submenu shows a right-chevron like other admin submenu items */
.admin-panel-submenu .dropdown-item.content-moderation-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.admin-panel-submenu .dropdown-item.content-moderation-toggle .fa-angle-right {
    color: var(--neon-pink);
    font-size: 1rem;
    margin-left: auto;
    display: inline-block;
}

/* Fallback chevron if the inline icon is not rendered */
/* Remove fallback chevron; inline FontAwesome icon will be used instead */
.admin-panel-submenu .dropdown-item.content-moderation-toggle::after {
    display: none;
    content: none;
}
