/* MEGAMART header redesign — visual stage 1 */
:root {
    --mm-brand: #0046be;
    --mm-brand-light: #0040b1;
    --mm-brand-dark: #0046be;
    --mm-yellow: #ffd600;
    --mm-ink: #17212b;
    --mm-muted: #667085;
    --mm-line: #e7e9ee;
    --mm-soft: #f5f6f8;
    --mm-white: #fff;
    --mm-nav-soft: #e6f1ff;
}

html body,
html body * {
    letter-spacing: 0 !important;
}

html body,
html body button,
html body input,
html body select,
html body textarea,
html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6,
html body b,
html body strong {
    font-family: 'RobotoAz', Arial, sans-serif;
}

header { background: var(--mm-white); }
#header-top { display: none !important; }

.mm-utility-bar {
    min-height: 36px;
    background: #0050dd;
    border-top: 2px solid var(--mm-yellow);
    color: var(--mm-white);
}

.mm-utility-inner,
.mm-utility-left,
.mm-utility-right,
.mm-main-header,
.mm-header-actions,
.mm-header-action {
    display: flex;
    align-items: center;
}

.mm-utility-inner,
.mm-main-header {
    width: calc(100% - 30px);
    max-width: 1500px;
    margin-right: auto;
    margin-left: auto;
}

.mm-utility-inner { min-height: 34px; justify-content: space-between; }
.mm-utility-left, .mm-utility-right { gap: 18px; }

.mm-utility-button,
.mm-pickup-link,
.mm-phone,
.mm-utility-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--mm-white);
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
}

.mm-utility-button,
.mm-phone,
.mm-utility-link {
    display: inline-flex;
    align-items: center;
    height: 34px;
}

.mm-utility-button:hover,
.mm-utility-button:focus,
.mm-phone:hover,
.mm-phone:focus,
.mm-utility-link:hover,
.mm-utility-link:focus {
    color: var(--mm-yellow);
    text-decoration: none;
    outline: none;
}

.mm-utility-button .fa-map-marker,
.mm-pickup-link .fa,
.mm-phone .fa {
    margin-right: 6px;
    color: var(--mm-yellow);
    font-size: 14px;
}

.mm-chevron { margin-left: 7px; }
.mm-pickup-link,
.mm-utility-link { color: var(--mm-white); cursor: default; }

.mm-city-menu {
    width: 360px;
    max-height: 360px;
    padding: 10px;
    overflow-y: auto;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    box-shadow: 0 16px 45px rgba(23, 33, 43, .14);
    column-count: 2;
}

.mm-city-menu > li { break-inside: avoid; }
.mm-city-menu > li > a { padding: 8px 10px; border-radius: 7px; color: var(--mm-ink); }
.mm-city-menu > li > a:hover,
.mm-city-menu > li > a:focus { background: #eef5ff; color: var(--mm-brand); }

.mm-language-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--mm-white);
    font-size: 13px;
    font-weight: 400;
}

.mm-language-button:hover,
.mm-language-button:focus { color: var(--mm-yellow); outline: none; }
.mm-language-icon { font-size: 15px; line-height: 1; }
.mm-language-switcher .header-lang {
    display: none;
    position: absolute;
    z-index: 1050;
    top: 100%;
    right: 0;
    min-width: 175px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--mm-line);
    border-radius: 10px;
    background: var(--mm-white);
    box-shadow: 0 14px 35px rgba(23, 33, 43, .16);
    list-style: none;
}

.mm-language-switcher.open .header-lang { display: block; }
.mm-language-switcher .header-lang li { display: block; margin: 0; padding: 0; }
.mm-language-switcher .header-lang a {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--mm-ink);
    font-size: 0;
    font-weight: 400;
    line-height: 20px;
    text-align: left;
}

.mm-language-switcher .header-lang a::before { font-size: 14px; }
.mm-language-switcher .header-lang a#az::before { content: "Azərbaycan"; }
.mm-language-switcher .header-lang a#ru::before { content: "Русский"; }

.mm-language-switcher .header-lang a:hover,
.mm-language-switcher .header-lang a.selected_lang {
    background: #eef5ff;
    color: var(--mm-brand-dark);
    text-decoration: none;
}

#header-main {
    height: auto;
    min-height: 88px;
    padding: 12px 0;
    background: var(--mm-brand-dark);
    border-bottom: 1px solid var(--mm-line);
}

.mm-main-header { min-height: 60px; gap: 28px; justify-content: space-between; }
#header-main .mm-logo {
    display: flex;
    flex: 0 0 218px;
    align-items: center;
    height: 52px;
}

#header-main .mm-logo img { width: auto; max-width: 205px; max-height: 52px; }
#header-main .mm-search-container {
    position: relative;
    float: none;
    flex: 0 1 760px;
    max-width: 760px;
    width: auto;
    margin: 0;
}

#header-main .mm-search-container .search { width: 100%; margin: 0; padding: 0; }
.mm-search-form { position: relative; display: flex; width: 100%; height: 52px; }

#header-main .mm-search-form #elasticSearch {
    width: 100%;
    height: 52px;
    padding: 0 72px 0 50px;
    border: 2px solid #ebecef;
    border-radius: 26px;
    background: var(--mm-soft);
    box-shadow: none;
    color: var(--mm-ink);
    font-size: 15px;
}

#header-main .mm-search-form #elasticSearch:focus { border-color: var(--mm-yellow); background: var(--mm-white); }
.mm-search-leading {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 20px;
    color: #7b8492;
    font-size: 18px;
    transform: translateY(-50%);
}

#header-main .mm-search-form button {
    position: absolute;
    z-index: 3;
    top: 5px;
    right: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--mm-yellow);
    color: var(--mm-brand-dark);
    font-size: 17px;
}

#header-main .mm-search-form button:hover,
#header-main .mm-search-form button:focus { background: #ffe147; }
.mm-header-actions { flex: 0 0 auto; gap: 12px; }
.mm-header-action {
    flex-direction: column;
    min-width: 68px;
    color: var(--mm-white);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.mm-header-action:hover,
.mm-header-action:focus { color: var(--mm-yellow); text-decoration: none; }
.mm-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    font-size: 19px;
    transition: background .2s ease, color .2s ease;
}

.mm-header-action:hover .mm-action-icon,
.mm-header-action:focus .mm-action-icon { background: rgba(255, 214, 0, .18); }
.mm-action-label {
    max-width: 92px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

header .navbar-default {
    min-height: 52px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--mm-line);
    border-radius: 0;
    background: var(--mm-nav-soft);
    box-shadow: none;
}

header .navbar-default .container {
    width: calc(100% - 30px);
    max-width: 1500px;
    padding-right: 0;
    padding-left: 0;
}

header .navbar-default .navbar-nav > li > a {
    margin: 6px 0;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--mm-white);
    color: var(--mm-ink);
    font-size: 13px;
    font-weight: 400;
}

header .navbar-default .navbar-nav > li > a:hover,
header .navbar-default .navbar-nav > li > a:focus {
    background: var(--mm-white);
    color: var(--mm-brand);
}
header .navbar-default .resize_category .category_list > a.categories-button-new {
    min-width: 190px;
    margin: 6px 14px 6px 0;
    padding: 11px 20px;
    border-radius: 10px;
    background: var(--mm-yellow);
    color: var(--mm-brand-dark);
    font-weight: 700;
}

header .navbar-default .resize_category .category_list > a.categories-button-new:hover,
header .navbar-default .resize_category .category_list.open > a.categories-button-new {
    background: #ffe147;
    color: var(--mm-brand-dark);
}

header .navbar-default .categories-button-new .glyphicon { margin-right: 9px; }
header .navbar-default #main_category_menu {
    margin-top: 0;
    border: 1px solid var(--mm-line);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 18px 42px rgba(23, 33, 43, .13);
}

@media (min-width: 768px) {
    header .navbar-default .resize_category.isHome,
    header .navbar-default .resize_category.isHome .category_list,
    header .navbar-default .resize_category.isNotHome,
    header .navbar-default .resize_category.isNotHome .category_list {
        width: auto;
    }

    header .navbar-default .resize_category {
        float: left;
        margin: 0;
    }

    header .navbar-default .isHome #main_category_menu,
    header .navbar-default .isNotHome #main_category_menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 320px;
        padding: 8px 0;
    }

    header .navbar-default .category_list.open #main_category_menu {
        display: block;
    }

    header .navbar-default .navigation-hidder {
        display: block;
        overflow: hidden;
    }

    header .navbar-default .top_categories {
        display: flex;
        align-items: center;
        gap: 8px;
        float: left !important;
        width: auto;
        height: 51px;
    }

    header .navbar-default .top_categories > li {
        float: none;
    }
}

header .mobile-navbar { border-bottom: 1px solid var(--mm-line); background: var(--mm-white); }

@media (max-width: 1199px) {
    .mm-main-header { gap: 20px; }
    #header-main .mm-logo { flex-basis: 180px; }
    #header-main .mm-logo img { max-width: 170px; }
    .mm-header-actions { gap: 5px; }
    .mm-header-action { min-width: 58px; }
    .mm-action-label { display: none; }
}

@media (max-width: 767px) {
    .mm-utility-bar { border-top-width: 2px; }
    .mm-utility-inner {
        width: calc(100% - 92px);
        min-height: 42px;
        padding: 0;
    }
    .mm-utility-left, .mm-utility-right { gap: 12px; }
    .mm-pickup-link, .mm-phone { display: none; }
    .mm-city-menu { width: calc(100vw - 92px); column-count: 2; }
    #header-main { min-height: 126px; padding: 12px 0 14px; }
    .mm-main-header {
        display: grid;
        width: calc(100% - 92px);
        grid-template-columns: 1fr auto;
        gap: 10px 14px;
        padding: 0;
    }

    #header-main .mm-logo { width: auto; height: 42px; }
    #header-main .mm-logo img { max-width: 145px; max-height: 40px; }
    .mm-header-actions { justify-content: flex-end; }
    .mm-header-action { min-width: 38px; }
    .mm-action-icon { width: 36px; height: 36px; margin: 0; font-size: 17px; }
    #header-main .mm-search-container { grid-column: 1 / -1; }
    .mm-search-form,
    #header-main .mm-search-form #elasticSearch { height: 48px; }
    #header-main .mm-search-form #elasticSearch { padding-right: 58px; border-radius: 24px; }
    #header-main .mm-search-form button { top: 4px; right: 4px; width: 40px; height: 40px; }
    header .mobile-navbar { padding: 8px 46px; }
    header .mobile-navbar .navbar-nav { margin: 0; }
    header .mobile-navbar .category_list > a.categories-button-new {
        display: block;
        padding: 13px 18px;
        border-radius: 10px;
        background: var(--mm-yellow);
        color: var(--mm-brand-dark);
        font-weight: 700;
    }
}
