/* BudMarket — миттєвий live-пошук (випадайка у хедері) */

.bm-ls-wrap {
    position: relative;
}

.bm-ls {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
    overflow: hidden;
    max-height: 70vh;
    overflow-y: auto;
    font-size: 14px;
}

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

.bm-ls__loading,
.bm-ls__empty {
    padding: 20px 18px;
    text-align: center;
    color: #777;
}

.bm-ls__list {
    display: block;
}

.bm-ls__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #1a202c;
    border-bottom: 1px solid #f2f2f2;
    transition: background-color .12s ease;
}

.bm-ls__item:last-child {
    border-bottom: 0;
}

.bm-ls__item:hover,
.bm-ls__item.is-active {
    background: #fbeced;
}

.bm-ls__thumb {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.bm-ls__info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bm-ls__cat {
    font-size: 11px;
    color: #9aa0a6;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.bm-ls__title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #1a202c;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bm-ls__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.bm-ls__price {
    font-weight: 700;
    color: #E21E25;
    white-space: nowrap;
}

.bm-ls__price del {
    color: #b0b0b0;
    font-weight: 400;
    margin-right: 4px;
}

.bm-ls__stock {
    font-size: 12px;
    white-space: nowrap;
}

.bm-ls__stock.is-in {
    color: #1a9e4b;
}

.bm-ls__stock.is-out {
    color: #b0b0b0;
}

.bm-ls__all {
    display: block;
    padding: 13px 14px;
    text-align: center;
    font-weight: 600;
    color: #fff;
    background: #E21E25;
    text-decoration: none;
    transition: background-color .12s ease;
}

.bm-ls__all:hover {
    background: #c01a21;
    color: #fff;
}

.bm-ls__all b {
    font-weight: 700;
}

@media (max-width: 782px) {
    .bm-ls {
        max-height: 60vh;
    }
    .bm-ls__thumb {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
    }
}
