.aa-Panel {
  z-index: 999;
  /* margin-top: 176px; */
  /* top: 254px !important;
  left: 124px !important;
  right: 264px !important; */
}

.bc-searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 20px;
}

.bc-searchbar__box {
  flex: 1;
  min-width: 0; /* stops flex overflow */
}

.bc-ac-hit {
  display: flex;
  align-items: center; /* vertical centering */
  gap: 12px;
  padding: 12px 8px;
}

.aa-SubmitButton {
  display: none;
}

/* Each result */
.aa-Item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Remove line on last item */
.aa-Item:last-child {
  border-bottom: none;
}

/* Add breathing room */
.bc-ac-hit {
  padding: 12px 8px;
}

/* Make Autocomplete fill the available width */
#bc-algolia-autocomplete,
#bc-algolia-autocomplete .aa-Autocomplete,
#bc-algolia-autocomplete .aa-Form {
  width: 100%;
}

/* Ensure the input itself stretches */
#bc-algolia-autocomplete .aa-InputWrapper {
  flex: 1;
  min-width: 0;
}

#bc-algolia-autocomplete .aa-Input {
  width: 100%;
}

/* Keep the Algolia logo block tight on the right */
.bc-searchbar__powered {
  flex: 0 0 auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-size: 12px;
}

/* Make Algolia "Powered by" logo appear white */
.bc-search-dark .ais-PoweredBy {
  color: #fff; /* harmless fallback */
}

.bc-search-dark .ais-PoweredBy .ais-PoweredBy-logo path {
  fill: #fff !important;
}

/* Optional: make the powered-by widget sit nicely */
#bc-powered-by .ais-PoweredBy {
  margin: 0;
  display: flex;
  align-items: center;
}

.bc-ac-hit__img {
  width: 100px;
  height: auto;
  object-fit: contain; /* keeps aspect ratio sane */
  max-height: 100px; /* optional safety cap */
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .bc-ac-hit__img {
    width: 60px;
    max-height: 60px;
  }
}
