/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    direction: ltr;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #007bff;
    color: white;
    padding: 12px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.8em;
    margin: 0;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

header nav ul li {
    margin: 0 10px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    padding: 8px 12px;
    display: block;
}

/* Hero - foreground image + separate overlay for guaranteed text visibility */
#hero {
    position: relative;
    height: 70dvh;
    min-height: 60vh;
    background-color: #f0f0f0;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 20px;
}

.hero-content h2 {
    font-size: clamp(2em, 8vw, 3.2em);
    margin-bottom: 0.7em;
}

.hero-content p {
    font-size: clamp(1.1em, 5vw, 1.5em);
    margin: 0;
}

/* About section */
#nosotros, #about {
    background-color: white;
    padding: 50px 0;
}

#nosotros h2, #about h2 {
    text-align: center;
    margin-bottom: 20px;
}

.about-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    border-radius: 8px;
}

/* Products section */
#productos, #products {
    background-color: #f8f9fa;
    padding: 50px 0;
}

#productos h2, #products h2 {
    text-align: center;
    margin-bottom: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.product-item {
    background-color: white;
    padding: 15px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.product-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center top;
    border-radius: 6px;
    margin-bottom: 12px;
}

.product-item h3 {
    margin-bottom: 8px;
}

/* Contact section */
#contacto, #contact {
    background-color: white;
    padding: 50px 0;
}

#contacto h2, #contact h2 {
    text-align: center;
    margin-bottom: 20px;
}

form {
    max-width: 600px;
    margin: 0 auto;
}

label {
    display: block;
    margin-bottom: 6px;
}

input, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Footer */
footer {
    background-color: #222;
    color: white;
    text-align: center;
    padding: 25px 0;
}

footer p {
    margin: 6px 0;
}

footer a {
    color: #4dabf7;
    text-decoration: none;
}

/* Mobile fixes */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    header .container {
        flex-direction: column;
        align-items: center;
    }

    header nav ul {
        flex-direction: column;
        margin-top: 12px;
        width: 100%;
    }

    header nav ul li {
        margin: 6px 0;
        width: 100%;
        text-align: center;
    }

    header nav ul li a {
        display: block;
        padding: 14px 0;
        font-size: 1.1em;
    }

    #hero {
        height: 65dvh;
        min-height: 55vh;
    }

    .hero-content {
        padding: 15px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-item img {
        height: 220px;
    }
}

@media (max-width: 480px) {
    #hero {
        height: 60dvh;
    }

    header h1 {
        font-size: 1.6em;
        text-align: center;
        margin-bottom: 8px;
    }
}