/* ==========================================================================
   Header
   ========================================================================== */

.header,
.header-main-top,
.header-top-bar,
.main-nav {
    width: 100%;
}

.header {
    background: var(--me-surface);
}

/* TOP BAR */

.header-top-bar {
    background: #f8fafc;
    border-bottom: 1px solid var(--me-border);
    font-size: 14px;
}

.header-top-bar .holder,
.header-main-top .holder,
.main-nav .holder {
    max-width: var(--me-container);
    margin: 0 auto;
    padding: 0 var(--me-gutter);
}

.header-top-bar-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 42px;
}

.header-top-bar-flex .icon-wrap,
.header-top-bar-flex > .icon + strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-top-bar-flex .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1f2933;
}

.header-top-bar-flex i,
.header-top-bar-flex svg {
    font-size: 18px;
}

.header-top-bar-flex strong {
    color: #1f2933;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.header-top-bar-flex a {
    color: #64748b;
}

.header-top-bar-flex a:hover {
    color: var(--me-blue);
}

/* MAIN HEADER */

.header-main-top {
    background: #fff;
    border-bottom: 1px solid var(--me-border);
}

.header-main-top .holder {
    min-height: 118px;
    display: flex;
    align-items: center;
}

.header-main-top-right {
    width: 100%;
    display: grid;
    grid-template-columns: 260px minmax(360px, 620px) auto;
    align-items: center;
    gap: 42px;
}

/* LOGO */

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.logo a {
    display: inline-flex;
    align-items: center;
    padding: 0;
}

.logo a img {
    width: auto;
    max-width: 250px;
    max-height: 92px;
    object-fit: contain;
}

/* SEARCH */

.header-search {
    width: 100%;
}

.header-search .searchform,
.searchform {
    display: flex;
    width: 100%;
    max-width: 620px;
    height: 48px;
    margin: 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.header-search .searchform-input,
.searchform .searchform-input,
.header-search input[type="text"],
.header-search input[type="search"] {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 48px;
    padding: 0 18px;
    color: var(--me-text);
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 15px;
}

.header-search .searchform-input::placeholder,
.header-search input[type="text"]::placeholder,
.header-search input[type="search"]::placeholder {
    color: #64748b;
}

.header-search .searchform-button,
.searchform .searchform-button,
.header-search button,
.header-search input[type="submit"] {
    width: 58px;
    min-width: 58px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 0;
    background: var(--me-blue);
    color: #fff !important;
    font-size: 0;
    box-shadow: none;
    transform: none;
    position: relative;
}

.header-search .searchform-button:hover,
.searchform .searchform-button:hover,
.header-search button:hover,
.header-search input[type="submit"]:hover {
    background: var(--me-red);
    transform: none;
    box-shadow: none;
}

.searchform label {
    display: none;
}

/* CTA */

.header-distributor-cta {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 26px;
    background: #c62828;
    color: #fff !important;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.header-distributor-cta:hover {
    background: #e53935;
    color: #fff !important;
}

/* MAIN NAV */

.main-nav {
    background: var(--me-blue);
    box-shadow: 0 8px 20px rgba(14, 95, 178, 0.18);
}

.main-nav .holder {
    min-height: 56px;
    display: flex;
    align-items: center;
}

.header-main-top-left {
    width: 100%;
}

.header-main-top-left > ul {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

.header-main-top-left > ul > li {
    position: relative;
    display: flex;
}

.header-main-top-left > ul > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 56px;
    padding: 0 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase !important;
    letter-spacing: 0.03em;
    border-right: 1px solid rgba(255, 255, 255, 0.16);
    white-space: nowrap;
}

.header-main-top-left > ul > li:first-child > a {
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.header-main-top-left > ul > li > a:hover,
.header-main-top-left > ul > li:hover > a {
    background: #fff;
    color: var(--me-blue);
}

/* DROPDOWN */

.header-main-top-left .sub-menu {
    display: none;
    position: absolute;
    z-index: 9999;
    left: 0;
    top: 100%;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--me-border);
    box-shadow: var(--me-shadow-md);
}

.header-main-top-left li:hover > .sub-menu {
    display: block;
}

.header-main-top-left .sub-menu li {
    position: relative;
    display: block;
    border-bottom: 1px solid var(--me-border);
}

.header-main-top-left .sub-menu li:last-child {
    border-bottom: 0;
}

.header-main-top-left .sub-menu a {
    display: block;
    padding: 11px 16px;
    color: var(--me-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.header-main-top-left .sub-menu a:hover {
    color: var(--me-blue);
    background: var(--me-surface-soft);
}

.header-main-top-left .sub-menu .sub-menu {
    left: 100%;
    top: -1px;
}

/* OLD HEADER CLEANUP */

.header-box {
    width: 100%;
    border-bottom: 1px solid var(--me-border);
}

/* RESPONSIVE */

@media (max-width: 1100px) {
    .header-main-top-right {
        grid-template-columns: 220px minmax(260px, 1fr) auto;
        gap: 24px;
    }

    .logo a img {
        max-width: 210px;
    }
}

@media (max-width: 980px) {
    .header-top-bar-flex {
        flex-wrap: wrap;
        justify-content: center;
        padding: 8px 0;
        text-align: center;
    }

    .header-main-top .holder {
        min-height: auto;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .header-main-top-right {
        grid-template-columns: 1fr;
        gap: 16px;
        justify-items: center;
    }

    .logo a img {
        max-width: 190px;
        max-height: 76px;
    }

    .header-search {
        width: 100%;
        max-width: 620px;
    }

    .header-distributor-cta {
        justify-self: center;
    }

    .header-main-top-left > ul {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .header-main-top-left > ul > li {
        flex: 0 0 auto;
    }
}

@media (max-width: 640px) {
    .header-top-bar-flex {
        flex-direction: column;
        gap: 7px;
    }

    .logo a img {
        max-width: 165px;
        max-height: 64px;
    }

    .header-search .searchform,
    .searchform {
        height: 44px;
    }

    .header-search .searchform-input,
    .searchform .searchform-input,
    .header-search input[type="text"],
    .header-search input[type="search"] {
        min-height: 44px;
        font-size: 14px;
    }

    .header-search .searchform-button,
    .searchform .searchform-button,
    .header-search button,
    .header-search input[type="submit"] {
        height: 44px;
        min-height: 44px;
        width: 52px;
        min-width: 52px;
    }

    .header-distributor-cta {
        width: 100%;
        max-width: 620px;
    }

    .header-main-top-left > ul > li > a {
        min-height: 48px;
        padding: 0 14px;
        font-size: 13px;
    }

    .main-nav .holder {
        min-height: 48px;
    }
}

.header-search {
    width: 100%;
}

.me-search-form {
    display: flex;
    width: 100%;
    max-width: 620px;
    height: 48px;
    margin: 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    overflow: hidden;
}

.me-search-input {
    flex: 1;
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--me-text);
    font-size: 15px;
    box-shadow: none;
}

.me-search-input:focus {
    box-shadow: none;
}

.me-search-submit {
    width: 58px;
    min-width: 58px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 0;
    background: var(--me-blue);
    color: #fff !important;
    box-shadow: none;
    transform: none;
}

.me-search-submit:hover {
    background: var(--me-red);
    transform: none;
    box-shadow: none;
}

.me-search-submit i {
    font-size: 18px;
}