/**
 * NAVIGATION STYLES
 * 
 * Comprehensive stylesheet for the main navigation component of Midway Wholesale website.
 * Implements a two-tier navigation system with search functionality, user authentication,
 * shopping cart, and multi-level category dropdown menus.
 * 
 * Navigation Structure:
 * - Top Bar: Logo, Search, User Account, Shopping Cart
 * - Bottom Bar: Category Dropdown Menu, Contact Link
 * - Cart Sidebar: Slide-out shopping cart panel
 * 
 * Key Features:
 * - Responsive design considerations
 * - Hover-activated dropdown menus
 * - Shopping cart with item counter badge
 * - User authentication state handling
 * - Multi-level category navigation
 * 
 * Dependencies:
 * - Font Awesome for icons
 * - Boxicons for cart icon
 * - JavaScript cart.js for cart functionality
 * 
 * @package MidwayWholesale
 * @version 2.1
 * @author GoneClear Development Team
 */


/* ================================
   GLOBAL RESET & BASE STYLES
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: 'Open Sans', sans-serif;
}

/* ================================
   MAIN NAVIGATION CONTAINER
   ================================ */

nav {
    width: 100%;
    position: relative;
    z-index: 1000;
}

/* ================================
   TOP NAVIGATION BAR
   ================================ */

.navTop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    background-color: #19427f;
    color: white;
    height: 60px;
}

/* ================================
   LOGO SECTION
   ================================ */

.nav-logo .logo img {
    max-height: 30px;
    display: block;
}

/* ================================
   SEARCH COMPONENT
   ================================ */

.search {
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px;
    background-color: #f9f9f9;
}

.search-box-text {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 10px;
    font-size: 14px;
    background-color: transparent;
    min-width: 500px;
}

.search-box-select {
    border: none;
    outline: none;
    font-size: 14px;
    padding: 10px;
    background-color: transparent;
    margin-right: 10px;
}

.search-box-button {
    background-color: #dc382b;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    color: #fff;
    border-radius: 0 5px 5px 0;
    transition: background-color 0.3s;
}

.search-box-button:hover {
    background-color: #9b281e;
}

/* ================================
   HEADER LINKS & USER NAVIGATION
   ================================ */

.header-links {
    display: flex;
    align-items: center;
    gap: 30px;  /* INCREASED from 15px to 30px for better spacing */
    list-style: none;
    height: 100%;
}

.header-links a {
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
    gap: 5px;
    transition: color 0.3s;
    height: 100%;
    justify-content: center;
}

.header-links a i {
    font-size: 20px;
}

.navItem .badge {
    color: white;
    font-size: 14px;
    /* PREVENT TEXT SHIFT: Fixed width prevents layout shift when text changes */
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
}

/* ================================
   SHOPPING CART COMPONENT
   ================================ */

.icon-cart {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    cursor: pointer;
    padding: 0px 0px;
    text-decoration: none;
    font-size: 14px;
    gap: 5px;
    transition: color 0.3s;
    height: 100%;
    justify-content: center;
}

.icon-cart i {
    font-size: 20px;
}

.cart-count {
    background-color: rgb(169, 16, 16);
    position: absolute;
    top: -5px;
    right: 20px;
    width: 20px;
    height: 20px;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

/* ================================
   ACCOUNT DROPDOWN MENU
   ================================ */

.header-links li > div {
    position: relative;
}

.account-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-radius: 3px;
    padding: 10px 0;
    z-index: 9999;
}

.header-links li > div:hover .account-dropdown-content {
    display: block;
}

.account-dropdown-header {
    padding: 10px 20px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 8px;
}

.account-dropdown-header h3 {
    color: #0F1111;
    font-size: 13px;
    margin: 0;
}

.account-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-menu-list li {
    padding: 0;
    margin: 0;
}

.account-menu-list a {
    display: block;
    padding: 8px 20px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.2s;
}

.account-menu-list a:hover {
    background-color: #eaeded;
}

.account-divider {
    height: 1px;
    background-color: #e5e5e5;
    margin: 8px 0;
}

/* ================================
   BOTTOM NAVIGATION BAR
   ================================ */

.categories-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
    padding: 10px 50px;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    font-size: 17px;
    color: #555;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.categories-left span {
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    font-size: 17px;
    color: #555;
}

.categories-left {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    color: black;
    padding: 10px;
}

.categories-left i {
    font-size: 12px;
    color: #666;
}

/* ================================
   CATEGORY DROPDOWN MENU
   ================================ */

.categories-dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 250px;
    display: none;
    z-index: 1000;
    padding: 0px 0;
    border-radius: 3px;
}

.categories-dropdown:hover .dropdown-menu {
    display: block;
}

.menu-level-1 {
    list-style: none;
}

.menu-level-1 > li {
    position: relative;
    padding: 10px 20px;
}

.menu-level-1 > li:hover {
    background-color: #eaeded;
}

.menu-level-2 > li:hover {
    background-color: #eaeded;
}

.menu-level-2 {
    position: absolute;
    top: 0;
    left: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    display: none;
    width: 200px;
    z-index: 1001;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none;
    border-radius: 3px;
}

.menu-level-1 > li:hover .menu-level-2 {
    display: block;
}

.dropdown-menu a {
    text-decoration: none;
    color: #555;
    padding: 2px;
    display: block;
    transition: color 0.3s ease;
}

/* ================================
   CATEGORIES RIGHT SECTION
   ================================ */

.categories-right a {
    text-decoration: none;
    color: #555;
    transition: color 0.3s ease;
}

.categories-right a:hover {
    color: #007bff;
}