Based on the gender-stratified path analysis, in women, diet quality indirectly through WHtR, CRP, and metabolic syndrome, and in men through WHtR, Hemoglobin A1c, and metabolic syndrome affected NAFLD. Here, CRP is linked to metabolic dysfunction-associated steatotic liver disease.