body {
    padding-top: 0;
}

.header-navbar{
    background-color: var(--white);

    a {
        color: var(--gray-600);
        transition: color 0.3s;

        &:hover {
            color: var(--red-600);
        }
    }

    .header-navbar__top {
        padding: 10px 14px;
        position: relative;
        background-color: var(--white);
        transition: 0.3s;
        font-size: 0.75rem;

        &.is-fixed {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: var(--white);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            z-index: 3;
        }

        @media (max-width: 992px) {
            display: none;
        }

        &:before {
            content: '';
            width: 100%;
            height: 1px;
            background-color: var(--gray-200-47);
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
        }
    }

    .header-navbar__top-content {
        max-width: 1366px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-left: 20px;
        padding-right: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        color: var(--gray-600);

    }

    .header-navbar__top-items {
        display: flex;
        gap: 20px;

        @media (max-width: 768px) {
            width: 100%;
            justify-content: flex-end;
            &:first-child {
                display: none;
            }
        }
    }

    .header-navbar__top-item {
        display: flex;
        align-items: center;

        span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            transition: color 0.3s;
        }

        small {
            width: 100%;
        }


    }

    .header-navbar__top-address {
        display: flex;
        align-items: center;
        gap: 15px;

        svg {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
            fill: var(--red-700);
            stroke: var(--red-700);
        }

        @media (max-width: 1200px) {
            display: none;
        }
    }

    .header-navbar__top_border {
        border-left: 1px solid var(--gray-200-47);
        border-right: 1px solid var(--gray-200-47);
        padding: 0 30px;
        margin: 0 30px;

        @media (max-width: 992px) {
            border-left: 1px solid transparent;
            border-right: 1px solid transparent;
            padding: 0;
            margin: 0;
        }
    }

    .header-navbar__top-item-mail {
        font-size: var(--fz-12);
        font-weight: 500;
        flex-direction: column;
        align-items: flex-start;
        cursor: pointer;
        position: relative;
        white-space: nowrap;

        @media (max-width: 992px) {
            font-size: var(--fz-14);
        }

        &:hover {
            span {
                color: var(--red-600);
            }

            svg {
                fill: var(--red-600);
                stroke: var(--red-600);
            }
        }

        span {
            display: flex;
            align-items: center;
            gap: 5px;
            transition: color 0.3s;
        }

        svg {
            width: 11px;
            height: 10px;
            flex-shrink: 0;
            fill: var(--gray-450);
            stroke: var(--gray-450);
            transition: color 0.3s;
        }

        small {
            color: var(--gray-450);
        }
    }

    .header-navbar__middle {
        display: flex;
        align-items: center;
        gap: 35px;
        padding-bottom: 40px;
        padding-top: 30px;

        @media (max-width: 992px) {
            display: grid;
            gap: 20px;
            grid-template-columns: auto auto 1fr auto auto 30px 32px;
            grid-template-rows: 1fr 1fr;
            padding-top: 20px;
            padding-bottom: 30px;
        }
        @media (max-width: 768px) {
            grid-template-columns: auto auto auto 32px;
            padding-bottom: 0;
        }
        @media (max-width: 576px) {
            grid-template-columns: auto 1fr 32px;
        }
    }

    .header-navbar__logo {
        display: flex;
        gap: 30px;
        align-items: center;
        max-width: 335px;

        @media (max-width: 992px) {
            grid-column: 1/2;
            grid-row: 1;
        }

        svg {
            display: flex;
            width: 107px;
            height: 51px;
            flex-shrink: 0;
        }

        span {
            text-align: left;

            @media (max-width: 1200px) {
                display: none;
            }
        }

        &:hover {
            svg {
                fill: unset;
                stroke: unset;
            }

        }
    }

    #catalog-header {
        position: absolute;
        top: 200px;
        z-index: 999;
        left: 0;
        right: 0;
        max-height: calc(100vh - 160px);
        overflow: hidden;
        overscroll-behavior: contain;
        background-color: var(--white);
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .catalog-header__btn {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 500;
        border-radius: 10px;
        padding: 15px;
        transition: all 0.3s;
        width: 116px;


        @media (max-width: 992px) {
            display: none;
        }

        svg {
            width: 14px;
            height: 13px;
            flex-shrink: 0;
            fill: var(--white);
            stroke: var(--white);
        }
    }

    .js-catalog-toggle {
        .burger-menu__button {
            span {
                background-color: var(--white);
            }
        }


        &.active {
            background-color: var(--red-600);

            span {
                &:nth-child(1) {
                    transform: rotate(45deg) translate(3px, 7px);
                }

                &:nth-child(2) {
                    opacity: 0;
                }

                &:nth-child(3) {
                    transform: rotate(-45deg) translate(3px, -7px);
                }
            }
        }

    }

    .header-navbar__middle-item-mail {
        display: none;

        @media (max-width: 992px) {
            display: flex;
            grid-column: 4/5;
            grid-row: 1;
            margin-left: auto;

        }
        @media (max-width: 768px) {
            grid-column: 3/4;
        }
        @media (max-width: 576px) {
            display: none;
        }
    }

    .header-navbar__search {
        flex: 1;

        @media (max-width: 992px) {
            grid-column: 1/-1;
            grid-row: 2;
        }
    }


    .nav__mobile__icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        display: none;
        align-items: center;
        justify-content: center;

        @media (max-width: 992px) {
            &:first-child {
                display: none;
            }
        }

        svg {
            width: 20px;
            height: 20px;
            fill: var(--gray-400);
            stroke: var(--gray-400);
            transition: all 0.3s;

            &:hover {
                fill: var(--red-600);
                stroke: var(--red-600);
            }

            @media (max-width: 992px) {
                width: 30px;
                height: 30px;
            }
        }
    }

    .burger-menu {
        align-items: center;
        display: none;
        z-index: 98;
        cursor: pointer;

        @media (max-width: 992px) {
            display: flex;
            grid-column: 7/8;
            grid-row: 1;
        }
        @media (max-width: 768px) {
            grid-column: 4/5;
        }
        @media (max-width: 576px) {
            grid-column: 3/4;
        }
    }

    .burger-menu-logo {
        padding: 20px;
        display: none;
        gap: 20px;
        font-weight: 500;
        align-items: center;
        width: 100%;
        flex-direction: column;
        justify-content: center;
        max-width: 335px;

        @media (max-width: 992px) {
            display: flex;
        }


        svg {
            display: flex;
            width: 100%;
            height: 61px;
            flex-shrink: 0;
        }

        span {
            text-align: center;
            color: var(--gray-700);
        }
    }

    .burger-menu__button {
        width: 30px;
        height: 16px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        position: relative;

        span {
            display: block;
            width: 100%;
            height: 2px;
            background-color: var(--red-700);
            transition: all 0.3s ease;
        }

        &.active span {
            background-color: var(--white);

            &:nth-child(1) {
                transform: rotate(45deg) translate(3px, 7px);
            }

            &:nth-child(2) {
                opacity: 0;
            }

            &:nth-child(3) {
                transform: rotate(-45deg) translate(3px, -8px);
            }
        }
    }

    .header-navbar__middle-contacts {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .header-navbar__middle-contact {
        color: var(--gray-400);
        font-weight: 500;
        display: flex;
        flex-direction: column;
        white-space: nowrap;
        margin-left: auto;

        @media (max-width: 992px) {
            grid-column: 3/4;
            grid-row: 1;
        }
        @media (max-width: 768px) {
            grid-column: 2/3;
        }

        a {
            color: var(--red-700);
            font-size: var(--fz-20);
            font-weight: 600;
            transition: color 0.3s;

            @media (max-width: 768px) {
                font-size: var(--fz-16);

            }

            &:hover {
                color: var(--red-600);
            }
        }

        span {
            display: block;

            @media (max-width: 768px) {
                font-size: var(--fz-10);
            }
        }
    }

    .header-navbar__basket {
        display: flex;
        align-items: center;
        flex-direction: column;
        color: var(--gray-600);
        transition: color 0.3s;
        cursor: pointer;

        @media (max-width: 992px) {
            display: none;
        }
        @media (max-width: 768px) {
            display: none;
        }

        svg {
            width: 30px;
            height: 30px;
            stroke: var(--gray-600);

            @media (max-width: 992px) {
                stroke: var(--gray-400);
            }
        }

        &:hover {
            color: var(--red-600);
        }

        span {
            @media (max-width: 992px) {
                display: none;
            }
        }
    }

    .header-navbar__basket-icon {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;


    }
}

.lc-button {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--red-700);
    font-size: 1rem;
    font-weight: 600;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-skip-ink: none;
    text-decoration-thickness: 6.5%; /* 1.04px */
    text-underline-offset: 16.5%; /* 2.64px */
    text-underline-position: from-font;

    span {
        color: var(--red-700);

        &:hover {
            color: var(--red-600);
        }
    }

    svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
        fill: var(--red-700);
        stroke: var(--red-700);
    }

    @media (max-width: 992px) {
        display: none;
    }
}


.header-navbar-position-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
    box-shadow: 0 4px 12px rgba(43, 45, 52, .12);

    @media (max-width: 576px) {
        display: none;
    }

    &.is-fixed {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}


.header-navbar-position {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px;
    height: 70px;
    padding: 0 32px;


    .header-navbar__logo {
        display: flex;
        padding: 10px;
        height: 100%;

        svg {
            width: 107px;
            height: 51px;

        }

        @media (max-width: 768px) {
            display: none;
        }
    }

    .header-navbar__catalog {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 500;
        border-radius: 10px;
        padding: 15px;
        transition: all 0.3s;
        width: 116px;
        height: auto;

        &:hover {
            background-color: var(--white);
            color: var(--red-600);

            svg {
                fill: var(--red-600);
                stroke: var(--red-600);
            }

            .burger-menu__button {
                span {
                    background-color: var(--red-600);
                }
            }
        }

        .burger-menu__button {
            width: 30px;
            height: 16px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            cursor: pointer;
            position: relative;

            span {
                background-color: var(--gray-700);
                height: 1px;
                transition: background-color .3s;
            }
        }
    }

    .header-navbar__search {
        flex: 1;

        @media (max-width: 992px) {
            display: none;
        }
    }

    .header-navbar__top-item-mail {
        color: var(--white);
        font-size: var(--fz-12);
        font-weight: 500;
        flex-direction: column;
        align-items: flex-start;
        cursor: pointer;
        position: relative;
        white-space: nowrap;

        @media (max-width: 768px) {
            margin-left: auto;
            font-size: var(--fz-16);
        }
        @media (max-width: 576px) {
            margin-left: auto;
            font-size: var(--fz-12);
        }

        &:nth-child(4) {
            @media (max-width: 992px) {
                margin-left: auto;
            }
            @media (max-width: 768px) {
                display: none;
            }
        }


        small {
            color: var(--white);
        }

        span {
            display: flex;
            align-items: center;
            gap: 5px;
            transition: color 0.3s;

            svg {
                width: 11px;
                height: 10px;
                flex-shrink: 0;
                fill: var(--white);
                stroke: var(--white);
                transition: color 0.3s;
            }
        }
    }

    .header-navbar__middle-contact {
        color: var(--white);
        font-size: var(--fz-12);
        display: flex;
        flex-direction: column;

        @media (max-width: 768px) {
            margin-left: auto;
        }

        span {
            display: block;
        }

        a {
            color: var(--white);
            font-size: 1.25rem;
            transition: color 0.3s;
        }
    }
}


/* LOCK SCROLL */
.body-lock {
    overflow: hidden;
    position: fixed;
    width: 100%;
    touch-action: none;
}


/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    z-index: 100;
    overflow: hidden;
    display: none;
    animation: fadeIn 0.2s ease-out;
    border: 1px solid #eaeaea;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.results-count {
    background: var(--red-700);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.dropdown-content {
    max-height: 350px;
    overflow-y: auto;
}

.result-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background: #f8fafe;
}

.result-item.highlighted {
    background: #f0f5ff;
    border-left: 4px solid var(--red-700);
}

.item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f0f5ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--red-700);
    font-size: 1rem;
}

.item-content {
    flex: 1;
}

.item-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.item-category {
    display: inline-block;
    background: #f0f0f0;
    color: var(--gray-600);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 5px;
}

.no-results {
    padding: 30px 20px;
    text-align: center;
    color: #888;
}

.no-results i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #ddd;
}

/* Responsive */
@media (max-width: 768px) {
    .search__box {
        flex-direction: column;
    }

    #searchButton {
        padding: 18px;
        justify-content: center;
    }

    .search-wrapper {
        padding: 20px;
    }
}

/* Scrollbar */
.dropdown-content::-webkit-scrollbar {
    width: 8px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


.live-search {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    z-index: 2000;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.live-search__list {
    max-height: 360px;
    overflow: auto;
}

.live-search__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: .3s;
}

.live-search__item:before {
    position: absolute;
    bottom: 0;
    content: '';
    height: 0.5px;
    width: 90%;
    background-color: var(--color-EDEEEF);
    right: 48%;
}

.live-search__item:hover {
    background-color: var(--color-EFF4F9);
}

.live-search__img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 10px;
    overflow: hidden;
}

.live-search__title {
    color: var(--color-3F4B69);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: 600;
    font-size: 12px;
    width: 100%;
}


.live-search__title_analog {
    font-size: 12px;
    background-color: var(--color-EFF4F9);
    font-weight: 400;
    padding: 6px 10px;
    border-radius: 4px;
    color: #666;

}

.live-search__all {
    display: block;
    padding: 10px;
    border-top: 1px solid var(--color-EDEEEF);
    text-decoration: none;
    color: var(--color-3F4B69);

}

.live-search__title mark {
    background: rgba(255, 230, 120, 0.6);
    padding: 0 2px;
    border-radius: 3px;
}

/*copy*/

.tooltip {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--red-700);
    color: var(--white);
    border: 1px solid var(--red-700);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    visibility: hidden; /* Добавляем для плавности */
    transition: opacity 0.3s, visibility 0.3s;
    margin-bottom: 5px;
    white-space: nowrap;
    font-weight: 400;
    z-index: 1000; /* Увеличиваем z-index */
}

.tooltip.show-tooltip {
    opacity: 1;
    visibility: visible; /* Показываем */
}

.tooltip:after {
    content: "";
    position: absolute;
    top: -8px; /* Немного выше для белой стрелки */
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent var(--red-700) transparent;
}

.tooltip_bgc_white {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    color: var(--red-700);
    border: 1px solid var(--white);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    visibility: hidden; /* Добавляем для плавности */
    transition: opacity 0.3s, visibility 0.3s;
    margin-bottom: 5px;
    white-space: nowrap;
    font-weight: 400;
    z-index: 1000; /* Увеличиваем z-index */
}

.tooltip_bgc_white:after {
    content: "";
    position: absolute;
    top: -8px; /* Немного выше для белой стрелки */
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent var(--white) transparent;
}

/*scroll*/
.scroll-overflow {
    position: relative;
    overflow: hidden;

    &::before,
    &::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        height: 80px;
        z-index: 3;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    &.scroll-overflow_bg_white {
        &::before {
            top: 0;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%);
        }

        &::after {
            bottom: 0;
            background: linear-gradient(0deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%);
        }
    }

    &.is-shadow-top::before {
        opacity: 1;
    }

    &.is-shadow-bottom::after {
        opacity: 1;
    }

    /*серый фон*/

    &.scroll-overflow_bg_gray {
        &::before {
            top: 0;
            background: linear-gradient(180deg, rgb(249, 249, 249) 0%, rgba(243, 244, 246, 0) 100%);
        }

        &::after {
            bottom: 0;
            background: linear-gradient(0deg, rgb(249, 249, 249) 0%, rgba(243, 244, 246, 0) 100%);
        }
    }
}

.scroll-overflow__wrapper {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-350) transparent;

    &::-webkit-scrollbar {
        width: 4px;
    }

    &::-webkit-scrollbar-track {
        background: transparent;
    }

    &::-webkit-scrollbar-thumb {
        background-color: var(--gray-300);
        border-radius: 4px;
    }

    &::-webkit-scrollbar-thumb:hover {
        background-color: var(--gray-400);
    }
}