Cost-effective nanostructured thin-film solar cell with enhanced absorption