/* ==================================
   1. Declaración de las fuentes
================================== */
@font-face {
    font-family: 'Raleway';
    src: url('fonts/Raleway-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'Urbanist';
    src: url('fonts/Urbanist-Variable.ttf') format('truetype');
    font-weight: 100 500;
    font-style: normal;
}

@media (max-width: 768px) {
    .image-title {
        font-size: 1em; /* Disminuye el tamaño del texto en pantallas más pequeñas */
    }
}

/* ==================================
   2. Reset básico (opcional)
================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
}

/* ==================================
   3. Reglas globales
================================== */
body {
    font-family: 'Urbanist', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    background-color: #EEAA23 ;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 900; /* Black */
    margin-bottom: 20px;
}

h1.thin, h2.thin, h3.thin, h4.thin, h5.thin, h6.thin {
    font-weight: 100; /* Thin */
}

p {
    font-weight: 400;
    margin-bottom: 20px;
}

a {
    text-decoration: none;
    color: #853512 ;
}

a:focus {
    outline: 2px dashed #853512;
    outline-offset: 3px;
}


/* ==================================
   4. Tipografía y texto
================================== */
h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p, a, li {
    font-size: 1rem;
}

/* Utility: visually hide content but keep it accessible to screen readers */
.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    border: 0; padding: 0; margin: -1px;
}
/* ==================================
   5. Estructura y layout
================================== */
/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #F5F5F5;
    border-bottom: 1px solid #ddd;
}

header img {
    max-width: 150px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li {
    display: inline-block;
}

/* Main layout */
main {
    padding: 40px 20px;
}

/* Footer */
footer {
    background-color: #F5F5F5;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #ddd;
}

footer img {
    max-width: 300px;
    margin-bottom: 20px;
}

footer ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ==================================
   6. Componentes específicos
================================== */

/* Cambio de lenguaje */
.language-switcher {
    margin-top: 10px;
    text-align: right;
}

.language-switcher a {
    background-color: #f1f1f1;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    color: #333;
    font-weight: bold;
}

.language-switcher a:hover {
    background-color: #ddd;
}

/* Carrusel */
.carousel {
    display: flex;
    overflow: hidden;
    width: 100%;
    margin-top: 20px;
}

.carousel img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.tagline {
    text-align: center;
    font-family: 'Raleway', sans-serif;
    font-size: 1.3em;
    font-weight: 600;
    margin-top: 10px;
    color: #853512 ;
}

/* Estilos para el menú */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    position: relative;
    display: inline-block; /* Para que los elementos se alineen horizontalmente */
}

nav ul li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #853512 ;
}

.nav-link-hover, nav ul li a:hover, .products-header:hover {
    background-color: #ddd;
}

.products-header {
    font-weight: bold; /* Destaca visualmente el encabezado */
}

/* Si `.products-header` contiene un enlace, aplica padding al <a> para mantener alineación */
.products-header > a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #853512 ;
    font-weight: bold;
}

.products-header > a:hover, .products-header:hover > a {
    background-color: #ddd;
}

.products-header .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.products-header:hover .dropdown {
    display: block;
}

.dropdown li a {
    padding: 10px 15px;
    color: #333;
    display: block;
}

.dropdown li a:hover {
    background-color: #ddd;
}

/* Formulario de contacto */
/* Contact form styling: improved layout, colors and button */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 680px;
    margin: 0 auto;
    padding: 24px;
    background-color: #ffffff;
    border: 1px solid rgba(133,53,18,0.12);
    border-left: 6px solid #853512; /* accent */
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.contact-form label {
    font-weight: 700;
    color: #333;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    background: #fff;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #853512;
    box-shadow: 0 4px 12px rgba(133,53,18,0.08);
    outline: none;
}

.contact-form textarea { min-height: 140px; resize: vertical; }

.contact-form button[type="submit"] {
    align-self: flex-start;
    background-color: #853512;
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.contact-form button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(133,53,18,0.16);
    opacity: 0.98;
}

.contact-form .hint {
    color: #666;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .contact-form { padding: 18px; max-width: 92%; }
    .contact-form button[type="submit"] { width: 100%; text-align: center; }
}


/* Sección "Contact Us" */
.contact {
    margin-top: 20px; /* Ajusta el espacio según sea necesario */
    text-align: center; /* Centra el contenido dentro de la sección */
}

/* Contact Us - Imagen y texto de dirección */
.contact .image-container {
    position: relative;
    text-align: center;
}

.contact .address-text {
    position: absolute;
    bottom: 10px; /* Alinea el texto en la parte inferior de la imagen */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
    font-size: 1.2em;
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 768px) {
    .contact .address-text {
        bottom: 5px; /* Reduce la distancia del texto desde la parte inferior */
        font-size: 1em; /* Reduce un poco el tamaño de la fuente para pantallas más pequeñas */
        padding: 5px;
    }

    .contact .image-container img {
        width: 100%; /* Asegura que la imagen se ajuste al ancho del contenedor */
    }
}

/* Botón de Whatsapp */
.whatsapp-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    padding: 15px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.whatsapp-btn:hover {
    transform: scale(1.1); /* Ampliación suave */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

/* ==================================
   7. Media queries (diseño responsive)
================================== */
@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    footer ul {
        flex-direction: column;
        gap: 10px;
    }
    .carousel img {
        max-height: 200px;
    }
    .hero {
        height: 50vh;
    }
    .hero-logo {
        max-width: 70%;
    }
    .contact .address-text {
        bottom: 5px;
        font-size: 1em;
        padding: 5px;
    }
    .contact .image-container img {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p, a, li {
        font-size: 0.9rem;
    }
}
/* ==================================
   Estilos para la sección principal (Home)
================================== */

.hero {
    position: relative;
    width: 100%;
    height: 50vh;
    background-image: url('images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #F3F3F3; /* Fallback */
    display: flex;
    justify-content: center;
    align-items: center;
}


.hero-logo {
    position: absolute;
    max-width: 100%; /* Ajusta el tamaño del logo SVG */
    height: auto; /* Mantén las proporciones del logo SVG */
}

/* Ajustes para dispositivos móviles */
@media screen and (max-width: 768px) {
    .hero {
        height: 50vh; /* Reduce el tamaño de la sección en móviles */
    }

    .hero-logo {
        max-width: 70%; /* Ajusta el tamaño del logo en pantallas pequeñas */
    }
}

@media screen and (max-width: 480px) {
    .hero-logo {
        max-width: 80%; /* Aún más pequeño en pantallas muy pequeñas */
    }
}

/* Estilos para el carrusel */
.carousel-container {
    position: relative; /* Necesario para posicionar los controles */
    max-width: 80%; /* Asegura que no se exceda el ancho del contenedor */
    margin: auto; /* Centra el carrusel */
}

.carousel-slide {
    display: none; /* Oculta todas las diapositivas por defecto */
}

.prev, .next {
    cursor: pointer; /* Cambia el cursor a puntero para los controles */
    position: absolute; /* Posiciona los controles */
    top: 50%; /* Centra verticalmente */
    width: auto; /* Ajusta el ancho */
    padding: 16px; /* Espaciado interno */
    color: white; /* Color del texto */
    font-weight: bold; /* Negrita */
    font-size: 18px; /* Tamaño de fuente */
    transition: 0.6s ease; /* Efecto de transición */
    border-radius: 0 3px 3px 0; /* Esquinas redondeadas */
    user-select: none; /* Desactiva la selección de texto */
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8); /* Fondo oscuro al pasar el mouse */
}


/* Transiciones de desvanecimiento */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

/* ==================================
   Estilos para la sección about
   (aplican a .commitment-section para que funcionen
    en about-ES.html/about.html sin clase adicional)
================================== */

.commitment-section .commitment-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    width: 100%;
}

.commitment-section .commitment-images img {
    width: 100%;
    max-width: 340px; /* limita ancho en desktop */
    height: auto;
    margin: 0 auto;
    display: block;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* cada imagen ocupará al menos 200px y se adaptará */
.commitment-section .commitment-images img {
    flex: 1 1 200px;
}

@media (max-width: 768px) {
    .commitment-section .commitment-images {
        gap: 10px;
    }
    .commitment-section .commitment-images img {
        flex: 1 1 100%;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .commitment-section .commitment-images img {
        max-width: 100%;
    }
}

/* ==================================
   Estilos para la sección chilean-offer
================================== */

.chilean-offer .product-images {
    display: flex; /* Flexbox para alinear las imágenes */
    flex-wrap: wrap; /* Permite que las imágenes se acomoden en varias filas */
    justify-content: center; /* Centra las imágenes */
    gap: 20px; /* Espaciado entre las imágenes */
    margin: 20px 0;
}

.chilean-offer .product-images img {
    max-width: 100%; /* Asegura que las imágenes no excedan el contenedor */
    height: auto; /* Mantiene la proporción de las imágenes */
    flex: 1 1 300px; /* Las imágenes ocuparán al menos 300px */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Sombra ligera */
    border-radius: 8px; /* Bordes redondeados */
}

.chilean-offer .image-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.chilean-offer .image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.chilean-offer .product-name {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 1.2em;
    border-radius: 5px;
    z-index: 2; /* Asegura que el texto esté sobre la imagen */
}

/* Modificación para mover el enlace a la esquina inferior derecha */
.chilean-offer .product-link {
    position: absolute;
    bottom: 10px; /* Mueve el enlace hacia la parte inferior */
    right: 10px; /* Alinea el enlace a la derecha */
    background-color: rgba(255, 255, 255, 0.7); /* Fondo semitransparente claro para el enlace */
    color: black;
    padding: 5px 10px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 1em;
    border-radius: 5px;
    z-index: 2;
    text-decoration: none; /* Elimina subrayado de enlaces */
}

.chilean-offer .product-link:hover {
    background-color: rgba(255, 255, 255, 0.9); /* Color más sólido al pasar el cursor */
}

/* ==================================
   Estilos para la sección others
================================== */

.others .product-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.others .product-item {
    flex: 1 1 320px; /* Las imágenes ocupan al menos 300px y se ajustan según el espacio disponible */
    max-width: 400px; /* Limita el ancho máximo de cada producto */
    text-align: center; /* Centra el texto de la descripción debajo de la imagen */
}

.others .image-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.others .image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.others .product-name {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 1.2em;
    border-radius: 5px;
    z-index: 2;
}

