@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background: #aa0d0d;
    color: white;
    padding: 15px;
    text-align: center;
}

header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    font-weight: bold;
}

nav {
    margin: 20px auto 10px auto;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.7em; /* Tamaño del menú unificado */
    padding: 12px 20px;
    font-family: 'Montserrat', sans-serif;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

main {
    padding: 20px;
    text-align: center;
}

.productos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    overflow: hidden; /* Añadido para evitar el desbordamiento */
}

.producto {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    width: 250px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%; /* Limita el ancho máximo */
}

.producto:hover {
    transform: scale(1.05); /* Aumenta un 5% el tamaño */
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
    transform-origin: center; /* Asegura que el zoom sea desde el centro */
}

.producto img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.producto h3 {
    color: #aa0d0d;
    font-family: 'Montserrat', sans-serif;
}

.producto p {
    color: #333;
}

.producto a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px;
    background: #aa0d0d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
}

footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: auto; /* Empuja el footer hacia el final */
}

/* Media Queries para responsividad */
@media (max-width: 1025px) {
    header {
        flex-direction: row;
        justify-content: center;
    }

    header h1 {
        margin-left: 0;
    }

    nav {
        margin-left: 0;
    }

    main {
        padding: 15px;
    }

    .productos {
        gap: 15px;
    }

    .producto {
        width: 90%;
    }
}

@media (max-width: 768px) {
    header {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 160px;
        padding: 15px;
    }

    header h1 {
        margin-left: 0;
        margin-top: 60px;
    }

    nav {
        margin-top: 15px;
        width: 100%;
    }

    nav ul {
        gap: 15px;
    }

    .producto {
        width: 100%;
    }

    .producto:hover {
        transform: scale(1.03); /* Reducido el zoom en pantallas pequeñas */
    }
}

@media (max-width: 480px) {
    header {
        min-height: 180px;
        padding-bottom: 20px;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    header h1 {
        font-size: 1.5em;
        margin-top: 50px;
    }

    .producto:hover {
        transform: scale(1.02); /* Reducción aún mayor en móviles */
    }
}
