.jb-header {
    position: relative;
    z-index: 980;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.jb-header a {
    text-decoration: none;
}

.jb-header__topbar {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #475569;
    font-size: 13px;
}

.jb-header__topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 36px;
}

.jb-header__topbar-contact,
.jb-header__topbar-links {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.jb-header__topbar a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-weight: 600;
    white-space: nowrap;
}

.jb-header__topbar a:hover {
    color: #c2410c;
}

.jb-header__main {
    background: #fff;
}

.jb-header__main-inner {
    display: grid;
    grid-template-columns: minmax(88px, 180px) minmax(120px, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 78px;
}

.jb-header__logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.jb-header__logo img {
    display: block;
    width: min(160px, 100%);
    max-height: 58px;
    object-fit: contain;
}

.jb-header__search {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) 48px;
    align-items: center;
    min-width: 0;
    height: 48px;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.jb-header__search:focus-within {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.jb-header__search-input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111827;
    font-size: 14px;
}

.jb-header__search-input {
    min-width: 0;
    padding: 0 14px;
}

.jb-header__search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    background: #f59e0b;
    color: #fff;
    cursor: pointer;
}

.jb-header__search-button:hover {
    background: #d97706;
}

.jb-header__actions {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.jb-header__action {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 58px;
    min-height: 58px;
    padding: 6px 4px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font-weight: 600;
    line-height: 1.1;
    cursor: pointer;
}

.jb-header__action-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.jb-header__action-text {
    display: block;
    color: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.jb-header__action:hover {
    border-color: #f59e0b;
    color: #c2410c;
}

.jb-header__cart-icon {
    position: relative;
}

.jb-header__cart .items__count {
    position: absolute;
    top: -10px;
    right: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.jb-header__more {
    position: relative;
}

.jb-header__more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    padding: 8px 0;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 1006;
}

.jb-header__more.is-open .jb-header__more-menu,
.jb-header__more:hover .jb-header__more-menu,
.jb-header__more:focus-within .jb-header__more-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.jb-header__more-menu a {
    display: block;
    padding: 10px 14px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.jb-header__more-menu a:hover {
    background: #fff7ed;
    color: #c2410c;
}

.jb-header__nav-wrap {
    position: sticky;
    top: 0;
    background: #111827;
    z-index: 990;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.jb-header__nav-inner {
    display: flex;
    align-items: center;
    min-height: 48px;
}

.jb-header__menu-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.jb-header__nav {
    min-width: 0;
    width: 100%;
}

.jb-header__menu,
.jb-header__dropdown,
.jb-mobile-menu__list,
.jb-mobile-menu__submenu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.jb-header__menu {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.jb-header__menu-item,
.jb-header__dropdown li {
    position: relative;
}

.jb-header__menu-link,
.jb-header__dropdown a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #fff;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.jb-header__menu-link {
    min-height: 48px;
    padding: 0 14px;
}

.jb-header__menu-link:hover,
.jb-header__menu-link.active,
.jb-header__menu-item.is-open > .jb-header__menu-link,
.jb-header__menu-item:hover > .jb-header__menu-link {
    color: #fbbf24;
}

.jb-header__chevron {
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.jb-header__menu-item:hover > .jb-header__menu-link .jb-header__chevron,
.jb-header__menu-item.is-open > .jb-header__menu-link .jb-header__chevron {
    transform: rotate(180deg);
}

.jb-header__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    padding: 8px 0;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 1005;
}

.jb-header__dropdown--nested {
    top: -9px;
    left: 100%;
    transform: translateX(8px);
}

.jb-header__dropdown a {
    min-height: 40px;
    padding: 9px 14px;
    color: #1f2937;
}

.jb-header__dropdown a:hover,
.jb-header__dropdown li:hover > a,
.jb-header__dropdown li.is-open > a {
    background: #fff7ed;
    color: #c2410c;
}

.jb-header__menu-item:hover > .jb-header__dropdown,
.jb-header__menu-item:focus-within > .jb-header__dropdown,
.jb-header__menu-item.is-open > .jb-header__dropdown,
.jb-header__dropdown li:hover > .jb-header__dropdown,
.jb-header__dropdown li:focus-within > .jb-header__dropdown,
.jb-header__dropdown li.is-open > .jb-header__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.jb-header__dropdown li:hover > .jb-header__dropdown--nested,
.jb-header__dropdown li:focus-within > .jb-header__dropdown--nested,
.jb-header__dropdown li.is-open > .jb-header__dropdown--nested {
    transform: translateX(0);
}

.jb-mobile-menu,
.jb-mobile-menu__overlay {
    position: fixed;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.jb-mobile-menu {
    z-index: 1101;
    pointer-events: none;
}

.jb-mobile-menu__overlay {
    z-index: 1100;
    background: rgba(17, 24, 39, 0.48);
}

.jb-mobile-menu__panel {
    width: min(360px, calc(100vw - 38px));
    height: 100%;
    overflow-y: auto;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    pointer-events: auto;
}

body.jb-mobile-menu-open {
    overflow: hidden;
}

body.jb-mobile-menu-open .jb-mobile-menu,
body.jb-mobile-menu-open .jb-mobile-menu__overlay {
    opacity: 1;
    visibility: visible;
}

body.jb-mobile-menu-open .jb-mobile-menu__panel {
    transform: translateX(0);
}

.jb-mobile-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 12px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.jb-mobile-menu__logo img {
    display: block;
    max-width: 145px;
    max-height: 48px;
    object-fit: contain;
}

.jb-mobile-menu__close,
.jb-mobile-menu__row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #111827;
    cursor: pointer;
}

.jb-mobile-menu__close {
    width: 42px;
    height: 42px;
}

.jb-mobile-menu__nav {
    padding: 8px 0 28px;
}

.jb-mobile-menu__list a {
    display: block;
    padding: 12px 18px;
    color: #111827;
    font-weight: 600;
}

.jb-mobile-menu__row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eef0f3;
}

.jb-mobile-menu__row > a {
    flex: 1;
    min-width: 0;
}

.jb-mobile-menu__row button {
    width: 46px;
    height: 46px;
    transition: transform 0.2s ease;
}

.jb-mobile-menu__submenu {
    display: none;
    padding-left: 12px;
    background: #f9fafb;
}

.jb-mobile-menu__list > li > a {
    border-bottom: 1px solid #eef0f3;
}

.jb-mobile-menu__list li.is-open > .jb-mobile-menu__submenu {
    display: block;
}

.jb-mobile-menu__list li.is-open > .jb-mobile-menu__row button {
    transform: rotate(180deg);
}

@media (max-width: 991.98px) {
    .jb-header__topbar-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        padding: 8px 0;
    }

    .jb-header__topbar-contact,
    .jb-header__topbar-links {
        flex-wrap: wrap;
        gap: 8px 14px;
    }

    .jb-header__topbar-contact,
    .jb-header__more {
        display: none;
    }

    .jb-header__main-inner {
        grid-template-columns: minmax(58px, 96px) minmax(0, 1fr) auto;
        gap: 8px;
        min-height: 66px;
    }

    .jb-header__logo img {
        max-height: 44px;
    }

    .jb-header__search {
        grid-template-columns: minmax(0, 1fr) 42px;
        height: 42px;
    }

    .jb-header__search-input {
        padding: 0 10px;
        font-size: 13px;
    }

    .jb-header__search-button {
        width: 42px;
        height: 42px;
    }

    .jb-header__actions {
        gap: 5px;
    }

    .jb-header__action {
        width: 42px;
        min-height: 48px;
        padding: 5px 2px;
    }

    .jb-header__action-text {
        font-size: 10px;
    }

    .jb-header__nav-inner {
        min-height: 44px;
    }

    .jb-header__menu-toggle {
        display: inline-flex;
    }

    .jb-header__nav {
        display: none;
    }
}

@media (max-width: 420px) {
    .jb-header__main-inner {
        grid-template-columns: 54px minmax(0, 1fr) 84px;
        gap: 6px;
    }

    .jb-header__logo img {
        max-height: 38px;
    }

    .jb-header__actions {
        gap: 4px;
    }

    .jb-header__action {
        width: 40px;
    }

    .jb-header__search-input {
        font-size: 12px;
    }
}
