/* ==========================================================
   ATREVE SEARCH 1.3.7
   Front office — PC/Tablet + Mobile independentes
   Visual preservado; integração de largura corrigida.
   ========================================================== */

.atreve-search {
  position: relative;
  width: 100%;
  max-width: none;
  overflow: visible;
  font-family: var(--as-font-family, 'Poppins', Arial, sans-serif);
  z-index: 1200;
}
.atreve-search,
.atreve-search * {
  box-sizing: border-box;
}
.atreve-search svg {
  display: block;
  width: var(--as-submit-icon, 20px);
  height: var(--as-submit-icon, 20px);
  fill: currentColor;
}
.atreve-search-form {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
}
.atreve-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.atreve-search-input {
  width: 100%;
  min-width: 0;
  height: var(--as-input-h, 46px);
  padding: 0 calc(var(--as-submit-w, 34px) + var(--as-input-pad-x, 16px)) 0 var(--as-input-pad-x, 16px);
  border: var(--as-border-width, 1px) solid var(--as-border, #eadde0);
  border-radius: var(--as-input-radius, 999px);
  background: var(--as-bg, #fff);
  color: var(--as-text, #24181c);
  font-family: var(--as-font-family, 'Poppins', Arial, sans-serif);
  font-size: var(--as-input-size, 14px);
  font-weight: var(--as-font-weight, 400);
  outline: 0;
  box-shadow: var(--as-shadow, none);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.atreve-search-input::placeholder {
  color: var(--as-placeholder, #8b8185);
  opacity: 1;
}
/* v1.2.9 — foco definitivo aprovado: luz pérola/blush, SEM border vermelha.
   Este estado aparece apenas quando o input recebe foco (clique/escrita), nunca no hover.
   O efeito combina uma linha quase branca, um brilho imediato e um halo exterior suave.
   A sombra principal é aplicada diretamente ao INPUT para não depender de pseudo-elementos
   que podem ser neutralizados ou recortados pelo tema. O wrapper acrescenta apenas o halo
   mais difuso e mantém o botão integralmente dentro da cápsula. */
.atreve-search-input-wrap {
  isolation: isolate;
  overflow: visible !important;
}
.atreve-search-input-wrap::before,
.atreve-search-input-wrap::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: var(--as-input-radius, 999px);
  opacity: 0;
  transition: opacity .18s ease, box-shadow .18s ease;
}
/* Halo difuso exterior. */
.atreve-search-input-wrap::before {
  inset: -3px;
  z-index: 0;
  border: 0;
  box-shadow:
    0 0 8px 2px rgba(255,250,247,.92),
    0 0 var(--as-focus-glow-size, 20px) 5px var(--as-focus-glow, rgba(243,216,206,.90));
}
/* Reflexo interior pérola, muito discreto. */
.atreve-search-input-wrap::after {
  inset: 1px;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.76);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 -1px 0 rgba(238,221,215,.26);
}
.atreve-search .atreve-search-input {
  position: relative;
  z-index: 1;
}
.atreve-search .atreve-search-input:focus,
.atreve-search .atreve-search-input:focus-visible {
  border: 1px solid rgba(255,250,247,.98) !important;
  outline: 0 !important;
  outline-offset: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background: var(--as-bg, #fff) !important;
  /* Mesma família visual do brilho do menu, mas sem vermelho/bordeaux. */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(237,219,212,.22),
    0 0 0 1px rgba(255,255,255,.98),
    0 0 0 2px rgba(248,232,226,.82),
    0 0 7px 2px rgba(255,249,245,.98),
    0 0 var(--as-focus-glow-size, 20px) 4px var(--as-focus-glow, rgba(243,216,206,.90)),
    0 5px 14px rgba(182,145,132,.10) !important;
}
.atreve-search .atreve-search-input-wrap:focus-within,
.atreve-search .atreve-search-input-wrap.is-input-focused {
  border-radius: var(--as-input-radius, 999px);
  overflow: visible !important;
}
.atreve-search .atreve-search-input-wrap:focus-within::before,
.atreve-search .atreve-search-input-wrap:focus-within::after,
.atreve-search .atreve-search-input-wrap.is-input-focused::before,
.atreve-search .atreve-search-input-wrap.is-input-focused::after {
  opacity: 1;
}
.atreve-search-desktop[data-focus-glow="0"] .atreve-search-input-wrap:focus-within::before,
.atreve-search-desktop[data-focus-glow="0"] .atreve-search-input-wrap:focus-within::after,
.atreve-search-desktop[data-focus-glow="0"] .atreve-search-input-wrap.is-input-focused::before,
.atreve-search-desktop[data-focus-glow="0"] .atreve-search-input-wrap.is-input-focused::after,
.atreve-search-mobile[data-focus-glow="0"] .atreve-search-input-wrap:focus-within::before,
.atreve-search-mobile[data-focus-glow="0"] .atreve-search-input-wrap:focus-within::after,
.atreve-search-mobile[data-focus-glow="0"] .atreve-search-input-wrap.is-input-focused::before,
.atreve-search-mobile[data-focus-glow="0"] .atreve-search-input-wrap.is-input-focused::after {
  opacity: 0 !important;
}
.atreve-search-desktop[data-focus-glow="0"] .atreve-search-input:focus,
.atreve-search-desktop[data-focus-glow="0"] .atreve-search-input:focus-visible,
.atreve-search-mobile[data-focus-glow="0"] .atreve-search-input:focus,
.atreve-search-mobile[data-focus-glow="0"] .atreve-search-input:focus-visible {
  border-color: var(--as-border, #eadde0) !important;
  box-shadow: var(--as-shadow, none) !important;
}

/* Botão da lupa — fica sempre integralmente dentro da cápsula da pesquisa.
   O tema aplicava dimensões/background ao button e a área branca podia ultrapassar
   a ponta direita. Aqui limitamos a dimensão ao interior útil do input e calculamos
   o inset a partir da altura real da própria barra. */
.atreve-search-submit {
  position: absolute;
  right: max(3px, calc((var(--as-input-h, 46px) - var(--as-submit-w, 34px)) / 2));
  top: 50%;
  transform: translateY(-50%) scale(1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(var(--as-submit-w, 34px), calc(var(--as-input-h, 46px) - 8px));
  height: min(var(--as-submit-h, 34px), calc(var(--as-input-h, 46px) - 8px));
  max-width: calc(var(--as-input-h, 46px) - 8px);
  max-height: calc(var(--as-input-h, 46px) - 8px);
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: var(--as-submit-border-width, 0px) solid var(--as-submit-border-color, #930024);
  border-radius: var(--as-submit-radius, 999px);
  background: var(--as-submit-bg, transparent);
  background-clip: padding-box;
  color: var(--as-submit-color, #930024);
  box-shadow: none !important;
  outline: 0 !important;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  overflow: hidden;
  z-index: 2;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.atreve-search-submit:hover,
.atreve-search-submit:focus-visible {
  background: var(--as-submit-hover-bg, #930024);
  color: var(--as-submit-hover-color, #fff);
  transform: translateY(-50%) scale(var(--as-submit-scale, 1.05));
}
.atreve-search-spinner {
  display: none;
  position: absolute;
  right: calc(var(--as-submit-w, 34px) + var(--as-spinner-gap, 10px));
  width: var(--as-spinner-size, 16px);
  height: var(--as-spinner-size, 16px);
  border: var(--as-spinner-border, 2px) solid rgba(147, 0, 36, .2);
  border-top-color: var(--as-accent, #930024);
  border-radius: 50%;
  animation: as-spin .7s linear infinite;
}
.atreve-search.is-loading .atreve-search-spinner { display: block; }
@keyframes as-spin { to { transform: rotate(360deg); } }

/* ==========================================================
   PC / TABLET
   ========================================================== */
.atreve-search-desktop {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  transform: translate(var(--as-offset-x, 0px), var(--as-offset-y, 0px));
}

/*
 * v1.3.7 — integração correta com a Área do Header / Builder.
 * O contentor exterior .atreve-search já recebe a largura efetivamente
 * atribuída pelo tema (ex.: 480px). A barra interna deve ocupar essa
 * largura a 100%, em vez de manter uma segunda largura independente.
 *
 * Desta forma:
 *   Área 480px -> barra 480px
 *   Área 600px -> barra 600px
 * e nunca existe overflow para fora da Área.
 */
.atreve-search-desktop[data-align="left"],
.atreve-search-desktop[data-align="center"],
.atreve-search-desktop[data-align="right"] {
  margin-left: 0;
  margin-right: 0;
}

.atreve-search-desktop > .atreve-search-form,
.atreve-search-desktop > .atreve-search-form > .atreve-search-input-wrap,
.atreve-search-desktop .atreve-search-input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.atreve-search-desktop .atreve-search-results {
  position: absolute;
  top: calc(100% + 8px);
  width: var(--as-drop-w, 560px);
  max-width: min(var(--as-drop-w, 560px), calc(100vw - 24px));
}
.atreve-search-desktop[data-align="left"] .atreve-search-results {
  left: 0;
  right: auto;
  transform: translateX(var(--as-clamp-shift, 0px));
}
.atreve-search-desktop[data-align="center"] .atreve-search-results {
  left: 50%;
  right: auto;
  transform: translateX(calc(-50% + var(--as-clamp-shift, 0px)));
}
.atreve-search-desktop[data-align="right"] .atreve-search-results {
  left: auto;
  right: 0;
  transform: translateX(var(--as-clamp-shift, 0px));
}

/* ==========================================================
   DROPDOWN / SUGESTÕES
   O scroll horizontal é bloqueado em todos os níveis.
   ========================================================== */
.atreve-search-results {
  display: none;
  min-width: 0;
  background: var(--as-bg, #fff);
  border: var(--as-border-width, 1px) solid var(--as-border, #eadde0);
  border-radius: var(--as-drop-radius, 16px);
  box-shadow: 0 18px 44px rgba(44, 18, 27, .16);
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: none;
}
.atreve-search-results.is-open { display: block; }
.atreve-search-results *,
.atreve-search-result-list,
.atreve-search-result-item,
.atreve-search-result-link,
.atreve-search-result-body {
  min-width: 0;
  max-width: 100%;
}
.atreve-search-result-list {
  width: 100%;
  margin: 0;
  padding:
    var(--as-drop-pad-top, 10px)
    var(--as-drop-pad-right, 10px)
    var(--as-drop-pad-bottom, 10px)
    var(--as-drop-pad-left, 10px);
  list-style: none;
  max-height: min(var(--as-drop-max-h, 520px), 70vh);
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  overscroll-behavior-x: none;
  scrollbar-gutter: stable;
}
.atreve-search-result-item {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.atreve-search-result-link {
  display: flex;
  align-items: center;
  gap: var(--as-item-gap, 12px);
  width: 100%;
  min-height: var(--as-item-min-h, 72px);
  padding:
    var(--as-item-pad-top, 10px)
    var(--as-item-pad-right, 12px)
    var(--as-item-pad-bottom, 10px)
    var(--as-item-pad-left, 12px);
  border-radius: max(6px, calc(var(--as-drop-radius, 16px) * .65));
  color: var(--as-text, #24181c);
  text-decoration: none !important;
  white-space: normal;
  overflow: hidden;
  transition: background .18s ease;
}
.atreve-search-result-link:hover,
.atreve-search-result-link.is-active {
  background: var(--as-hover, #fff5f7);
  color: var(--as-text, #24181c);
}

/* Miniatura — largura/altura, margem, raio e object-fit configuráveis */
.atreve-search-result-image {
  flex: 0 0 var(--as-image-w, 58px);
  width: var(--as-image-w, 58px);
  height: var(--as-image-h, 58px);
  margin-top: var(--as-image-margin-top, 0px);
  margin-bottom: var(--as-image-margin-bottom, 0px);
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  border-radius: var(--as-image-radius, 10px);
  background: #f6f4f5;
  overflow: hidden;
}
.atreve-search-result-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: var(--as-image-fit, contain);
}
.atreve-search-result-body {
  flex: 1 1 auto;
  overflow: hidden;
}
.atreve-search-result-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--as-text, #24181c);
  font-family: var(--as-font-family, 'Poppins', Arial, sans-serif);
  font-size: var(--as-title-size, 12px);
  font-weight: var(--as-title-weight, 500);
  line-height: 1.35;
}
.atreve-search-result-meta {
  display: flex;
  align-items: center;
  gap: var(--as-meta-gap, 7px);
  flex-wrap: wrap;
  margin-top: var(--as-meta-mt, 4px);
  overflow: hidden;
  color: #766a6e;
  font-size: var(--as-meta-size, 10px);
  line-height: 1.3;
}
.atreve-search-result-price {
  margin-top: var(--as-price-mt, 5px);
  color: var(--as-accent, #930024);
  font-family: var(--as-font-family, 'Poppins', Arial, sans-serif);
  font-size: var(--as-price-size, 12px);
  font-weight: var(--as-price-weight, 600);
}
.atreve-search-result-arrow {
  flex: 0 0 auto;
  color: var(--as-accent, #930024);
  font-size: var(--as-arrow-size, 23px);
  font-weight: 300;
  transition: transform .18s ease;
}
.atreve-search-result-link:hover .atreve-search-result-arrow,
.atreve-search-result-link.is-active .atreve-search-result-arrow {
  transform: translateX(3px);
}

/* Botão "Ver todos os resultados" — tamanho totalmente configurável */
.atreve-search-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--as-viewall-w, 70%);
  max-width: calc(100% - 16px);
  min-height: var(--as-viewall-h, 38px);
  height: var(--as-viewall-h, 38px);
  margin: var(--as-viewall-mt, 8px) auto var(--as-viewall-mb, 8px);
  padding: 0 var(--as-viewall-pad-x, 14px);
  border: 0;
  border-radius: var(--as-viewall-radius, 999px);
  background: var(--as-viewall-bg, #930024);
  color: var(--as-viewall-color, #fff) !important;
  font-family: var(--as-font-family, 'Poppins', Arial, sans-serif);
  font-size: var(--as-viewall-size, 10px);
  font-weight: var(--as-viewall-weight, 600);
  line-height: 1;
  letter-spacing: .4px;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.atreve-search-view-all:hover,
.atreve-search-view-all:focus-visible {
  background: var(--as-viewall-hover-bg, #720019);
  color: var(--as-viewall-hover-color, #fff) !important;
  transform: scale(var(--as-viewall-scale, 1.02));
}
.atreve-search-message {
  padding: var(--as-message-pad-y, 18px) var(--as-message-pad-x, 14px);
  color: #766a6e;
  font-size: var(--as-message-size, 12px);
  text-align: center;
}

/* ==========================================================
   MOBILE
   ========================================================== */
.atreve-search-mobile {
  display: none;
  width: var(--as-input-w, 100%);
  max-width: 100%;
  position: relative;
}
.atreve-search-mobile[data-align="left"] { margin-left: 0; margin-right: auto; }
.atreve-search-mobile[data-align="center"] { margin-left: auto; margin-right: auto; }
.atreve-search-mobile[data-align="right"] { margin-left: auto; margin-right: 0; }
.atreve-search-mobile[data-align="left"] .atreve-search-mobile-trigger { margin-left: 0; margin-right: auto; }
.atreve-search-mobile[data-align="center"] .atreve-search-mobile-trigger { margin-left: auto; margin-right: auto; }
.atreve-search-mobile[data-align="right"] .atreve-search-mobile-trigger { margin-left: auto; margin-right: 0; }
.atreve-search-mobile .atreve-search-mobile-trigger {
  transform: translate(var(--as-offset-x, 0px), var(--as-offset-y, 0px));
}
body.atreve-search-mobile-open { overflow: hidden; }
.atreve-search-mobile-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--as-mobile-trigger-size, 42px);
  height: var(--as-mobile-trigger-size, 42px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--as-accent, #930024);
  cursor: pointer;
}
.atreve-search-mobile-panel { display: none; }
.atreve-search-mobile-panel.is-open { display: block; }
.atreve-search-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--as-mobile-head-mb, 16px);
}
.atreve-search-mobile-heading {
  font-family: var(--as-font-family, 'Poppins', Arial, sans-serif);
  font-size: var(--as-mobile-heading-size, 20px);
  font-weight: 600;
  color: var(--as-text, #24181c);
}
.atreve-search-mobile-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--as-mobile-close-size, 40px);
  height: var(--as-mobile-close-size, 40px);
  border: var(--as-border-width, 1px) solid var(--as-border, #eadde0);
  border-radius: 50%;
  background: #fff;
  color: var(--as-text, #24181c);
  font-size: var(--as-mobile-close-font, 28px);
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.atreve-search[data-mobile-layout="fullscreen"] .atreve-search-mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  padding: var(--as-mobile-panel-pad-top, 18px) var(--as-mobile-panel-pad-x, 16px) var(--as-mobile-panel-pad-bottom, 28px);
  background: var(--as-bg, #fff);
  overflow-y: auto;
  overflow-x: hidden;
}
.atreve-search[data-mobile-layout="fullscreen"] .atreve-search-mobile-panel .atreve-search-form {
  width: var(--as-input-w, 100%);
  max-width: 100%;
  transform: translate(var(--as-offset-x, 0px), var(--as-offset-y, 0px));
}
.atreve-search[data-mobile-layout="fullscreen"] .atreve-search-mobile[data-align="left"] .atreve-search-mobile-panel .atreve-search-form { margin-left: 0; margin-right: auto; }
.atreve-search[data-mobile-layout="fullscreen"] .atreve-search-mobile[data-align="center"] .atreve-search-mobile-panel .atreve-search-form { margin-left: auto; margin-right: auto; }
.atreve-search[data-mobile-layout="fullscreen"] .atreve-search-mobile[data-align="right"] .atreve-search-mobile-panel .atreve-search-form { margin-left: auto; margin-right: 0; }
.atreve-search[data-mobile-layout="fullscreen"] .atreve-search-mobile-panel .atreve-search-results {
  position: static;
  width: min(var(--as-drop-w, 100%), 100%);
  margin-top: var(--as-mobile-results-mt, 12px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.atreve-search[data-mobile-layout="fullscreen"] .atreve-search-result-list {
  max-height: var(--as-drop-max-h, 520px);
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
.atreve-search[data-mobile-layout="fullscreen"] .atreve-search-result-link {
  border-bottom: 1px solid var(--as-border, #eadde0);
}

.atreve-search[data-mobile-layout="dropdown"] .atreve-search-mobile { position: relative; }
.atreve-search[data-mobile-layout="dropdown"] .atreve-search-mobile-panel {
  position: absolute;
  top: calc(100% + var(--as-mobile-dropdown-gap, 6px));
  width: var(--as-drop-w, 520px);
  max-width: calc(100vw - 24px);
  padding: var(--as-mobile-dropdown-pad, 12px);
  background: var(--as-bg, #fff);
  border: var(--as-border-width, 1px) solid var(--as-border, #eadde0);
  border-radius: var(--as-drop-radius, 14px);
  box-shadow: 0 18px 44px rgba(44, 18, 27, .16);
  overflow-x: hidden;
}
.atreve-search[data-mobile-layout="dropdown"] .atreve-search-mobile[data-align="left"] .atreve-search-mobile-panel {
  left: var(--as-offset-x, 0px);
  right: auto;
  margin-top: var(--as-offset-y, 0px);
}
.atreve-search[data-mobile-layout="dropdown"] .atreve-search-mobile[data-align="center"] .atreve-search-mobile-panel {
  left: 50%;
  right: auto;
  transform: translateX(calc(-50% + var(--as-offset-x, 0px)));
  margin-top: var(--as-offset-y, 0px);
}
.atreve-search[data-mobile-layout="dropdown"] .atreve-search-mobile[data-align="right"] .atreve-search-mobile-panel {
  left: auto;
  right: calc(0px - var(--as-offset-x, 0px));
  margin-top: var(--as-offset-y, 0px);
}
.atreve-search[data-mobile-layout="dropdown"] .atreve-search-mobile-heading { font-size: var(--as-mobile-dropdown-heading, 15px); }
.atreve-search[data-mobile-layout="dropdown"] .atreve-search-mobile-close { width: var(--as-mobile-dropdown-close, 32px); height: var(--as-mobile-dropdown-close, 32px); font-size: var(--as-mobile-dropdown-close-font, 22px); }
.atreve-search[data-mobile-layout="dropdown"] .atreve-search-results {
  position: static;
  width: 100%;
  margin-top: 8px;
  border: 0;
  box-shadow: none;
}

/* ==========================================================
   Página de resultados
   O cartão/HTML vem do próprio tema; aqui apenas controlamos
   espaçamento, nº de colunas e paginação do módulo.
   ========================================================== */
.atreve-search-page {
  padding: 16px 0 40px;
  font-family: 'Poppins', Arial, sans-serif;
}
.atreve-search-page-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  color: #766a6e;
  font-size: 12px;
}
.atreve-search-page-query,
.atreve-search-page-count { margin: 0; }
.atreve-search-page-query strong { color: #930024; font-weight: 600; }
.atreve-search-empty-page {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px;
  border: 1px solid #eadde0;
  border-radius: 18px;
  background: #fff;
  color: #766a6e;
}
.atreve-search-empty-page strong { color: #24181c; font-size: 16px; }

/* O Leo usa colunas Bootstrap. Dentro da pesquisa o módulo controla apenas a largura das colunas, sem tocar no cartão. */
.atreve-search-theme-products .product_list > .row,
.atreve-search-theme-products .products.row {
  display: flex;
  flex-wrap: wrap;
}
.atreve-search-theme-products .ajax_block_product {
  flex: 0 0 calc(100% / var(--as-cols-desktop, 5)) !important;
  max-width: calc(100% / var(--as-cols-desktop, 5)) !important;
  width: calc(100% / var(--as-cols-desktop, 5)) !important;
}
.atreve-search-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 32px;
}
.atreve-search-page-number,
.atreve-search-page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #eadde0;
  border-radius: 999px;
  background: #fff;
  color: #24181c !important;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none !important;
}
.atreve-search-page-number.active,
.atreve-search-page-number:hover,
.atreve-search-page-nav:hover {
  border-color: #930024;
  background: #930024;
  color: #fff !important;
}

@media (max-width: 1199px) and (min-width: 768px) {
  .atreve-search-theme-products .ajax_block_product {
    flex-basis: calc(100% / var(--as-cols-tablet, 3)) !important;
    max-width: calc(100% / var(--as-cols-tablet, 3)) !important;
    width: calc(100% / var(--as-cols-tablet, 3)) !important;
  }
}

@media (max-width: 767px) {
  .atreve-search-desktop { display: none !important; }
  .atreve-search-mobile { display: block; }
  .atreve-search-page { padding-top: 12px; }
  .atreve-search-theme-products .ajax_block_product {
    flex-basis: calc(100% / var(--as-cols-mobile, 2)) !important;
    max-width: calc(100% / var(--as-cols-mobile, 2)) !important;
    width: calc(100% / var(--as-cols-mobile, 2)) !important;
  }
  .atreve-search-result-title { font-size: var(--as-title-size, 14px); }
  .atreve-search-result-price { font-size: var(--as-price-size, 13px); }
}

/* v1.2.6 — evita focus rings/borders acrescentadas pelo tema/navegador. */
.atreve-search input[type="search"]:focus { outline: 0 !important; }
.atreve-search input[type="search"]::-webkit-search-decoration,
.atreve-search input[type="search"]::-webkit-search-cancel-button,
.atreve-search input[type="search"]::-webkit-search-results-button,
.atreve-search input[type="search"]::-webkit-search-results-decoration { -webkit-appearance: none; }


/* ==========================================================
   v1.3.9 — MOBILE PREMIUM / PAINEL ADAPTATIVO
   - painel é montado diretamente no body para escapar a transforms/z-index do Header Builder;
   - começa sempre depois do header real;
   - botão fechar mantém círculo perfeito;
   - lista adapta-se à altura disponível e o CTA "Ver todos" permanece acessível.
   ========================================================== */
@media (max-width: 767px) {
  .atreve-search-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147482950;
    background: rgba(25, 16, 20, .48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
  }

  .atreve-search-mobile-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.atreve-search-mobile-open {
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: pan-x pan-y;
  }

  .atreve-search-mobile-panel--portal {
    position: fixed !important;
    top: var(--as-mobile-panel-top, 0px) !important;
    left: max(6px, env(safe-area-inset-left)) !important;
    right: max(6px, env(safe-area-inset-right)) !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    height: var(--as-mobile-panel-height, calc(100dvh - var(--as-mobile-panel-top, 0px))) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: max(14px, var(--as-mobile-panel-pad-top, 18px)) max(14px, var(--as-mobile-panel-pad-x, 16px)) max(14px, var(--as-mobile-panel-pad-bottom, 28px)) !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--as-bg, #fff) !important;
    border: 0 !important;
    border-top: 1px solid rgba(147, 0, 36, .08) !important;
    border-radius: 24px 24px 0 0 !important;
    box-shadow: 0 -2px 0 rgba(255,255,255,.72), 0 18px 42px rgba(36, 18, 24, .20) !important;
    overflow: hidden !important;
    z-index: 2147483000 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -7px, 0) !important;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    -webkit-overflow-scrolling: touch;
    contain: layout paint;
  }

  .atreve-search-mobile-panel--portal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) !important;
  }

  .atreve-search-mobile-panel--portal {
    font-family: var(--as-font-family, 'Poppins', Arial, sans-serif);
  }

  .atreve-search-mobile-panel--portal .atreve-search-submit svg {
    display: block !important;
    width: var(--as-submit-icon, 20px) !important;
    height: var(--as-submit-icon, 20px) !important;
    fill: currentColor !important;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-head {
    flex: 0 0 auto;
    width: 100%;
    min-height: 42px;
    margin: 0 0 12px !important;
    padding: 0;
    gap: 12px;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-heading {
    min-width: 0;
    font-size: clamp(18px, 5vw, var(--as-mobile-heading-size, 20px));
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.2px;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-close,
  .atreve-search-mobile-close {
    width: var(--as-mobile-close-size, 40px) !important;
    height: var(--as-mobile-close-size, 40px) !important;
    min-width: var(--as-mobile-close-size, 40px) !important;
    min-height: var(--as-mobile-close-size, 40px) !important;
    max-width: var(--as-mobile-close-size, 40px) !important;
    max-height: var(--as-mobile-close-size, 40px) !important;
    flex: 0 0 var(--as-mobile-close-size, 40px) !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--as-border, #eadde0) !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: var(--as-text, #24181c) !important;
    line-height: 0 !important;
    box-shadow: 0 2px 8px rgba(50, 24, 31, .05) !important;
    overflow: hidden !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-close svg,
  .atreve-search-mobile-close svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px;
    fill: none !important;
  }

  .atreve-search-mobile-panel--portal .atreve-search-form {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    transform: none !important;
  }

  .atreve-search-mobile-panel--portal .atreve-search-input-wrap {
    flex: 0 0 auto;
    width: 100% !important;
    border-radius: var(--as-input-radius, 16px) !important;
  }

  .atreve-search-mobile-panel--portal .atreve-search-input {
    width: 100% !important;
    max-width: none !important;
    border-radius: var(--as-input-radius, 16px) !important;
    overflow: hidden !important;
  }

  .atreve-search-mobile-panel--portal .atreve-search-results {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    max-height: var(--as-mobile-results-max, 58dvh) !important;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    overflow: hidden !important;
    transform: none !important;
  }

  .atreve-search-mobile-panel--portal .atreve-search-results.is-open {
    display: flex !important;
    flex-direction: column !important;
  }

  .atreve-search-mobile-panel--portal .atreve-search-result-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 4px 0 2px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: auto;
    -webkit-overflow-scrolling: touch;
  }

  .atreve-search-mobile-panel--portal .atreve-search-result-link {
    width: 100%;
    border-bottom: 1px solid rgba(234, 221, 224, .85);
    border-radius: 12px;
  }

  .atreve-search-mobile-panel--portal .atreve-search-result-item:last-child .atreve-search-result-link {
    border-bottom-color: transparent;
  }

  .atreve-search-mobile-panel--portal .atreve-search-view-all {
    position: relative !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-height: max(44px, var(--as-viewall-h, 42px)) !important;
    height: max(44px, var(--as-viewall-h, 42px)) !important;
    margin: 10px 0 2px !important;
    padding: 0 16px !important;
    border-radius: 14px !important;
    z-index: 3;
    box-shadow: 0 -10px 24px 10px rgba(255, 255, 255, .96), 0 8px 20px rgba(147, 0, 36, .13) !important;
  }

  .atreve-search-mobile-panel--portal .atreve-search-message {
    flex: 0 0 auto;
    margin-top: 4px;
    border-radius: 14px;
    background: #fff8f9;
  }

  /* O painel vive fora do .atreve-search enquanto está aberto; preservar o foco premium. */
  .atreve-search-mobile-panel--portal .atreve-search-input {
    position: relative;
    z-index: 1;
  }
  .atreve-search-mobile-panel--portal .atreve-search-input:focus,
  .atreve-search-mobile-panel--portal .atreve-search-input:focus-visible {
    border: 1px solid rgba(255,250,247,.98) !important;
    outline: 0 !important;
    background: var(--as-bg, #fff) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,1),
      0 0 0 1px rgba(255,255,255,.98),
      0 0 0 2px rgba(248,232,226,.82),
      0 0 7px 2px rgba(255,249,245,.98),
      0 0 var(--as-focus-glow-size, 16px) 4px var(--as-focus-glow, rgba(243,216,206,.90)) !important;
  }
  .atreve-search-mobile-panel--portal[data-focus-glow="0"] .atreve-search-input:focus,
  .atreve-search-mobile-panel--portal[data-focus-glow="0"] .atreve-search-input:focus-visible {
    border-color: var(--as-border, #eadde0) !important;
    box-shadow: var(--as-shadow, none) !important;
  }
}


/* ==========================================================
   v1.4.0 — INÍCIO DA PESQUISA MOBILE
   - pesquisas recentes locais;
   - "Explorar por categoria" usa apenas categorias-mãe reais do PrestaShop;
   - ao escrever, esta área desaparece e ficam apenas os produtos/resultados.
   ========================================================== */
@media (max-width: 767px) {
  .atreve-search-mobile-panel--portal .atreve-search-mobile-home {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    margin: 14px 0 0;
    padding: 0 1px 8px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-home[hidden],
  .atreve-search-mobile-panel--portal .atreve-search-mobile-recent[hidden] {
    display: none !important;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-recent {
    margin: 0 0 24px;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-section-title {
    margin: 0 0 10px;
    color: var(--as-text, #24181c);
    font-family: var(--as-font-family, 'Poppins', Arial, sans-serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.1px;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-section-head .atreve-search-mobile-section-title {
    margin-bottom: 0;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-recent-clear {
    flex: 0 0 auto;
    min-height: 32px;
    margin: 0;
    padding: 4px 2px 4px 10px;
    border: 0;
    background: transparent;
    color: var(--as-accent, #930024);
    font-family: var(--as-font-family, 'Poppins', Arial, sans-serif);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-recent-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid rgba(147, 0, 36, .10);
    border-radius: 999px;
    background: #fff8f9;
    color: #3f3035;
    font-family: var(--as-font-family, 'Poppins', Arial, sans-serif);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.15;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(63, 28, 38, .03);
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-recent-chip:active {
    transform: scale(.98);
    background: #fff1f4;
    border-color: rgba(147, 0, 36, .18);
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-recent-chip svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    fill: currentColor;
    opacity: .72;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-categories {
    margin: 0;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px 8px;
    width: 100%;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-category {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 8px 8px;
    border: 1px solid rgba(147, 0, 36, .08);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff8f9 0%, #fff2f5 100%);
    color: var(--as-accent, #930024) !important;
    font-family: var(--as-font-family, 'Poppins', Arial, sans-serif);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    overflow-wrap: anywhere;
    box-shadow: 0 2px 7px rgba(88, 34, 49, .035);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  }

  .atreve-search-mobile-panel--portal .atreve-search-mobile-category:active {
    transform: scale(.985);
    border-color: rgba(147, 0, 36, .18);
    box-shadow: 0 1px 3px rgba(88, 34, 49, .035);
  }

  /* Quando existem resultados, o espaço pertence totalmente à lista. */
  .atreve-search-mobile-panel--portal .atreve-search-results.is-open {
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }
}
