/* =========================================================
   A1 CASH & CARRY
   COMPLETE HEADER.CSS
========================================================= */


/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {

    --header-white: #ffffff;

    --primary: #087f23;

    --primary-dark: #075f1c;

    --primary-light: #e9f8ec;

    --header-text: #1d2939;

    --header-muted: #777777;

}


/* =========================================================
   RESET
========================================================= */

.main-header,
.main-header *,
.main-nav,
.main-nav * {

    box-sizing: border-box;
}


/* =========================================================
   MAIN WHITE HEADER

   IMPORTANT:
   FIXED = ALWAYS VISIBLE
========================================================= */

.main-header {

    position: fixed !important;

    top: 0 !important;

    left: 0 !important;

    right: 0 !important;

    width: 100% !important;

    z-index: 999999 !important;

    background: #ffffff !important;

    margin: 0 !important;

    padding: 0 !important;

    opacity: 1 !important;

    visibility: visible !important;

    transform: none !important;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.08);

}


/* =========================================================
   HEADER TOP
========================================================= */

.header-top {

    min-height: 80px;

    width: 100%;

    display: flex;

    align-items: center;

    gap: 20px;

    padding: 10px 3%;

    background: #ffffff;

    position: relative;

}


/* =========================================================
   LOGO
========================================================= */

.logo-area {

    display: flex;

    align-items: center;

    min-width: 250px;

    text-decoration: none;

    flex-shrink: 0;
}


.logo-a1 {

    font-size: 50px;

    font-weight: 900;

    font-style: italic;

    color: #075f1c;

    line-height: 1;
}


.logo-cart {

    color: var(--primary);

    font-size: 35px;

    margin: 0 8px;
}


.logo-text h1 {

    text-transform: uppercase;

    color: var(--primary);

    font-size: 20px;

    margin: 0;

    line-height: 1.2;
}


.logo-text span {

    display: block;

    font-size: 7px;

    font-weight: 600;

    color: #333333;

    white-space: nowrap;
}


/* =========================================================
   LOCATION
========================================================= */

.location-box {

    display: flex;

    align-items: center;

    gap: 8px;

    min-width: 130px;

    flex-shrink: 0;
}


.location-box > i {

    color: var(--primary);

    font-size: 22px;
}


.location-box small {

    display: block;

    color: var(--header-muted);

    font-size: 10px;
}


.location-box strong {

    font-size: 12px;

    white-space: nowrap;
}


/* =========================================================
   SEARCH
========================================================= */

.search-container {

    flex: 1;

    min-width: 180px;

    height: 46px;

    display: flex;

    border: 2px solid var(--primary);

    border-radius: 8px;

    overflow: hidden;

    background: #ffffff;
}


.search-container select {

    border: none;

    padding: 0 10px;

    background: #f3f7f4;

    outline: none;

    color: #222;

    cursor: pointer;
}


.search-container input {

    flex: 1;

    min-width: 0;

    border: none;

    outline: none;

    padding: 0 15px;

    font-size: 14px;

    background: #ffffff;

    color: #222;
}


.search-container input::placeholder {

    color: #888;
}


.search-container button {

    width: 55px;

    min-width: 55px;

    border: none;

    background: var(--primary);

    color: #ffffff;

    font-size: 17px;

    cursor: pointer;

    transition: background 0.2s ease;
}


.search-container button:hover {

    background: var(--primary-dark);
}


/* =========================================================
   LANGUAGE
========================================================= */

.language-btn {

    border: none;

    background: var(--primary-light);

    color: var(--primary);

    font-weight: 700;

    padding: 10px 12px;

    border-radius: 7px;

    cursor: pointer;

    flex-shrink: 0;
}


.language-btn:hover {

    background: #d8f1dd;
}


/* =========================================================
   HEADER ICON
========================================================= */

.header-icon-btn {

    position: relative;

    width: 40px;

    height: 40px;

    min-width: 40px;

    display: flex;

    justify-content: center;

    align-items: center;

    background: transparent;

    color: var(--header-text);

    font-size: 20px;

    border: none;

    cursor: pointer;

    text-decoration: none;

    flex-shrink: 0;
}


.header-icon-btn:hover {

    color: var(--primary);
}


/* =========================================================
   BADGE
========================================================= */

.badge {

    position: absolute;

    top: 0;

    right: 0;

    width: 17px;

    height: 17px;

    background: #e53935;

    color: #ffffff;

    border-radius: 50%;

    font-size: 9px;

    display: flex;

    justify-content: center;

    align-items: center;

    font-weight: 700;
}


/* =========================================================
   ACCOUNT
========================================================= */

.account-box {

    display: flex;

    align-items: center;

    gap: 8px;

    text-decoration: none;

    color: inherit;

    flex-shrink: 0;
}


.account-box small {

    display: block;

    font-size: 10px;

    color: var(--header-muted);
}


.account-box strong {

    font-size: 13px;

    color: var(--header-text);
}


/* =========================================================
   PROFILE
========================================================= */

.profile-account-box {

    display: flex;

    align-items: center;

    gap: 10px;
}


.header-profile-image {

    width: 42px;

    height: 42px;

    border-radius: 50%;

    object-fit: cover;

    border: 2px solid #e9f8ec;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.12);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}


.profile-account-box:hover
.header-profile-image {

    transform: scale(1.08);

    border-color: var(--primary);
}


/* =========================================================
   CART
========================================================= */

.cart-box {

    display: flex;

    align-items: center;

    gap: 8px;

    text-decoration: none;

    color: inherit;

    flex-shrink: 0;
}


.cart-icon {

    position: relative;

    font-size: 23px;

    color: var(--primary);
}


.cart-icon span {

    position: absolute;

    top: -10px;

    right: -10px;

    width: 18px;

    height: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #e53935;

    color: #ffffff;

    border-radius: 50%;

    font-size: 9px;

    font-weight: 700;
}


.cart-box strong {

    color: var(--header-text);

    font-size: 13px;
}


/* =========================================================
   GREEN NAVBAR

   IMPORTANT:
   NOT STICKY
   IT IS INSIDE FIXED WHITE HEADER
========================================================= */

.main-header .main-nav {

    position: relative !important;

    top: auto !important;

    left: auto !important;

    right: auto !important;

    bottom: auto !important;

    width: 100% !important;

    height: 48px !important;

    min-height: 48px !important;

    max-height: 48px !important;

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 0 3%;

    background: var(--primary);

    color: #ffffff;

    z-index: 100;

    overflow: hidden;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12);

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

    pointer-events: auto;

    transition:
        height 0.25s ease,
        min-height 0.25s ease,
        max-height 0.25s ease,
        opacity 0.25s ease,
        transform 0.25s ease;
}


/* =========================================================
   HIDE ONLY GREEN NAVBAR
========================================================= */

.main-header .main-nav.navbar-hidden {

    height: 0 !important;

    min-height: 0 !important;

    max-height: 0 !important;

    padding-top: 0 !important;

    padding-bottom: 0 !important;

    margin-top: 0 !important;

    margin-bottom: 0 !important;

    opacity: 0 !important;

    visibility: hidden !important;

    transform: translateY(-100%) !important;

    pointer-events: none !important;

    overflow: hidden !important;

    box-shadow: none !important;
}


/* =========================================================
   NAV LEFT
========================================================= */

.nav-left {

    display: flex;

    align-items: center;

    height: 48px;

    gap: 4px;

    flex-wrap: nowrap;

    flex-shrink: 0;
}


/* =========================================================
   NAV LINKS
========================================================= */

.nav-left > a,
.category-menu-btn {

    height: 48px;

    padding: 0 16px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    background: transparent;

    color: #ffffff;

    font-weight: 500;

    white-space: nowrap;

    text-decoration: none;

    border: none;

    cursor: pointer;

    font-size: 14px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


/* =========================================================
   NAV HOVER
========================================================= */

.nav-left > a:hover,
.nav-left > a.active,
.category-menu-btn:hover {

    background: var(--primary-dark);
}


/* =========================================================
   NAV RIGHT
========================================================= */

.nav-right {

    display: flex;

    gap: 20px;

    font-size: 12px;

    align-items: center;
}


/* =========================================================
   MEGA MENU SUPPORT
========================================================= */

.main-header {

    isolation: isolate;
}


.mega-menu {

    position: absolute;

    top: 100%;

    left: 0;

    width: 100%;

    z-index: 10000;
}


/* =========================================================
   HEADER SPACER

   header.js creates this automatically.
========================================================= */

#a1-header-spacer {

    width: 100%;

    height: 0;

    display: block;

    flex-shrink: 0;
}


/* =========================================================
   SITE HEADER
========================================================= */

#site-header {

    position: relative !important;

    width: 100% !important;

    z-index: 999999 !important;

    overflow: visible !important;
}


/* =========================================================
   DARK MODE
========================================================= */

body.dark-mode .main-header {

    background: #101512 !important;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.30);
}


body.dark-mode .header-top {

    background: #101512 !important;
}


body.dark-mode .logo-text span {

    color: #b8c2bb;
}


body.dark-mode .location-box small,
body.dark-mode .account-box small {

    color: #aab5ad;
}


body.dark-mode .account-box strong {

    color: #ffffff;
}


body.dark-mode .header-icon-btn {

    color: #ffffff;
}


body.dark-mode .search-container {

    background: #1a211c;
}


body.dark-mode .search-container select {

    background: #1a211c;

    color: #ffffff;
}


body.dark-mode .search-container input {

    background: #1a211c;

    color: #ffffff;
}


body.dark-mode .search-container input::placeholder {

    color: #aab5ad;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .header-top {

        gap: 12px;
    }


    .logo-area {

        min-width: 210px;
    }


    .logo-a1 {

        font-size: 42px;
    }


    .logo-cart {

        font-size: 30px;

        margin: 0 5px;
    }


    .logo-text h1 {

        font-size: 17px;
    }


    .location-box {

        min-width: 110px;
    }


    .main-header .main-nav {

        overflow-x: auto;

        justify-content: flex-start;

        scrollbar-width: none;
    }


    .main-header .main-nav::-webkit-scrollbar {

        height: 0;
    }


    .nav-left {

        flex-shrink: 0;
    }


    .nav-right {

        display: none;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .header-top {

        min-height: 70px;

        padding: 8px 3%;

        gap: 10px;
    }


    .logo-area {

        min-width: auto;
    }


    .logo-a1 {

        font-size: 38px;
    }


    .logo-cart {

        font-size: 26px;

        margin: 0 5px;
    }


    .logo-text h1 {

        font-size: 15px;
    }


    .logo-text span {

        font-size: 5px;
    }


    .header-profile-image {

        width: 36px;

        height: 36px;
    }


    .main-header .main-nav {

        height: 48px !important;

        min-height: 48px !important;

        max-height: 48px !important;
    }


    .nav-left > a,
    .category-menu-btn {

        padding: 0 12px;

        font-size: 13px;
    }


    .search-container {

        height: 40px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 600px) {

    .header-top {

        gap: 7px;
    }


    .location-box {

        display: none;
    }


    .search-container {

        height: 40px;

        min-width: 100px;
    }


    .search-container select {

        display: none;
    }


    .search-container input {

        padding: 0 8px;

        font-size: 11px;
    }


    .search-container button {

        width: 42px;

        min-width: 42px;

        font-size: 14px;
    }


    .language-btn {

        padding: 8px;

        font-size: 10px;
    }


    .header-icon-btn {

        width: 34px;

        min-width: 34px;

        height: 34px;

        font-size: 17px;
    }


    .account-box > div {

        display: none;
    }


    .cart-box strong {

        display: none;
    }


    .logo-a1 {

        font-size: 30px;
    }


    .logo-cart {

        font-size: 21px;
    }


    .logo-text h1 {

        font-size: 12px;
    }
}


/* =========================================================
   IMPORTANT FINAL OVERRIDES
========================================================= */

/*
   White header is ALWAYS fixed.
*/

.main-header {

    position: fixed !important;

    top: 0 !important;

    left: 0 !important;

    right: 0 !important;

    width: 100% !important;

    z-index: 999999 !important;

    visibility: visible !important;

    opacity: 1 !important;

    transform: none !important;
}


/*
   Green navbar is NEVER sticky.
*/

.main-header .main-nav {

    position: relative !important;

    top: auto !important;

    left: auto !important;

    right: auto !important;

    bottom: auto !important;
}


/*
   Only navbar gets hidden.
*/

.main-header .main-nav.navbar-hidden {

    position: relative !important;

    height: 0 !important;

    min-height: 0 !important;

    max-height: 0 !important;

    opacity: 0 !important;

    visibility: hidden !important;

    transform: translateY(-100%) !important;

    pointer-events: none !important;
}