/* ═════════════════════════════════════════════════════════════
   AUTOSEARCH – Живой поиск Meilisearch
   Выпадающие подсказки в шапке сайта
   ═════════════════════════════════════════════════════════════ */

/* ---- Контейнер результатов ---- */
.autosearch-results {
  padding: 4px 0 0 0;
  line-height: 1.3;
}

/* Скроллбар */
.autosearch-results::-webkit-scrollbar {
  width: 6px;
}
.autosearch-results::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 0 0 8px 0;
}
.autosearch-results::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 3px;
}
.autosearch-results::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

/* ---- Секция (Товары / Статьи) ---- */
.as-section {
  padding-bottom: 4px;
}

.as-section-head {
  padding: 8px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  border-bottom: 1px solid #f0f0f0;
}

/* ---- Строка результата ---- */
.as-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none !important;
  color: #222 !important;
  transition: background 0.12s ease;
  border-bottom: 1px solid #f7f7f7;
}

.as-row:last-child {
  border-bottom: none;
}

.as-even {
  background: #ffffff;
}
.as-odd {
  background: #f9fafb;
}

.as-row:hover {
  background: #eef2f6 !important;
  text-decoration: none !important;
}

/* ---- Картинка / плейсхолдер ---- */
.as-img {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.as-img-empty {
  background: #f0f2f5;
}

/* ---- Тело строки ---- */
.as-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.as-title {
  font-size: 13.5px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Мета-строка: Артикул | цена ---- */
.as-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #777;
  flex-wrap: wrap;
}

.as-art {
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
  font-size: 11.5px;
  letter-spacing: 0.01em;
}

.as-divider {
  color: #d4d4d4;
  font-size: 11px;
  user-select: none;
}

/* ---- Цены ---- */
.as-price {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.as-price-new {
  font-weight: 700;
  font-size: 14px;
  color: #1a1a1a;
}

.as-price-old {
  font-weight: 400;
  font-size: 12px;
  color: #a0a0a0;
  text-decoration: line-through;
}

/* Категория статьи */
.as-cat {
  font-size: 11.5px;
  color: #8b9db0;
  font-weight: 500;
}

/* Подсветка совпадений */
.as-hl {
  color: #d0021b;
  font-weight: 600;
}

/* ---- Пустое состояние ---- */
.as-empty {
  text-align: center;
  padding: 18px 16px;
  color: #999;
  font-size: 13px;
}

/* ---- Футер "Все результаты" ---- */
.as-footer {
  display: block;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #2b6cb0 !important;
  text-decoration: none !important;
  border-top: 1px solid #eee;
  background: #fafafa;
  border-radius: 0 0 8px 8px;
  transition: background 0.15s;
}

.as-footer:hover {
  background: #eef2f8;
  color: #1a4b8c !important;
}
