/* Amaro Commerce 2.4.1 — sugestões do catálogo no próprio campo de pesquisa. */

form[data-amaro-search] {
  position: relative !important;
  overflow: visible !important;
  z-index: 45;
}

form[data-amaro-search] .amaro-search-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  max-height: min(475px, 70vh);
  overflow-y: auto;
  padding: 10px 10px 0;
  border: 1px solid #dce4ef;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 16px 36px #10294d1e;
  color: #10294d;
  font: 12px/1.5 Inter, Arial, sans-serif;
  text-align: left;
  scrollbar-width: thin;
}

form[data-amaro-search] .amaro-search-suggestions[hidden] { display: none !important; }

form[data-amaro-search] .amaro-suggest-heading {
  padding: 7px 0 5px;
  border-bottom: 1px solid #e0e5ed;
  color: #69798c;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: .35px;
  text-transform: uppercase;
}

/* A especificidade neutraliza estilos globais do Elementor e do tema. */
form[data-amaro-search] .amaro-search-suggestions button {
  display: flex !important;
  align-items: center;
  width: 100% !important;
  height: auto !important;
  min-height: 32px;
  margin: 0 !important;
  padding: 7px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #52657d !important;
  font: 400 12px/1.5 Inter, Arial, sans-serif !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
  text-align: left !important;
  white-space: normal !important;
  cursor: pointer;
}

form[data-amaro-search] .amaro-search-suggestions button:hover,
form[data-amaro-search] .amaro-search-suggestions button:focus-visible {
  background: #edf3fc !important;
  color: #10439a !important;
  outline: none;
}

form[data-amaro-search] .amaro-suggest-category {
  justify-content: flex-start;
  min-height: 29px;
}

form[data-amaro-search] .amaro-suggest-product {
  gap: 10px;
  min-height: 55px !important;
  border-bottom: 1px solid #edf0f5 !important;
}

form[data-amaro-search] .amaro-suggest-thumb {
  display: block;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid #e3e8f0;
  border-radius: 5px;
  background: #f8fafc;
}

form[data-amaro-search] .amaro-suggest-thumb .amaro-v2-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #f8fafc;
}

form[data-amaro-search] .amaro-suggest-thumb .amaro-v2-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

form[data-amaro-search] .amaro-suggest-thumb .amaro-v2-empty > span { font-size: 19px; }
form[data-amaro-search] .amaro-suggest-thumb .amaro-v2-empty > small { display: none; }

form[data-amaro-search] .amaro-suggest-name {
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  overflow-wrap: anywhere;
}

form[data-amaro-search] .amaro-search-suggestions .amaro-suggest-price {
  flex: 0 0 auto;
  margin-left: auto;
  color: #10439a;
  font: 600 11px/1.4 Inter, Arial, sans-serif;
  white-space: nowrap;
}

form[data-amaro-search] .amaro-search-suggestions button.amaro-suggest-all {
  justify-content: center;
  margin: 2px 0 0 !important;
  padding: 12px 5px !important;
  border-top: 1px solid #e3e8f0 !important;
  color: #10439a !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-align: center !important;
  text-transform: uppercase !important;
}

form[data-amaro-search] .amaro-suggest-empty {
  margin: 12px 0 16px;
  color: #647187;
  font-size: 11px;
}

@media (max-width: 580px) {
  form[data-amaro-search] .amaro-search-suggestions { max-height: min(400px, 65vh); padding: 8px 8px 0; }
  form[data-amaro-search] .amaro-suggest-product { gap: 8px; }
  form[data-amaro-search] .amaro-suggest-thumb { flex-basis: 38px; width: 38px; height: 38px; }
  form[data-amaro-search] .amaro-search-suggestions button { font-size: 11px !important; }
  form[data-amaro-search] .amaro-search-suggestions .amaro-suggest-price { font-size: 10px; }
}

/*
 * Correção de compatibilidade: temas e cabeçalhos do Elementor aplicam o
 * azul de fundo a TODO botão dentro da barra de busca (inclusive sugestões).
 * Estas regras vencem esses estilos sem alterar o botão da lupa ou o layout.
 */
html body form[data-amaro-search] .amaro-search-suggestions > button.amaro-suggest-category,
html body form[data-amaro-search] .amaro-search-suggestions > button.amaro-suggest-product,
html body form[data-amaro-search] .amaro-search-suggestions > button.amaro-suggest-all {
  background: #fff !important;
  background-image: none !important;
  color: #657385 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html body form[data-amaro-search] .amaro-search-suggestions > button.amaro-suggest-category:hover,
html body form[data-amaro-search] .amaro-search-suggestions > button.amaro-suggest-product:hover,
html body form[data-amaro-search] .amaro-search-suggestions > button.amaro-suggest-all:hover,
html body form[data-amaro-search] .amaro-search-suggestions > button.amaro-suggest-category:focus-visible,
html body form[data-amaro-search] .amaro-search-suggestions > button.amaro-suggest-product:focus-visible,
html body form[data-amaro-search] .amaro-search-suggestions > button.amaro-suggest-all:focus-visible {
  background: #f5f7fa !important;
  background-image: none !important;
  color: #10439a !important;
}

html body form[data-amaro-search] .amaro-search-suggestions .amaro-suggest-name {
  color: inherit !important;
}

html body form[data-amaro-search] .amaro-search-suggestions .amaro-suggest-price {
  color: #718093 !important;
}

html body form[data-amaro-search] .amaro-search-suggestions > button.amaro-suggest-all {
  color: #708095 !important;
}

/* O JS reforça o fundo branco com estilo inline para instalações com CSS do
 * Elementor mais específico; estas regras preservam o mesmo visual sem JS. */
form[data-amaro-search] .amaro-search-suggestions {
  color-scheme: light;
  background-color: #fff !important;
}
