/*
|--------------------------------------------------------------------------
| JOELSTORE - NAVBAR CSS
|--------------------------------------------------------------------------
| Header 2 tingkat
| Desktop + Tablet + Mobile
|--------------------------------------------------------------------------
*/


/* ==========================================================================
   HEADER WRAPPER
========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(29, 30, 32, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid #292a2c;
}


/* ==========================================================================
   LEVEL 1 - TOP HEADER
========================================================================== */

.top-header {
    height: 67px;
    background: #1d1e20;
    border-bottom: 1px solid #292a2c;
}

.top-header .header-row {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}


/* ==========================================================================
   LOGO
========================================================================== */

.top-header .brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 105px;

    color: #ffffff;
    text-decoration: none;

    font-size: 23px;
    font-weight: 950;
    font-style: italic;

    letter-spacing: -1.5px;

    transition:
        color .2s ease,
        transform .2s ease;
}

.top-header .brand span {
    color: #ff7415;
}

.top-header .brand:hover {
    color: #ffffff;
    transform: translateY(-1px);
}


/* ==========================================================================
   SEARCH
========================================================================== */

.search-form {
    height: 36px;
    flex: 1;

    display: flex;
    align-items: center;

    min-width: 0;

    padding: 0 14px;

    background: #2b2c2e;

    border: 1px solid #3a3b3e;
    border-radius: 22px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.search-form:focus-within {
    background: #303134;
    border-color: #ff7415;

    box-shadow:
        0 0 0 3px rgba(255, 116, 21, .08);
}

.search-form > span {
    flex-shrink: 0;

    color: #a8a9ac;
    font-size: 18px;
    line-height: 1;
}

.search-form input {
    width: 100%;
    min-width: 0;

    margin-left: 9px;

    border: 0;
    outline: 0;

    background: transparent;

    color: #ffffff;

    font-size: 13px;
}

.search-form input::placeholder {
    color: #999b9f;
}


/* ==========================================================================
   LOCATION / CURRENCY
========================================================================== */

.locale-trigger {
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    gap: 7px;

    padding: 0 13px;

    background: #202124;

    border: 1px solid #3a3b3e;
    border-radius: 22px;

    color: #ffffff;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.locale-trigger:hover {
    background: #292a2c;
    border-color: #ff7415;
}

.locale-trigger:active {
    transform: scale(.97);
}


/* ==========================================================================
   LEVEL 2 - NAVIGATION BAR
========================================================================== */

.nav-bar {
    height: 45px;

    background: #1b1c1e;

    border-bottom: 1px solid #252629;
}

.nav-bar .nav-row {
    height: 100%;

    display: flex;
    align-items: stretch;
    justify-content: space-between;
}


/* ==========================================================================
   MAIN NAV LINKS
========================================================================== */

.nav-links {
    height: 100%;

    display: flex;
    align-items: stretch;

    gap: 22px;
}

.nav-links a {
    position: relative;

    height: 100%;

    display: flex;
    align-items: center;

    gap: 7px;

    color: #dddddf;

    font-size: 13px;
    font-weight: 750;

    white-space: nowrap;

    border-bottom: 2px solid transparent;

    transition:
        color .2s ease,
        border-color .2s ease;
}

.nav-links a:hover {
    color: #ff7415;
    border-bottom-color: #ff7415;
}

.nav-links a.active {
    color: #ff7415;
    border-bottom-color: #ff7415;
}


/* ==========================================================================
   NAV ICON
========================================================================== */

.nav-links a::first-letter {
    font-size: 15px;
}


/* ==========================================================================
   ACCOUNT
========================================================================== */

.nav-account {
    height: 100%;

    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.nav-account a {
    height: 100%;

    display: flex;
    align-items: center;

    gap: 7px;

    padding: 0 2px;

    color: #dddddf;

    font-size: 13px;
    font-weight: 750;

    border-bottom: 2px solid transparent;

    transition:
        color .2s ease,
        border-color .2s ease;
}

.nav-account a:hover {
    color: #ff7415;
    border-bottom-color: #ff7415;
}


/* ==========================================================================
   ACCOUNT USER
========================================================================== */

.nav-account a[href*="dashboard"] {
    max-width: 160px;
}

.nav-account a[href*="dashboard"] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==========================================================================
   MOBILE MENU BUTTON
========================================================================== */

.mobile-menu-toggle {
    display: none;

    width: 38px;
    height: 38px;

    align-items: center;
    justify-content: center;

    padding: 0;

    background: #252629;

    border: 1px solid #393a3d;
    border-radius: 9px;

    color: #ffffff;

    font-size: 20px;

    cursor: pointer;
}


/* ==========================================================================
   MOBILE NAVIGATION
========================================================================== */

.mobile-navigation {
    display: none;
}


/* ==========================================================================
   TABLET
========================================================================== */

@media (max-width: 900px) {

    .top-header .header-row {
        gap: 15px;
    }

    .top-header .brand {
        min-width: 95px;
        font-size: 21px;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 12px;
    }

}


/* ==========================================================================
   MOBILE
========================================================================== */

@media (max-width: 700px) {

    .site-header {
        position: sticky;
        top: 0;
    }

    .top-header {
        height: 60px;
    }

    .top-header .header-row {
        height: 60px;

        gap: 8px;

        padding-top: 7px;
        padding-bottom: 7px;
    }


    /* LOGO */

    .top-header .brand {
        min-width: auto;

        font-size: 18px;
        letter-spacing: -1px;
    }


    /* SEARCH */

    .search-form {
        height: 35px;

        padding: 0 10px;

        border-radius: 18px;
    }

    .search-form > span {
        font-size: 15px;
    }

    .search-form input {
        margin-left: 6px;

        font-size: 11px;
    }

    .search-form input::placeholder {
        font-size: 11px;
    }


    /* LOCALE */

    .locale-trigger {
        height: 35px;

        padding: 0 9px;

        gap: 4px;

        font-size: 11px;
    }


    /* LEVEL 2 */

    .nav-bar {
        height: 43px;

        overflow: hidden;
    }

    .nav-bar .nav-row {
        width: 100%;

        overflow: hidden;
    }

    .nav-links {
        width: 100%;

        overflow-x: auto;
        overflow-y: hidden;

        gap: 2px;

        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        height: 43px;

        flex-shrink: 0;

        padding: 0 10px;

        font-size: 11px;
    }

    .nav-account {
        display: none;
    }

}


/* ==========================================================================
   SMALL MOBILE
========================================================================== */

@media (max-width: 480px) {

    .top-header {
        height: 58px;
    }

    .top-header .header-row {
        height: 58px;
    }

    .top-header .brand {
        font-size: 17px;
    }

    .locale-trigger {
        padding: 0 7px;
    }

    .locale-trigger span:last-child {
        display: none;
    }

    .nav-links a {
        padding-left: 8px;
        padding-right: 8px;

        font-size: 10px;
    }

}


/* ==========================================================================
   EXTRA SMALL
========================================================================== */

@media (max-width: 360px) {

    .top-header .brand {
        font-size: 16px;
    }

    .search-form {
        padding-left: 8px;
        padding-right: 8px;
    }

    .search-form input::placeholder {
        font-size: 10px;
    }

    .nav-links a {
        padding-left: 7px;
        padding-right: 7px;

        font-size: 10px;
    }

}


/* ==========================================================================
   TOUCH DEVICE
========================================================================== */

@media (hover: none) and (pointer: coarse) {

    .nav-links a,
    .locale-trigger,
    .mobile-menu-toggle {
        -webkit-tap-highlight-color: transparent;
    }

    .nav-links a {
        min-height: 43px;
    }

}


/* ==========================================================================
   REDUCED MOTION
========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .brand,
    .locale-trigger,
    .search-form,
    .nav-links a,
    .nav-account a {
        transition: none;
    }

}