:root {
    --header-navy: #1a222e; /* Darker than brand navy for contrast */
    --header-white: #ffffff;
    --header-orange: #F6A000;
    --header-orange-hover: #C48000;
    --header-border: #e0e0e0;
    --header-text-light: #f5f5f5;
    --header-text-dark: #333333;
    --header-font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* =========================================
   1. Utility Strip (Top)
   ========================================= */
.header-utility-strip {
    background-color: var(--header-navy);
    color: var(--header-text-light);
    font-size: 13px;
    height: 40px;
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

.utility-left, .utility-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.utility-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4caf50; /* Green for verified */
    font-weight: 600;
}
.utility-badge .material-icons { font-size: 16px; }

.utility-phone {
    color: var(--header-white);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}
.utility-phone .material-icons { font-size: 16px; color: var(--header-orange); }

.utility-link {
    color: #ccc;
    text-decoration: none;
    border-bottom: 1px dotted #ccc;
}
.utility-link:hover { color: var(--header-white); }


/* =========================================
   2. Action Deck (Middle)
   ========================================= */
.header-action-deck {
    background-color: var(--header-white);
    padding: 20px 0;
    border-bottom: 1px solid var(--header-border);
}

.header-action-deck .header-inner {
    gap: 40px;
}

.mobile-menu-toggle-modern {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--header-text-dark);
}

.header-search {
    flex-grow: 1;
}

.search-input-group {
    display: flex;
    border: 2px solid var(--header-border);
    border-radius: 4px;
    overflow: hidden;
    height: 44px;
    transition: border-color 0.2s;
}

.search-input-group:focus-within {
    border-color: var(--header-orange);
}

.search-input-group input {
    flex-grow: 1;
    border: none;
    padding: 0 15px;
    font-size: 16px;
    outline: none;
}

.search-btn {
    background-color: #f0f0f0;
    border: none;
    width: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--header-text-dark);
    transition: background 0.2s;
}
.search-btn:hover { background-color: #e0e0e0; }
.search-btn .material-icons { font-size: 24px; }

.header-actions {
    display: flex;
    gap: 30px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--header-text-dark);
}

.icon-box {
    position: relative;
    display: flex;
    align-items: center;
}
.icon-box .material-icons { font-size: 28px; }

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--header-orange);
    color: white;
    font-size: 11px;
    font-weight: bold;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.small-label { font-size: 12px; color: #666; }
.bold-label { font-size: 14px; font-weight: 700; }


/* =========================================
   3. Navigation Deck (Bottom)
   ========================================= */
.header-nav-deck {
    background-color: var(--header-orange);
    height: 50px;
}

.header-nav-deck .header-inner {
    height: 100%;
}

.shop-all-wrapper {
    position: relative;
    height: 100%;
    width: 240px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.shop-all-btn {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: white;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding-left: 0;
}

/* Mega Menu Dropdown Logic */
.mega-menu-dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    top: 50px; /* Directly below the strip */
    left: 0;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
    width: 900px;
    z-index: 1000;
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr) 1fr; /* 5 columns grid */
    gap: 20px;
    
    /* Reveal logic */
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

/* Hover State to Show Mega Menu */
.shop-all-wrapper:hover .mega-menu-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.mega-column h4 {
    color: var(--header-orange);
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.mega-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-column li { margin-bottom: 8px; }

.mega-column a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.1s;
}
.mega-column a:hover { color: var(--header-orange); text-decoration: underline; }


/* Horizontal Nav */
.primary-nav-links {
    display: flex;
    gap: 0;
    height: 100%;
    align-items: center;
    flex-grow: 1;
    padding-left: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: background 0.1s;
}

.nav-link:hover {
    background-color: rgba(0,0,0,0.1);
}

.nav-link.highlight-link {
    background-color: rgba(255,255,255,0.2);
    margin-left: auto; /* Push to right */
}

.nav-link.legacy-link {
    background-color: rgba(255,255,255,0.15);
    border-left: 1px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link.legacy-link .material-icons {
    font-size: 18px;
}

.nav-link.legacy-link:hover {
    background-color: rgba(255,255,255,0.25);
}


/* =========================================
   Mobile Drawer & Responsiveness
   ========================================= */
.mobile-drawer-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s;
}

.mobile-drawer-overlay.active {
    visibility: visible;
    opacity: 1;
}

.mobile-drawer {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 300px;
    background: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.mobile-drawer-overlay.active .mobile-drawer {
    transform: translateX(0);
}

.drawer-header {
    background: var(--header-navy);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title { font-weight: bold; font-size: 18px; }
.drawer-close { background: none; border: none; color: white; font-size: 24px; cursor: pointer; }

.drawer-content { overflow-y: auto; flex-grow: 1; }

.drawer-search {
    padding: 15px;
    display: flex;
    border-bottom: 1px solid #eee;
}
.drawer-search input { flex-grow: 1; padding: 8px; border: 1px solid #ddd; }
.drawer-search button { padding: 0 10px; background: #eee; border: 1px solid #ddd; border-left: none; }

.drawer-menu {
    list-style: none;
    padding: 0; margin: 0;
}

.drawer-menu li a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.drawer-menu li.divider { height: 10px; background: #f9f9f9; border-bottom: 1px solid #eee; }

/* Mobile Submenus */
.submenu-toggle {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #f5f5f5;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.submenu {
    display: none; /* Hidden */
    background: #f9f9f9;
    list-style: none;
    padding: 0;
}

.submenu li a {
    padding-left: 35px;
    font-weight: 400;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #eee;
}

.has-submenu.open .submenu { display: block; }
.has-submenu.open .submenu-toggle .material-icons { transform: rotate(180deg); }

/* Hide specific nav links between 1070px and 769px */
@media (max-width: 1070px) {
    .nav-link.hide-on-narrow {
        display: none;
    }
}

/* Responsive Media Queries */
@media (max-width: 769px) {
    .header-nav-deck { display: none; } /* Hide Desktop Nav */
    .header-utility-strip { display: none; } /* Hide Utility Strip on Tablet/Mobile to save space */
    
    .mobile-menu-toggle-modern { display: block; } /* Show Hamburger */
    .desktop-only { display: none !important; } /* Hide Desktop Actions */
    
    .header-action-deck .header-inner {
        gap: 15px;
        justify-content: space-between;
    }
    
    .brand-logo img { width: 140px; height: auto; }
    
    .header-search { display: none; } /* Hide Center Search on Mobile (It's in the drawer) */
    
    .header-actions { gap: 15px; }
}

@media (min-width: 770px) {
    .mega-menu-dropdown { display: grid; } /* Ensure grid display on desktop */
}

/* =========================================
   Login Dropdown Styles
   ========================================= */
.login-dropdown-wrapper {
    position: relative;
}

.action-item-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--header-text-dark);
    font-family: var(--header-font);
}

.login-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border: 1px solid var(--header-border);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 320px;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.login-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.login-header {
    background-color: white;
    color: var(--header-navy);
    padding: 15px 20px;
    border-radius: 4px 4px 0 0;
    border-bottom: 3px solid var(--header-orange);
}

.login-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.login-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--header-text-dark);
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--header-border);
    border-radius: 4px;
    font-size: 14px;
    font-family: var(--header-font);
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--header-orange);
}

.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #ffebee;
    color: #c62828;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 15px;
    border-left: 3px solid #c62828;
}

.login-error .material-icons {
    font-size: 18px;
}

.btn-login {
    width: 100%;
    background-color: var(--header-orange);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: var(--header-font);
}

.btn-login:hover {
    background-color: var(--header-orange-hover);
}

.btn-login:active {
    transform: translateY(1px);
}
