The forerunner of the typical Spanish “flamenco costume” is found in the eighteenth century working clothes worn by peasants and gypsies at livestock markets. These women wore modest, ruffled calico gowns to work. Over the years two or three ruffles finishing the bustle became the fashion. See map of Spanish traditional dress at www.floatingpenguin.co.uk/from-humble-to-worldwide.htm
Sooooo glad we don't wear these anymore. The amount of underwear they wore was unhealthy; corsets even caused terrible health problems deforming the shape of the torso to the point of illness. If I remember right they even caused infertility and miscarriage. Not everything from "the old days" was lovely.