.navbar-search {
    position: relative;
    width: 100%;
    max-width: 200px;

    /* FIX: mantener input + botón en una línea en TODAS las páginas */
    display: flex;
    align-items: center;
    gap: 8px;
}

#buscador-productos {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;

    /* FIX: que el input tome el espacio y no empuje al botón */
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
}

#sugerencias { 
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    width: 100%;
    z-index: 9999;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 0 0 4px 4px;

    /* FIX: asegurar que quede bajo el input */
    top: calc(100% + 6px);
    left: 0;
    box-sizing: border-box;
}

/* Solo móviles */
@media (max-width: 768px) {
	#sugerencias {
		width: 120%;  
	}
}
@media (max-width: 420px) {
	#sugerencias {
		width: 150%;  
	}
}

.sugerencia-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
    color: #000;
}
.sugerencia-item a span {
    font-size: 11px;
}
.sugerencia-item img {
    width: 40px;
   /* height: 40px;*/
    object-fit: cover;
    margin-right: 10px;
    border-radius: 3px;
}
.sugerencia-item:hover {
    background: #f8f8f8;
}
/* Texto del título dentro de las sugerencias */
#sugerencias .sugerencia-item a span {
    color: #000 !important; /* Negro o el color que quieras */
}

/* Opcional: cambia el color al pasar el mouse */
#sugerencias .sugerencia-item a:hover span {
    color: #000000 !important; /* Rojo o el color que quieras */
}

/*resultados de busqueda aca*/
.grid-resultados {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5em;
}
.resultado {
    background: white;
    border-radius: 12px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    padding: 1em;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.resultado-imagen {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5em;
}
.resultado img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.resultado-categoria {
    display: inline-block;
    background: #FFC21F;
    color: #000;
    font-weight: bold;
    padding: 0.3em 0.8em;
    border-radius: 100px;
    font-size: 0.8rem;
    margin-bottom: 0.5em;
}
.resultado h3 {
    font-size: 1rem;
    margin: 0;
}

#voice-search-btn i {
  font-size: 18px;     
  color: #ffffff;         
  cursor: pointer;
}

.search-voice-btn{
    margin-left:8px; 
    padding:6px 10px; 
    border:1px solid #ddd; 
    border-radius:8px;
    background:#fff; 
    cursor:pointer; 
    line-height:1; 
    font-size:16px;

    /* FIX: que no se transforme en botón flotante por CSS externo */
    position: static !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.search-voice-btn.is-listening{ 
    background:#ffe9a8; 
    border-color:#f3c048; 
} 

@media (max-width:480px){
    .search-voice-btn{ 
        padding:6px 8px; 
        font-size:15px; 
    }
}

.search-voice-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-left:8px;
    border:1px solid #ddd;
    background:#fff;
    cursor:pointer;
    width:34px;
    height:34px;
    border-radius:8px;
    line-height:1;

    /* FIX: que no se salga de la línea / no tome position raro */
    position: static !important;
    flex: 0 0 auto;
    box-sizing: border-box;
}

.search-voice-btn i{
    pointer-events:none;
}

.voice-hint{
    position:relative;
    margin-top:6px;
    font-size:12px;
    color:#333;
    background:#f6f6f6;
    border:1px solid #e3e3e3;
    border-radius:8px;
    padding:6px 10px;
    opacity:0;
    transition:opacity .2s ease;
    display:inline-block;
}
/* ==============================
   FIX FUERTE: mic flotante (Contáctanos / otras páginas)
   Pegar AL FINAL del CSS
   ============================== */

/* Asegura que el contenedor NO haga wrap */
.navbar-search{
  flex-wrap: nowrap !important;
}

/* Resetea CUALQUIER estilo externo que convierta el mic en botón flotante */
.navbar-search #voice-search-btn,
.navbar-search button#voice-search-btn,
.navbar-search .search-voice-btn{
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  float: none !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 34px !important;
  height: 34px !important;

  margin: 0 0 0 8px !important;
  padding: 0 !important;

  background: #fff !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  box-shadow: none !important;

  line-height: 1 !important;
  z-index: 2 !important;
}

/* Ícono del mic: evita que quede blanco sobre fondo blanco */
.navbar-search #voice-search-btn i,
.navbar-search .search-voice-btn i{
  color: #000 !important;
  font-size: 18px !important;
  pointer-events: none !important;
}
