body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #222;
    color: white;
}

.container {
    display: grid;
    grid-template-columns: 3fr 1fr;
    height: 100vh;
}

/* PRODUCTOS */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 200px));
    gap: 10px;
    padding: 10px;
    justify-content: center;
}

.product {
    background: #007bff;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.name {
    font-size: 18px;
}

.price {
    font-size: 16px;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    width: 45px;
    height: 45px;
    font-size: 24px;
    border-radius: 8px;
    background: #0056b3;
    line-height: 45px;
    text-align: center;
}

.btn.minus {
    background: #c0392b;
}

.count {
    font-size: 22px;
}

/* RESUMEN */
.summary {
    background: #111;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.total {
    font-size: 28px;
    text-align: center;
    margin-top: auto;
}

/* BOTON COBRAR */
.pay-btn {
    padding: 20px;
    font-size: 26px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 10px;
    margin-top: 10px;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    background: rgba(0,0,0,0.8);
    top: 0;
    width: 100%;
    height: 100%;
}

.modal-content {
    background: white;
    color: black;
    padding: 20px;
    margin: 20% auto;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    text-align: center;
}

.modal button {
    width: 100%;
    padding: 20px;
    font-size: 22px;
    margin: 5px 0;
}

/* RESPONSIVE */
@media (max-width: 900px) {

    .container {
        grid-template-columns: 1fr;
    }

    .products {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .summary {
        position: fixed;
        bottom: 0;
        width: 100%;
        height: 160px;
    }
}
