The stock market moved higher on the last day of the work week, with major market benchmarks gaining 1% or more late Friday morning. Ongoing enthusiasm about the prospects for artificial intelligence to lift the tech industry despite the impacts of a sluggish economy helped bolster sentiment, as did the belief that politicians in Washington will finally figure out a solution to the impending debt ceiling breach.

Yet in the retail sector, a couple of high-profile stocks suffered declines. Both Ulta Beauty (ULTA -0.57%) and RH (RH -16.94%) have gotten a lot of attention in recent years, but what they said in their latest financial reports suggests that they could be in for some tough times ahead. Have these two retail stocks already seen the best of times? Read on and find out.

Ulta finally proves vulnerable

Shares of Ulta Beauty were down 11% Friday morning. The beauty products and salon company reported fiscal first-quarter financial results for the period ended April 29, and investors finally got a taste of how an economic slowdown might affect Ulta's pace of future growth.

Ulta's numbers held up quite well. Sales were up more than 12% to $2.63 billion, as comparable sales climbed at a 9.3% pace. However, higher costs caused its operating margin to fall by nearly 2 percentage points to 16.8%. Earnings of $6.88 per share were up about 9% year over year.

Moreover, Ulta upgraded some of its guidance for the rest of the fiscal year. The beauty specialist now expects to get about $50 million more in sales than previously expected, projecting total revenue of between $11 billion and $11.1 billion. However, it also expects operating margin to remain below its prior guidance range. As a result, Ulta kept its earnings guidance unchanged, with expectations of earning between $24.70 and $25.40 per share.

Even with the solid sales growth, Ulta is dealing with customers who on average are spending less on beauty products for the first time in years. That could point to further challenges ahead for Ulta, and shareholders aren't used to dealing with headwinds for a stock that has seen its price jump tenfold since 2011.

RH sees big declines

Shares of RH eased lower by about 4% Friday morning. However, the hit to the high-end retail business in the fiscal first quarter that ended April 29 was a lot bigger than the stock price suggested.

RH's financial metrics were lower in many respects. Revenue dropped 23% year over year to $739 million. Gross margin fell by more than 5 percentage points to 47%, while operating margin was down nearly 10 percentage points to 14.9% on an adjusted basis. Adjusted net income fell to $52 million, down more than 70% from year-ago levels and working out to adjusted earnings of $2.21 per share.

CEO Gary Friedman put the results into context. Mortgage rates are at 20-year highs, and the regional banking crisis had an impact on the luxury housing market as well. Moreover, with the possibility of further rate hikes to control inflation, RH expects poor macroeconomic conditions to continue throughout 2023 and into 2024.

That isn't stopping RH from moving forward with its global expansion, as it aims to buck the trend and take advantage of opportunities that others are passing on right now. That's a typically bold approach for RH, and it'll be interesting to see whether the retailer is successful with its longer-term vision to become the go-to luxury brand despite economic pressures.