/* Estilos generales */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4f4f4;
}

header {
    background-color: #2f2f2f;
    color: #fff;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

nav {
    display: flex;
    align-items: center;
}

.menu-icon {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
}

.line {
    width: 30px;
    height: 3px;
    background-color: white;
}

ul#menu {
    display: flex;
    gap: 20px;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

ul#menu li {
    display: inline-block;
}

ul#menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 8px 15px;
    transition: background-color 0.3s;
}

ul#menu a:hover {
    background-color: #d00;
    border-radius: 5px;
}

/* Estilos para el menú en dispositivos móviles */
@media (max-width: 768px) {
    ul#menu {
        display: none; /* El menú se oculta por defecto */
        position: absolute;
        top: 60px;
        right: 20px;
        background-color: #2f2f2f;
        width: 200px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        border-radius: 5px;
        padding: 10px;
        text-align: left;
    }

    ul#menu.active {
        display: block; /* Muestra el menú cuando tiene la clase 'active' */
    }

    .menu-icon {
        display: flex; /* Muestra el icono del menú */
    }
}

@media screen and (max-width: 768px) {
    .products-section {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .product {
        width: 48%; /* Para que haya dos productos por fila */
        margin: 1%; /* Espaciado entre productos */
        box-sizing: border-box;
    }

    .product img {
        width: 100%; /* La imagen se ajusta al ancho del contenedor */
        height: auto;
    }
}
