/* Живий пошук товарів у шапці (inc/search.php + assets/js/live-search.js). */
.am-ls {
    position: fixed;
    z-index: 100000;
    top: 0;
    left: 0;
    width: 420px;
    max-height: 70vh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #3e5338;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(40, 40, 40, .16);
    color: #282828;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
}

.am-ls[hidden] {
    display: none;
}

.am-ls.is-loading {
    opacity: .75;
}

.am-ls__group + .am-ls__group {
    border-top: 1px solid #eef2ec;
}

.am-ls__label {
    padding: 12px 16px 6px;
    color: #777;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.am-ls__terms {
    display: flex;
    flex-direction: column;
    padding: 0 0 8px;
}

.am-ls__term {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 16px;
    color: #282828;
    text-decoration: none;
}

.am-ls__term-type {
    flex: 0 0 auto;
    color: #8a8a8a;
    font-size: 12px;
}

.am-ls__term-name {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-ls__term.is-active,
.am-ls__term:hover {
    background: #eef2ec;
    color: #3e5338;
}

.am-ls__item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    color: #282828;
    text-decoration: none;
}

.am-ls__item.is-active,
.am-ls__item:hover {
    background: #eef2ec;
}

.am-ls__thumb {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 3px;
    background: #f4f5f3;
}

.am-ls__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.am-ls__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.am-ls__brand {
    color: #3e5338;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.am-ls__title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    font-weight: 500;
}

.am-ls mark {
    padding: 0;
    background: none;
    color: #3e5338;
    font-weight: 700;
}

.am-ls__stock {
    color: #a33;
    font-size: 11px;
}

.am-ls__item.is-out .am-ls__thumb img {
    opacity: .55;
}

.am-ls__price {
    color: #3e5338;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.am-ls__price del {
    display: block;
    color: #999;
    font-size: 12px;
    font-weight: 400;
}

.am-ls__price ins {
    text-decoration: none;
}

.am-ls__all {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 16px;
    border-top: 1px solid #dfe7dc;
    background: #3e5338;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-decoration: none;
    text-transform: uppercase;
}

.am-ls__all span {
    font-weight: 400;
}

.am-ls__all svg {
    width: 20px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.am-ls__all.is-active,
.am-ls__all:hover {
    background: #263c25;
    color: #fff;
}

.am-ls__empty {
    padding: 18px 16px;
    color: #555;
    font-size: 13px;
}

@media (max-width: 767px) {
    .am-ls {
        font-size: 13px;
    }

    .am-ls__item {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 10px;
        padding: 8px 12px;
    }

    .am-ls__thumb {
        width: 48px;
        height: 48px;
        grid-row: span 2;
    }

    .am-ls__price {
        grid-column: 2;
        text-align: left;
        font-size: 13px;
    }

    .am-ls__price del {
        display: inline;
        margin-right: 6px;
    }

    .am-ls__label,
    .am-ls__terms {
        padding-left: 12px;
        padding-right: 12px;
    }
}
