/* ===== ПОИСК + ПОДСКАЗКИ (стиль AYVO) ===== */
.search {
    position: relative;
    flex: 1;
    min-width: 260px;
    display: flex;
    align-items: center;
    background: #f1efe9;
    border: 1px solid #e0ddd5;
    border-radius: 24px;
    padding: 4px 10px;
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.search:focus-within {
    background: #ffffff;
    border-color: #ff6b50;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}
.search-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    color: #1f3f38;
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.search input {
    flex: 1;
    padding: 8px 6px 8px 0;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1f2933;
    min-width: 0;
}
.search input::placeholder {
    color: #a9a49a;
}

/* Оранжевая кнопка справа — как на макете */
.search-submit-btn {
    flex-shrink: 0;
    height: 34px;
    padding: 0 18px;
    margin-left: 8px;
    border: none;
    border-radius: 999px;
    background: #ff6b50;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
}
.search-submit-btn:hover {
    background: #ff5a3a;
}
.search-submit-btn:active {
    transform: scale(0.97);
}

/* Спиннер загрузки подсказок — рядом с полем ввода */
.search-spinner {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    border: 2px solid rgba(255, 107, 80, 0.25);
    border-top-color: #ff6b50;
    border-radius: 50%;
    animation: vm-search-spin 0.7s linear infinite;
    display: none;
}
.search-spinner.is-on { display: inline-block; }
@keyframes vm-search-spin {
    to { transform: rotate(360deg); }
}

.search-suggest {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 100%;
    margin-top: 6px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    max-height: 420px;
    overflow-y: auto;
    padding: 4px 0;
    display: none;
    z-index: 160;
}

/* Заголовок раздела подсказок */
.search-suggest-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9a958b;
}
.search-suggest-clear {
    border: none;
    background: transparent;
    color: #ff6b50;
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 8px;
    font-family: inherit;
    transition: background 0.2s;
}
.search-suggest-clear:hover { background: #fff1ee; }

.search-suggest-item {
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}
.search-suggest-item:hover,
.search-suggest-item.active {
    background: #f3f4ff;
}
.search-suggest-item.active { background: #fdeee9; }
.search-suggest-thumb {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.search-suggest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.search-suggest-main {
    flex: 1;
    min-width: 0;
}
.search-suggest-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2933;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-suggest-meta {
    margin-top: 2px;
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-suggest-price {
    font-weight: 700;
    color: #111827;
    margin-right: 6px;
}
.search-suggest-kind {
    flex-shrink: 0;
    font-size: 11px;
    color: #9a958b;
    margin-left: auto;
    padding-left: 8px;
}
.search-suggest-all {
    font-weight: 600;
    color: #0f3b36;
}
.search-suggest-all .search-suggest-thumb {
    background: #eaf3f1;
    color: #0f3b36;
}
.search-suggest-empty,
.search-suggest-loading {
    padding: 12px 14px;
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-suggest-loading .search-spinner { display: inline-block; }
.search-suggest-error { color: #b91c1c; }

@media (max-width: 768px) {
    .search { order: 3; flex-basis: 100%; min-width: 0; }
    .search-suggest { left: 0; right: 0; }
}
