/* impeccable-disable overused-font: Montserrat - фирменный шрифт заголовков metallon.kz, берём с сайта 1:1 */
/* ===== Шапка и каталог metallon.kz (IPROD, 10.2026) ===== */
.mh {
    --mh-navy: #223E58;
    --mh-navy-dark: #18304A;
    --mh-gold: #F0A500;
    --mh-ink: #1A1A2E;
    --mh-muted: #5B6470;
    --mh-line: #DDE2E8;
    --mh-soft: #F2F5F8;
    --mh-radius: 4px;
    --mh-wrap: 1280px;
    position: relative;
    z-index: 1000;
    font-family: "Onest", -apple-system, sans-serif;
    color: var(--mh-ink);
    background: #fff;
}
.mh *, .mh *::before, .mh *::after { box-sizing: border-box; }
.mh a { text-decoration: none; color: inherit; }
.mh button { font: inherit; cursor: pointer; }
.mh svg { display: block; flex-shrink: 0; }
.mh-wrap { max-width: var(--mh-wrap); margin: 0 auto; padding: 0 20px; }

/* --- Верхняя строка --- */
.mh-top { background: var(--mh-navy); color: #DCE4EC; font-size: 13px; line-height: 1.3; }
.mh-top .mh-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 36px; padding-top: 8px; padding-bottom: 8px; }
.mh-top__info { display: flex; gap: 24px; }
.mh-top__info a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.mh-top__nav { display: flex; gap: 22px; }
.mh-top__nav a { color: #fff; font-weight: 500; }
.mh-top__nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Основная строка --- */
.mh-main { border-bottom: 1px solid var(--mh-line); background: #fff; }
.mh-main .mh-wrap { display: flex; align-items: center; gap: 20px; min-height: 84px; }
.mh-logo { display: flex; align-items: center; flex-shrink: 0; }
.mh-logo img { display: block; height: 50px; width: auto; }

.mh .mh-cat-btn {
    display: inline-flex; align-items: center; gap: 10px;
    height: 48px; padding: 0 22px;
    border: 0; border-radius: var(--mh-radius);
    background: var(--mh-navy); color: #fff;
    font-family: "Montserrat", sans-serif; font-size: 15px; font-weight: 700; letter-spacing: 0;
    transition: background-color .2s;
}
.mh .mh-cat-btn:hover, .mh .mh-cat-btn[aria-expanded="true"] { background: var(--mh-navy-dark); }
.mh-cat-btn .mh-ic-close { display: none; }
.mh-cat-btn[aria-expanded="true"] .mh-ic-grid { display: none; }
.mh-cat-btn[aria-expanded="true"] .mh-ic-close { display: block; }

.mh-search { position: relative; flex: 1 1 auto; min-width: 0; display: flex; }
.mh .mh-search input {
    /* !important: поля ввода на сайте перекрашивают стили Elementor и WooCommerce */
    width: 100% !important; height: 48px !important; margin: 0 !important;
    padding: 0 52px 0 16px !important;
    border: 1px solid transparent !important; border-radius: var(--mh-radius) !important;
    background: var(--mh-soft) !important; color: var(--mh-ink) !important;
    font: 400 15px/1 "Onest", sans-serif !important;
    box-shadow: none !important; outline: none !important;
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.mh .mh-search input::placeholder { color: #8A929B; }
.mh .mh-search input:focus { border-color: var(--mh-navy) !important; background: #fff !important; box-shadow: 0 0 0 3px rgba(34,62,88,.14) !important; }
.mh .mh-search button {
    position: absolute; top: 0; right: 0; width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border: 0; background: transparent; color: var(--mh-navy); padding: 0;
}

.mh-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex-shrink: 0; }
.mh-phone { font-family: "Montserrat", sans-serif; font-size: 19px; font-weight: 700; line-height: 1.15; color: var(--mh-ink); white-space: nowrap; }
.mh-phone:hover { color: var(--mh-navy); }
.mh .mh-callback {
    border: 0; background: none; padding: 0;
    color: var(--mh-navy); font-size: 14px; font-weight: 500;
    text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px;
}
.mh .mh-callback:hover { text-decoration-style: solid; }

.mh-msg { display: flex; gap: 8px; flex-shrink: 0; }
.mh-msg a {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--mh-line); border-radius: var(--mh-radius);
    color: var(--mh-navy); transition: border-color .2s, color .2s;
}
.mh-msg a:hover { border-color: var(--mh-navy); }
.mh-msg .mh-wa:hover { color: #1DA851; }
.mh-msg .mh-tg:hover { color: #229ED9; }

.mh .mh-icon-btn { display: none; }

/* --- Каталог (мега-меню) --- */
.mh-mega {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--mh-line);
    box-shadow: 0 18px 32px -12px rgba(26,26,46,.22);
}
.mh-mega[hidden] { display: none; }
.mh-mega__in { display: grid; grid-template-columns: 300px minmax(0, 1fr); max-height: calc(100vh - 140px); }
.mh-mega__groups { list-style: none; margin: 0; padding: 12px 16px 12px 0; border-right: 1px solid var(--mh-line); overflow-y: auto; }
.mh-mega__groups li { margin: 0; }
.mh-mega__groups a {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-left: -12px; padding: 10px 14px 10px 12px; border-radius: var(--mh-radius);
    font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--mh-ink);
    transition: background-color .15s, color .15s;
}
.mh-mega__groups a svg { color: #A3ABB4; }
.mh-mega__groups a.is-active { background: var(--mh-soft); color: var(--mh-navy); font-weight: 600; }
.mh-mega__groups a.is-active svg { color: var(--mh-gold); }
.mh-mega__groups a:hover { color: var(--mh-navy); }

.mh-mega__panels { overflow-y: auto; padding: 22px 0 28px 36px; }
.mh-mega__panel[hidden] { display: none; }
.mh-mega__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.mh-mega__title { font-family: "Montserrat", sans-serif; font-size: 24px; font-weight: 700; line-height: 1.15; color: var(--mh-ink); letter-spacing: -0.01em; }
.mh-mega__title:hover { color: var(--mh-navy); }
.mh-mega__all { font-size: 14px; font-weight: 500; color: var(--mh-navy); text-decoration: underline !important; text-underline-offset: 3px; }
.mh-mega__cols { columns: 3 220px; column-gap: 36px; }
.mh-mega__item { break-inside: avoid; padding-bottom: 14px; }
.mh-mega__item > a { display: inline-block; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--mh-ink); }
.mh-mega__item > a:hover, .mh-mega__sub a:hover { color: var(--mh-navy); text-decoration: underline; text-underline-offset: 3px; }
.mh-mega__sub { list-style: none; margin: 6px 0 0; padding: 0; }
.mh-mega__sub li { margin: 0 0 4px; }
.mh-mega__sub a { font-size: 14px; line-height: 1.35; color: var(--mh-muted); }
.mh-mega__empty { font-size: 15px; color: var(--mh-muted); }

.mh-backdrop { position: fixed; inset: 0; z-index: 999; background: rgba(26,26,46,.38); }
.mh-backdrop[hidden] { display: none; }

/* --- Мобильная панель каталога --- */
.mh-drawer { position: fixed; inset: 0; z-index: 1001; background: #fff; display: flex; flex-direction: column; }
.mh-drawer[hidden] { display: none; }
.mh-drawer__head { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--mh-line); }
.mh-drawer__title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Montserrat", sans-serif; font-size: 18px; font-weight: 700; }
.mh .mh-drawer__back, .mh .mh-drawer__close { position: relative; z-index: 1; }
.mh .mh-drawer__back, .mh .mh-drawer__close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; color: var(--mh-ink); padding: 0; }
.mh .mh-drawer__back[hidden] { display: none; }
.mh-drawer__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mh-drawer__list { list-style: none; margin: 0; padding: 4px 0; }
.mh-drawer__list li { margin: 0; border-bottom: 1px solid var(--mh-soft); }
.mh-drawer__list a, .mh .mh-drawer__list button {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
    min-height: 52px; padding: 12px 16px; border: 0; background: none; text-align: left;
    font-size: 16px; font-weight: 500; line-height: 1.3; color: var(--mh-ink);
}
.mh-drawer__list svg { color: #A3ABB4; }
.mh-drawer__list .mh-drawer__all { color: var(--mh-navy); font-weight: 600; }
.mh-drawer__list .is-sub a { min-height: 44px; padding-left: 32px; font-size: 15px; color: var(--mh-muted); }
.mh-drawer__foot { padding: 16px; border-top: 1px solid var(--mh-line); display: grid; gap: 10px; }
.mh-drawer__foot .mh-phone { font-size: 20px; }
.mh-drawer__nav { list-style: none; margin: 0; padding: 4px 0; }

body.mh-lock { overflow: hidden; }

/* --- Планшет --- */
@media (max-width: 1180px) {
    .mh-top__info span:nth-child(2) { display: none; }
    .mh-msg { display: none; }
}
/* --- Телефон --- */
@media (max-width: 860px) {
    .mh-top { display: none; }
    .mh-main .mh-wrap { flex-wrap: wrap; gap: 10px 8px; min-height: 0; padding: 10px 16px 12px; }
    .mh-logo { margin-right: auto; }
    .mh-logo img { height: 40px; }
    .mh-contact { display: none; }
    .mh .mh-icon-btn {
        display: flex; align-items: center; justify-content: center;
        width: 44px; height: 44px; border: 1px solid var(--mh-line); border-radius: var(--mh-radius);
        background: #fff; color: var(--mh-navy); padding: 0;
    }
    .mh-main .mh-wrap::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
    .mh .mh-cat-btn { order: 3; height: 44px; padding: 0 16px; font-size: 14px; }
    .mh-search { order: 4; flex: 1 1 0; }
    .mh .mh-search input { height: 44px; font-size: 16px; }
    .mh .mh-search button { width: 44px; height: 44px; }
    .mh-mega { display: none !important; }
}

/* Кнопки шапки: Hello Elementor и набор Elementor красят button:hover/:focus, возвращаем свои состояния */
.mh .mh-drawer__back:hover, .mh .mh-drawer__back:focus,
.mh .mh-drawer__close:hover, .mh .mh-drawer__close:focus,
.mh .mh-drawer__list button:hover, .mh .mh-drawer__list button:focus,
.mh .mh-search button:hover, .mh .mh-search button:focus,
.mh .mh-callback:hover, .mh .mh-callback:focus { background: transparent; color: inherit; }
.mh .mh-drawer__close:hover, .mh .mh-drawer__back:hover { background: var(--mh-soft); }
.mh .mh-icon-btn:hover, .mh .mh-icon-btn:focus { background: #fff; color: var(--mh-navy); border-color: var(--mh-navy); }
.mh .mh-callback:hover, .mh .mh-callback:focus { color: var(--mh-navy); }
.mh .mh-cat-btn:focus { background: var(--mh-navy-dark); color: #fff; }
.mh a:focus-visible, .mh button:focus-visible, .mh input:focus-visible { outline: 2px solid var(--mh-gold); outline-offset: 2px; }
/* Плавающая кнопка мессенджера не должна закрывать открытую панель */
body.mh-lock .chaty, body.mh-lock .chaty-widget, body.mh-lock [id^="chaty-widget"] { display: none !important; }
