.site-header__middle-inner {
    grid-template-columns: 360px minmax(0, 1fr) auto;
}

.header-contact {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.header-wechat {
    position: relative;
    flex: 0 0 auto;
}

.header-wechat__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 36px;
    padding: 0 8px;
    border: 1px solid #d5ebdd;
    border-radius: 6px;
    background: #f3fbf6;
    color: #17663c;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    list-style: none;
    white-space: nowrap;
    cursor: pointer;
}

.header-wechat__toggle::-webkit-details-marker {
    display: none;
}

.header-wechat__toggle:hover,
.header-wechat[open] .header-wechat__toggle {
    background: #e5f5ec;
}

.header-wechat__toggle:focus-visible {
    outline: 2px solid #17663c;
    outline-offset: 2px;
}

.header-wechat__toggle svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: currentColor;
}

.header-wechat__panel {
    position: absolute;
    z-index: 2;
    top: calc(100% + 8px);
    right: 0;
    width: 224px;
    max-width: calc(100vw - 32px);
    padding: 12px;
    border: 1px solid #e3e7e5;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .14);
    color: #252a28;
    text-align: center;
}

.header-wechat__panel strong {
    font-size: 15px;
    font-weight: 700;
}

.header-wechat__panel img {
    width: 100%;
    height: auto;
    margin: 6px auto;
    padding: 6px;
}

.header-wechat__panel p {
    color: #5b625f;
    font-size: 12px;
}

.mobile-header__actions {
    flex: 0 0 auto;
    gap: 8px;
}

.mobile-header__actions .mobile-phone__text small {
    display: block;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .site-header__middle-inner {
        grid-template-columns: minmax(0, 280px) minmax(150px, 1fr) auto;
        column-gap: 16px;
    }

    .header-contact .header-hotline {
        display: flex;
    }
}

@media (max-width: 760px) {
    .site-header__middle-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        min-height: 0;
        padding: 12px 0;
    }

    .site-header__middle-inner .site-logo {
        width: 100%;
        max-width: 240px;
    }

    .site-header__middle-inner .site-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .header-contact {
        gap: 8px;
    }

    .header-contact .header-hotline {
        gap: 5px;
        padding-left: 0;
        border-left: 0;
    }

    .header-contact .header-hotline strong {
        font-size: 15px;
    }
}

@media (max-width: 380px) {
    .header-contact .header-hotline__icon,
    .mobile-header__actions .mobile-phone svg {
        display: none;
    }
}
