/**
 * Navbar Styles — Midway Wholesale
 * Matches new DM Sans / navy-blue design system
 * @version 4.1 — fixes dropdown blink + cart bg
 */

/* ── Force consistent light theme across all browsers (fixes Opera dark mode) ── */
:root {
    color-scheme: light;

    /* Cart variables — defined here so the cart sidebar works on ALL pages,
       not just the shop page where shop.css loads them.
       NOTE: We intentionally do NOT define --radius-sm/md/lg/xl here
       because dashboard-theme.css defines those and must not be overridden. */
    --navy:           #0c1c44;
    --navy-dark:      #081228;
    --navy-light:     #12285f;
    --accent:         #d61f26;
    --accent-hover:   #b4070b;
    --text-on-dark:   rgba(255,255,255,0.92);
    --blue-mid:       #12285f;
    --ease:           cubic-bezier(0.4, 0, 0.2, 1);
    --speed:          0.2s;
}

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    min-height: 100vh;
    font-family: 'DM Sans', 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

html, body { overflow-x: hidden; width: 100%; }

nav {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(13,27,62,0.18);
}

/* ── TOP BAR ── */

.navTop {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 20px 14px;
    background: linear-gradient(160deg, #12285f 0%, #0c1c44 46%, #081228 100%);
    color: white;
    gap: 10px;
    min-height: 60px;
}

/* On desktop, override flex-wrap children so nothing drifts */
@media (min-width: 768px) {
    .navTop > * { align-self: center; }
}

/* ── LOGO ── */

.nav-logo { flex: 0 0 auto; order: 1; }
.nav-logo .logo {
    display: block;
    overflow: hidden;
    height: 28px;
}
.nav-logo .logo img {
    display: block;
    height: 50px;
    width: auto;
    margin-top: -2px;
    transition: opacity 0.2s, filter 0.2s;
    filter: brightness(0) invert(1);
    max-height: none;
}
.nav-logo .logo:hover img { opacity: 0.85; }

/* ── HEADER LINKS (account + cart) ── */

/* ── HEADER LINKS (account + cart) ── */

.header-links {
    display: flex;
    align-items: stretch;   /* children all fill the same row height */
    gap: 18px;
    list-style: none;
    margin-left: auto;
    order: 2;
    flex-shrink: 0;
}

/* Wrapper li and div inside header-links must not add height */
.header-links li,
.header-links li > div {
    display: flex;
    align-items: center;
    position: relative;
}

/* Each link: icon on top, label below — force consistent sizing */
.header-links a,
.icon-cart {
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    gap: 2px;
    transition: opacity 0.2s;
    line-height: 1.2;
    cursor: pointer;
    min-height: 48px;
}
.header-links a:hover,
.icon-cart:hover { opacity: 0.8; }
.header-links a > i:first-child,
.icon-cart > i:first-child { font-size: 22px; }

/* ── Account navItem — icon + label row with chevron ── */
.navItem {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: white;
    min-height: 48px;     /* matches .icon-cart exactly */
    line-height: 1.2;
    cursor: pointer;
}
/* Top icon — same size as cart icon */
.navItem > i { font-size: 22px; flex-shrink: 0; }
/* Label row: "My Account ∨" */
.navItem .badge-wrap {
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1;
}
.navItem .badge {
    color: white;
    font-size: 11px;
    font-weight: 500;
}
.navItem .nav-chevron {
    font-size: 9px;
    opacity: 0.8;
    transition: transform 0.2s;
}
#accountDropdownWrapper:hover .nav-chevron,
#accountDropdownWrapper.active .nav-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* ── CART COUNT BUBBLE ── */
.cart-count {
    background: #b4070b;
    position: absolute;
    top: -4px;
    right: 12px;
    width: 18px; height: 18px;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid #0c1c44;
}

.cart-text { display: inline; font-size: 11px; }

/* ── SEARCH ── */

.search {
    display: flex;
    align-items: center;
    flex: 1 1 100%;
    order: 3;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.2);
    overflow: visible; /* allow dropdown to escape container */
    margin-top: 4px;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}
.search:focus-within {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.5);
}

.search-box-select { display: none; }
.search-box-select:disabled { cursor: not-allowed; opacity: 0.6; }

/* ── Custom search category picker ── */
.search-cat-picker {
    display: flex; /* show on all sizes */
    position: relative;
    flex-shrink: 0;
    align-self: stretch;
}
.search-cat-btn {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.14);
    border: none;
    border-right: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px 0 0 8px;
    color: rgba(255,255,255,0.9);
    padding: 8px 12px;
    font-size: 13px; font-family: inherit; font-weight: 500;
    cursor: pointer; white-space: nowrap;
    min-width: 120px; max-width: 160px;
    height: 100%;
}
.search-cat-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.search-cat-btn i { font-size: 15px; flex-shrink: 0; transition: transform 0.2s; }
.search-cat-btn.open i { transform: rotate(180deg); }

.search-cat-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px); left: 0;
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(13,27,62,0.18);
    width: 240px;
    max-height: 65vh;
    overflow-y: auto;
    z-index: 3000;
    padding: 6px 0;
}
.search-cat-dropdown.open { display: block; }

.scd-heading {
    font-size: 0.66rem; font-weight: 800; letter-spacing: 0.09em;
    text-transform: uppercase; color: #fff;
    background: linear-gradient(135deg, #0c1c44, #12285f);
    padding: 5px 12px; margin: 6px 8px 3px;
    border-radius: 5px;
}
/* Clickable heading = filter across every subcategory under it */
.scd-heading-clickable {
    cursor: pointer;
    transition: filter 0.12s, box-shadow 0.12s;
    display: flex; align-items: center; justify-content: space-between;
}
.scd-heading-clickable::after {
    content: '\203A'; /* › chevron hint that the whole heading is tappable */
    font-size: 0.9rem; font-weight: 700; opacity: 0.75; margin-left: 8px;
}
.scd-heading-clickable:hover { filter: brightness(1.12); box-shadow: 0 1px 4px rgba(37,99,235,0.35); }
.scd-heading-clickable.active { box-shadow: 0 0 0 2px rgba(37,99,235,0.55); }
.scd-item {
    padding: 7px 12px 7px 20px;
    font-size: 13px; color: #374151;
    cursor: pointer; transition: background 0.12s;
    position: relative;
}
.scd-item::before {
    content: ''; position: absolute; left: 10px; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 4px;
    background: #93a3b8; border-radius: 50%;
}
.scd-all { font-weight: 600; padding-left: 12px; color: #0c1c44; }
.scd-all::before { display: none; }
.scd-item:hover { background: #f0f4ff; color: #0c1c44; }
.scd-item:hover::before { background: #0c1c44; }
.scd-item.active { color: #0c1c44; font-weight: 600; background: #eef2ff; }

.search-box-text {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 10px 14px;
    font-size: 14px;
    background: transparent;
    color: white;
    min-width: 0;
    font-family: 'DM Sans', sans-serif;
}
.search-box-text::placeholder { color: rgba(255,255,255,0.65); font-size: 13px; }

.search-box-button {
    background: #b4070b;
    border: none;
    padding: 9px 16px;
    cursor: pointer;
    color: white;
    border-radius: 8px;
    margin: 4px;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px; min-height: 40px;
    flex-shrink: 0;
}
.search-box-button:hover { background: #8f0509; transform: scale(1.04); }
.search-box-button:active { transform: scale(0.97); }
.search-box-button i { font-size: 15px; }

/* ── ACCOUNT DROPDOWN ── */

/*
 * FIX: Invisible bridge between the icon and the dropdown panel.
 * Without this, moving the cursor down from the icon crosses a gap
 * where neither element is hovered → dropdown blinks/disappears.
 * The ::before pseudo creates a transparent area that keeps hover
 * active during the crossing, and the bottom padding on the wrapper
 * ensures the gap is fully covered.
 */
#accountDropdownWrapper {
    position: relative;
    /* Extra bottom padding creates the hover bridge zone */
    padding-bottom: 8px;
}

#accountDropdownWrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -20px;
    right: -20px;
    height: 12px; /* bridge height — covers the gap */
    background: transparent;
    pointer-events: auto;
}

.account-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 2px); /* reduced from 8px — less gap to cross */
    right: 0;
    background: #fff;
    min-width: 210px;
    max-width: calc(100vw - 30px);
    box-shadow: 0 8px 32px rgba(13,27,62,0.18);
    border-radius: 12px;
    padding: 8px 0;
    z-index: 9999;
    border: 1px solid rgba(13,27,62,0.08);
    overflow: hidden;
}

/* Keep open when hovering wrapper OR dropdown content */
#accountDropdownWrapper.active .account-dropdown-content { display: block; }

@media (hover: hover) and (min-width: 768px) {
    #accountDropdownWrapper:hover .account-dropdown-content { display: block; }
    /* Ensure dropdown itself keeps wrapper hovered */
    .account-dropdown-content:hover { display: block; }
}

.account-dropdown-header {
    background: linear-gradient(135deg, #0d1b3e, #0c1c44);
    color: white;
    padding: 16px 20px;
}
.account-dropdown-header h3 { margin: 0; font-size: 15px; font-weight: 600; }

.account-menu-list { list-style: none; padding: 6px 0; margin: 0; }
.account-menu-list li { margin: 0; }
.account-menu-list a {
    display: block;
    padding: 11px 20px;
    color: #1a1a2e;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.account-menu-list a:hover { background: #f0f4ff; color: #0c1c44; }
.account-divider { height: 1px; background: #eef0f4; margin: 6px 0; }

/* ── CATEGORIES BAR ── */

.categories-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0d1b3e;
    padding: 0 20px;
    font-size: 14px;
    height: 42px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.categories-left {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    cursor: pointer;
}

.categories-left span {
    font-weight: 700;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.categories-left i { font-size: 11px; color: rgba(255,255,255,0.6); }

/* ── CATEGORY DROPDOWN ── */

.categories-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    cursor: pointer;
    user-select: none;
    gap: 6px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    background: #fff;
    border: 1px solid #e5e9f2;
    box-shadow: 0 8px 32px rgba(13,27,62,0.15);
    width: 240px;
    display: none;
    z-index: 1000;
    border-radius: 12px;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.categories-dropdown.active .dropdown-menu { display: block; }
@media (hover: hover) { .categories-dropdown:hover .dropdown-menu { display: block; } }

.menu-level-1 { list-style: none; padding: 6px 0; margin: 0; }
.menu-level-1 > li {
    position: relative;
    padding: 0;
    border-bottom: 1px solid #f5f5f5;
}
.menu-level-1 > li:last-child { border-bottom: none; }

.menu-level-1 > li > a,
.dropdown-menu a {
    display: block;
    padding: 11px 18px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.menu-level-1 > li:hover { background: #f7f9ff; }
.dropdown-menu a:hover { color: #0c1c44; }

.menu-level-2 {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background: #f9fafb;
}
.menu-level-1 > li.expanded .menu-level-2 { display: block; }
.menu-level-2 > li > a { padding: 9px 18px 9px 32px; font-size: 13px; color: #555; }

/* ── CATEGORY HEADING & ITEM (grouped dropdown) ── */
.menu-level-1 > li.nav-category-heading {
    border-bottom: none;
    background: none;
    cursor: pointer;
    padding: 12px 14px 5px;
    margin-top: 4px;
}
.menu-level-1 > li.nav-category-heading span,
.menu-level-1 > li.nav-category-heading > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #0c1c44, #12285f);
    padding: 5px 10px;
    border-radius: 5px;
    transition: filter 0.12s, box-shadow 0.12s;
}
/* Chevron hint that tapping the heading filters the whole section */
.menu-level-1 > li.nav-category-heading > a::after {
    content: '\203A';
    font-size: 0.9rem; font-weight: 700; opacity: 0.75; margin-left: 8px;
}
.menu-level-1 > li.nav-category-heading:hover { background: none; }
.menu-level-1 > li.nav-category-heading > a:hover {
    filter: brightness(1.12);
    box-shadow: 0 1px 4px rgba(37,99,235,0.35);
}

.menu-level-1 > li.nav-category-item { border-bottom: none; }
.menu-level-1 > li.nav-category-item > a {
    padding: 6px 14px 6px 22px;
    font-size: 13px;
    color: #4b5563;
    position: relative;
}
.menu-level-1 > li.nav-category-item > a::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #93a3b8;
    border-radius: 50%;
}
.menu-level-1 > li.nav-category-item:hover { background: #f0f4ff; }
.menu-level-1 > li.nav-category-item:hover > a { color: #0c1c44; }
.menu-level-1 > li.nav-category-item:hover > a::before { background: #0c1c44; }

/* ── CONTACT LINK ── */

.categories-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.categories-right a {
    text-decoration: none;
    color: rgba(255,255,255,0.72);
    font-size: 13px;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.2s;
    white-space: nowrap;
}
.categories-right a:hover { color: #fff; }

/* Shop / Checkout quick-links (logged-in only) */
.categories-right-links {
    display: flex;
    align-items: center;
    gap: 14px;
}
.categories-right-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.18);
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.categories-right-links a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.35);
}

/* ── CART SIDEBAR ── */
/*
 * Full cart styling lives in shop.css.
 * --navy and related variables are defined in :root above so the cart
 * renders correctly on all pages.
 * --radius-sm is scoped here only so it doesn't override dashboard-theme.css.
 */
.cartBar {
    --radius-sm: 6px;
    position: fixed;
    right: -400px;
    top: 0;
    bottom: 0;
    width: 360px;
    max-width: 100vw;
    z-index: 10000;  /* above session bar (9000) and nav (1000) */
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cartBar.active { right: 0; }

/* ── TABLET 768px ── */

@media (min-width: 768px) {
    .navTop { flex-wrap: nowrap; padding: 10px 32px 14px; gap: 18px; }
    .nav-logo .logo { height: 30px; }
    .nav-logo .logo img { height: 54px; max-height: none; }

    .search {
        flex: 1 1 auto;
        order: 2;
        max-width: 560px;
        margin: 0 auto;
        margin-top: 0;
        background: rgba(255,255,255,0.14);
    }

    .search-box-select { display: none !important; }

    .search-box-text { padding: 10px 14px; font-size: 14px; min-width: 260px; }

    .header-links { gap: 22px; margin-left: 0; }
    .header-links a { font-size: 12px; }
    .navItem .badge { font-size: 12px; }
    .icon-cart { font-size: 12px; }
    .cart-count { right: 16px; }
    .cart-text { display: inline; }

    .categories-bar { padding: 0 32px; }
    .categories-left span { font-size: 13px; }

    .menu-level-2 {
        position: absolute;
        top: 0;
        left: 100%;
        background: #fff;
        border: 1px solid #e5e9f2;
        display: none;
        width: 220px;
        z-index: 1001;
        box-shadow: 0 8px 24px rgba(13,27,62,0.12);
        border-radius: 10px;
        margin-left: -1px;
    }
    .menu-level-1 > li:hover .menu-level-2 { display: block; }
}

/* ── DESKTOP 992px ── */

@media (min-width: 992px) {
    .navTop { padding: 10px 60px 14px; gap: 28px; }
    .nav-logo .logo { height: 32px; }
    .nav-logo .logo img { height: 58px; max-height: none; }
    .search { max-width: 720px; }
    .search-box-text { min-width: 440px; }
    .header-links { gap: 28px; }
    .header-links a { font-size: 13px; }
    .header-links a > i:first-child { font-size: 22px; }
    .navItem .badge { font-size: 13px; }
    .navItem .badge-wrap { font-size: 13px; }
    .icon-cart { font-size: 13px; }
    .icon-cart > i { font-size: 22px; }
    .cart-text { font-size: 13px; }
    .categories-bar { padding: 0 60px; height: 44px; }
    .categories-left span { font-size: 14px; }
}

/* ── LARGE DESKTOP 1200px ── */

@media (min-width: 1200px) {
    .navTop { padding: 10px 80px 14px; }
    .search { max-width: 860px; }
    .categories-bar { padding: 0 80px; }
}

/* ── ACCESSIBILITY ── */

a:focus, button:focus, input:focus, select:focus {
    outline: 2px solid rgba(255,255,255,0.7);
    outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════
   MOBILE NAVBAR — clean 2-row layout
   Row 1: logo  |  (spacer)  |  cart+account icons
   Row 2: search bar full width
   ══════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .navTop {
        display: grid;
        grid-template-areas:
            "logo icons"
            "search search";
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        padding: 10px 16px 10px;
        gap: 10px 0;
        align-items: center;
    }

    /* Logo — left of row 1 */
    .nav-logo { grid-area: logo; }

    /* Icons (account + cart) — right of row 1 */
    .header-links {
        grid-area: icons;
        justify-content: flex-end;
        gap: 4px;
        margin: 0;
    }

    /* Search — full width row 2 */
    .search {
        grid-area: search;
        flex: unset;
        width: 100%;
        max-width: 100%;
        order: unset;
        margin: 0;
        overflow: visible;
    }

    /* Hide category picker inside search on mobile — use ALL CATEGORIES dropdown */
    .search-cat-picker { display: none !important; }

    /* Search input fills remaining width */
    .search-box-text {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Hide Shop/Checkout/Contact links in categories bar — too cramped */
    .categories-right { display: none; }

    /* Touch targets */
    .header-links a, .icon-cart, .categories-dropdown, .categories-right a {
        min-width: 44px; min-height: 44px;
        display: inline-flex; align-items: center; justify-content: center;
    }
}

* { -webkit-tap-highlight-color: rgba(0,0,0,0.08); }

/* ── CATEGORY DROPDOWN LOGIN PROMPT ── */
.dropdown-menu li a[href="/login"] { color: #64748b; font-style: italic; }
.dropdown-menu li a[href="/login"] i.fa-lock { margin-right: 8px; font-size: 13px; }

/* ── DISABLED SEARCH SELECT ── */
.search-box-select:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── MOBILE TOUCH ── */
@media (max-width: 768px) {
    .navItem { min-width: 44px; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; }

    /* On mobile the cart icon navigates to /checkout — no sidebar */
    .icon-cart {
        position: relative;
    }
}
/* ── Session info bar (shop/detail/checkout — privileged users only) ── */
#session-info-bar {
    position: sticky;
    top: 0;
    z-index: 9000;
    background: #0d1b3e;
    border-bottom: 1.5px solid rgba(102,126,234,0.35);
    padding: 7px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-family: 'DM Sans', sans-serif;
    gap: 12px;
}
#session-info-bar .sib-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a0aec0;
}
#session-info-bar .sib-left strong { color: #f3f2f2; }
#session-info-bar .sib-left span.sib-session { color: #667eea; font-weight: 600; }
#session-info-bar .sib-back {
    color: #a0aec0;
    text-decoration: none;
    padding: 3px 9px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.76rem;
    transition: color 0.2s, border-color 0.2s;
}
#session-info-bar .sib-back:hover { color: #f3f2f2; border-color: rgba(255,255,255,0.3); }

@media (min-width: 768px) {
    #session-info-bar { padding: 7px 32px; }
}
@media (min-width: 992px) {
    #session-info-bar { padding: 7px 60px; }
}/**
 * ═══════════════════════════════════════════════════════════════
 * navbar_mobile_fixes.css — append to navbar.css
 * Fixes: ALL CATEGORIES dropdown on mobile (touch), layout polish
 * ═══════════════════════════════════════════════════════════════
 */

/* ============================================================
   ALL CATEGORIES — mobile tap to open
   On mobile, :hover doesn't fire so we rely on the .active class
   toggled by JS. This makes the dropdown work on touch devices.
   ============================================================ */

/* Always show dropdown when .active is present (set by JS tap) */
.categories-dropdown.active .dropdown-menu {
    display: block !important;
}

/* Mobile: dropdown slides down from categories bar */
@media (max-width: 767px) {
    /* Show categories-right on mobile — hide non-essential items only */
    .categories-right {
        display: flex !important;
    }

    /* Shop/Checkout links now show on mobile too (JS reveals them when logged in) */

    /* Tighter categories bar on mobile */
    .categories-bar {
        padding: 0 12px;
        height: 40px;
        font-size: 13px;
    }

    /* ALL CATEGORIES label — shorter on mobile */
    .categories-left span {
        font-size: 12px;
        letter-spacing: 0.04em;
    }

    /* Dropdown: full width on mobile, appears below the bar */
    .dropdown-menu {
        position: fixed;       /* break out of nav stacking context */
        top: auto;
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        max-height: 65vh;
        border-radius: 0 0 14px 14px;
        box-shadow: 0 12px 32px rgba(13,27,62,0.22);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-top: 2px solid rgba(25,66,127,0.15);
        z-index: 2000;
    }

    /* Larger touch targets for category items on mobile */
    .menu-level-1 > li > a,
    .dropdown-menu a {
        padding: 13px 20px;
        font-size: 14px;
    }

    .menu-level-1 > li.nav-category-item > a {
        padding: 11px 20px 11px 32px;
    }

    .menu-level-1 > li.nav-category-heading {
        padding: 14px 16px 6px;
    }

    /* Chevron rotation on open */
    .categories-dropdown.active .fa-chevron-down {
        transform: rotate(180deg);
    }
    .fa-chevron-down {
        transition: transform 0.2s ease;
    }

    /* Contact link stays visible on right */
    .categories-right > a:not(.categories-right-links *) {
        font-size: 12px;
        color: rgba(255,255,255,0.75);
    }
}

/* ============================================================
   SEARCH — hide category picker on mobile (already hidden by
   display:none but reinforce here so it doesn't shift layout)
   ============================================================ */
@media (max-width: 767px) {
    .search-cat-picker {
        display: none !important;
        width: 0 !important;
        overflow: hidden !important;
    }

    /* Rounded search on mobile since picker is hidden */
    .search-box-text {
        border-radius: 8px 0 0 8px;
    }
}

/* ============================================================
   CART SIDEBAR — full width on very small screens
   ============================================================ */
@media (max-width: 480px) {
    .cartBar {
        width: 100% !important;
        right: -100% !important;
    }
    .cartBar.active {
        right: 0 !important;
    }
}

/* ── MOCKUP RED TOP BAR (added) ── */
.mw-topbar {
    width: 100%;
    background: linear-gradient(135deg, #c20d12 0%, #a3060a 100%);
    color: #ffffff;
    font-family: 'Roboto', 'DM Sans', sans-serif;
}
.mw-topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 13.5px;
    font-weight: 500;
}
.mw-topbar p { margin: 0; }
.mw-topbar-contact { display: flex; align-items: center; gap: 14px; }
.mw-topbar-contact span { opacity: .55; }
.mw-topbar-contact a { color: #fff; text-decoration: none; }
.mw-topbar-contact a:hover { text-decoration: underline; }
@media (max-width: 768px) {
    .mw-topbar p { display: none; }
    .mw-topbar-inner { justify-content: center; padding: 7px 16px; font-size: 12px; }
    .mw-topbar-contact { flex-wrap: wrap; justify-content: center; gap: 10px; }
}

/* ── HOMEPAGE SECTION LINKS (shown in place of search on the landing) ── */
.mw-nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    order: 2;
    flex: 1 1 auto;
    margin: 0;
    padding-left: 24px;
    font-family: 'Roboto', 'DM Sans', sans-serif;
}
.mw-nav-links li { display: flex; }
.mw-nav-links a {
    position: relative;
    color: #eaecf5;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.2s;
}
.mw-nav-links a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 2px;
    background: #d61f26;
    border-radius: 2px;
    transition: width 0.25s ease;
}
.mw-nav-links a:hover { color: #ffffff; }
.mw-nav-links a:hover::after { width: 100%; }

@media (max-width: 900px) {
    .mw-nav-links {
        order: 4;
        flex: 1 1 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
        padding: 10px 0 2px;
        font-size: 14.5px;
    }
}

/* ══ HOMEPAGE MOBILE MENU (hamburger → section links + account + cart) ══ */
.mw-mobile-btn { display: none; }        /* hidden on desktop */
.mw-mobile-menu { display: none; }       /* hidden on desktop */

@media (max-width: 900px) {
    /* navTop is the positioning context for the absolute mobile menu */
    .navTop { position: relative; }

    /* On mobile the homepage shows the hamburger instead of inline links/icons */
    .mw-nav-links { display: none !important; }
    .is-landing .navTop .header-links { display: none !important; }

    .mw-mobile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 2;
        margin-left: auto;
        width: 46px; height: 46px;
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 26px;
        cursor: pointer;
    }

    .mw-mobile-menu {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 999;
        max-height: 0;
        overflow: hidden;
        background: linear-gradient(165deg, #102150 0%, #0b1a3f 100%);
        border-top: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 20px 40px rgba(6,10,25,0.4);
        transition: max-height 0.35s ease;
    }
    .mw-mobile-menu.active { max-height: 640px; }

    .mw-mobile-links {
        padding: 10px 20px 6px;
        display: flex;
        flex-direction: column;
    }
    .mw-mobile-links a {
        color: #ffffff;
        text-decoration: none;
        font-size: 17px;
        font-weight: 500;
        padding: 15px 2px;
        border-bottom: 1px solid rgba(255,255,255,0.10);
        transition: color 0.2s;
    }
    .mw-mobile-links a:active,
    .mw-mobile-links a:hover { color: #ff5a5f; }

    .mw-mobile-actions {
        padding: 14px 20px 22px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .mw-mobile-action-btn {
        width: 100%;
        min-height: 56px;
        background: rgba(255,255,255,0.08);
        color: #ffffff;
        border: none;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-family: inherit;
        font-size: 15px;
        font-weight: 500;
        text-decoration: none;
        cursor: pointer;
        transition: background 0.2s;
    }
    .mw-mobile-action-btn:hover { background: rgba(255,255,255,0.14); }
    .mw-mobile-action-btn i { font-size: 18px; }
    .mw-mobile-cart-icon { position: relative; display: inline-flex; }
    .mw-mobile-cart-icon small {
        position: absolute; top: -8px; right: -11px;
        background: #d61f26; color: #fff;
        width: 18px; height: 18px; border-radius: 50%;
        font-size: 10.5px; font-weight: 700;
        display: flex; align-items: center; justify-content: center;
    }
}

/* ══ NAVBAR SEARCH REMOVED SITE-WIDE ══
   The shop page has its own product search, so the navbar search is hidden
   on every page. It's hidden (not deleted) because the categories dropdown
   JS reads #searchCategoryDropdown inside .search — deleting it would break
   the ALL CATEGORIES menu. Hidden keeps that element in the DOM. */
.search { display: none !important; }

/* ══ FULL LOGO ON LANDING PAGE (uncropped, with tagline) ══
   Other pages keep the compact cropped "MIDWAY" wordmark; the homepage
   shows the full white logo including "Wholesale Depot Limited" + tagline. */
.nav-logo--full .logo { height: auto; overflow: visible; }
.nav-logo--full .logo img { width: auto; height: 78px; max-height: 78px; margin-top: 0; filter: none; }
@media (max-width: 900px) {
    .nav-logo--full .logo img { width: 190px; height: auto; max-height: 62px; }
}

/* ══ KEEP ACCOUNT + CART ON THE RIGHT (search is hidden) ══
   The search's flex-grow used to push .header-links to the right edge.
   With the search removed, restore right-alignment on desktop so the
   account dropdown + cart stay in their original far-right position. */
@media (min-width: 768px) {
    .header-links { margin-left: auto; }
}


/* ══ ALIGN ACCOUNT + CART (icon-over-label) ══
   The account uses a Font Awesome icon and the cart a BoxIcons icon, which
   render at different heights/baselines. Give both icons a fixed centered
   box and both labels a fixed height so they line up and share the same
   icon→label spacing. */
.navItem,
.icon-cart,
.header-links a {
    justify-content: center;
    gap: 4px;
}
.navItem > i:first-child,
.icon-cart > i:first-child,
.header-links a > i:first-child {
    font-size: 22px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.navItem .badge-wrap,
.icon-cart .cart-text {
    height: 15px;
    line-height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* ══ ACCOUNT + CART LABELS — identical size / weight / font ══
   .badge scaled up on desktop (12–13px, weight 500) while .cart-text stayed
   11px with no weight. Lock both to the same values so "megewe" and
   "Shopping Cart" match. */
.navItem .badge,
.navItem .badge-wrap,
.icon-cart .cart-text {
    font-size: 12px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    letter-spacing: 0.2px;
    color: #ffffff;
}

/* ══ FINAL: match the mockup — account + cart identical & inline ══
   Same flex column, 6px gap, 23px same-family icons, 14px/500 labels,
   and no chevron (the mockup has none) so both clusters read as even. */
.header-links { align-items: center !important; }
#accountDropdownWrapper { display: flex; align-items: center; }
.navItem,
.icon-cart {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 0 !important;
    line-height: 1 !important;
}
.navItem > i:first-child,
.icon-cart > i:first-child {
    width: 30px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.navItem > i:first-child { font-size: 26px !important; }   /* mockup account icon */
.icon-cart > i:first-child { font-size: 28px !important; } /* mockup cart icon */
.navItem .badge-wrap,
.navItem .badge,
.icon-cart .cart-text {
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    height: auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Dropdown chevron shown for My Account (logged in + out) */
.navItem .badge-wrap { gap: 4px; }
.navItem .nav-chevron {
    display: inline-flex !important;
    align-items: center;
    font-size: 10px !important;
    opacity: 0.85;
    transition: transform 0.2s;
}

/* Space between account and cart — match mockup nav-actions gap */
.header-links { gap: 30px !important; }

/* ══ DEFINITIVE account/cart alignment (measured & verified) ══
   Earlier rules had higher specificity and left the two icon boxes unequal
   (26px vs 28px) so the cart sat lower. Force identical boxes + clusters. */
.header-links { align-items: center !important; }
.header-links > li { display: flex !important; align-items: center !important; margin: 0 !important; padding: 0 !important; }
#accountDropdownWrapper { display: flex !important; align-items: center !important; margin: 0 !important; padding: 0 !important; }
.header-links .navItem,
.header-links .icon-cart {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 56px !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}
.header-links .navItem > i:first-child,
.header-links .icon-cart > i:first-child {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}
.header-links .navItem > i:first-child { font-size: 26px !important; }
.header-links .icon-cart > i:first-child { font-size: 28px !important; }
.header-links .badge-wrap,
.header-links .badge,
.header-links .cart-text {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 16px !important;
    line-height: 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── ALL CATEGORIES removed from the navbar (the shop page now has its own
   category dropdown). #categoriesDropdownMenu stays in the DOM so the
   category JS doesn't break; it's just hidden. ── */
.categories-dropdown { display: none !important; }