/* ==========================================
   BUSCADOR
   ========================================== */

.sr-buscador {
    position: relative;

    width: 100%;
    max-width: 1100px;

    margin: 0 auto;
}


/* ==========================================
   INPUT
   ========================================== */

.sr-buscador-input-contenedor {
    position: relative;

    width: 100%;
}


.sr-buscador-input {
    width: 100%;
    min-height: 60px;

    padding: 0 22px 0 56px;

    box-sizing: border-box;

    border: 1px solid #d8d3c8;
    border-radius: 16px;

    background: #ffffff;

    color: #2a2a2a;

    font-family: inherit;
    font-size: 16px;

    outline: none;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.sr-buscador-input::placeholder {
    color: #8a8a8a;
}


.sr-buscador-input:focus {
    border-color: #a32929;

    box-shadow:
        0 0 0 4px rgba(163, 41, 41, 0.08);
}


/* ==========================================
   ICONO
   ========================================== */

.sr-buscador-icono {
    position: absolute;

    left: 19px;
    top: 50%;

    transform: translateY(-50%);

    width: 21px;
    height: 21px;

    color: #a32929;

    pointer-events: none;

    z-index: 2;
}


.sr-buscador-icono svg {
    width: 100%;
    height: 100%;

    display: block;
}


/* ==========================================
   RESULTADOS
   ========================================== */

.sr-buscador-resultados {
    width: 100%;

    margin-top: 24px;
}


/* ==========================================
   GRID
   ========================================== */

.sr-buscador-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 22px;
}


/* ==========================================
   PRODUCTO
   ========================================== */

.sr-buscador-producto {
    display: block;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e5e1d8;
    border-radius: 18px;

    text-decoration: none !important;

    color: inherit !important;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;

    /* Estado inicial de animación */

    opacity: 0;
    transform: translateY(25px);

    animation:
        sr-aparecer-producto
        0.55s ease
        var(--sr-delay)
        forwards;
}


.sr-buscador-producto:hover {
    transform: translateY(-5px);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.11);
}


/* ==========================================
   ANIMACIÓN
   ========================================== */

@keyframes sr-aparecer-producto {

    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* ==========================================
   IMAGEN
   ========================================== */

.sr-buscador-producto-imagen {
    width: 100%;
    height: 210px;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #f4f1ea;
}


.sr-buscador-producto-imagen img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    transition:
        transform 0.35s ease;
}


.sr-buscador-producto:hover
.sr-buscador-producto-imagen img {
    transform: scale(1.05);
}


/* ==========================================
   INFORMACIÓN
   ========================================== */

.sr-buscador-producto-info {
    padding: 18px;
}


.sr-buscador-producto-info h3 {
    margin: 0 0 9px;

    color: #2a2a2a;

    font-size: 17px;
    line-height: 1.35;
}


.sr-buscador-producto-info > span {
    display: block;

    margin-bottom: 14px;

    color: #a32929;

    font-size: 18px;
    font-weight: 700;
}


/* ==========================================
   VER PRODUCTO
   ========================================== */

.sr-buscador-ver-producto {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding-top: 13px;

    border-top: 1px solid #eeeae2;

    color: #a32929;

    font-size: 14px;
    font-weight: 600;
}


.sr-buscador-ver-producto span {
    font-size: 18px;

    transition:
        transform 0.25s ease;
}


.sr-buscador-producto:hover
.sr-buscador-ver-producto span {
    transform: translateX(4px);
}


/* ==========================================
   VER TODOS
   ========================================== */

.sr-buscador-ver-todos {
    display: flex;

    justify-content: center;

    margin-top: 28px;
}


.sr-buscador-btn-todos {
    display: inline-flex;

    align-items: center;
    gap: 10px;

    padding: 13px 22px;

    border: 1px solid #a32929;
    border-radius: 10px;

    color: #a32929 !important;

    background: transparent;

    text-decoration: none !important;

    font-size: 14px;
    font-weight: 600;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}


.sr-buscador-btn-todos:hover {
    background: #a32929;

    color: #ffffff !important;

    transform: translateY(-2px);
}


.sr-buscador-btn-todos span {
    font-size: 18px;
}


/* ==========================================
   CARGANDO
   ========================================== */

.sr-buscador-cargando {
    min-height: 100px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 12px;

    color: #666;

    font-size: 15px;
}


.sr-buscador-spinner {
    width: 20px;
    height: 20px;

    border: 2px solid #ddd;

    border-top-color: #a32929;

    border-radius: 50%;

    animation:
        sr-spinner 0.7s linear infinite;
}


@keyframes sr-spinner {

    to {
        transform: rotate(360deg);
    }

}


/* ==========================================
   SIN RESULTADOS
   ========================================== */

.sr-buscador-vacio {
    min-height: 160px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 30px;

    border-radius: 16px;

    background: #f4f1ea;

    color: #555;

    text-align: center;
}


.sr-buscador-vacio-icono {
    margin-bottom: 5px;

    font-size: 28px;
}


.sr-buscador-vacio strong {
    color: #2a2a2a;

    font-size: 17px;
}


.sr-buscador-vacio span {
    font-size: 14px;
}


/* ==========================================
   ERROR
   ========================================== */

.sr-buscador-error {
    padding: 25px;

    border-radius: 14px;

    background: #f4f1ea;

    color: #a32929;

    text-align: center;
}


/* ==========================================
   TABLET
   ========================================== */

@media (max-width: 1050px) {

    .sr-buscador-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* ==========================================
   TABLET PEQUEÑA
   ========================================== */

@media (max-width: 750px) {

    .sr-buscador-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 16px;
    }


    .sr-buscador-producto-imagen {
        height: 190px;
    }

}


/* ==========================================
   CELULAR
   ========================================== */

@media (max-width: 500px) {

    .sr-buscador-input {
        min-height: 55px;

        padding-left: 50px;

        font-size: 15px;
    }


    .sr-buscador-grid {
        grid-template-columns: 1fr;

        gap: 16px;
    }


    .sr-buscador-producto-imagen {
        height: 220px;
    }

}