Flexible thin-film solar cells