body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
}

.header {
    background-color: #212529;
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    margin: 0;
    font-size: 1.5em;
}

.btn-abrir-carrito {
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-abrir-carrito:hover { 
    background-color: #0b5ed7; 
}

.buscador-container {
    text-align: center;
    margin: 30px 0 10px 0;
}

.buscador-container input {
    padding: 12px;
    width: 50%;
    max-width: 400px;
    border: 1px solid #ccc;
    border-radius: 25px;
    outline: none;
    font-size: 1em;
}

.productos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 40px;
    justify-content: center;
}

.producto {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    width: 220px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.producto img {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 10px;
}

.producto h3 { 
    margin: 10px 0; 
    font-size: 1.1em; 
    flex-grow: 1; 
}

.producto p { 
    font-weight: bold; 
    font-size: 1.2em; 
    color: #333; 
}

.btn-agregar {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    font-weight: bold;
}

.btn-agotado {
    background-color: #ccc;
    color: #666;
    border: none;
    padding: 12px;
    cursor: not-allowed;
    border-radius: 4px;
    width: 100%;
    font-weight: bold;
}

.overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.seccion-carrito {
    position: fixed;
    top: 0; 
    right: 0;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 15px rgba(0,0,0,0.2);
    z-index: 999;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.seccion-carrito.abierto {
    transform: translateX(0);
}

.carrito-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.carrito-header h2 { margin: 0; }

.btn-cerrar {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #888;
}

.carrito-lista {
    flex-grow: 1;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
}

.carrito-lista li {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-quitar {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-weight: bold;
}

.carrito-footer {
    border-top: 2px solid #eee;
    padding-top: 15px;
    margin-top: 10px;
}

.total { 
    font-size: 1.3em; 
    font-weight: bold; 
    text-align: right; 
    margin-bottom: 15px; 
}