/* ============================================================
   SEARCH SUGGESTIONS DROPDOWN
   index.css — BeYaft Homepage specific styles
============================================================ */

/* The dropdown panel */
.search-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 460px;
  width: max-content;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 9999;
  overflow: hidden;
  animation: suggestFadeIn 0.18s ease;
}

/* On small screens, fill the full width of the wrapper */
@media (max-width: 600px) {
  .search-suggestions {
    min-width: 0;
    width: 100%;
    left: 0;
  }
}

/* Checkbox header — "Rechercher dans le titre uniquement" */
.search-suggestions__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid #f0f2f4;
  background: #fafbfc;
  cursor: pointer;
  user-select: none;
}

.search-suggestions__header-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary, #1b5e4b);
  cursor: pointer;
  flex-shrink: 0;
}

.search-suggestions__header-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-dark, #1a1a1a);
  cursor: pointer;
}


@keyframes suggestFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Visible state */
.search-suggestions.is-open {
  display: block;
}

/* List reset */
.search-suggestions__list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

/* Each suggestion item */
.search-suggestions__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 0.9rem;
  color: var(--color-dark, #1a1a1a);
}

.search-suggestions__item:hover,
.search-suggestions__item:focus {
  background-color: #f4fbf7;
  outline: none;
}

/* Left icon wrapper */
.search-suggestions__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background-color: #f0f0f0;
  border-radius: 8px;
  color: #888;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.search-suggestions__item:hover .search-suggestions__icon {
  background-color: var(--color-primary-pale, #e5f4ed);
  color: var(--color-primary, #1b5e4b);
}

/* Text area */
.search-suggestions__text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

/* The suggestion label — e.g. "Chaussure talon" */
.search-suggestions__label {
  display: block;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The highlighted match — e.g. "Chauss" gets a green pill bg */
.search-suggestions__match {
  display: inline;
  background-color: var(--color-primary, #1b5e4b);
  color: #fff;
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 700;
  font-size: 0.88em;
  letter-spacing: 0.01em;
}

/* The "dans [Catégorie]" tag */
.search-suggestions__category {
  display: block;
  font-size: 0.75rem;
  color: var(--color-gray, #718096);
  margin-top: 1px;
}

.search-suggestions__category strong {
  color: var(--color-primary, #1b5e4b);
  font-weight: 600;
}

/* Right arrow hint */
.search-suggestions__arrow {
  font-size: 0.75rem;
  color: #c0c8d0;
  flex-shrink: 0;
}

.search-suggestions__item:hover .search-suggestions__arrow {
  color: var(--color-primary, #1b5e4b);
}

/* Divider between suggestion groups */
.search-suggestions__divider {
  height: 1px;
  background: #f0f2f4;
  margin: 0.3rem 1rem;
}

/* Section header inside dropdown (e.g. "Suggestions") */
.search-suggestions__section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #a0aab4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 1.1rem 0.25rem;
}

/* Keyboard active state */
.search-suggestions__item.is-active {
  background-color: #f4fbf7;
}
