/* =========================================================
   header__search — barra de búsqueda siempre visible
   ========================================================= */

.header__search {
  flex: 1; /* ocupa todo el espacio entre nav y carrito */
  display: flex;
  align-items: center;
  position: relative;
  min-width: 0; /* evita overflow en flex */
  max-width: 480px; /* tope para pantallas muy anchas */
}

/* ── Icono lupa ──────────────────────────────────────────── */
.header__search-icon {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--dim);
  pointer-events: none;
  flex-shrink: 0;
}

/* ── Input ───────────────────────────────────────────────── */
.header__search-input {
  width: 100%;
  height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 0 36px 0 36px;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.06em;
  color: var(--text);
  outline: none;
  transition:
    border-color var(--dur-fast),
    background var(--dur-fast);
  -webkit-appearance: none;
  appearance: none;
}

.header__search-input::-webkit-search-cancel-button {
  display: none;
}

.header__search-input::placeholder {
  color: var(--dim);
}

.header__search-input:focus {
  border-color: var(--accent);
  background: var(--surface-3, var(--surface-2));
}

/* ── Botón limpiar (×) ───────────────────────────────────── */
.header__search-clear {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--dur-fast),
    color var(--dur-fast);
}

.header__search-clear [data-lucide] {
  width: 14px;
  height: 14px;
}

.header__search-clear:hover {
  color: var(--text);
}

.header__search-input:not(:placeholder-shown) ~ .header__search-clear {
  opacity: 1;
  pointer-events: auto;
}
/* ── Dropdown sugerencias ────────────────────────────────── */
.hs-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: var(--z-dropdown, 200);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hs-dropdown__item {
  border-bottom: 1px solid var(--line);
}

.hs-dropdown__item:last-of-type {
  border-bottom: none;
}

.hs-dropdown__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  transition: background var(--dur-fast);
}

.hs-dropdown__link:hover {
  background: var(--surface-3, rgba(255, 255, 255, 0.05));
}

.hs-dropdown__name {
  font-size: var(--size-sm);
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hs-dropdown__name mark {
  background: none;
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.hs-dropdown__price {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--muted);
  flex-shrink: 0;
}

.hs-dropdown__footer {
  background: var(--surface-1, var(--surface-2));
  border-top: 1px solid var(--line);
}

.hs-dropdown__all {
  display: block;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color var(--dur-fast);
}

.hs-dropdown__all:hover {
  color: var(--accent);
}

.hs-dropdown__all strong {
  color: var(--text);
  font-weight: var(--weight-medium);
}
