/* Reference header inspired by nsk.prabo.ru */

.prabo-header-top {
    display: none;
}

.site-header--prabo-nav .prabo-header-main {
    display: none;
}

.site-header--classic .header-nav-shell {
    display: none;
}

.site-header-shell {
    display: flex;
    flex-direction: column;
    overflow: visible;
    box-shadow: none;
}

.header-meta {
    order: 1;
}

.site-header--classic {
    order: 2;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.24s ease;
}

.site-header--prabo-nav {
    order: 3;
    position: relative;
    z-index: 8;
    transform: translateY(0);
    transition: transform 0.24s ease, box-shadow 0.2s ease;
}

.site-header-shell.is-menu-compact {
    pointer-events: none;
}

.site-header-shell.is-menu-compact .header-meta,
.site-header-shell.is-menu-compact .site-header--prabo-nav {
    pointer-events: auto;
}

.site-header-shell.is-menu-compact .site-header--classic {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.site-header-shell.is-menu-compact .site-header--prabo-nav {
    transform: translateY(calc(-1 * var(--site-classic-header-height, 0px)));
    box-shadow: 0 14px 28px rgba(245, 122, 31, 0.22);
}

.prabo-header-shell {
    width: min(calc(100% - 18px), 2020px);
    margin: 0 auto;
    background: transparent;
}

.prabo-header-shell > .prabo-header-main,
.prabo-header-shell > .prabo-nav-shell,
.prabo-header-shell > .prabo-nav-shell > .prabo-nav {
    width: 100%;
}

.prabo-header-top {
    background: #ffffff;
    border-bottom: 1px solid #ececec;
}

.prabo-header-top__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 46px;
}

.prabo-top-links {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.prabo-top-links__item {
    position: relative;
}

.prabo-top-links__item > a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 16px;
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
    border-radius: 4px;
}

.prabo-top-links__item.is-accent > a {
    background: linear-gradient(180deg, var(--accent-strong) 0%, var(--accent) 48%, var(--accent-2) 100%);
    color: #fff;
}

.prabo-top-links__item > a:hover,
.prabo-top-links__item > a:focus-visible {
    background: rgba(245, 122, 31, 0.08);
}

.prabo-top-links__item.is-accent > a:hover,
.prabo-top-links__item.is-accent > a:focus-visible {
    background: linear-gradient(180deg, #ff8a2b 0%, #f57a1f 48%, #e56211 100%);
    color: #fff;
}

.prabo-top-dropdown,
.prabo-nav-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    z-index: 90;
    display: grid;
    gap: 2px;
    min-width: 280px;
    padding: 12px;
    border: 1px solid #dfdfdf;
    background: #fff;
    box-shadow: 0 22px 36px rgba(0, 0, 0, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.prabo-top-links__item:hover .prabo-top-dropdown,
.prabo-top-links__item:focus-within .prabo-top-dropdown,
.prabo-top-links__item.is-open .prabo-top-dropdown,
.prabo-nav__item.is-hover-open .prabo-nav-dropdown,
.prabo-nav__item:focus-within .prabo-nav-dropdown,
.prabo-nav__item.is-open .prabo-nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.prabo-top-dropdown a,
.prabo-nav-dropdown a {
    display: block;
    padding: 10px 12px;
    color: #232323;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    border-radius: 4px;
}

.prabo-top-dropdown a:hover,
.prabo-top-dropdown a:focus-visible,
.prabo-nav-dropdown a:hover,
.prabo-nav-dropdown a:focus-visible {
    background: rgba(245, 122, 31, 0.08);
    color: var(--accent);
}

.prabo-login-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #111;
    font-size: 15px;
    font-weight: 600;
}

.prabo-login-link::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 2px;
    box-sizing: border-box;
    transform: translateY(1px);
}

.prabo-header-main {
    display: grid;
    grid-template-columns: minmax(220px, 290px) minmax(240px, 1fr) auto auto;
    align-items: center;
    gap: 24px;
    padding-top: 18px;
    padding-bottom: 18px;
    background: transparent;
}

.prabo-brand-row {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.prabo-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 168px;
    min-height: 64px;
    flex: 0 0 auto;
}

.prabo-brand img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.prabo-city-box {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.prabo-city-box__eyebrow {
    color: #262626;
    font-size: 13px;
    font-weight: 700;
}

.prabo-city-box__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.prabo-city-box__link::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.prabo-search {
    display: flex;
    align-items: stretch;
    min-width: 0;
    max-width: 420px;
    width: 100%;
    border: 1px solid #d8d8d8;
    border-radius: 3px;
    overflow: hidden;
    background: #fff;
}

.prabo-search input {
    width: 100%;
    min-width: 0;
    padding: 0 16px;
    border: 0;
    color: #252525;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.prabo-search input::placeholder {
    color: #8a8a8a;
}

.prabo-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    border: 0;
    background: #fff;
    cursor: pointer;
}

.prabo-search__icon {
    position: relative;
    width: 18px;
    height: 18px;
    border: 3px solid #171717;
    border-radius: 50%;
    box-sizing: border-box;
}

.prabo-search__icon::after {
    content: "";
    position: absolute;
    right: -7px;
    bottom: -5px;
    width: 9px;
    height: 3px;
    background: #171717;
    transform: rotate(45deg);
    border-radius: 999px;
}

.prabo-phones {
    display: flex;
    align-items: stretch;
    gap: 22px;
}

.prabo-phone-card {
    display: grid;
    grid-template-columns: 38px auto;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    gap: 4px;
    color: #171717;
    white-space: nowrap;
}

.prabo-phone-card::before {
    content: "•";
    position: absolute;
    opacity: 0;
}

.prabo-phone-card__number {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.1;
}

.prabo-phone-card__note {
    color: #696969;
    font-size: 13px;
    font-weight: 600;
}

.prabo-phone-card.contact-icon-link::before {
    content: "";
    position: static;
    opacity: 1;
    grid-row: 1 / span 2;
    align-self: center;
}

.prabo-phone-card__number,
.prabo-phone-card__note {
    grid-column: 2;
}

.prabo-header-actions {
    display: flex;
    justify-content: flex-end;
}

.prabo-call-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 28px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    background: #fff;
    transition: background 0.18s ease, color 0.18s ease;
}

.prabo-call-button:hover,
.prabo-call-button:focus-visible {
    background: var(--accent);
    color: #fff;
}

.prabo-nav-shell {
    width: 100%;
    background: linear-gradient(180deg, var(--accent-strong) 0%, var(--accent) 48%, var(--accent-2) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 239, 226, 0.18),
        0 12px 24px rgba(245, 122, 31, 0.18);
    overflow: visible;
}

.prabo-nav {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--prabo-nav-columns, 8), minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    min-height: 60px;
    overflow: visible;
}

.prabo-nav__item {
    position: relative;
    min-width: 0;
    z-index: 2;
}

.prabo-nav__item > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 60px;
    padding: 10px 14px;
    color: #fff;
    font-size: clamp(14px, 0.9vw, 16px);
    font-weight: 700;
    line-height: 1.18;
    text-align: center;
    white-space: normal;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
    transition: background 0.18s ease;
}

.prabo-nav__item:last-child > a {
    border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.prabo-nav__item > a:hover,
.prabo-nav__item > a:focus-visible {
    background: rgba(245, 122, 31, 0.18);
    color: #fff;
}

.prabo-nav__item.is-catalog > a {
    justify-content: flex-start;
    text-align: left;
}

.prabo-burger {
    display: inline-grid;
    gap: 3px;
    width: 20px;
    flex: 0 0 auto;
}

.prabo-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.prabo-nav__caret {
    width: 7px;
    height: 7px;
    margin-top: -2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.prabo-nav__toggle {
    display: none;
}

.prabo-nav-dropdown {
    min-width: 300px;
    max-width: 360px;
    z-index: 1200;
}

.prabo-nav-dropdown a {
    font-size: 15px;
}

.prabo-nav__item--mega {
    position: static;
}

.prabo-nav-dropdown--mega {
    left: 0;
    right: 0;
    top: 100%;
    min-width: 0;
    max-width: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 24px;
    padding: 26px 24px 30px;
    border-top: 0;
}

.prabo-nav-dropdown--mega .prabo-nav-mega-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-width: 0;
    padding: 6px 8px;
    border-radius: 10px;
}

.prabo-nav-dropdown--mega .prabo-nav-mega-card:hover,
.prabo-nav-dropdown--mega .prabo-nav-mega-card:focus-visible {
    background: rgba(245, 122, 31, 0.08);
    color: var(--accent);
}

.prabo-nav-mega-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(180deg, #fafafa 0%, #ededed 100%);
    overflow: hidden;
}

.prabo-nav-mega-card__media.is-empty::before {
    content: "";
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(177, 17, 22, 0.08);
}

.prabo-nav-mega-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.prabo-nav-mega-card__title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}
