Over the last several years, luxury carmakers like BMW and Mercedes-Benz have added a dizzying array of variations to their model lines, in hopes of attracting buyers from rival brands.

But the strategy is not working out.

Fresh evidence of the auto industry’s woes arrived on Monday, when automakers reported that sales of new cars and trucks declined by 3 percent in June from a year earlier, the sixth consecutive monthly decline. And luxury cars were no exception.

In recent years, the industry has been riding high, with low gasoline prices pushing buyers toward bigger — and for companies, more profitable — cars like sport utility vehicles and trucks. But the luxury sector, so often a bright spot in automakers’ earnings, has lost its sheen.

“The luxury industry is pretty flat right now,” said William Fay, senior vice president of automotive operations for Toyota North America.