html,
body {
    height: 100%;
    overflow-x: hidden;
    /* 🚫 Oculta el scroll lateral */
    overscroll-behavior-x: none;
    /* 🛑 Previene deslizamiento lateral involuntario */
    /* touch-action: pan-y; /* Solo permite desplazamiento vertical */
}


.dos {
    background-color: #f4f4f4;
    color: #333;
    padding: 20px;
    overflow-y: auto;
    /* Scroll vertical si el contenido crece hacia abajo */
    width: 97vw;
}

.goconsola {
    background-color: white;
    border: 1px solid #ccc;
    color: black;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
}

.btngestion {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
}


header {
    background-color: #0077cc;
    color: white;
    padding: 5px;
    text-align: center;
    border-radius: 10px;
    position: relative;
}

header h1 {
    margin-bottom: 10px;
}

header input {
    padding: 8px;
    width: 50%;
    border: none;
    border-radius: 5px;
    margin-right: 10px;
}

header button {
    padding: 8px 12px;
    background-color: #005fa3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

main,
section {
    margin-top: 20px;
}

h2 {
    margin-bottom: 10px;
    color: #005fa3;
}

/* Categorías */
#categorias,
#inventario,
#inventarioproductosCategoria,
#produtosencontrados,
#productosCategoria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 150px));
    column-gap: 77px;
    row-gap: 10px;
    justify-content: center;
    width: 94%;
}


.categoria {
    background-color: white;
    padding: 7px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 200px;
    min-height: 150px;
    position: relative;
    overflow: visible;
}

.categoria h3 {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    background-color: #db9a0d;
    padding: 5px;
    border-end-end-radius: 10px;


}

.categoria img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: Ñ5px;


}

.categoria:hover {
    transform: scale(1.03);
}








/* Productos */
.producto {
    background-color: white;
    padding: 7px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: 200px;
    position: relative;

}

.producto h4 {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    background-color: #0ddb0d;
    padding: 5px;
    border-end-end-radius: 10px;


}

.producto img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin: 10px 0;
}

.producto input[type="number"] {
    width: 60px;
    margin-right: 10px;
    padding: 5px;
}

.producto button {
    padding: 5px 10px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.producto button:hover {
    background-color: #218838;
}















#gestion input,
#gestion select {
    padding: 8px;
    margin: 5px 0;
    width: 100%;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#gestion button {
    background-color: #0077cc;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    margin-top: 5px;
    cursor: pointer;
}

#gestion button:hover {
    background-color: #005fa3;
}

/* Sección categoría específica */
#vistaCategoria,
#iventariovistaCategoria {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
}

#vistaCategoria button,
#iventariovistaCategoria button {
    margin-bottom: 20px;
    padding: 8px 12px;
    background-color: #ff9800;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}






#vistaCategoria button:hover,
#iventariovistaCategoria button:hover {
    background-color: #e68900;
}






.categoria img,
.producto img {

    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}


.contenedorprincipal {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.seccion {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
}

.dos {

    /* Scroll vertical si el contenido crece hacia abajo */
    width: 97vw;
}


/* Pantallas menores a 768px (ej: celulares) */
@media (max-width: 768px) {
    .tabla-con-scroll {
        /* max-height: 400px; */
    }


    .dos {
        background-color: #f4f4f4;
        background-color: #185fda;
        color: #333;
        padding: 20px;
        overflow-y: auto;
        /* Scroll vertical si el contenido crece hacia abajo */
        width: 92vw;
    }

    header {
        background-color: #020072;
    }

    #principal h2,
    #principal h3 {
        color: white;
    }


    #gestion h2 {
        color: white;
    }

    #gestion button {
        background-color: #020072;
    }


    #categorias,
    #inventario,
    #inventarioproductosCategoria,
    #produtosencontrados,
    #productosCategoria {
        display: grid;
        grid-template-columns: repeat(2, minmax(150px, auto));
        column-gap: 10px;
        row-gap: 10px;
        justify-content: center;
        width: 100%;

    }



}


@media (max-width: 460px) {

    .categoria,
    .producto {

        width: 90%;
        min-height: 150px;
        position: relative;
        overflow: visible;
    }

}