body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
}

.fijo {
    position: fixed;
    width: 97.8%;
}

header {
    background-color: #343a40;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-right: 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #ffc107;
}

.carrito-container {
    position: relative;
}

.carrito-icono {
    cursor: pointer;
    font-size: 1.5rem;
}

.carrito-cantidad {
    background-color: #ffc107;
    color: #343a40;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    position: absolute;
    top: -10px;
    right: -10px;
    font-weight: bold;
}

.carrito-dropdown {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    min-width: 350px;
    color: #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.carrito-lista {
    list-style-type: none;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.carrito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.3s ease;
}

.carrito-item:hover {
    background-color: #f8f9fa;
}

.item-imagen {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}

.item-detalles {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-nombre {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.item-precio {
    color: #495057;
    font-weight: 500;
}

.item-cantidad {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.cantidad-valor {
    font-weight: bold;
    color: #495057;
}


.btn-eliminar {
    background-color: transparent;
    color: #dc3545;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    transition: color 0.3s ease;
}

.btn-eliminar:hover {
    color: #c82333;
}

.btn-vaciar {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.btn-vaciar:hover {
    background-color: #c82333;
}

.carrito-total {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #dee2e6;
    font-weight: bold;
    font-size: 1.1rem;
}

.carrito-container:hover .carrito-dropdown {
    display: block;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #343a40;
    font-size: 2.5rem;
    font-weight: 700;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.producto {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease; */
}

/* .producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
} */

.producto-imagen {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.producto-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.producto h3 {
    margin: 0 0 0.5rem;
    color: #343a40;
    font-size: 1.25rem;
}

.producto-descripcion {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.producto-precio {
    font-weight: bold;
    color: #343a40;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.btn-agregar {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-agregar:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .carrito-dropdown {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
    }

    .carrito-lista {
        max-height: calc(100vh - 200px);
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}