创建依赖于多个动态下拉问题(PHP和/或jQuery)的产品选择器

Basically this is what i'm trying to achieve.

You have a number of questions as dropdowns starting with one, you select an option and then another dropdown's values will change dependant what you have selected. You choose one of these options and a 3rd dropdown will change depandant on that selection etc.... at the final step a product will be displayed based on your previous selections.

Eg.

  1. What is your favorite colour?
    • Red
    • Blue

(If you choose red, you get this question)

  1. Do you prefer light or dark red
    • Light
    • Dark

(however if you selected blue, you get this question)

  1. What shade of blue do you prefer?
    • Light blue
    • Medium blue
    • Dark blue

etc... etc....

Final question then reveals a product based on all your answers.

Hope this makes sense, just wondering if anyone has done anything similar to this in the past, or know of a good place to start for me to build this. The way I was starting to put this together in my head is each dropdown answer has a value attached to it, these values are then added up as you go and at the end it'll display a product depending on what the value is. However not sure if there could be occasions where you could reach the same value by a different combination of answers therefor giving an incorrect result.

I may also be wanting to have these products stored in a database, also this will need to be adaptable to work on mobile devices.

Thanks in advance.