The company said in a regulatory filing that the cuts will help it “manage operating expenses and realign investment priorities.” Shares fell about 14% in early trading Friday.CEO Niraj Shah wrote in an letter to employees that the layoffs were a “difficult decision” resulting from Covid-19.”We were seeing the tailwinds of the pandemic accelerate the adoption of e-commerce shopping, and I personally pushed hard to hire a strong team to support that growth,” Shah wrote. “This year, that growth has not materialized as we had anticipated. Our team is too large for the environment we are now in, and unfortunately we need to adjust.”Wayfair had flourished at the beginning of the pandemic, when demand for swanky furniture and other home decor upgrades was so hot that it broke global supply chains and caused lengthy shipment delays.But fast forward two years, and the picture looks a lot different now.Inflation has tapped out lower and middle-income shoppers, who have pulled back their discretionary purchases to focus on paying for necessities like groceries, gas and rent. Wealthier customers have shifted their spending from furniture and other goods to travel and services. Mortgage rates have climbed significantly, cutting into demand for new homes.These macro trends have hit consumer spending hard, and along with retailers like Target, Wayfair (W) has struggled. Sales declined 15% year-over-year for the second quarter. The brand also lost 24% of its active customers — a sign that the company is struggling to retain the shoppers it gained at the beginning of the pandemic. overall, Wayfair posted a net loss of $378 million during the quarter.Wayfair’s shares have lost about 70% of their value since the start of the year.The layoffs will cost Wayfair between $30 million to $40 million for employee severance and benefits, a charge the company said it expects to take in the third quarter.— CNN Business’ Nathaniel Meyersohn contributed to this report.