When Shefali Akter first sought a job at a garment factory near Bangladesh's capital, the crowding, heavy workload and poor salary led the 19-year-old to resign after a year and return to her rural home in northern Bangladesh.
But when she came back to the garment factory region west of Dhaka with her new husband a few years later, she found conditions at some factories had dramatically changed for the better.
At the Snowtex Group plant where the 26-year-old now works, she earns US$1,350 (about RM6000) a month, gets extra pay for overtime, a nutritious free lunch and a day off each week.
The well-ventilated factory - along with a sister facility nearby - has seen solar panels installed, cutting energy costs by half.
Rainwater storage facilities and measures to cut waste have slashed water consumption by 30%, factory officials say.
The plant's grounds, heavily planted with trees, also have their own vegetable gardens, offering employees the chance to buy inexpensive organic tomatoes, cabbage, cauliflower and red amaranth.
Bangladesh's garment factories have long been known for producing low-cost garments in often harsh working conditions, but international pressure for more green and sustainable clothing production is starting to change that.
Bangladesh now has 186 factories certified as green by the US Green Building Council’s Leadership in Energy and Environmental Design (LEED) standard, up from three in 2014.
Of those, 62 have earned a platinum rating, 110 a gold rating and 10 a silver rating, for progress toward lowering carbon emissions, water and energy use, and waste, and making transport and materials more sustainable, according to the Bangladesh Garment Manufacturers and Exporters Association (BGMEA).
Points are also awarded for improvements in worker health and the quality of indoor work environments.
Business analysts say that after the collapse of the Rana Plaza garment factory, which killed more than 1,130 people in 2013, factory owners facing foreign and domestic criticism have stepped up efforts to provide a safer working environment.
As part of that push, some have also become interested in creating more environmentally friendly factories - a shift that is spreading, particularly as international buyers trying to meet their own green commitments seek out more climate-friendly factories.
Today, Bangladesh has the highest number of eco-friendly factories among the world's garment exporting countries, according to the BGMEA.
At Snowtex Group's pair of LEED-platinum-certified factories about 25km west of Dhaka, workers now enjoy grounds set with a water-storing pond, nutritionist-approved free lunches, salaries paid online and well-ventilated factory floors.
"We ensure the safety and security of workers," said SM Khaled, managing director of the firm, which sells to brands such as Colombia, Decathlon and C&A and has 19,000 workers and an annual turnover of US$250 million.
Khaled said workers, through an app, can message management if they face problems and "we investigate the issue with the highest priority".
While greener factories help the environment, he noted, the company has also found they save money, with energy use 50% lower compared to more traditional factories Snowtex Group owns.
Khaled said solar panels on the factories can generate 25 megawatts of energy a month, providing about 10% of energy needed to run the facilities.
Another 86% of power for the Snowtex plants is bought from other solar providers, with just 4% coming from fossil fuels such as diesel, he said.
Building green factories is 30-35% costlier than building a traditional factory, he noted - but utilities are then cheaper each year and buyers easier to line up.
Other garment factory owners are also making changes.
Fazlul Haque's Plummy Fashions plant south of Dhaka, for instance, has one of the largest factory solar plants in Bangladesh and transparent glass walls and skylights that cut lighting costs and create more natural light for workers.
Such shifts have cut the plant's carbon emissions by 35% compared to a more traditional factory, and water-saving faucets and rainwater-capture reservoirs have reduced the factory's water demand by 40%, Haque said in an interview at the factory.
"The Rana Plaza incident shocked me. At that time I promised that if I started a factory it would not be a high-rise building but it must be a green factory”, he said.
A larger number of clothing brands seeking climate-smart and worker-friendly products are also making investments in better factories pay off, said Haque, whose factory sells to fashion labels such as Calvin Klein, Tommy Hilfiger and Next.
"Big brands are interested in buying clothes from green factories," Haque said. Now "we are in an advantageous position in bargaining".
Shima Akter, a labourer at the Plummy Fashions plant, said her workfloor wasn't "suffocating like other factories around" - and other parents in her community envied her job at a "green factory".
Md Ashraful Al Amin Khan, Bangladesh manager of GIII Apparel Group, a buyer for fashion brands such as Calvin Klein and Tommy Hilfiger, said his firm had signed long-term contracts with some of the green factories.
"We often visit those factories and are satisfied with the workers' wages and the working environment," he said, noting that "every prominent brand is considering the green garments issue and Bangladesh is really doing well.”
Faruque Hassan, president of the Bangladesh Garment Manufacturers and Exporters Association, said the country already had more LEED-certified garment factories than any other country with 52 out of the top 100 rated factories.
One, a Green Textile Limited factory in Mymensingh, in February was named the highest-scoring LEED-certified garment factory in the world, according to the BGMEA.
Altogether, Bangladesh is now home to nine of the top 10 LEED-certified garment plants in the world, the association said.
Ridhwanul Haq, a business administration professor at Dhaka University, said manufacturing of ready-made garments had dominated Bangladesh's economy for four decades but greener plants were positioning the country "for the next level of competitiveness" - and helping Bangladesh meet its own climate goals.