* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* ==================== CONTENEDOR PRINCIPAL ==================== */
.ingredientes-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: -1;
}

.logo-mobile h1 {
    color: white;
}

.nav-link {
    color: black;
}

.titulo-producto h1 {
    color: black;
}

.contactanos-link {
    color: black;
}

/* ==================== CONTENIDO INGREDIENTES ==================== */
.contenido-ingredientes {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 60px 60px;
}

/* Justificación */
.justificacion {
    text-align: center;
    margin-bottom: 50px;
    padding: 50px 60px;
}

.justificacion p {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 20px;
    color: #000000;
    line-height: 1.6;
    margin: 0 auto;
}

/* Título Lista Ingredientes */
.ingredientes-titulo {
    margin-bottom: 40px;
    padding: 35px 28px;
}

.ingredientes-titulo h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 20px;
    color: #000000;
}

/* Grid de Ingredientes */
.lista-ingredientes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    place-items: center;
    margin-bottom: 80px;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.ingrediente-item {
    position: relative;
    height: 164px;
    display: flex;
    align-items: center;
}

.ingrediente-imagen {
    width: 137px;
    height: 137px;
    background-color: #fbfbfb;
    border-radius: 11px;
    box-shadow: 0px 4px 5px 0px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    transition: all cubic-bezier(0.075, 0.82, 0.165, 1) 1.5s;
}

.ingrediente-imagen:hover {
    transform: translateY(-15px);
}

.ingrediente-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ingrediente-nombre {
    position: absolute;
    left: 123px;
    top: 16px;
    background-color: #b37e5a;
    color: white;
    padding: 1.5px 3px;
    border-radius: 8px;
    box-shadow: 0px 3px 1.5px 0px rgba(0, 0, 0, 0.44);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 13.65px;
    text-align: center;
    white-space: nowrap;
    min-width: 146px;
}

/* ==================== TABLAS ==================== */
.seccion-tabla,
.seccion-promedio {
    margin-bottom: 60px;
}

.tabla-titulo {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 24px;
    color: #000000;
    padding: 29px 28px;
    margin-bottom: 30px;
}

.tabla-wrapper,
.tabla-promedio-wrapper {
    background-color: #f4f4f4;
    border-radius: 9px;
    padding: 30px;
    overflow-x: auto;
}

/* Tabla Nutricional Grande */
.tabla-nutricional {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Montserrat', sans-serif;
    color: #673a10;
}

.tabla-nutricional th {
    font-weight: 700;
    font-size: 24px;
    text-align: left;
    padding: 10px 20px 40px 10px;
    border-bottom: 2px solid rgba(103, 58, 16, 0.1);
}

.tabla-nutricional td {
    font-weight: 300;
    font-size: 24px;
    padding: 20px 20px 20px 10px;
}

.tabla-nutricional tbody tr {
    border-bottom: 1px solid rgba(103, 58, 16, 0.05);
}

.tabla-nutricional tbody tr:last-child {
    border-bottom: none;
}

/* Tabla Promedio */
.tabla-promedio-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.tabla-promedio {
    flex: 1;
    border-collapse: collapse;
    font-family: 'Poppins', sans-serif;
    color: #673a10;
}

.tabla-promedio th {
    font-weight: 700;
    font-size: 24px;
    text-align: left;
    padding: 10px 20px 20px 10px;
    border-bottom: 2px solid rgba(103, 58, 16, 0.1);
}

.tabla-promedio td {
    font-weight: 300;
    font-size: 24px;
    padding: 10px 20px 10px 10px;
}

.tabla-promedio tbody tr {
    border-bottom: 1px solid rgba(103, 58, 16, 0.05);
}

/* Botón Interpretación */
.boton-interpretacion {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s;
}

.boton-interpretacion:hover {
    transform: scale(1.05);
}

.icono-busqueda {
    width: 70px;
    height: 66px;
    background-color: #cb9e65;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.boton-interpretacion:hover .icono-busqueda {
    background-color: #b37e5a;
}

.icono-busqueda svg {
    width: 45px;
    height: 45px;
}

.texto-interpretacion {
    position: absolute;
    top: 12px;
    left: 85px;
    background-color: #e35959;
    color: white;
    padding: 2px 3px;
    border-radius: 10px;
    box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, 0.44);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 16.4px;
    white-space: nowrap;
    min-width: 139px;
    text-align: center;
}

/* ==================== TABLETS (768px - 1199px) ==================== */
@media (max-width: 1199px) {
    .contenido-ingredientes {
        padding: 30px 30px 50px;
    }

    .justificacion {
        padding: 40px 30px;
    }

    .justificacion p {
        font-size: 18px;
    }

    .tabla-nutricional th,
    .tabla-nutricional td {
        font-size: 18px;
        padding: 15px 10px;
    }

    .tabla-promedio th,
    .tabla-promedio td {
        font-size: 18px;
    }

    .lista-ingredientes {
        max-width: 700px;
    }
}

/* ==================== MÓVILES (320px - 767px) ==================== */
@media (max-width: 767px) {

    /* Contenido móvil */
    .contenido-ingredientes {
        padding: 20px 15px 40px;
    }

    .justificacion {
        padding: 30px 20px;
        margin-bottom: 30px;
    }

    .justificacion p {
        font-size: 16px;
    }

    .ingredientes-titulo {
        padding: 20px 15px;
        margin-bottom: 25px;
    }

    .ingredientes-titulo h2 {
        font-size: 20px;
    }

    /* Grid 1 columna en móvil */
    .lista-ingredientes {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 50px;
    }

    .ingrediente-item {
        height: auto;
        flex-direction: column;
        align-items: center;
        padding: 20px;
        position: relative;
    }

    .ingrediente-imagen {
        width: 120px;
        height: 120px;
    }

    .ingrediente-nombre {
        position: static;
        margin-top: 15px;
        font-size: 14px;
        min-width: auto;
        padding: 8px 16px;
    }

    /* Tablas móviles */
    .tabla-titulo {
        font-size: 18px;
        padding: 20px 15px;
    }

    .tabla-wrapper,
    .tabla-promedio-wrapper {
        padding: 15px;
        overflow-x: auto;
    }

    .tabla-nutricional {
        font-size: 12px;
        min-width: 600px;
    }

    .tabla-nutricional th,
    .tabla-nutricional td {
        font-size: 12px;
        padding: 8px 5px;
    }

    .tabla-promedio-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .tabla-promedio {
        width: 100%;
        min-width: 300px;
    }

    .tabla-promedio th,
    .tabla-promedio td {
        font-size: 16px;
        padding: 10px 8px;
    }

    .boton-interpretacion {
        margin-top: 20px;
        align-self: center;
    }

    .icono-busqueda {
        width: 60px;
        height: 56px;
    }

    .texto-interpretacion {
        top: 10px;
        left: 75px;
        font-size: 14px;
        min-width: 120px;
    }
}

/* ==================== MÓVILES PEQUEÑOS (320px - 480px) ==================== */
@media (max-width: 480px) {
    .logo-mobile h1 {
        font-size: 28px;
    }

    .justificacion p {
        font-size: 15px;
    }

    .ingredientes-titulo h2 {
        font-size: 18px;
    }

    .ingrediente-imagen {
        width: 100px;
        height: 100px;
    }

    .tabla-titulo {
        font-size: 16px;
    }

    .tabla-nutricional th,
    .tabla-nutricional td {
        font-size: 10px;
    }

    .tabla-promedio th,
    .tabla-promedio td {
        font-size: 14px;
    }
}

/* ==================== ESCRITORIO GRANDE (1200px+) ==================== */
@media (min-width: 1200px) {
    .contenido-ingredientes {
        max-width: 1800px;
        padding: 60px 80px 80px;
    }

    .justificacion {
        padding: 60px 80px;
        margin-bottom: 70px;
    }

    .justificacion p {
        font-size: 20px;
    }

    .lista-ingredientes {
        max-width: 900px;
        gap: 15px;
        margin-bottom: 100px;
    }

    .tabla-nutricional th,
    .tabla-nutricional td {
        font-size: 22px;
    }

    .tabla-promedio th,
    .tabla-promedio td {
        font-size: 22px;
    }
}