.nm-product-ajax-search {
    position: relative;
    width: 100%;
}

.nm-product-ajax-search__field {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.nm-product-ajax-search__input {
    width: 100%;
    height: 46px;
    padding: 0 48px 0 16px;
    border: 1px solid #d9dde1;
    border-radius: 8px;
    background: #fff;
    color: #20252a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.nm-product-ajax-search__input:focus {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, .08);
}

.nm-product-ajax-search__submit {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #111;
    place-items: center;
    cursor: pointer;
}

.nm-product-ajax-search.is-loading .nm-product-ajax-search__submit::after {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(17, 17, 17, .2);
    border-top-color: #111;
    border-radius: 50%;
    content: "";
    animation: nmProductAjaxSearchSpin .65s linear infinite;
}

.nm-product-ajax-search.is-loading .nm-product-ajax-search__submit svg {
    opacity: 0;
}

.nm-product-ajax-search__results {
    position: absolute;
    z-index: 10000;
    top: calc(100% + 8px);
    right: 0;
    overflow: hidden;
    border: 1px solid #dfe3e7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(17, 24, 39, .14);
    width: 400px;
}

#search-canvas .nm-product-ajax-search__results {
   width: 100%; 
}

#search-canvas .nm-product-ajax-search__results {
    padding: 0;
    border: none;
    box-shadow: unset;
}

#search-canvas .nm-product-ajax-search__item {padding: 10px 0;}
#search-canvas .nm-product-ajax-search__view-all {
    margin-top: 10px;
    border: none;
    background: black;
    color: white;
    border-radius: 7px;
}

.nm-product-ajax-search__list {
    display: grid;
    max-height: 420px;
    overflow: auto;
}

.nm-product-ajax-search__item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 13px;
    border-bottom: 1px solid #edf0f2;
    color: inherit;
    text-decoration: none;
    transition: background-color .2s ease;
}

.nm-product-ajax-search__item:hover,
.nm-product-ajax-search__item:focus {
    background: #f7f8f9;
    color: inherit;
}

.nm-product-ajax-search__thumb {
    display: block;
    width: 58px;
    height: 58px;
    overflow: hidden;
    border-radius: 6px;
    background: #f1f3f5;
}

.nm-product-ajax-search__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nm-product-ajax-search__meta {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.nm-product-ajax-search__title {
    overflow: hidden;
    color: #171a1f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.nm-product-ajax-search__sku {
    color: #767f88;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.nm-product-ajax-search__price {
    color: var(--color-danger, #d71920);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.nm-product-ajax-search__price del {
    color: #111;
    font-size: 12px;
    font-weight: 600;
}

.nm-product-ajax-search__price ins {
    text-decoration: none;
}

.nm-product-ajax-search__empty,
.nm-product-ajax-search__view-all {
    display: block;
    padding: 13px 14px;
    color: #343a40;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.nm-product-ajax-search__view-all {
    border-top: 1px solid #edf0f2;
    background: #f7f8f9;
    color: #111;
    text-align: center;
    text-decoration: none;
}

.nm-product-ajax-search__view-all:hover,
.nm-product-ajax-search__view-all:focus {
    background: #111;
    color: #fff;
}

@keyframes nmProductAjaxSearchSpin {
    to {
        transform: rotate(360deg);
    }
}

@media screen and (max-width: 640px) {
    .nm-product-ajax-search__results {
        position: absolute;
        left: 0;
        max-height: 400px;
        overflow: auto;
        width: 100%;
    }
}
