/* ElectroPlace — Recherche intelligente (autocomplétion) */
.ep-suggest-host { position: relative; }

.ep-suggest {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  width: max(100%, min(30rem, calc(100vw - 24px)));
  max-height: min(70vh, 32rem);
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  color: #111;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(16, 27, 61, .18);
  z-index: 1100;
  font-size: 14px;
  line-height: 1.35;
  text-align: start;
}
.ep-suggest[hidden] { display: none; }

/* Dans le tiroir mobile : la liste se superpose sous le champ, à la largeur du tiroir */
.ep-suggest--inline {
  inset-inline: 10px;
  width: auto;
  max-height: 55vh;
}

.ep-suggest__heading {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b7280;
}

.ep-suggest__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.ep-suggest__item:hover,
.ep-suggest__item.is-active { background: #f1f4fb; }

.ep-suggest__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ep-suggest__parent { color: #6b7280; }
.ep-suggest__cat-ico { color: var(--yc-primary-color, #16265C); font-weight: 800; }

.ep-suggest__img {
  width: 44px; height: 44px;
  object-fit: contain;
  border-radius: 6px;
  background: #f6f7fb;
  flex: 0 0 44px;
}
.ep-suggest__prod .ep-suggest__label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}
.ep-suggest__price { font-weight: 800; color: #c2410c; white-space: nowrap; }

.ep-suggest__mark { background: #fff1d6; color: inherit; border-radius: 3px; padding: 0 1px; }

.ep-suggest__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 10px; }
.ep-suggest__chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f4fb;
  font-weight: 600;
}
.ep-suggest__chip:hover { background: #e3e9f7; }

.ep-suggest__empty, .ep-suggest__loading { padding: 12px 10px; color: #6b7280; }

.ep-suggest__all {
  margin-top: 4px;
  justify-content: center;
  font-weight: 800;
  color: var(--yc-primary-color, #16265C);
  border-top: 1px solid #eef0f6;
  border-radius: 0 0 8px 8px;
}

@media (prefers-reduced-motion: no-preference) {
  .ep-suggest { animation: ep-suggest-in .12s ease-out; }
  @keyframes ep-suggest-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}
