/*
|--------------------------------------------------------------------------
| MAGLO JAMAJOB FASHION — PREMIUM MULTI-ROW NAVIGATION
|--------------------------------------------------------------------------
| Inspired by modern fashion ecommerce navigation patterns.
| Keeps Maglo's own branding, routes and dynamic categories.
*/

.mj-mega-header {
    position: sticky !important;
    top: 0;
    z-index: 1100 !important;
    width: 100%;
    background: #fff !important;
    border-bottom: 1px solid #e9e9e9 !important;
    box-shadow: 0 4px 18px rgba(0,0,0,.045) !important;
}

.mj-desktop-header {
    display: block;
}

.mj-main-row {
    min-height: 74px;
    padding: 0 clamp(22px, 3vw, 48px);
    display: grid;
    grid-template-columns: auto auto minmax(300px, 1fr) auto;
    align-items: center;
    gap: clamp(20px, 2.2vw, 36px);
    border-bottom: 1px solid #ededed;
}

.mj-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    color: #0b0b0b;
    text-decoration: none;
}

.mj-brand-logo {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    object-fit: contain;
}

.mj-brand-name {
    max-width: 150px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.mj-primary-nav {
    height: 74px;
    display: flex;
    align-items: stretch;
    gap: 1px;
}

.mj-primary-nav > a,
.mj-nav-dropdown-button {
    position: relative;
    min-width: max-content;
    height: 74px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: #0d0d0d;
    font: inherit;
    font-size: 12.5px;
    font-weight: 850;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.mj-primary-nav > a::after,
.mj-nav-dropdown-button::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: 0;
    left: 10px;
    height: 3px;
    transform: scaleX(0);
    background: #e6007e;
    transition: transform .18s ease;
}

.mj-primary-nav > a:hover::after,
.mj-primary-nav > a.active::after,
.mj-nav-dropdown-button:hover::after,
.mj-nav-dropdown-button.active::after {
    transform: scaleX(1);
}

.mj-primary-nav > a:hover,
.mj-primary-nav > a.active,
.mj-nav-dropdown-button:hover,
.mj-nav-dropdown-button.active {
    color: #e6007e;
}

.mj-new-badge {
    position: absolute;
    top: 7px;
    right: 4px;
    padding: 2px 4px;
    border-radius: 3px;
    background: #e6007e;
    color: #fff;
    font-size: 7px;
    font-weight: 900;
    line-height: 1;
}

.mj-nav-dropdown {
    position: relative;
}

.mj-nav-dropdown-button svg {
    width: 13px;
    height: 13px;
}

.mj-nav-dropdown-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% - 1px);
    left: 0;
    width: 230px;
    padding: 8px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(7px);
    border: 1px solid #e8e8e8;
    background: #fff;
    box-shadow: 0 18px 45px rgba(0,0,0,.11);
    transition: .18s ease;
}

.mj-nav-dropdown:hover .mj-nav-dropdown-panel,
.mj-nav-dropdown:focus-within .mj-nav-dropdown-panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.mj-nav-dropdown-panel a {
    min-height: 42px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    color: #171717;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.mj-nav-dropdown-panel a:hover {
    background: #fff1f8;
    color: #e6007e;
}

.mj-search {
    min-width: 0;
    height: 44px;
    padding-left: 14px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #dcdcdc;
    border-radius: 24px;
    background: #fafafa;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.mj-search:focus-within {
    border-color: #e6007e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(230,0,126,.08);
}

.mj-search > svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    color: #777;
}

.mj-search input {
    min-width: 0;
    flex: 1;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    padding: 0 10px !important;
    box-shadow: none !important;
    color: #111;
    font-size: 13px;
}

.mj-search button {
    align-self: stretch;
    padding: 0 15px;
    border: 0;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    cursor: pointer;
}

.mj-search button:hover {
    background: #e6007e;
}

.mj-actions {
    display: flex;
    align-items: center;
    gap: 3px;
}

.mj-icon-action,
.mj-mobile-icon {
    position: relative;
    display: grid;
    place-items: center;
    color: #111;
    text-decoration: none;
}

.mj-icon-action {
    width: 40px;
    height: 40px;
}

.mj-icon-action svg,
.mj-mobile-icon svg {
    width: 23px;
    height: 23px;
}

.mj-icon-action:hover,
.mj-mobile-icon:hover {
    color: #e6007e;
}

.mj-action-count {
    position: absolute;
    top: -1px;
    right: -2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e6007e;
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
}

.mj-category-row {
    min-height: 43px;
    padding: 0 clamp(22px, 3vw, 48px);
    display: flex;
    align-items: center;
    gap: 1px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    white-space: nowrap;
    border-bottom: 2px solid #e6007e;
}

.mj-category-row::-webkit-scrollbar {
    display: none;
}

.mj-category-row a {
    min-height: 41px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    color: #111;
    font-size: 12.5px;
    font-weight: 650;
    text-decoration: none;
}

.mj-category-row a:hover,
.mj-category-row a.active {
    color: #e6007e;
    background: #fff5fa;
}

.mj-mobile-header {
    display: none;
}

/*
|--------------------------------------------------------------------------
| Mobile drawer
|--------------------------------------------------------------------------
*/

.mj-navigation-overlay {
    background: rgba(0,0,0,.48) !important;
    backdrop-filter: blur(2px);
}

.mj-navigation-drawer {
    width: min(390px, 90vw) !important;
    background: #fff !important;
    box-shadow: -20px 0 50px rgba(0,0,0,.18);
}

.mj-drawer-inner {
    padding: 20px !important;
}

.mj-drawer-header {
    margin-bottom: 14px !important;
    padding-bottom: 15px !important;
}

.mj-drawer-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 18px;
    font-weight: 900;
}

.mj-drawer-brand img {
    width: 42px;
    height: 42px;
}

.mj-drawer-close {
    border-radius: 0 !important;
}

.mj-drawer-user {
    margin-bottom: 16px;
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f8f8;
}

.mj-drawer-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e6007e;
    color: #fff;
    font-weight: 900;
}

.mj-drawer-user strong,
.mj-drawer-user small {
    display: block;
}

.mj-drawer-user strong {
    font-size: 13px;
}

.mj-drawer-user small {
    margin-top: 2px;
    color: #777;
    font-size: 11px;
}

.mj-drawer-nav {
    display: grid;
}

.mj-drawer-nav > a,
.mj-logout-form button {
    width: 100%;
    min-height: 44px;
    padding: 10px 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    background: transparent;
    color: #111;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
}

.mj-drawer-nav > a:hover,
.mj-logout-form button:hover {
    color: #e6007e;
    background: #fff7fb;
}

.mj-drawer-label {
    margin-top: 14px;
    padding: 10px 9px 6px;
    color: #8b8b8b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.mj-drawer-count {
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fff0f8;
    color: #e6007e;
    font-size: 10px;
}

.mj-logout-form {
    margin: 0;
}

/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 1250px) {
    .mj-main-row {
        grid-template-columns: auto auto minmax(230px, 1fr) auto;
        gap: 14px;
        padding-inline: 22px;
    }

    .mj-brand-name {
        display: none;
    }

    .mj-primary-nav > a,
    .mj-nav-dropdown-button {
        padding-inline: 8px;
        font-size: 11.5px;
    }
}

@media (max-width: 980px) {
    .mj-desktop-header {
        display: none;
    }

    .mj-mobile-header {
        display: block;
        background: #fff;
        border-bottom: 3px solid #e6007e;
    }

    .mj-mobile-main-row {
        min-height: 66px;
        padding: 8px 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        border-bottom: 1px solid #e8e8e8;
    }

    .mj-mobile-brand {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        color: #111;
        text-decoration: none;
    }

    .mj-mobile-brand img {
        width: 43px;
        height: 43px;
        flex: 0 0 43px;
    }

    .mj-mobile-brand span {
        max-width: 145px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
        font-weight: 900;
    }

    .mj-mobile-actions {
        display: flex;
        align-items: center;
        gap: 1px;
    }

    .mj-mobile-icon {
        width: 37px;
        height: 37px;
    }

    .mj-menu-button {
        width: 39px !important;
        height: 39px !important;
        display: flex !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .mj-menu-button span {
        width: 22px !important;
        height: 1.7px !important;
        background: #111 !important;
    }

    .mj-mobile-tabs {
        min-height: 45px;
        padding: 0 13px;
        display: flex;
        align-items: stretch;
        gap: 2px;
        overflow-x: auto;
        scrollbar-width: none;
        white-space: nowrap;
        border-bottom: 1px solid #ededed;
    }

    .mj-mobile-tabs::-webkit-scrollbar {
        display: none;
    }

    .mj-mobile-tabs a {
        position: relative;
        min-height: 45px;
        padding: 0 15px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #111;
        font-size: 11.5px;
        font-weight: 850;
        text-transform: uppercase;
        text-decoration: none;
    }

    .mj-mobile-tabs a::after {
        content: "";
        position: absolute;
        right: 10px;
        bottom: 0;
        left: 10px;
        height: 3px;
        transform: scaleX(0);
        background: #111;
    }

    .mj-mobile-tabs a.active::after {
        transform: scaleX(1);
    }

    .mj-mobile-tabs a.active {
        color: #e6007e;
    }

    .mj-mobile-search {
        margin: 10px 16px;
        height: 43px;
        padding-left: 13px;
        display: flex;
        align-items: center;
        overflow: hidden;
        border: 1px solid #dcdcdc;
        border-radius: 23px;
        background: #fafafa;
    }

    .mj-mobile-search:focus-within {
        border-color: #e6007e;
        background: #fff;
    }

    .mj-mobile-search > svg {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        color: #777;
    }

    .mj-mobile-search input {
        min-width: 0;
        flex: 1;
        border: 0 !important;
        outline: 0 !important;
        background: transparent !important;
        padding: 0 9px !important;
        box-shadow: none !important;
        font-size: 13px;
    }

    .mj-mobile-search button {
        width: 43px;
        height: 43px;
        display: grid;
        place-items: center;
        border: 0;
        background: transparent;
        color: #111;
    }

    .mj-mobile-search button svg {
        width: 19px;
        height: 19px;
    }

    /* Existing layout rules hide these under 1050px. Override them. */
    .mj-mobile-header .mobile-menu-button {
        display: flex !important;
    }
}

@media (max-width: 520px) {
    .mj-mobile-main-row {
        padding-inline: 12px;
    }

    .mj-mobile-brand span {
        display: none;
    }

    .mj-mobile-icon {
        width: 34px;
        height: 36px;
    }

    .mj-mobile-icon svg {
        width: 22px;
        height: 22px;
    }

    .mj-mobile-tabs {
        padding-inline: 7px;
    }

    .mj-mobile-tabs a {
        padding-inline: 13px;
        font-size: 11px;
    }

    .mj-mobile-search {
        margin-inline: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mj-primary-nav > a::after,
    .mj-nav-dropdown-button::after,
    .mj-nav-dropdown-panel {
        transition: none !important;
    }
}
