/* AutoHub header-new preview — visible to administrators only, 2026-08-15 */
:root {
    --ahh-text: #282828;
    --ahh-muted: #747474;
    --ahh-accent: #ed561c;
    --ahh-accent-dark: #d9470e;
    --ahh-accent-soft: #fff4ee;
    --ahh-line: #e8e8e8;
    --ahh-surface: #f6f6f6;
    --ahh-white: #fff;
    --ahh-height: 76px;
    --ahh-mobile-height: 62px;
}

body.ah-header-menu-open {
    overflow: hidden;
}

.ah-site-header,
.ah-site-header * {
    box-sizing: border-box;
}

.ah-site-header {
    position: sticky;
    top: 0;
    z-index: 99999;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgba(40, 40, 40, 0.08);
    color: var(--ahh-text);
    background: rgba(255, 255, 255, 0.98) !important;
    font-family: Montserrat, Arial, sans-serif;
    backdrop-filter: blur(14px);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-bar .ah-site-header {
    top: 32px;
}

.ah-site-header.is-scrolled,
.ah-site-header.is-menu-open {
    border-color: transparent;
    box-shadow: 0 7px 24px rgba(31, 32, 34, 0.09);
}

.ah-site-header [hidden] {
    display: none !important;
}

.ah-site-header a {
    color: inherit;
    text-decoration: none;
}

.ah-site-header button {
    margin: 0;
    border: 0;
    font: inherit;
}

.ah-header__bar {
    position: relative;
    width: 100%;
    background: var(--ahh-white);
}

.ah-header__inner {
    position: relative;
    display: flex;
    width: min(1240px, calc(100% - 32px));
    min-height: var(--ahh-height);
    margin: 0 auto;
    align-items: center;
    gap: 24px;
}

.ah-header__brand,
.ah-header__logo-link,
.ah-header__logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ah-header__brand {
    flex: 0 0 auto;
}

.ah-header__logo-link {
    border-radius: 6px;
}

.ah-header__logo {
    width: 142px;
    max-width: 142px;
    height: 30px;
    overflow: visible;
}

.ah-header__logo svg,
.ah-header__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ah-header__desktop-nav {
    position: static;
    display: flex;
    min-width: 0;
    margin-left: auto;
    align-items: center;
    gap: 5px;
}

.ah-header__nav-item {
    position: static;
}

.ah-header__nav-trigger,
.ah-header__nav-direct {
    display: inline-flex;
    min-height: 40px;
    padding: 0 12px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 7px;
    color: var(--ahh-text);
    background: transparent;
    cursor: pointer;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    white-space: nowrap;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.ah-header__nav-trigger svg,
.ah-header__mobile-section > button svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.ah-header__nav-item.is-open .ah-header__nav-trigger,
.ah-header__nav-trigger:hover,
.ah-header__nav-direct:hover {
    color: var(--ahh-accent-dark);
    background: var(--ahh-accent-soft);
}

.ah-header__nav-item.is-open .ah-header__nav-trigger svg {
    transform: rotate(180deg);
}

.ah-header__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 20;
    width: min(1080px, calc(100vw - 32px));
    padding: 28px 30px;
    border: 1px solid #dedede;
    border-radius: 20px;
    background: var(--ahh-white);
    box-shadow: 0 15px 45px rgba(28, 29, 31, 0.14);
    transform: translateX(-50%);
    animation: ahh-dropdown-in 0.2s ease both;
}

.ah-header__dropdown::before {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 13px;
    content: '';
}

.ah-header__dropdown-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.98fr);
    gap: 38px;
    align-items: stretch;
}

.ah-header__menu-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    align-content: center;
}

.ah-header__menu-list--three {
    padding-block: 22px;
}

.ah-header__menu-link {
    display: grid;
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    box-sizing: border-box;
    align-items: center;
    border-radius: 10px;
    color: var(--ahh-text);
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.ah-header__menu-link:hover {
    background: var(--ahh-accent-soft);
    transform: translateX(2px);
}

.ah-header__menu-icon {
    display: flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: var(--ahh-accent);
}



.ah-header__menu-link > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.ah-header__menu-link strong {
    color: var(--ahh-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.22;
}

.ah-header__menu-link small {
    color: #4f4f4f;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
}

.ah-header__promo {
    position: relative;
    display: flex;
    height: max-content;
    padding: 28px;
    overflow: hidden;
    border-radius: 20px;
    flex-direction: column;
    color: var(--ahh-text);
    background: var(--ahh-accent-soft);
    transition: background-color 0.18s ease;
}

.ah-header__promo:hover {
    background: #ffede4;
}

.ah-header__promo-title {
    position: relative;
    z-index: 2;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.ah-header__promo-text {
    position: relative;
    z-index: 2;
    max-width: 390px;
    margin-top: 6px;
    color: #8a8a8a;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

.ah-header__promo-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    gap: 10px;
    margin-top: 6px;
    align-items: center;
    align-self: flex-start;
    color: var(--ahh-accent);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.ah-header__promo-link b {
    font-size: 24px;
    font-weight: 400;
    transition: transform 0.18s ease;
}

.ah-header__promo:hover .ah-header__promo-link b {
    transform: translateX(4px);
}

.ah-header__promo-art {
    position: absolute;
    right: 14px;
    bottom: -4px;
    width: 83%;
    height: auto;
    fill: none;
    stroke: #ff8555;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ah-header__promo-art--car {
    right: -2px;
    bottom: -14px;
    width: 94%;
    opacity: 0.8;
}

.ah-header__promo-art--chart {
    right: 18px;
    bottom: 4px;
    width: 76%;
}

.ah-header__promo-art--chart .is-light {
    opacity: 0.25;
}

.ah-header__promo-art--document {
    right: 3px;
    bottom: 4px;
    width: 68%;
}

.ah-header__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
}

.ah-header__quick-link {
    position: relative;
    display: flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.ah-header__quick-link:hover {
    transform: translateY(-1px);
}



.ah-header__compare-link {
    color: var(--ahh-text);
    background: var(--ahh-white);
}

.ah-header__telegram {
    color: var(--ahh-white) !important;
    background: #239bd0;
}

.ah-header__telegram > svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
}

.ah-header__quick-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    display: flex;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ahh-white);
    border-radius: 99px;
    color: var(--ahh-white);
    background: var(--ahh-accent);
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.ah-site-header .ah-header__request {
    display: inline-flex;
    width: auto;
    min-height: 44px;
    height: 44px;
    padding: 3px 3px 3px 14px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    color: var(--ahh-white);
    background: linear-gradient(90deg, #E0571E 0%, #C9440E 100%);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    transition: filter 0.18s ease, transform 0.12s ease;
}

.ah-site-header .ah-header__request:hover {
    color: var(--ahh-white);
    filter: brightness(1.06);
}

.ah-site-header .ah-header__request:active {
    transform: translateY(1px);
}

.ah-site-header .ah-header__request .arrow {
    display: flex;
    width: 36px;
    height: 36px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.13);
}

.ah-site-header .ah-header__request .arrow svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ah-header__menu-toggle,
.ah-header__mobile-menu {
    display: none;
}

.ah-header__logo-link:focus-visible,
.ah-site-header a:focus-visible,
.ah-site-header button:focus-visible {
    outline: 3px solid rgba(237, 86, 28, 0.24);
    outline-offset: 3px;
}

@keyframes ahh-dropdown-in {
    from {
        opacity: 0;
        transform: translate(-50%, -7px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@media (max-width: 1220px) {
    .ah-header__inner {
        gap: 14px;
    }

    .ah-header__desktop-nav {
        gap: 1px;
    }

    .ah-header__nav-trigger,
    .ah-header__nav-direct {
        padding-inline: 9px;
        font-size: 13px;
    }

    .ah-header__logo {
        width: 130px;
        max-width: 130px;
        height: 28px;
    }

    .ah-site-header .ah-header__request {
        padding-left: 11px;
        gap: 10px;
        font-size: 12px;
    }
}

@media (max-width: 1100px) {
    .ah-header__inner {
        min-height: var(--ahh-mobile-height);
    }

    .ah-header__desktop-nav {
        display: none;
    }

    .ah-header__actions {
        margin-left: auto;
    }

    .ah-header__menu-toggle {
        display: flex;
        width: 42px;
        height: 42px;
        padding: 0;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        flex-direction: column;
        gap: 5px;
        color: var(--ahh-text);
        background: var(--ahh-surface);
        cursor: pointer;
        transition: color 0.18s ease, background-color 0.18s ease;
    }

    .ah-header__menu-toggle:hover {
        color: var(--ahh-accent-dark);
        background: var(--ahh-accent-soft);
    }

    .ah-header__menu-toggle > span {
        display: block;
        width: 20px;
        height: 1.5px;
        border-radius: 2px;
        background: currentColor;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .ah-header__menu-toggle[aria-expanded='true'] > span:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
    }

    .ah-header__menu-toggle[aria-expanded='true'] > span:nth-child(2) {
        opacity: 0;
    }

    .ah-header__menu-toggle[aria-expanded='true'] > span:nth-child(3) {
        transform: translateY(-6.5px) rotate(-45deg);
    }

    .ah-header__mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 30;
        display: block;
        width: 100%;
        border-top: 1px solid var(--ahh-line);
        background: var(--ahh-white);
        box-shadow: 0 22px 44px rgba(31, 32, 34, 0.15);
        animation: ahh-mobile-in 0.2s ease both;
    }

    .ah-header__mobile-scroll {
        width: min(720px, 100%);
        max-height: calc(100vh - var(--ahh-mobile-height));
        margin: 0 auto;
        padding: 12px 20px 22px;
        overflow: auto;
        overscroll-behavior: contain;
    }

    .admin-bar .ah-header__mobile-scroll {
        max-height: calc(100vh - var(--ahh-mobile-height) - 32px);
    }

    .ah-header__mobile-nav {
        border-top: 1px solid var(--ahh-line);
    }

    .ah-header__mobile-section {
        border-bottom: 1px solid var(--ahh-line);
    }

    .ah-header__mobile-section > button {
        display: flex;
        width: 100%;
        min-height: 58px;
        padding: 0 4px;
        align-items: center;
        justify-content: space-between;
        color: var(--ahh-text);
        background: transparent;
        cursor: pointer;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.25;
        text-align: left;
    }

    .ah-header__mobile-section > button[aria-expanded='true'] {
        color: var(--ahh-accent-dark);
    }

    .ah-header__mobile-section > button[aria-expanded='true'] svg {
        transform: rotate(180deg);
    }

    .ah-header__mobile-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        padding: 0 0 14px;
        animation: ahh-mobile-links-in 0.18s ease both;
    }

    .ah-header__mobile-links > a,
    .ah-header__mobile-links > button {
        display: flex;
        min-height: 74px;
        padding: 12px 13px;
        border: 0;
        border-radius: 9px;
        flex-direction: column;
        color: var(--ahh-text);
        background: var(--ahh-surface);
        cursor: pointer;
        text-align: left;
    }

    .ah-header__mobile-links > a:hover,
    .ah-header__mobile-links > button:hover {
        background: var(--ahh-accent-soft);
    }

    .ah-header__mobile-links strong {
        color: var(--ahh-text);
        font-size: 13px;
        font-weight: 600;
        line-height: 1.35;
    }

    .ah-header__mobile-links span {
        margin-top: 4px;
        color: var(--ahh-muted);
        font-size: 11px;
        font-weight: 400;
        line-height: 1.4;
    }

    .ah-header__mobile-quick {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding-top: 16px;
    }

    .ah-header__mobile-quick a {
        display: flex;
        min-height: 44px;
        padding: 10px 12px;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        color: var(--ahh-text);
        background: var(--ahh-surface);
        font-size: 12px;
        font-weight: 600;
        text-align: center;
    }

    .ah-header__mobile-quick .counterCompare {
        display: inline-flex;
        min-width: 18px;
        height: 18px;
        margin-left: 5px;
        align-items: center;
        justify-content: center;
        border-radius: 99px;
        color: var(--ahh-white);
        background: var(--ahh-accent);
        font-size: 9px;
    }

    .ah-header__mobile-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        padding-top: 9px;
    }

    .ah-header__mobile-add {
        display: flex;
        width: 100%;
        min-height: 48px;
        padding: 10px 15px;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(237, 86, 28, 0.42);
        border-radius: 8px;
        color: var(--ahh-accent-dark) !important;
        background: var(--ahh-white);
        font-size: 13px;
        font-weight: 600;
        text-align: center;
    }

    .ah-site-header .ah-header__mobile-actions .ah-header__request {
        width: 100%;
        min-height: 48px;
        height: 48px;
        justify-content: space-between;
    }
}

@media (max-width: 782px) {
    .admin-bar .ah-site-header {
        top: 46px;
    }

    .admin-bar .ah-header__mobile-scroll {
        max-height: calc(100vh - var(--ahh-mobile-height) - 46px);
    }
}

@media (max-width: 720px) {
    .ah-header__compare-link {
        display: none;
    }

    .ah-header__logo {
        width: 136px;
        max-width: 136px;
        height: 29px;
    }
}

@media (max-width: 560px) {
    .ah-header__inner {
        width: min(100% - 24px, 1240px);
        gap: 8px;
    }

    .ah-header__actions .ah-header__request {
        display: none;
    }

    .ah-header__quick-link {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .ah-header__menu-toggle {
        width: 40px;
        height: 40px;
    }

    .ah-header__mobile-scroll {
        padding: 10px 12px 16px;
    }

    .ah-header__mobile-section > button {
        min-height: 56px;
        font-size: 15px;
    }

    .ah-header__mobile-links,
    .ah-header__mobile-quick,
    .ah-header__mobile-actions {
        grid-template-columns: 1fr;
    }

    .ah-header__mobile-links > a,
    .ah-header__mobile-links > button {
        min-height: 68px;
    }
}

@media (max-width: 380px) {
    .ah-header__logo {
        width: 124px;
        max-width: 124px;
        height: 27px;
    }
}

@keyframes ahh-mobile-in {
    from { opacity: 0; transform: translateY(-7px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ahh-mobile-links-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .ah-site-header *,
    .ah-site-header *::before,
    .ah-site-header *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
