Kitchen-cabinet maker American Woodmark Corp posted a surprise quarterly loss as margins were weighed down by labor and overhead costs, sending its shares down 17 percent.

The company, which caters to the remodeling and new home construction sectors, has seen demand fall as recession-hit consumers scaled back on large-ticket purchases and the U.S. housing slump deepened.

Sales in the first quarter fell 28 percent to $100.8 million. The company, whose brands include American Woodmark, Timberlake and Shenandoah Cabinetry, experienced sales declines of more than 20 percent in both its remodeling and new construction sales channels.

As you make less product, it costs you more per unit because your fixed costs, which are labor and overhead, are spread over fewer units. That negatively affects your profitability, Morgan Keegan analyst Keith Johnson said.

Selling, general and administrative costs were 19.4 percent of net sales in the first quarter, up from 15.9 percent last year.

For the first quarter, the company, whose customers include Home Depot and Lowe's Cos Inc, reported a loss of $6.4 million, or 45 cents a share, compared with a profit of $156,000, or 1 cent a share, a year ago.

Excluding restructuring charges, the company posted a loss of 34 cents a share.

Analysts on average were expecting earnings of 1 cent a share, before special items, on revenue of $116.9 million, according to Reuters Estimates.

American Woodmark's remodeling segment was hit by big retailers like Home Depot and Lowe's ending promotions, which helped prop up demand in the third and fourth quarters, said Johnson, who has a market perform rating on the stock.

Our company had been somewhat insulated against these difficult conditions in our two previous quarters by a favorable retail promotional environment, but that impact ended during the fourth quarter of our last fiscal year, Chief Executive Kent Guichard said in a statement.

Shares of the Winchester, Virginia-based company touched a low of $20.27 before recouping some losses to trade down 13 percent at $21.02 in morning trade Tuesday.