/* Cucumber RC: Bentriz / ps_searchbar compatibility, 2026-10-06. */
:is(#header, #wrapper) #search_widget {
  width: 420px;
  max-width: 100%;
  min-width: 0;
  height: auto;
  overflow: visible;
  padding: 0;
}
:is(#header, #wrapper) #search_widget form {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 48px;
  border: 1px solid #626262;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
:is(#header, #wrapper) #search_widget form:focus-within {
  outline: 3px solid #f5b0b0;
  outline-offset: 3px;
}
:is(#header, #wrapper) #search_widget input[name="s"] {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  height: 100%;
  padding: 0 16px;
  border: 0;
  border-radius: 5px 0 0 5px;
  background: #fff;
  color: #262626;
  font-size: 16px;
  box-shadow: none;
}
:is(#header, #wrapper) #search_widget input[name="s"]::placeholder {
  color: #666;
  opacity: 1;
}
:is(#header, #wrapper) #search_widget button[type="submit"] {
  position: static;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 48px;
  height: 100%;
  padding: 0 16px;
  margin: 0;
  border: 0;
  border-radius: 0 5px 5px 0;
  background: #c90b0b;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
:is(#header, #wrapper) #search_widget button[type="submit"]:hover {
  background: #ab0909;
}
:is(#header, #wrapper) #search_widget button[type="submit"]:focus-visible {
  outline: 3px solid #262626;
  outline-offset: -4px;
}
:is(#header, #wrapper) #search_widget .cucumber-search-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.ui-autocomplete.searchbar-autocomplete {
  box-sizing: border-box;
  max-width: calc(100vw - 30px);
  max-height: min(420px, 60vh);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px;
  margin-top: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  z-index: 1000;
}
.ui-autocomplete.searchbar-autocomplete li a,
.ui-autocomplete.searchbar-autocomplete li a.ui-state-focus {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px;
  margin: 0;
  border: 0;
  border-radius: 3px;
  color: #262626;
  text-decoration: none;
  white-space: normal;
}
.ui-autocomplete.searchbar-autocomplete li a:hover,
.ui-autocomplete.searchbar-autocomplete li a.ui-state-focus,
.ui-autocomplete.searchbar-autocomplete li.ui-state-focus {
  background: #f6eeee;
  color: #8b0808;
}
.ui-autocomplete.searchbar-autocomplete li a .autocomplete-thumbnail {
  float: none;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  margin: 0;
  object-fit: contain;
}
.ui-autocomplete.searchbar-autocomplete .product {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.4;
}
@media (max-width: 767px) {
  :is(#header, #wrapper) #search_widget {
    float: none;
    clear: both;
    width: 100%;
    margin: 16px 0 4px;
  }
  :is(#header, #wrapper) #search_widget form { height: 48px; }
  :is(#header, #wrapper) #search_widget button[type="submit"] { padding: 0 12px; }
}
