body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
}

#lista-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.producto {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
}

.producto img {
    max-width: 100%;
    height: auto;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.producto h2 {
    font-size: 1.2rem;
    margin: 0 0 10px 0;
}

.precio {
    font-weight: bold;
    color: #e44d26;
    font-size: 1.1rem;
}

.agregar-carrito {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.agregar-carrito:hover {
    background-color: #218838;
}

/* ... (estilos anteriores) ... */

/* Estilos del Carrito */
.carrito-icono {
    position: absolute;
    top: 20px;
    right: 30px;
    cursor: pointer;
    color: white;
    font-size: 1.8rem;
}

#carrito-contador {
    position: absolute;
    top: -10px;
    right: -15px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Estilos del Modal del Carrito */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-contenido {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
}

.cerrar-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.cerrar-modal:hover,
.cerrar-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#carrito-items .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

#procesar-pedido {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 15px;
}

#procesar-pedido:hover {
    background-color: #0056b3;
}