Ulta Beauty shares gained more than 10% in the quarter after the company reported results ahead of market expectations.