		/* ===== WRAPPER ===== */

.buscador-overlay body {
    display: flex;
    flex-direction: column!important;
}
.buscador-productos-wrapper {
    position: relative;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 100;
    display: flex;
    flex-direction: row;
    align-items: center;
}

button#btn-borrar-recientes {
    padding: 2px 8px;
    font-size: 14px;
    font-weight: 600;
    background: #226940;
    color: #ffffff;
}

div#resultados-busqueda {
    display: flex;
    flex-direction: column;
}


.busquedas-recientes {
    padding-bottom: 10px;
    border-bottom: 1px solid #d2d2d2;
}

p.titulo-busquedas {
    font-size: 15px;
    font-weight: 600;
}

#buscador-productos {
    flex: 1;
    padding-right: 40px; /* espacio para el botón */
}

.pildoras-recientes {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
}

.pildoras-mas-buscado{
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
}

.pildoras-keywords{
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
}

.pildoras-categorias{
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
}

#btn-buscar {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}
svg.icon-module_icon__Cn42w.icon-module_big__8nlaM{
    width: 24px;
}
/* ===== INPUT ===== */
.buscador-productos-wrapper input {
    width: 100%;
    padding: 12px 44px 12px 14px;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
}

input#buscador-productos {
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

#buscador-productos {
    z-index: 100;
    position: relative; 
}

button.btn-cerrar-buscador {
    display: none;
}

.buscador-imput {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

p.titulo-busquedas {
    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    justify-content: space-between;
}


.btn-buscar {
    background: transparent;
    border: none;
    padding: 0 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    z-index: 105;
}

.btn-buscar svg {
    width: 20px;
    height: 25px;
    fill: #000; /* fuerza el color */
}

svg.icon-module_icon__Cn42w.icon-module_big__8nlaM {
    width: 43px;
}


/* ===== RESULTADOS ===== */
#resultados-busqueda {
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    z-index: 90;
    max-height: 600px;
    overflow-y: auto;
}

div#resultados-busqueda {
    padding-top: 40px;
}

.resultados-productos {
    padding: 10px;
    border-bottom: 1px solid #cccccc;
    
}
.busquedas-recientes{
    padding: 10px;
    border-bottom: 1px solid #cccccc;
}
.mas-buscado{
    padding: 10px;
    border-bottom: 1px solid #cccccc;
}
.resultados-keywords {
    padding: 10px;
    border-bottom: 1px solid #cccccc;
}
.resultados-categorias {
    padding: 10px;
    border-bottom: 1px solid #cccccc;
}
.resultados-consejos {
    padding: 10px;
    border-bottom: 1px solid #cccccc;
}

.resultado-producto .info-producto {
    display: flex;
    flex-direction: column;
    align-content: flex-start;
    align-items: flex-start;
}
/* ===== pildoras mas buscados ===== */
.pildora {
    display: inline-block;
    background: #eee;
    color: #060606;
    padding: 5px 8px;
    margin: 3px 4px;
    border-radius: 7px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pildora:hover {
    background: #d6d6d6; /* gris un poco más oscuro */
    color: #060606;      /* se mantiene negro */
}


/* ===== ITEM PRODUCTO ===== */
.resultado-producto {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
}

.resultado-producto:last-child {
    border-bottom: none;
}

.resultado-producto img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

/* ===== TEXTO ===== */
.resultado-producto a {
    font-weight: 600;
    text-decoration: none;
    color: #111;
    display: block;
}

.precio {
    font-size: 0.9em;
    color: #666;
}

/* ===== MENSAJES ===== */
.no-resultados {
    padding: 14px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.buscador-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 998;
}

.buscador-productos-wrapper {
    z-index: 999;
    position: relative; /* o fixed */
}

/* ================================
   BUSCADOR FULLSCREEN EN MÓVIL
================================ */
@media (max-width: 768px) {

    body.buscador-activo {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    body.buscador-activo .buscador-productos-wrapper {
        position: fixed;
        inset: 0;
        max-width: 100%;
        margin: 0;
        background: #fff;
        z-index: 9999;
        flex-direction: column;
        align-items: stretch;
    }

    body.buscador-activo .buscador-imput {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 10000;
        padding: 12px;
        border-bottom: 1px solid #e5e5e5;
    }

    body.buscador-activo #buscador-productos {
        font-size: 18px;
        border-radius: 8px;
    }

    body.buscador-activo #btn-buscar {
        right: 12px;
    }

    body.buscador-activo #resultados-busqueda {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        max-height: none;
        overflow-y: auto;
        border-radius: 0;
        padding: 16px;
        padding-top: 16px;
    }

    
}

/* ================================
   BOTÓN CERRAR – SOLO MÓVIL
================================ */
.btn-cerrar-buscador {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    font-weight: 600;
    padding: 0 10px 0 0;
    cursor: pointer;
    color: #111;
}

svg.icon-module_icon__Cn42w.icon-cerrar-buscador {
    fill: #252525;
    width: 20px;
    height: 20px;
}

/* Mostrar solo en móvil */
@media (max-width: 768px) {
    .btn-cerrar-buscador {
        display: flex;
        align-items: center;
    }
    button.btn-cerrar-buscador {
        padding: 12px 5px;
    }

    .buscador-imput {
        gap: 6px;
    }
}
/* Overlay siempre presente */
.buscador-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4); /* semitransparente */
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.buscador-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ================================
   BUSCADOR FULLSCREEN EN MÓVIL
================================ */
@media (max-width: 768px) {

    body.buscador-activo {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    body.buscador-activo .buscador-productos-wrapper {
        position: fixed;
        inset: 0;
        max-width: 100%;
        margin: 0;
        background: #fff;
        z-index: 9999; /* encima del overlay */
        flex-direction: column;
        align-items: stretch;
    }

    body.buscador-activo .buscador-imput {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 10001; /* encima de todo */
        border-bottom: 1px solid #e5e5e5;
    }

    body.buscador-activo #buscador-productos {
        font-size: 18px;
        border-radius: 8px;
    }

    .pildoras-keywords {
        display: flex;
        flex-direction: column;
        gap: 0px;
    }

    body.buscador-activo #resultados-busqueda {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        max-height: none;
        overflow-y: auto;
        border-radius: 0;
        padding: 16px;
        padding-top: 16px;
        z-index: 10000; /* encima del overlay */
    }

    .buscador-imput {
        padding: 0px;
    }

    body.buscador-activo .btn-cerrar-buscador {
        display: flex; /* mostrar solo en móvil */
        z-index: 10002;
    }
}