/* Контейнер выпадающего списка поиска */
.live-search {
    width: 100%;
    position: absolute;
    z-index: 1000;
    padding: 5px 0px;
    margin-top: 40px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 2px #dddddd;
    left: 0;
    display: none; /* Переключите на block с помощью JS при вводе */
    padding-bottom: 42px;
    box-sizing: border-box;
}

/* Список товаров */
.live-search ul {
    list-style-type: none;
    margin: 0px;
    padding: 0px;
    max-height: 400px;
    overflow-y: auto;
}
@media (max-width: 768px) {
  .live-search ul {
    max-height: 300px;
  }
}

/* Кастомизация скроллбара */
.live-search ul::-webkit-scrollbar {
    width: 6px;
}
.live-search ul::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.live-search ul::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}
.live-search ul::-webkit-scrollbar-thumb:hover {
    background: #a3a3a3;
}

/* Строка товара */
.live-search ul li {
    cursor: pointer;
    padding: 7px;
    margin: 5px;
    background-color: #fff;
    min-height: 80px;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}
.live-search ul li:nth-child(even) {
    background-color: #fafafa;
}
.live-search ul li:hover {
    background-color: #e1ecee;
    border-radius: 5px;
}

/* Ссылка внутри li ( Flexbox для идеального выравнивания ) */
.live-search ul li a {
    text-decoration: none;
    display: flex;
    align-items: center; /* Центрирует картинку, текст и цену по вертикали */
    justify-content: space-between; /* Распределяет элементы по краям */
    width: 100%;
    height: 100%;
}

/* Картинка товара */
.live-search .product-image {
    flex-shrink: 0;
    margin-right: 12px;
    display: flex;
    align-items: center;
}
.live-search .product-image img {
    object-fit: cover;
    border-radius: 4px;
}

/* Блок с названием и описанием */
.live-search .product-name {
    flex-grow: 1; /* Занимает всё доступное пространство по центру */
    font-size: 16px;
    font-weight: normal;
    color: #333;
    padding-right: 15px;
}
.live-search .product-name p {
    font-weight: normal;
    line-height: 16px;
    font-size: 12px;
    color: #095f6e;
    margin: 4px 0 0 0;
    padding: 0px;
}

/* Блок цены ( Корректно вмещает любые цифры ) */
.live-search .product-price {
    text-align: right;
    font-size: 18px;
    font-weight: normal;
    flex-shrink: 0; /* Цена никогда не сожмется и не перенесется криво */
    display: flex;
    flex-direction: column; /* Выстраивает цены строго друг под другом */
    justify-content: center;
    min-width: 80px;
}
.live-search .product-price .price {
    color: #333333;
    font-weight: 600;
    white-space: nowrap;
}
.live-search .product-price .special {
    color: #f70000;
    text-decoration: line-through;
    font-size: 13px;
    margin-top: 2px;
    white-space: nowrap;
}

/* Нижний системный текст */
.live-search .result-text {
    text-align: center;
    font-size: 16px;
    line-height: 40px;
    color: #095f6e;
    background-color: #ffffff;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    border-top: 1px solid #FFFFFF;
    border-radius: 0 0 10px 10px;
}
