.header-search-bar {
  position: fixed;
  inset: 0;
  z-index: 110;
  pointer-events: none;
}

.header-search-bar.open {
  pointer-events: auto;
}

.header-search-bar__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 39, 35, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.header-search-bar.open .header-search-bar__backdrop {
  opacity: 1;
}

.header-search-bar__form {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(43, 39, 35, 0.16);
  background: rgba(246, 243, 236, 0.98);
  backdrop-filter: blur(10px);
  transform: translateY(-100%);
  transition: transform 0.2s ease;
}

.header-search-bar.open .header-search-bar__form {
  transform: translateY(0);
}

.header-search-bar__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--migration-ink, #2b2723);
}

.header-search-bar__form .field__input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--migration-ink, #2b2723);
  font: 400 16px/1.4 "Hanken Grotesk", system-ui, sans-serif;
}

.header-search-bar__form .field__input:focus {
  outline: none;
}

.header-search-bar__form .field__input::placeholder {
  color: var(--migration-light-muted, #756e62);
}

.header-search-bar__results {
  position: absolute;
  top: 72px;
  left: 50%;
  display: none;
  width: min(640px, calc(100% - 56px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  border: 1px solid var(--migration-oat, #ded7c8);
  border-radius: 16px;
  background: var(--migration-chalk, #f6f3ec);
  box-shadow: 0 18px 40px rgba(43, 39, 35, 0.14);
  transform: translateX(-50%);
}

.header-search-bar__results.shown {
  display: block;
}

.header-search-bar__results-loading {
  display: none;
  align-items: center;
  justify-content: center;
  height: 96px;
}

.header-search-bar__results.loading .header-search-bar__results-loading {
  display: flex;
}

.header-search-bar .predictive-search__title {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(43, 39, 35, 0.08);
  color: var(--migration-ink, #2b2723);
  font: 600 12px/normal "Spline Sans Mono", ui-monospace, monospace;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.header-search-bar .predictive-search__results {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-search-bar .predictive-search__result-item {
  border-bottom: 1px solid rgba(43, 39, 35, 0.06);
}

.header-search-bar .predictive-search__result-item:last-child {
  border-bottom: 0;
}

.header-search-bar .predictive-search__result-item a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.header-search-bar .predictive-search__product {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
}

.header-search-bar .predictive-search__product-image-wrap {
  position: relative;
  flex: 0 0 auto;
}

.header-search-bar .predictive-search__product-image {
  display: block;
  width: 56px;
  height: 56px;
  border: 1px solid var(--migration-oat, #ded7c8);
  border-radius: 10px;
  object-fit: cover;
}

.header-search-bar .predictive-search__product-save-price {
  display: none;
}

.header-search-bar .predictive-search__product-title {
  margin: 0 0 4px;
  color: var(--migration-ink, #2b2723);
  font: 600 15px/1.35 "Hanken Grotesk", system-ui, sans-serif;
}

.header-search-bar .predictive-search__product-price {
  color: var(--migration-muted, #5f5a52);
  font: 500 14px/1.4 "Hanken Grotesk", system-ui, sans-serif;
}

.header-search-bar .predictive-search__footer {
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-top: 1px solid rgba(43, 39, 35, 0.08);
}

.header-search-bar .predictive-search__more {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border: 0;
  background: transparent;
  color: var(--migration-teal-dark, #2c6069);
  cursor: pointer;
  font: 600 14px/1.4 "Hanken Grotesk", system-ui, sans-serif;
}

body.header-search-bar--lockscreen {
  overflow: hidden;
}

@media (max-width: 899px) {
  .header-search-bar__form {
    padding: 14px 18px;
  }

  .header-search-bar__results {
    top: 62px;
    width: calc(100% - 36px);
    max-height: calc(100vh - 78px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-search-bar__backdrop,
  .header-search-bar__form {
    transition: none;
  }
}
