.smart-search__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1000;
    width: min(760px, calc(100vw - 32px));
    max-height: min(710px, calc(100vh - 120px));
    overflow-y: auto;
    padding: 16px;
    border: 1px solid var(--Gray-3, #e5e5e6);
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 16px 36px rgba(23, 23, 23, .12);
}

.smart-search__panel[hidden] {
    display: none;
}

.smart-search__group:not(:last-child) {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--Gray-3, #e5e5e6);
}

.smart-search__title {
    margin: 0 0 12px;
    color: var(--Gray-7, #7a7a85);
    font-size: 12px;
    font-weight: 500;
    line-height: 150%;
    letter-spacing: .24px;
    text-transform: uppercase;
}

.smart-search__products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.smart-search__product {
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 94px;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color .2s ease;
}

.smart-search__product:hover,
.smart-search__product:focus-visible {
    background-color: var(--Gray-1, #fafafa);
}

.smart-search__product-image {
    display: block;
    width: 64px;
    height: 78px;
    flex: 0 0 64px;
    object-fit: contain;
}

.smart-search__product-content {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.smart-search__product-name {
    color: var(--Base-Dark, #171717);
    font-size: 14px;
    font-weight: 500;
    line-height: 140%;
    letter-spacing: .14px;
    transition: color .2s ease;
}

.smart-search__product:hover .smart-search__product-name,
.smart-search__product:focus-visible .smart-search__product-name {
    color: var(--Dark-wine-1, #92111c);
}

.smart-search__product-brand {
    overflow: hidden;
    color: var(--Gray-7, #7a7a85);
    font-size: 12px;
    line-height: 150%;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-search__product-price {
    margin-top: 2px;
    color: var(--Base-Dark, #171717);
    font-size: 14px;
    font-weight: 700;
    line-height: 150%;
}

.smart-search__history {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.smart-search__history-item {
    appearance: none;
    padding: 7px 12px;
    border: 1px solid var(--Gray-3, #e5e5e6);
    border-radius: 8px;
    background-color: #fff;
    color: var(--Gray-8---Main, #383838);
    font: inherit;
    font-size: 14px;
    line-height: 150%;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.smart-search__history-item:hover,
.smart-search__history-item:focus-visible {
    border-color: var(--Dark-wine-1, #92111c);
    background-color: #fff7f8;
    color: var(--Dark-wine-1, #92111c);
}

.smart-search__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.smart-search__category {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 8px;
    background-color: var(--Gray-1, #fafafa);
    color: var(--Gray-8---Main, #383838);
    font-size: 14px;
    line-height: 150%;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease;
}

.smart-search__category:hover,
.smart-search__category:focus-visible {
    background-color: #fff0f1;
    color: var(--Dark-wine-1, #92111c);
}

.smart-search__empty {
    padding: 12px 8px;
    color: var(--Gray-7, #7a7a85);
    font-size: 14px;
    line-height: 150%;
}

.search-form.searching button[type="submit"]:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    display: block;
    z-index: 1;
    background-color: var(--Dark-wine-Main, #45080D);
    background-image: url('../images/loading.svg');
    background-repeat: no-repeat;
    background-size: 20px;
    background-position: center;
}

@media (max-width: 680px) {
    .smart-search__panel {
        left: 50%;
        width: calc(100vw - 32px);
        padding: 12px;
        transform: translateX(-50%);
    }

    .smart-search__products {
        display: block;
    }

    .smart-search__product {
        min-height: 88px;
    }
}
