/**** 2026 NICO - Buscador homs: estilos del buscador en vivo (fase 2) ****/

.homs-buscador {
    position: relative;
    width: 100%;
    max-width: 700px;
}

/* Campo + botón (aspecto inicial: se ajusta a la cabecera de homs en clon2) */
.homs-buscador__form {
    display: flex;
    align-items: center;
    margin: 0;
    background: #fff;
    border-radius: 999px;
    overflow: hidden;
}

.homs-buscador .homs-buscador__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 34px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
}

.homs-buscador .homs-buscador__input:focus {
    outline: none;
    box-shadow: none;
}

.homs-buscador .homs-buscador__btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 34px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    line-height: 1;
}

body.homs-general-context .homs-buscador .homs-buscador__btn { color: #fe5000; }
body.homs-context-eventos .homs-buscador .homs-buscador__btn { color: #0080de; }
body.homs-context-energia .homs-buscador .homs-buscador__btn { color: #000000; }
body.homs-context-formacion .homs-buscador .homs-buscador__btn { color: #ead869; }
body.homs-context-rehabilitacion .homs-buscador .homs-buscador__btn { color: #afafaf; }


.homs-buscador .homs-buscador__btn:hover {
    opacity: .85;
}

/* Que ocupe el ancho disponible dentro del header (el elemento HTML de Flatsome no crece solo) */
.header-main .header-nav:has(.homs-buscador) {
    width: 100%;
}

.header-main li.html:has(.homs-buscador) {
    flex: 1 1 auto;
}

.header-main .homs-buscador {
    min-width: 320px;
    max-width: 700px;
    margin: 0 auto;
}

/* Escritorio estrecho: el buscador no debe tocar los botones de la derecha */
@media (min-width: 850px) and (max-width: 1250px) {
    .header-main .homs-buscador {
        min-width: 0;
        max-width: 34vw;
    }
}

.homs-buscador__panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    margin-top: 4px;
    max-height: 70vh;
    overflow-y: auto;
    background: #fffffff2;
-webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.homs-buscador__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color .15s ease;
}

.homs-buscador__item:hover,
.homs-buscador__item.is-activo {
    background-color: #f7f7f7;
}

/* Color del texto fijo: evita el verde de los enlaces de Flatsome (a:hover) */
.homs-buscador .homs-buscador__item,
.homs-buscador .homs-buscador__item:hover,
.homs-buscador .homs-buscador__item:focus,
.homs-buscador .homs-buscador__item.is-activo {
    color: #4c4c4c;
}

.homs-buscador__item img {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.homs-buscador__txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.homs-buscador__titulo {
    line-height: 1.3;
    font-size: 14px;
  font-weight: 400;
  font-family: 'Aeonik-regular';
}

.homs-buscador__sku {
    font-size: 12px;
    opacity: .6;
}

.homs-buscador__vacio {
    padding: 12px;
    opacity: .7;
}

.homs-buscador__todos {
    display: block;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
}

.homs-buscador__todos:hover {
    background-color: #f7f7f7;
}

/* Fila del buscador en móvil y tablet */
.homs-buscador-movil {
    padding: 10px 0;
}

/**** 2026 NICO 11/2026 - Fondo de la fila del buscador móvil según el contexto ***************/
body.homs-general-context .homs-buscador-movil        { background: #fe5000; } /* naranja Homs */
body.homs-context-eventos .homs-buscador-movil        { background: #0080de; } /* azul eventos */
body.homs-context-energia .homs-buscador-movil        { background: #000000; } /* energía */
body.homs-context-formacion .homs-buscador-movil      { background: #ead869; } /* formación */
body.homs-context-rehabilitacion .homs-buscador-movil { background: #afafaf; } /* rehabilitación */
/**** FIN 2026 NICO ***************/

.homs-buscador-movil .homs-buscador {
    max-width: none;
  border-radius: 20px;
}

/* Hasta 849 px se oculta el buscador del header: se usa el de la fila de debajo */
@media (max-width: 849px) {
    #header .homs-buscador {
        display: none;
    }
}