.header-8 {
    position: relative;
    z-index: 100;
    width: 100%;
}

.sticky-header-8 {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 110;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: #000;
}

/* Mobile sticky header fixes */
@media (max-width: 768px) {
    /* Ensure parent containers don't interfere with sticky positioning */
    body {
        overflow-x: hidden;
        position: relative;
    }
}

/* Header Container */
/* Main flex container for header layout */
.header8_container {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    position: relative;
}

/* Header Sections */
/* Flex layout for the three main header sections */
.header8_menus {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.header8logo {
    flex: 0 0 auto;
    text-align: center;
    margin: 0 20px;
}

.header8_actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

/* === USER ACTIONS STYLING === */
/* Styling for user account, wishlist, compare, and cart icons */
.header-8 .user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-8 .header_8_icons {
    background: none;
    border: 0;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-8 .header_8_icons:hover {
    background: rgba(194, 28, 32, 0.1);
}

.header-8 .search_header_8 {
    position: relative;
}

.header-8 .user-actions .icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.header-8 .user-actions .icon-btn svg {
    width: 28px;
    height: 28px;
}

.user-actions .badge {
    padding: 0px;
}

.header-8 .user-actions .badge-circle {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === USER MENU AND DROPDOWN STYLING === */
/* User account menu and dropdown functionality */
.header-8 .user-menu {
    display: flex;
    align-items: center;
}

.header-8 .nav-user-info {
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-8 .nav-user-info svg {
    width: 28px;
    height: 28px;
    /* color: #fff; */
}

.header-8 .nav-user-info a {
    /* color: #fff !important; */
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-8 .nav-user-info a:hover {
    color: var(--primary) !important;
}

/* User Dropdown */
.header-8 .user-dropdown {
    position: relative;
}

.header-8 .user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.header-8 .user-btn:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary) !important;
}

.header-8 .user-icon {
    width: 28px;
    height: 28px;
}

.header-8 .user-text {
    white-space: nowrap;
    font-weight: 500;
}

.header-8 .dropdown-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.header-8 .user-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.header-8 .user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    color: #000;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
}

.header-8 .user-dropdown.active .user-dropdown-menu,
.header-8 .user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    overflow: hidden;
}

.header-8 .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    transition: background 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.header-8 .dropdown-item:hover {
    background: #f5f5f5;
}

.header-8 .dropdown-item-icon {
    width: 18px;
    height: 18px;
}

.header-8 .dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

.header-8 .dropdown-logout {
    margin: 0;
}

.header-8 .logout-item {
    color: #e74c3c;
}

.header-8 .logout-item:hover {
    background: #fef2f2;
}

/* === CART AND SEARCH INTEGRATION === */
/* Cart display and search functionality styling */
.header-8 .hide_on_checkout {
    display: block;
}

/* Search Results Styling */
.header-8 .search-results {
    border-top: 1px solid #eee;
}

.header-8 .search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s ease;
}

.header-8 .search-result-item:hover {
    background: #f8f9fa;
}

.header-8 .search-result-item:last-child {
    border-bottom: none;
}

.header-8 .search-result-image {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.header-8 .search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.header-8 .search-result-info {
    flex: 1;
    min-width: 0;
}

.header-8 .search-result-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-8 .search-result-price {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.header-8 .search-view-all {
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid #eee;
}

.header-8 .search-view-all a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.header-8 .search-view-all a:hover {
    text-decoration: underline;
}

.header-8 .no-results {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px;
}

.header8_user_action {
    display: flex;
    align-items: center;
}

.header8_cart_action {
    display: flex;
    align-items: center;
}

/* === DESKTOP NAVIGATION STYLES === */
/* Navigation menu styling for desktop view */
.header8-navigation .desktop-nav {
    display: block;
}

.nav-columns {
    display: flex;
    gap: 26px;
    align-items: flex-start;
}

.nav-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link {
    /* color: #fff; */
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    padding: 4px 0;
}

.nav-link:hover {
    color: var(--primary);
}

/* === MOBILE NAVIGATION === */
/* Mobile hamburger menu and sidebar navigation */
.mobile-nav-trigger {
    display: none;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 32px;
    height: 32px;
    gap: 4px;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* === SIDEBAR OVERLAY === */
/* Dark overlay for mobile sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === NAVIGATION SIDEBAR === */
/* Mobile sidebar navigation menu */
.homenav-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: #000;
    color: #fff;
    z-index: 1000;
    transition:
        left 0.3s ease,
        opacity 0.3s ease,
        transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
}

.homenav-sidebar.active {
    left: 0;
    opacity: 1;
    transform: translateY(0);
}

.homenav-sidebar .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(194, 28, 32, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation-delay: 0.05s;
    animation-fill-mode: both;
}

.homenav-sidebar.active .sidebar-header {
    animation: slideUpFadeInSmooth 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94)
        forwards;
}

.sidebar-logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
}

.homenav-sidebar .close-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.homenav-sidebar .close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-search {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.homenav-sidebar.active .nav-search {
    animation: slideUpFadeInSmooth 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94)
        forwards;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    background: #333;
    border: 1px solid #555;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}

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

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-btn {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.nav-items {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.nav-item:hover {
    background: rgba(194, 28, 32, 0.1);
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sale-item {
    background: linear-gradient(
        135deg,
        rgba(194, 28, 32, 0.1),
        rgba(194, 28, 32, 0.05)
    );
}

.sale-badge {
    position: absolute;
    right: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.nav-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.nav-footer-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(40px);
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.homenav-sidebar.active .nav-footer-title {
    animation: slideUpFadeInSmooth 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94)
        forwards;
}

.nav-footer-item {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 8px 0;
    font-size: 14px;
    transition: color 0.3s ease;
    opacity: 0;
    transform: translateY(40px);
    animation-delay: calc(var(--footer-index) * 0.08s + 0.4s);
    animation-fill-mode: both;
}

.homenav-sidebar.active .nav-footer-item {
    animation: slideUpFadeInSmooth 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94)
        forwards;
}

@keyframes slideUpFadeInSmooth {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    60% {
        opacity: 0.8;
        transform: translateY(-2px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-footer-item:hover {
    color: var(--primary);
}

/* === RESPONSIVE BREAKPOINTS === */
/* Media queries for different screen sizes */
@media (max-width: 900px) {
    .header8_container {
        padding: 12px 16px;
    }

    /* Hide desktop navigation */
    .header8-navigation .desktop-nav {
        display: none;
    }

    /* Show mobile trigger */
    .mobile-nav-trigger {
        display: block;
    }

    /* Full width sidebar on mobile */
    .homenav-sidebar {
        width: 100%;
        left: -100%;
        transition:
            left 0.3s ease,
            opacity 0.3s ease,
            transform 0.3s ease;
    }

    .homenav-sidebar.active {
        left: 0;
        opacity: 1;
        transform: translateY(0);
    }

    /* Adjust logo size */
    .header8logo .logo-text {
        font-size: 28px;
        letter-spacing: 4px;
    }
}

@media (max-width: 768px) {
    .header8_actions {
        gap: 10px;
    }

    .header8logo {
        margin: 0 15px;
    }

    /* Reduce gap between user-actions elements on mobile */
    .header-8 .user-actions {
        gap: 8px;
    }

    /* Reduce SVG sizes on mobile */
    .header-8 .user-actions .icon-btn svg,
    .header-8 .user-btn svg,
    .header-8 .nav-user-info svg {
        width: 20px;
        height: 20px;
    }

    /* Reduce search and cart SVG sizes */
    .header-8 .search_button svg {
        width: 18px;
        height: 18px;
    }

    .header-8 .cart-icon {
        width: 18px;
        height: 18px;
    }

    /* Adjust user button padding on mobile */
    .header-8 .user-btn {
        padding: 8px 10px;
        gap: 6px;
    }

    /* Reduce dropdown icon size on mobile */
    .header-8 .dropdown-icon {
        width: 16px;
        height: 16px;
    }

    /* Hide user SVG icon on mobile */
    .header-8 .user-btn.d-flex.d-lg-none .user-icon {
        display: none;
    }

    /* Hide dropdown arrow icon on mobile */
    .header-8 .user-btn.d-flex.d-lg-none .dropdown-icon {
        display: none;
    }

    /* Hide user dropdown menus on mobile */
    .header-8 .user-dropdown-menu {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .header8_container {
        padding: 10px 12px;
    }

    .header8logo .logo-text {
        font-size: 24px;
        letter-spacing: 3px;
    }

    .homenav-sidebar {
        width: 100vw;
    }
}

/* === ACCESSIBILITY === */
/* Accessibility and user preference styles */
@media (prefers-reduced-motion: reduce) {
    .homenav-sidebar,
    .sidebar-overlay,
    .hamburger-line,
    .nav-link,
    .nav-item,
    .nav-footer-item,
    .nav-footer-title {
        transition: none;
        animation: none;
    }
}

/* Focus styles for keyboard navigation */
.nav-link:focus,
.nav-item:focus,
.hamburger-btn:focus,
.search-input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-link:hover,
    .nav-item:hover {
        background: var(--primary);
        color: #fff;
    }
}

/* Print styles */
@media print {
    .header-8 {
        background: #fff !important;
        color: #000 !important;
        border-top: none;
    }

    .homenav-sidebar,
    .sidebar-overlay,
    .mobile-nav-trigger {
        display: none !important;
    }
}
