

/* =========================================================
   LSDR SMART SEARCH PRINCIPAL - ODOO 19
   VERSION COMPLETA · V1.5.21 CORRECCIONES + OEM + NEW + SELECTORES
   =========================================================

   FUNCIONES
   ---------------------------------------------------------
   - BUSCADOR PERSONALIZADO
   - ODOO 19
   - PC / NOTEBOOK / TABLET / CELULAR
   - MÍNIMO 10 CARACTERES
   - ESPERA 0.5 SEGUNDOS
   - ENTER PROGRESIVO V1.3
   - CACHE
   - CANCELACIÓN DE PETICIONES
   - IMAGEN
   - PRECIO
   - STOCK
   - CORRECCIÓN ORTOGRÁFICA
   - EQUIVALENCIAS DE REPUESTOS
   - COMPATIBILIDAD POR AÑO
   - RANGOS 1993-2010
   - RANGOS 93-98 = 1993-1998
   - RANGOS 05-10 = 2005-2010
   - RANGOS CON /
   - RANGOS CON A / AL / HASTA
   - DESDE 1993
   - 1993 EN ADELANTE
   - 1993+
   - BÚSQUEDA SIN AÑO COMO RESPALDO
   - FILTRADO POR AÑO DESPUÉS DE ENCONTRAR PRODUCTOS

   ========================================================= */


/* =========================================================
   OCULTAR BUSCADOR ORIGINAL ODOO
   ========================================================= */

header form[action="/shop"]{
    display:none !important;
}

.o_wsale_products_searchbar_form,
.o_wsale_search_bar,
.o_searchbar_form,
.js_searchbar_form,
.website_search_form{
    display:none !important;
}


/* =========================================================
   CONTENEDOR
   ========================================================= */

.lsdr-main-search{

    width:min(
        900px,
        calc(100% - 32px)
    );

    max-width:900px;

    margin:18px auto 22px auto !important;

    position:relative;

    z-index:1000 !important;

    font-family:inherit;

    box-sizing:border-box;

}


.lsdr-main-search *,
.lsdr-main-search *::before,
.lsdr-main-search *::after{

    box-sizing:border-box;

}


/* =========================================================
   FORMULARIO
   ========================================================= */

.lsdr-main-search-form{

    width:100%;

    height:60px;

    min-height:60px;

    display:flex;

    align-items:center;

    background:#fff;

    border:1px solid rgba(
        17,
        24,
        39,
        .14
    );

    border-radius:15px;

    overflow:hidden;

    box-shadow:
        0 6px 22px
        rgba(
            15,
            23,
            42,
            .09
        );

    transition:
        border-color .2s ease,
        box-shadow .2s ease;

}


.lsdr-main-search-form:focus-within{

    border-color:
        rgba(
            214,
            31,
            38,
            .50
        );

    box-shadow:

        0 0 0 3px
        rgba(
            214,
            31,
            38,
            .07
        ),

        0 10px 28px
        rgba(
            15,
            23,
            42,
            .12
        );

}


/* =========================================================
   ICONO
   ========================================================= */

.lsdr-main-search-icon{

    width:58px;

    height:60px;

    flex:0 0 58px;

    display:flex;

    align-items:center;

    justify-content:center;

    color:#6b7280;

    pointer-events:none;

}


.lsdr-main-search-icon svg{

    width:22px;

    height:22px;

}


.lsdr-main-search-form:focus-within
.lsdr-main-search-icon{

    color:#d61f26;

}


/* =========================================================
   V1.4.4 · GUÍA SUTIL PARA COMPLETAR VEHÍCULO
   ========================================================= */

.lsdr-main-search-guide{

    width:100%;

    display:flex;

    align-items:center;

    justify-content:center;

    flex-wrap:wrap;

    gap:4px;

    margin:7px 0 0;

    padding:0 10px;

    color:#6b7280;

    font-size:11px;

    line-height:1.35;

    font-weight:500;

    text-align:center;

    box-sizing:border-box;

}


.lsdr-main-search-guide strong{

    color:#374151;

    font-weight:750;

}


.lsdr-main-search-guide .lsdr-guide-dot{

    width:4px;

    height:4px;

    margin:0 2px;

    border-radius:50%;

    background:#d61f26;

    flex:0 0 4px;

}


.lsdr-main-search-guide .lsdr-guide-example{

    color:#8a94a2;

    font-weight:500;

}


@media(max-width:767px){

    .lsdr-main-search-guide{

        justify-content:flex-start;

        margin-top:6px;

        padding:0 4px;

        font-size:10px;

        line-height:1.3;

        text-align:left;

    }

    .lsdr-main-search-guide .lsdr-guide-dot,
    .lsdr-main-search-guide .lsdr-guide-example{

        display:none;

    }

}


@media(max-width:390px){

    .lsdr-main-search-guide{

        font-size:9.5px;

    }

}


/* =========================================================
   INPUT
   ========================================================= */

.lsdr-main-search-input{

    flex:1 1 auto;

    min-width:0;

    width:100%;

    height:60px !important;

    min-height:60px !important;

    max-height:60px !important;

    border:none !important;

    outline:none !important;

    background:transparent !important;

    padding:
        0
        10px
        0
        0 !important;

    margin:0 !important;

    font-family:inherit;

    font-size:17px !important;

    line-height:60px !important;

    font-weight:500;

    color:#111827;

    box-shadow:none !important;

    appearance:none !important;

    -webkit-appearance:none !important;

}


.lsdr-main-search-input:focus{

    outline:none !important;

    box-shadow:none !important;

    transform:none !important;

}


.lsdr-main-search-input::placeholder{

    color:#9ca3af;

    opacity:1;

}


/* =========================================================
   BOTÓN
   ========================================================= */

.lsdr-main-search-button{

    width:48px;

    height:48px;

    flex:0 0 48px;

    margin-right:6px;

    padding:0 !important;

    border:none !important;

    border-radius:12px;

    background:#f3f4f6;

    color:#4b5563;

    display:flex !important;

    align-items:center;

    justify-content:center;

    cursor:pointer;

    outline:none !important;

    transition:
        background .15s ease,
        color .15s ease,
        transform .15s ease;

}


.lsdr-main-search-button svg{

    width:20px;

    height:20px;

}


.lsdr-main-search-button:hover{

    background:#d61f26;

    color:#fff;

    transform:scale(1.03);

}


.lsdr-main-search-button.lsdr-loading{

    background:#d61f26;

    color:#fff;

    pointer-events:none;

}


.lsdr-main-search-button.lsdr-loading svg{

    display:none !important;

}


.lsdr-main-search-button.lsdr-loading::after{

    content:"";

    width:16px;

    height:16px;

    border:
        2px solid
        rgba(255,255,255,.42);

    border-top-color:#fff;

    border-radius:50%;

    box-sizing:border-box;

    animation:
        lsdr-main-spin .65s linear infinite;

}


@keyframes lsdr-main-spin{

    from{
        transform:rotate(0deg);
    }

    to{
        transform:rotate(360deg);
    }

}


/* =========================================================
   RESULTADOS
   ========================================================= */

.lsdr-main-search-results{

    position:absolute;

    top:calc(
        100% + 9px
    );

    left:0;

    right:0;

    width:100%;

    max-height:520px;

    overflow-y:auto;

    background:#fff;

    border:
        1px solid
        rgba(
            17,
            24,
            39,
            .10
        );

    border-radius:15px;

    box-shadow:

        0 20px 48px
        rgba(
            15,
            23,
            42,
            .18
        ),

        0 5px 12px
        rgba(
            15,
            23,
            42,
            .07
        );

    display:none;

    z-index:1100 !important;

}


.lsdr-main-search-results.show{

    display:block;

}


/* =========================================================
   RESULTADO
   ========================================================= */

.lsdr-main-search-result{

    width:100%;

    min-height:92px;

    padding:
        11px
        14px;

    display:flex;

    align-items:center;

    gap:13px;

    text-decoration:none !important;

    color:#111827 !important;

    background:#fff;

    border-bottom:
        1px solid
        #f1f2f4;

    cursor:pointer;

}


.lsdr-main-search-result:hover{

    background:#f8fafc;

    text-decoration:none !important;

}


.lsdr-main-search-result:last-child{

    border-bottom:none;

}


/* =========================================================
   IMAGEN
   ========================================================= */

.lsdr-main-result-image{

    width:68px;

    height:68px;

    min-width:68px;

    max-width:68px;

    flex:0 0 68px;

    border-radius:10px;

    object-fit:contain;

    background:#fff;

    border:
        1px solid
        #eef0f2;

    display:block;

}


.lsdr-main-result-icon{

    width:68px;

    height:68px;

    min-width:68px;

    max-width:68px;

    flex:0 0 68px;

    display:flex;

    align-items:center;

    justify-content:center;

    border-radius:10px;

    background:#f3f4f6;

    color:#d61f26;

}


/* =========================================================
   CONTENIDO
   ========================================================= */

.lsdr-main-result-content{

    min-width:0;

    flex:1 1 auto;

    display:flex;

    flex-direction:column;

    justify-content:center;

}


/* =========================================================
   TITULO
   ========================================================= */

.lsdr-main-result-title{

    display:-webkit-box;

    -webkit-line-clamp:2;

    -webkit-box-orient:vertical;

    overflow:hidden;

    font-size:14px;

    line-height:1.4;

    font-weight:700;

    color:#111827 !important;

    text-decoration:none !important;

}


.lsdr-main-result-title *,
.lsdr-main-search-result *,
.lsdr-main-search-result span{

    text-decoration:none !important;

}


/* =========================================================
   PRECIO
   ========================================================= */

.lsdr-main-result-price{

    display:flex;

    align-items:center;

    flex-wrap:wrap;

    gap:7px;

    margin-top:5px;

    font-size:15px;

    font-weight:900;

    color:#d61f26;

}


.lsdr-main-result-old-price{

    font-size:11px;

    font-weight:600;

    color:#9ca3af;

    text-decoration:line-through !important;

}


.lsdr-main-result-sale-price{

    font-size:15px;

    font-weight:900;

    color:#d61f26;

}


/* =========================================================
   COMPATIBILIDAD
   ========================================================= */

.lsdr-main-result-compatible{

    display:inline-flex;

    align-items:center;

    gap:4px;

    margin-top:3px;

    font-size:10px;

    font-weight:700;

    color:#15803d;

}


/* =========================================================
   STOCK
   ========================================================= */

.lsdr-main-result-stock{

    display:inline-flex;

    align-items:center;

    gap:5px;

    margin-top:3px;

    font-size:10px;

    font-weight:700;

}


.lsdr-main-result-stock.available{

    color:#15803d;

}


.lsdr-main-result-stock.unavailable{

    color:#dc2626;

}


.lsdr-main-stock-dot{

    width:6px;

    height:6px;

    border-radius:50%;

    background:currentColor;

    display:inline-block;

    flex:0 0 6px;

}


/* =========================================================
   CARGANDO
   ========================================================= */

.lsdr-main-search-loading{

    padding:18px;

    text-align:center;

    color:#6b7280;

    font-size:13px;

    font-weight:600;

}


/* =========================================================
   VACÍO
   ========================================================= */

.lsdr-main-search-empty{

    padding:
        20px
        16px;

    text-align:center;

    color:#6b7280;

    font-size:13px;

    line-height:1.45;

    font-weight:500;

}


/* =========================================================
   MENSAJE
   ========================================================= */

.lsdr-main-smart-message{

    position:fixed;

    top:70px;

    left:50%;

    transform:
        translateX(-50%);

    z-index:2147483000 !important;

    width:max-content;

    max-width:
        min(
            520px,
            calc(100% - 30px)
        );

    padding:
        11px
        18px;

    background:#111827;

    color:#fff;

    border-radius:10px;

    font-family:inherit;

    font-size:12px;

    font-weight:600;

    line-height:1.4;

    text-align:center;

    box-shadow:
        0 12px 30px
        rgba(
            0,
            0,
            0,
            .20
        );

    opacity:0;

    visibility:hidden;

    pointer-events:none;

    transition:
        opacity .2s ease,
        visibility .2s ease;

}


.lsdr-main-smart-message.show{

    opacity:1;

    visibility:visible;

}


/* =========================================================
   SCROLLBAR
   ========================================================= */

.lsdr-main-search-results::-webkit-scrollbar{

    width:6px;

}


.lsdr-main-search-results::-webkit-scrollbar-thumb{

    background:#d1d5db;

    border-radius:20px;

}


/* =========================================================
   TABLET
   ========================================================= */

@media(max-width:1100px){

    .lsdr-main-search{

        width:
            min(
                760px,
                calc(100% - 28px)
            );

        max-width:760px;

    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:768px){

    .lsdr-main-search{

        width:
            calc(
                100% - 20px
            );

        max-width:none;

        margin:
            10px
            10px
            18px
            10px !important;

    }


    .lsdr-main-search-form{

        height:56px;

        min-height:56px;

        border-radius:13px;

    }


    .lsdr-main-search-icon{

        width:44px;

        height:56px;

        flex-basis:44px;

    }


    .lsdr-main-search-icon svg{

        width:19px;

        height:19px;

    }


    .lsdr-main-search-input{

        height:56px !important;

        min-height:56px !important;

        max-height:56px !important;

        line-height:56px !important;

        font-size:16px !important;

    }


    .lsdr-main-search-button{

        width:44px;

        height:44px;

        flex-basis:44px;

        margin-right:5px;

        border-radius:10px;

    }


    .lsdr-main-search-results{

        max-height:60vh;

        border-radius:13px;

    }


    .lsdr-main-result-image,
    .lsdr-main-result-icon{

        width:58px;

        height:58px;

        min-width:58px;

        max-width:58px;

        flex-basis:58px;

    }


    .lsdr-main-search-result{

        min-height:80px;

        padding:
            8px
            10px;

        gap:10px;

    }


    .lsdr-main-result-title{

        font-size:12px;

    }


    .lsdr-main-result-price{

        font-size:13px;

    }


    .lsdr-main-result-sale-price{

        font-size:13px;

    }

}


/* =========================================================
   CELULAR PEQUEÑO
   ========================================================= */

@media(max-width:420px){

    .lsdr-main-search{

        width:
            calc(
                100% - 14px
            );

        margin:
            8px
            7px
            14px
            7px !important;

    }


    .lsdr-main-search-input::placeholder{

        font-size:14px;

    }


    .lsdr-main-result-image,
    .lsdr-main-result-icon{

        width:54px;

        height:54px;

        min-width:54px;

        max-width:54px;

        flex-basis:54px;

    }

}


