/**
 * Search Autocomplete — только товары
 * Картинка + название + категория + цена
 */

.us-search-input-wrap {
    position: relative;
    width: 100%;
}

.us-search-form {
    position: relative;
}

/* ==========================
   Выпадающий список
   ========================== */
.us-search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99999;
    margin-top: 2px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    max-height: 480px;
    overflow-y: auto;
}

.us-search-suggestions.us-suggest-visible {
    display: block;
}

/* Строка товара */
.us-suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.12s;
    cursor: pointer;
}

.us-suggest-item:last-child {
    border-bottom: none;
}

.us-suggest-item:hover,
.us-suggest-item:focus {
    background: #f7f8fa;
    color: #333;
    text-decoration: none;
}

/* Миниатюра товара */
.us-suggest-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid #eee;
    background: #f5f5f5;
}

/* Заглушка если нет картинки */
.us-suggest-thumb-placeholder {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 6px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 20px;
}

/* Текстовый блок */
.us-suggest-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.us-suggest-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.us-suggest-cat {
    font-size: 12px;
    color: #888;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Подсветка совпадения */
.us-suggest-title mark {
    background: transparent;
    color: #222;
    font-weight: 700;
    padding: 0;
}

/* Цена */
.us-suggest-price {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    text-align: right;
}

.us-suggest-price del {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #999;
}

.us-suggest-price ins {
    text-decoration: none;
    color: #e74c3c;
}

/* Кнопка «Все результаты» */
.us-suggest-all {
    display: block;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    color: #2c6fbb;
    text-decoration: none;
    border-top: 1px solid #eee;
    transition: background 0.12s;
}

.us-suggest-all:hover {
    background: #f7f8fa;
    text-decoration: none;
}

/* Загрузка */
.us-suggest-loading {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.us-suggest-loading::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-top-color: #555;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    animation: us-spin 0.6s linear infinite;
}

@keyframes us-spin {
    to { transform: rotate(360deg); }
}

/* Пустой результат */
.us-suggest-empty {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .us-search-suggestions {
        border-radius: 0 0 8px 8px;
        max-height: 60vh;
    }

    .us-suggest-thumb,
    .us-suggest-thumb-placeholder {
        width: 44px;
        height: 44px;
    }

    .us-suggest-title {
        font-size: 13px;
    }

    .us-suggest-price {
        font-size: 13px;
    }
}
.us-suggest-group-title {text-align:left}
.us-suggest-item {display:flex !important;width:100%}
.us-suggest-item {margin-left:0 !important}
.us-suggest-visible {right:-20px !important}

.us-search-input-wrap {text-align:left  !important}
.us-search-field {width:65%  !important}

.us-suggest-visible {
  right: -15px !important;
  left: -15px;
  top: 60px;
}