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

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

/* Campo + botón, con el aspecto del buscador actual de Flatsome */
.smoh-buscador__form {
    display: flex;
    align-items: center;
    margin: 0;
    background: #fff;
    border-radius: 999px;
    overflow: hidden;
}

.smoh-buscador .smoh-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;
}

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

.smoh-buscador .smoh-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: #000;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.smoh-buscador .smoh-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(.smoh-buscador) {
    width: 100%;
}

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

.header-main .smoh-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 .smoh-buscador {
        min-width: 0;
        max-width: 38vw;
    }
}

/* Hasta 849 px (móvil y tablet) se usa el buscador de debajo del header (.buscador-movil) */
@media (max-width: 849px) {
    .header-main li.html:has(.smoh-buscador) {
        display: none;
    }
}

.smoh-buscador__panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    margin-top: 4px;
    max-height: 70vh;
    overflow-y: auto;
    background: #fffffff0;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.smoh-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;
}

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

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

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

/* Color del texto fijo: evita el verde de los enlaces de Flatsome (a:hover) */
.smoh-buscador .smoh-buscador__item {
    color: #000000;
}

.smoh-buscador .smoh-buscador__item:hover,
.smoh-buscador .smoh-buscador__item:focus,
.smoh-buscador .smoh-buscador__item.is-activo {
    color: #7b7b7b;
}

.smoh-buscador__titulo {
    line-height: 1.3;
}

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

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

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

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