/* --- FERRETERIA.CSS (CORREGIDO) --- */

/* Contenedor principal de tarjetas */
.cont {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 30px 20px;
    max-width: 1300px;
    margin: 0 auto;
}

/* Tarjeta individual del producto */
.producto {
    background-color: #ffffff;
    width: 220px;
    min-height: 320px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Se elimina position: absolute para que respete el flujo */
    position: relative; 
}

.producto:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Imagen del producto */
.producto img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
    /* Se remueven las coordenadas absolutas fijos */
    position: static; 
}

/* Nombre del producto */
.producto h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin: 5px 0 10px 0;
    text-align: center;
    position: static;
}

/* Selector de cantidad interno */
.producto .selector-cantidad {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    padding: 4px 8px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

/* Botón Añadir */
.producto button.btn-agregar {
    background-color: #28a745;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: static;
}

.producto button.btn-agregar:hover {
    background-color: #218838;
}

/* Limpieza de contenedor secundario si existe */
.cont2 {
    position: static;
    margin: 20px auto;
}


/* =====================================================
   BUSCADOR DE PRODUCTOS - INVERSIONES ARZ
===================================================== */

.buscador-productos {
    width: 100%;
    max-width: 1300px;
    margin: 25px auto 5px;
    padding: 0 20px;
}

.buscador-input {
    width: 100%;
    max-width: 600px;
    height: 50px;
    margin: 0 auto;

    display: flex;
    align-items: center;

    background: #ffffff;

    border: 2px solid #dddddd;
    border-radius: 12px;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);

    transition: 0.3s ease;
}

.buscador-input:focus-within {
    border-color: #B8832F;

    box-shadow:
        0 0 0 3px rgba(184, 131, 47, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.10);
}


/* ICONO */

.icono-busqueda {
    margin-left: 16px;
    margin-right: 10px;

    font-size: 20px;

    pointer-events: none;
}


/* INPUT */

.buscador-input input {
    flex: 1;

    width: 100%;
    height: 46px;

    border: none;
    outline: none;

    background: transparent;

    font-size: 16px;
    color: #333;

    padding: 0 5px;
}

.buscador-input input::placeholder {
    color: #999;
}


/* BOTÓN X */

#btnLimpiarBusqueda {
    width: 42px;
    height: 42px;

    margin-right: 4px;

    border: none;
    border-radius: 9px;

    background: transparent;

    color: #888;

    font-size: 17px;
    font-weight: bold;

    cursor: pointer;

    transition: 0.2s ease;

    display: flex;
    align-items: center;
    justify-content: center;
}

#btnLimpiarBusqueda:hover {
    background: #f1f1f1;
    color: #B8832F;
}


/* MENSAJE SIN RESULTADOS */

.sin-resultados {
    width: 100%;

    text-align: center;

    padding: 60px 20px;

    color: #666;

    font-size: 18px;
}

.sin-resultados strong {
    display: block;

    margin-bottom: 8px;

    color: #333;

    font-size: 21px;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 600px) {

    .buscador-productos {
        margin-top: 18px;
        padding: 0 15px;
    }

    .buscador-input {
        height: 46px;
        border-radius: 10px;
    }

    .buscador-input input {
        font-size: 14px;
    }

    .icono-busqueda {
        margin-left: 12px;
        margin-right: 7px;
        font-size: 18px;
    }

    #btnLimpiarBusqueda {
        width: 38px;
        height: 38px;
    }

}