[hidden] {
    display: none !important;
}

.krf-header {
    position: relative;
    z-index: 1000;
    background: #fff;
    color: var(--krf-text);
    font-family: Inter, Arial, sans-serif;
}

.krf-header a,
.krf-header button,
.krf-mobile-menu a,
.krf-mobile-menu button,
.krf-callback-modal button {
    font-family: inherit;
}

.krf-header svg,
.krf-mobile-menu svg,
.krf-callback-modal svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.krf-header__top {
    height: 57px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.krf-header__top-inner {
    height: 57px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.krf-header__top-menu,
.krf-header__menu,
.krf-mobile-menu__list,
.krf-mobile-menu__extra-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.krf-header__top-menu {
    display: flex;
    align-items: center;
    gap: 26px;
}

.krf-header__top-menu a {
    color: #555;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease;
}

.krf-header__top-menu a:hover {
    color: #0076df;
}

.krf-header__top-right {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
}

.krf-header__top-contacts {
    display: flex;
    align-items: center;
    gap: 17px;
    white-space: nowrap;
}

.krf-header__worktime {
    color: #555;
    font-size: 16px;
    font-weight: 400;
}

.krf-header__top-phone {
    color: #353535;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.krf-header__messengers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.krf-header__messenger {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
}

.krf-header__messenger img {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
}

.krf-header__messenger span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0076df;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.krf-header__messenger svg {
    width: 30px;
    height: 30px;
    stroke: none;
    fill: currentColor;
}

.krf-header__callback {
    min-height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 10px;
    background: #0076df;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.krf-header__callback svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.4;
}

.krf-header__callback:hover {
    background: #0068c5;
}

.krf-header__callback:active,
.krf-header__catalog-btn:active {
    transform: translateY(1px);
}

.krf-header__main {
    background: #fff;
}

.krf-header__main-inner {
    min-height: 82px;
    display: grid;
    grid-template-columns: minmax(360px, 560px) minmax(280px, 399px) auto;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.krf-header__brand {
    display: flex;
    align-items: center;
    gap: 40px;
    min-width: 0;
}

.krf-header__logo,
.krf-mobile-menu__logo {
    flex: 0 0 172px;
    width: 172px;
    min-width: 172px;
    display: inline-flex;
    align-items: center;
    color: #2563eb;
    text-decoration: none;
    line-height: 1;
}

.krf-header__logo img,
.krf-mobile-menu__logo img {
    max-width: 172px;
    max-height: 54px;
    width: auto;
    height: auto;
    display: block;
}

.krf-header__logo-title {
    color: #2563eb;
    font-size: 36px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -0.06em;
    line-height: 1;
    text-transform: none;
}

.krf-header__descriptor {
    width: 282px;
    color: #555;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.15;
}

.krf-header__search {
    width: 399px;
    max-width: 100%;
    justify-self: center;
}

.krf-header__search form,
.krf-mobile-menu__search form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.krf-header__search label,
.krf-mobile-menu__search label {
    flex: 1 1 auto;
    width: 100%;
}

.krf-header__search .screen-reader-text,
.krf-mobile-menu__search .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.krf-header__search input[type="search"],
.krf-mobile-menu__search input[type="search"] {
    width: 100%;
    height: 45px;
    padding: 0 58px 0 16px;
    border: 0;
    border-radius: 10px;
    outline: none;
    background: #eef4ff;
    color: #353535;
    font-size: 16px;
    font-weight: 400;
    box-shadow: none;
}

.krf-header__search input[type="search"]::placeholder,
.krf-mobile-menu__search input[type="search"]::placeholder {
    color: #717171;
    opacity: 1;
}

.krf-header__search input[type="search"]:focus,
.krf-mobile-menu__search input[type="search"]:focus {
    outline: 2px solid rgba(0, 118, 223, 0.18);
    outline-offset: 0;
}

.krf-header__search button,
.krf-header__search input[type="submit"],
.krf-mobile-menu__search button,
.krf-mobile-menu__search input[type="submit"] {
    position: absolute;
    right: 8px;
    top: 4px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: transparent;
    font-size: 0;
    cursor: pointer;
}

.krf-header__search button::before,
.krf-header__search input[type="submit"]::before,
.krf-mobile-menu__search button::before,
.krf-mobile-menu__search input[type="submit"]::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 9px;
    width: 15px;
    height: 15px;
    border: 3px solid #888;
    border-radius: 50%;
}

.krf-header__search button::after,
.krf-header__search input[type="submit"]::after,
.krf-mobile-menu__search button::after,
.krf-mobile-menu__search input[type="submit"]::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 3px;
    background: #888;
    right: 8px;
    bottom: 9px;
    transform: rotate(45deg);
    border-radius: 4px;
}

.krf-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.krf-header__action {
    position: relative;
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.krf-header__action:hover {
    background: rgba(37, 99, 235, 0.16);
}

.krf-header__action svg {
    width: 22px;
    height: 22px;
}

.krf-header__action-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.krf-header__badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.krf-header__nav-row {
    height: 44px;
    background: transparent;
}

.krf-header__nav-shell {
    height: 44px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: #111827;
}

.krf-header__catalog-btn {
    width: 238px;
    height: 44px;
    min-height: 44px;
    padding: 0 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 0 0 238px;
    border: 0;
    border-radius: 10px 0 0 10px;
    background: #0076df;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.krf-header__catalog-btn:hover {
    background: #0068c5;
}

.krf-header__catalog-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.krf-header__nav {
    flex: 1 1 auto;
    min-width: 0;
}

.krf-header__menu {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 60px;
}

.krf-header__menu a {
    height: 44px;
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease;
}

.krf-header__menu a:hover {
    color: #bcdcff;
}

.krf-header__mobile-actions {
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-left: auto;
}

.krf-header__mobile-phone {
    color: #353535;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.krf-header__burger {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: #0076df;
    color: #fff;
    cursor: pointer;
}

.krf-header__catalog-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 50;
    background: #fff;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    border-bottom: 1px solid rgba(17, 24, 39, 0.12);
    box-shadow: 0 24px 50px rgba(17, 24, 39, 0.12);
}

.krf-header__catalog-head {
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.krf-header__catalog-title {
    color: #111827;
    font-size: 20px;
    font-weight: 800;
}

.krf-header__catalog-close {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    color: #111827;
    cursor: pointer;
}

.krf-header__catalog-list {
    padding: 18px 0 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.krf-header__catalog-item {
    min-height: 74px;
    padding: 15px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(17, 24, 39, 0.09);
    border-radius: 16px;
    background: #f8fbff;
    color: #353535;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.krf-header__catalog-item:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 118, 223, 0.28);
    background: #eef4ff;
}

.krf-header__catalog-item-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.krf-header__catalog-item-mark svg {
    width: 15px;
    height: 15px;
}

.krf-header__catalog-item-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.22;
}

.krf-header__catalog-empty {
    grid-column: 1 / -1;
    padding: 18px 0;
    color: #717171;
}

.krf-mobile-menu,
.krf-callback-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.krf-mobile-menu__overlay,
.krf-callback-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 16, 20, 0.48);
}

.krf-mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 100%);
    height: 100%;
    padding: 22px;
    overflow-y: auto;
    background: #fff;
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.18);
}

.krf-mobile-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.krf-mobile-menu__close,
.krf-callback-modal__close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    color: #111827;
    cursor: pointer;
}

.krf-mobile-menu__description {
    margin-top: 14px;
    color: #555;
    font-size: 14px;
    line-height: 1.45;
}

.krf-mobile-menu__search {
    margin-top: 18px;
}

.krf-mobile-menu__section {
    margin-top: 18px;
}

.krf-mobile-menu__catalog-toggle {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 14px;
    background: #0076df;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.krf-mobile-menu__catalog {
    display: grid;
    gap: 8px;
    padding-top: 10px;
}

.krf-mobile-menu__catalog a,
.krf-mobile-menu__list a,
.krf-mobile-menu__extra-list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: #353535;
    text-decoration: none;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.krf-mobile-menu__catalog a {
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: #f8fbff;
    font-size: 15px;
    font-weight: 700;
}

.krf-mobile-menu__nav {
    margin-top: 18px;
}

.krf-mobile-menu__list a {
    font-size: 17px;
    font-weight: 800;
}

.krf-mobile-menu__extra {
    margin-top: 18px;
}

.krf-mobile-menu__extra-list a {
    color: #555;
    font-size: 15px;
    font-weight: 600;
}

.krf-mobile-menu__bottom {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    display: grid;
    gap: 12px;
}

.krf-mobile-menu__worktime {
    color: #555;
    font-size: 14px;
}

.krf-mobile-menu__phone {
    color: #111827;
    font-size: 20px;
    font-weight: 900;
    text-decoration: none;
}

.krf-mobile-menu__messengers {
    display: flex;
    gap: 10px;
}

.krf-mobile-menu__messengers a,
.krf-mobile-menu__callback {
    min-height: 44px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.krf-mobile-menu__callback {
    width: 100%;
    border: 0;
    background: #0076df;
    color: #fff;
    cursor: pointer;
}

.krf-callback-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.krf-callback-modal__content {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    padding: 34px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
}

.krf-callback-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
}

.krf-callback-modal__title {
    padding-right: 50px;
    color: #111827;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
}

.krf-callback-modal__text {
    margin-top: 10px;
    color: #555;
    font-size: 15px;
    line-height: 1.45;
}

.krf-callback-modal__form {
    margin-top: 22px;
}

body.krf-lock {
    overflow: hidden;
}

@media (max-width: 1500px) {
    .krf-header__main-inner {
        gap: 28px;
        grid-template-columns: minmax(330px, 520px) minmax(260px, 399px) auto;
    }

    .krf-header__brand {
        gap: 28px;
    }

    .krf-header__menu {
        padding: 0 42px;
    }
}

@media (max-width: 1280px) {
    .krf-header__descriptor,
    .krf-header__top-contacts {
        display: none;
    }

    .krf-header__main-inner {
        grid-template-columns: 220px minmax(280px, 1fr) auto;
    }

    .krf-header__menu {
        padding: 0 24px;
        gap: 14px;
    }
}

@media (max-width: 1080px) {
    .krf-header__top,
    .krf-header__nav-row,
    .krf-header__search,
    .krf-header__actions {
        display: none;
    }

    .krf-header__main-inner {
        min-height: 72px;
        display: flex;
        gap: 16px;
    }

    .krf-header__mobile-actions {
        display: flex;
    }

    .krf-header__catalog-panel {
        display: none;
    }
}

@media (max-width: 560px) {
    .krf-header__main-inner {
        min-height: 64px;
    }

    .krf-header__logo,
    .krf-mobile-menu__logo {
        width: 136px;
        min-width: 136px;
        flex-basis: 136px;
    }

    .krf-header__logo img,
    .krf-mobile-menu__logo img {
        max-width: 136px;
        max-height: 46px;
    }

    .krf-header__logo-title {
        font-size: 28px;
    }

    .krf-header__mobile-phone {
        display: none;
    }

    .krf-mobile-menu__panel {
        padding: 18px;
    }

    .krf-callback-modal__content {
        padding: 28px 22px;
        border-radius: 18px;
    }

    .krf-callback-modal__title {
        font-size: 24px;
    }
}

/* v4 fixes: separate header logo, mobile quick icons, visible top-bar menu in burger, social icons instead of labels */
.krf-footer .krf-container,
.krf-header .krf-container {
    width: min(100% - var(--krf-side), var(--krf-container));
}

.krf-header__mobile-social,
.krf-header__mobile-call {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    text-decoration: none;
}

.krf-header__mobile-social img {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
}

.krf-header__mobile-social span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0076df;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.krf-header__mobile-call svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}

.krf-mobile-menu__extra-title {
    margin-bottom: 6px;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.krf-mobile-menu__messengers {
    align-items: center;
    flex-wrap: wrap;
}

.krf-mobile-menu__messenger {
    width: 34px;
    height: 34px;
    min-height: 34px !important;
    padding: 0 !important;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    background: #eef4ff !important;
    color: #2563eb !important;
    text-decoration: none;
}

.krf-mobile-menu__messenger img {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
}

.krf-mobile-menu__messenger span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0076df;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 1080px) {
    .krf-header__mobile-actions {
        display: flex;
        gap: 8px;
    }
}

@media (max-width: 560px) {
    .krf-header__mobile-actions {
        gap: 6px;
    }

    .krf-header__mobile-social,
    .krf-header__mobile-call,
    .krf-header__burger {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .krf-header__mobile-social img {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 380px) {
    .krf-header__mobile-social:nth-child(2) {
        display: none;
    }
}


/* Header icon fixes v1.0.17 */
.krf-header__search button::before,
.krf-header__search input[type="submit"]::before,
.krf-mobile-menu__search button::before,
.krf-mobile-menu__search input[type="submit"]::before {
    content: '';
    position: absolute;
    left: 50% !important;
    top: 50% !important;
    width: 22px !important;
    height: 22px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: url('../icons/header-search.svg') center / contain no-repeat !important;
    transform: translate(-50%, -50%) !important;
}

.krf-header__search button::after,
.krf-header__search input[type="submit"]::after,
.krf-mobile-menu__search button::after,
.krf-mobile-menu__search input[type="submit"]::after {
    content: none !important;
    display: none !important;
}

.krf-header__catalog-icon .krf-icon-svg,
.krf-header__action .krf-icon-svg {
    width: 22px;
    height: 22px;
    display: block;
}

.krf-header__catalog-icon .krf-icon-svg {
    width: 14px;
    height: 14px;
}

.krf-header__action .krf-icon-svg *,
.krf-header__catalog-icon .krf-icon-svg * {
    vector-effect: non-scaling-stroke;
}

.krf-header__catalog-icon .krf-icon-img,
.krf-header__action .krf-icon-img {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}

.krf-header__catalog-icon .krf-icon-img {
    width: 14px;
    height: 14px;
}

/* Header catalog category thumbnails */
.krf-header__catalog-item {
    justify-content: center;
    text-align: center;
}

.krf-header__catalog-item.has-image {
    justify-content: flex-start;
    text-align: left;
}

.krf-header__catalog-item-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.krf-header__catalog-item:not(.has-image) .krf-header__catalog-item-name {
    width: 100%;
}
