Shares of Ulta Beauty Inc. rallied after hours on Thursday after the cosmetics chain offered up a slightly more upbeat full-year sales forecast, saying efforts to counterbalance a slowdown in demand and steeper competition were showing signs of “gaining traction.”