/* === Поисковые обёртки в хедере === */
.header__search_wrapper {
    flex: 1;
}

.header__search_wrapper_mobile {
    flex: 0;
}

.header__search_clear {
    display: flex;
    position: absolute;
    right: 10px;
    top: 50%;
    border: 1px solid #c2025e;
    border-radius: 50px;
    background: transparent;
    padding: 6px;
    transform: translateY(-50%);
    cursor: pointer;
    outline: none;
}

.header__search_clear svg {
    width: 9px;
    height: 9px;
}

/* === Автокомплит === */
.search-autocomplete {
    position: absolute;
    top: calc(55% + 22px);
    left: 50%;
    transform: translate(-50%);
    width: 58vw;
    max-width: 1920px;
    box-shadow: 0 7px 25px #0000001f;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: opacity .3s ease, max-height .3s ease, visibility .3s ease;
    z-index: 100;
    border-radius: 10px;
    padding: 24px;
}

.search-autocomplete.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    max-height: 578px;
}

.search-autocomplete__list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.search-autocomplete__list::-webkit-scrollbar {
    width: 8px;
    height: 6px;
}

.search-autocomplete__list::-webkit-scrollbar-track {
    background: #f7f7f8;
}

.search-autocomplete__list::-webkit-scrollbar-thumb {
    background-color: #e1e1e5;
}

.search-autocomplete__item {
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    background: #fffc;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.search-autocomplete__item-image {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    padding: 16px;
    background: #f8f7f7;
}

.search-autocomplete__item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.search-autocomplete__item-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    padding: 34px 24px;
}

.search-autocomplete__item-title {
    font-size: 16px;
    font-weight: 500;
    color: #776e73;
    line-height: 1.38;
}

.search-autocomplete__item-title mark {
    background: #dd4b914d;
    color: #290718;
    padding: 0 2px;
    border-radius: 2px;
}

.search-autocomplete__item-price {
    font-size: 21px;
    font-weight: 500;
    color: #290718;
    white-space: nowrap;
}

.search-autocomplete__footer {
    margin-top: 8px;
    display: flex;
}

.search-autocomplete__btn {
    border: 1px solid #e8e3e6;
    border-radius: 32px;
    background: transparent;
    padding: 11px 16px;
    margin: 0 auto;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.1;
    color: #290718;
}

.search-autocomplete__empty {
    padding: 20px 24px;
    text-align: center;
    color: #70828a;
    font-size: 14px;
}

/* === Медиазапросы === */
@media screen and (max-width: 1400px) {
    .search-autocomplete {
        width: 80vw;
    }
}

@media screen and (max-width: 992px) {
    .header__search_clear {
        z-index: 10;
    }

    .header .search-autocomplete {
        top: calc(60% + 22px);
    }

    .search-autocomplete {
        width: 90vw;
        top: calc(25% + 22px);
    }
}

@media screen and (max-width: 768px) {
    .search-autocomplete {
        padding: 16px;
        width: 100%;
        -webkit-backdrop-filter: blur(68px);
        backdrop-filter: blur(68px);
        background: #ffffffb3;
    }

    .search-autocomplete__list {
        max-height: 390px;
    }

    .search-autocomplete__item {
        border-radius: 16px;
    }

    .search-autocomplete__item-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px;
    }

    .search-autocomplete__item-title {
        font-size: 14px;
    }

    .search-autocomplete__item-price {
        font-size: 16px;
        white-space: wrap;
    }
}