body {
    background-color: #3D50B9;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Merriweather', sans-serif;
    padding-top: 5rem;
}

h2 {
    color: #FCFEFD;
    margin-bottom: 20px;
    text-align: center;
}

section {
    background: #31DCB7;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    margin-top: 0;
}

.contenedorPrimario {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 1000;
    background: #31DCB7;
    padding: 10px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contenedorInputBoton {
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
}

.sumaTotal {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    margin-left: auto;
}


input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input {
    font-size: 1rem;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #90caf9;
}

#botonAgregarProducto {
    background-color: #91ff80;
    color: #373737;
    font-size: 1.5rem;
    font-weight: 700;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sumaTotal {
    margin-top: 20px;
    font-size: 1.5rem;
}

#botonAgregarProducto:hover {
    background-color: #76d865;
}

#listaProductos {
    list-style-type: none;
    padding: 0;
    margin-top: 5rem;
}

.productoCreado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #a5d6a7;
    margin-bottom: 10px;
    background: #5060BC;
    opacity: 1; 
    transform: translateX(0); 
    animation: slideIn 0.5s ease-out forwards;
    overflow: visible;
}

.productoCreado span {
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: j;
    text-overflow: ellipsis;
    margin-right: 10px;
    line-height: 1.5;
    color: #FCFDFE;
}

.productoCreado div {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    
}


.inputPrecio {
    width: 100px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #90caf9;
    flex-shrink: 0;
}

.inputCantidad {
    width: 50px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #90caf9;
    flex-shrink: 0;
}


.productoCreado button {
    margin-left: 0;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.botonMarcado {
    background-color: #81c784;
    color: white;
}

.botonDesmarcado {
    background-color: white;
    color: black;
}

.botonEliminar {
    background-color: #f80606;
    color: white;
}

.botonEliminar:hover {
    background-color: #d80505;
}

@media (max-width: 480px) {
    
    .productoCreado {
        flex-direction: column;
        align-items: flex-start;
    }

    .productoCreado div {
        width: 100%;
        justify-content: space-between;
    }

    
    .contenedorInputBoton input {
        width: 160px; 
    }

    

    .sumaTotal {
        font-size: 1.5rem;
    }
    
    .inputPrecio {
        width: 90px;
    }
    
    .inputCantidad {
        width: 35px;
    }
}
