/* Shared catalogue search (home + store): one box, grouped suggestions. */
.hn-search {
  --hn-red: #d81921;
  --hn-red-dark: #b0141b;
  --hn-red-soft: #fef2f2;
  --hn-ink: #0f172a;
  --hn-muted: #64748b;
  --hn-line: #e2e8f0;
}

.hn-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem;
  border: 2px solid var(--hn-line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.45);
  transition: border-color 0.15s ease;
}

.hn-search:focus-within {
  border-color: var(--hn-red);
}

.hn-search__box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding-inline-start: 0.7rem;
}

.hn-search__icon {
  color: var(--hn-muted);
  font-size: 1.5rem;
}

.hn-search__input {
  flex: 1;
  min-width: 0;
  height: 2.9rem;
  border: 0;
  background: transparent;
  color: var(--hn-ink);
  font-size: 1.05rem;
  font-weight: 700;
  outline: none;
}

.hn-search__input:focus {
  box-shadow: none;
}

.hn-search__input::placeholder {
  color: #94a3b8;
  font-weight: 600;
}

.hn-search__voice,
.hn-search__go {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: 2.9rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.hn-search__voice {
  width: 2.9rem;
  background: #f1f5f9;
  color: var(--hn-ink);
}

.hn-search__voice .material-symbols-outlined {
  font-size: 1.5rem;
}

.hn-search.is-listening .hn-search__voice {
  background: var(--hn-red);
  color: #fff;
  animation: hn-pulse 1.1s ease-in-out infinite;
}

.hn-search__go {
  padding: 0 1.35rem;
  background: var(--hn-red);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.hn-search__go:hover {
  background: var(--hn-red-dark);
}

.hn-search__voice:focus-visible,
.hn-search__go:focus-visible {
  outline: 2px solid var(--hn-ink);
  outline-offset: 2px;
}

@keyframes hn-pulse {
  50% {
    box-shadow: 0 0 0 8px rgba(216, 25, 33, 0.18);
  }
}

.hn-search__spinner {
  display: none;
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  border: 2.5px solid #fecaca;
  border-top-color: var(--hn-red);
  border-radius: 999px;
  animation: hn-spin 0.7s linear infinite;
}

.hn-search.is-searching .hn-search__icon {
  display: none;
}

.hn-search.is-searching .hn-search__spinner {
  display: block;
}

.hn-search.is-listening {
  border-color: var(--hn-red);
  box-shadow: 0 0 0 4px rgba(216, 25, 33, 0.12), 0 10px 30px -18px rgba(15, 23, 42, 0.45);
}

@keyframes hn-spin {
  to {
    transform: rotate(360deg);
  }
}

.hn-suggest {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  left: 0;
  z-index: 5;
  max-height: var(--hn-suggest-max, min(70vh, 34rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  padding: 0.4rem 0 0;
  border: 1px solid var(--hn-line);
  border-radius: 1.1rem;
  background: #fff;
  box-shadow: 0 24px 50px -24px rgba(15, 23, 42, 0.45);
}

.hn-suggest::-webkit-scrollbar {
  width: 6px;
}

.hn-suggest::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.hn-suggest__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem 1rem 0.35rem;
  color: var(--hn-muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.hn-suggest__spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid #fecaca;
  border-top-color: var(--hn-red);
  border-radius: 999px;
  animation: hn-spin 0.7s linear infinite;
}

.hn-suggest__skeleton {
  display: grid;
  gap: 0.5rem;
  padding: 0.25rem 1rem 1rem;
}

.hn-suggest__skeleton span {
  height: 3.25rem;
  border-radius: 0.85rem;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: hn-shimmer 1.3s linear infinite;
}

.hn-suggest__group {
  padding: 0.35rem 0 0.6rem;
}

.hn-suggest__group + .hn-suggest__group {
  border-top: 1px solid #f1f5f9;
}

.hn-suggest__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.4rem 1rem;
  color: var(--hn-muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.hn-suggest__title .material-symbols-outlined {
  font-size: 1.05rem;
  color: var(--hn-red);
}

.hn-suggest__group--products .hn-suggest__items {
  display: grid;
}

.hn-suggest__group--chips .hn-suggest__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem;
}

.hn-suggest__product {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1rem;
  color: var(--hn-ink);
  text-decoration: none;
}

.hn-suggest__thumb {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  overflow: hidden;
  border: 1px solid #eef0f4;
  border-radius: 0.8rem;
  background: #f8fafc;
  color: #94a3b8;
}

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

.hn-suggest__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.hn-suggest__label {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hn-suggest__label mark {
  border-radius: 0.2rem;
  background: #fde68a;
  color: inherit;
}

.hn-suggest__meta {
  overflow: hidden;
  color: var(--hn-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hn-suggest__badge {
  width: fit-content;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 900;
}

.hn-suggest__chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 2.4rem;
  padding: 0 0.9rem;
  border: 1.5px solid var(--hn-line);
  border-radius: 999px;
  color: var(--hn-ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.hn-suggest__chip .hn-suggest__label {
  white-space: nowrap;
}

.hn-suggest__product:hover,
.hn-suggest__product.is-active {
  background: var(--hn-red-soft);
}

.hn-suggest__chip:hover,
.hn-suggest__chip.is-active {
  border-color: var(--hn-red);
  background: var(--hn-red-soft);
}

.hn-suggest__all {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  border-top: 1px solid var(--hn-line);
  background: #fff;
  color: var(--hn-red);
  font-weight: 900;
  text-decoration: none;
}

.hn-suggest__all:hover,
.hn-suggest__all.is-active {
  background: var(--hn-red-soft);
}

.hn-suggest__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.25rem 1rem 1.4rem;
  color: var(--hn-muted);
  font-weight: 800;
  text-align: center;
}

.hn-suggest__empty .material-symbols-outlined {
  font-size: 2rem;
  color: #cbd5e1;
}

.hn-suggest__empty p {
  margin: 0;
}


.hn-search [hidden] {
  display: none !important;
}
