/* --- 1. THE MAIN HEADER ROW (Logo - Search - Cart) --- */
/* Forces Logo (Left), Search (Expanding Center), and Cart (Right) */
.header.content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 100% !important; /* Forces it to use the full screen width */
    padding: 10px 4% !important; /* Gives it that breathable edge padding */
}

.logo { 
    margin: 0 !important; 
    flex: 0 0 auto !important; 
    margin-right: 30px !important;
}

/* The Search Container: Expands like Amazon/Overstock */
.header-search-middle {
    flex: 1 !important;           /* Forces container to take all available space */
    display: flex !important;
    justify-content: center !important;
    margin: 0 40px !important;    /* Gap so it doesn't touch logo/cart */
}

.block-search {
    width: 100% !important;
    max-width: 800px !important;  /* The 'Elongated' limit */
    float: none !important;       /* Kills Magento default float */
    margin: 0 !important;
}

.block-search .control input {
    width: 100% !important;
    height: 44px !important;
    border: 1px solid #131a22 !important;
    border-radius: 4px 0 0 4px !important;
    padding-left: 15px !important;
    font-size: 16px !important;
}

.block-search .action.search {
    background-color: #febd69 !important;
    border: none !important;
    height: 44px !important;
    width: 50px !important;
    border-radius: 0 4px 4px 0 !important;
    right: 0 !important;
    top: 0 !important;
}

.block-search .action.search::before {
    color: #333 !important; /* Dark icon on orange background */
    font-size: 20px !important;
}

.minicart-wrapper {
    flex: 0 0 auto !important;
    margin-left: 30px !important;
}

/* --- 2. THE NAVY MENU BAR (Full-Width Background) --- */
.dunedin-nav-wrapper {
    background-color: #232f3e !important; 
    width: 100vw !important; 
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw; 
    margin-right: -50vw;
    border-bottom: 1px solid #131a22 !important;
}

.navigation.custom-megamenu {
    background: transparent !important;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header .header.content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 100% !important; 
    width: 100% !important;
    padding: 10px 30px !important;
    box-sizing: border-box !important;
}

/* Navigation List Alignment */
.mega-menu-list {
    display: flex !important;
    justify-content: flex-start !important; /* Starts from left to accommodate "All" */
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 10px !important;
}

/* --- 3. HAMBURGER ICON & "ALL" MENU --- */
.all-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 800 !important;
}

/* Fix the All Item to be side-by-side */
.all-menu-item a {
    display: flex !important;
    flex-direction: row !important; /* Forces side-by-side */
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer;
}

.all-text {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

.hamburger-icon {
    width: 18px;
    height: 12px;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    flex-shrink: 0;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #ffffff !important; /* Ensure visibility */
    border-radius: 1px;
}

/* Ensure the "All" text is also white */
.hamburger-menu a span {
    color: #ffffff !important;
}

/* --- 4. CATEGORY TABS --- */
.category-item {
    position: relative;
}

.category-item > a {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 14px 20px !important; /* Tab spacing */
    display: inline-block;
    text-decoration: none !important;
    white-space: nowrap;
}

/* Hover effect with Amazon Gold underline */
.category-item:hover > a {
    background-color: #37475a !important;
    box-shadow: inset 0 -3px 0 0 #febd69; /* Gold Bottom Border */
}

/* --- 5. THE DROPDOWN (Perfectly Centered Under Tab) --- */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%); /* Precisely centers submenu under tab */
    background: #ffffff;
    min-width: 220px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    padding: 10px 0;
    border-top: 3px solid #febd69;
}

.category-item:hover .submenu {
    display: block;
}

.child-item a {
    display: block;
    padding: 10px 20px !important;
    color: #333 !important;
    font-size: 14px !important;
    border-bottom: 1px solid #f0f0f0;
}

.child-item a:hover {
    background: #f3f3f3;
    color: #e77600 !important; /* Amazon Orange text */
}

/* Ensure the wrapper doesn't hide the nav drawer on mobile */
@media (max-width: 767px) {
    .dunedin-nav-wrapper {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        left: 0;
    }
}

/* --- UPDATED SLIDING OVER PANEL LOGIC --- */

/* The Toggler Button styling */
.menu__toggler {
    z-index: 1001;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 10px;
    position: relative; /* Essential for span positioning */
}

/* The Animated Hamburger Spans */
.menu__toggler span,
.menu__toggler span::before,
.menu__toggler span::after {
    position: absolute;
    content: '';
    width: 18px;
    height: 2px;
    background: #ffffff;
    border-radius: 20px;
    transition: 500ms cubic-bezier(0.77, 0, 0.175, 1);
}
.menu__toggler span::before { top: -6px; }
.menu__toggler span::after { top: 6px; }

/* Toggler Active Animation */
.menu__toggler.active span { background: transparent; }
.menu__toggler.active span::before { transform: rotate(-225deg); top: 0; background: #ffffff; }
.menu__toggler.active span::after { transform: rotate(225deg); top: 0; background: #ffffff; }

.all-label { color: #fff; margin-left: 25px; font-weight: 700; font-size: 14px; }

/* The Panel (Slides OVER the page) */
.side-panel-menu {
    position: fixed;
    top: 0;
    left: -380px; 
    width: 350px;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    transition: 300ms left cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    overflow-y: auto;
}

.side-panel-menu.active {
    left: 0; 
}

/* Dark Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
    display: none;
}
.menu-overlay.active { display: block; }

/* Panel Styling */
.side-panel-header {
    background: #232f3e;
    color: white;
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
}
.side-panel-content { padding: 20px; color: #111; }
.side-panel-content h3 { font-size: 18px; margin: 20px 0 10px; font-weight: 700; color: #111; }
.side-panel-content ul { list-style: none; padding: 0; margin: 0; }
.side-panel-content ul li a {
    display: block;
    padding: 12px 10px;
    color: #111;
    text-decoration: none;
    font-size: 14px;
}
.side-panel-content ul li a:hover { background: #f2f2f2; }
.no-scroll { overflow: hidden; }

/* Remove old nav-sections push behavior */
.nav-open .page-wrapper { left: 0 !important; }