To make this recipe gluten-free, substitute the all-purpose flour in the cookie dough with a 1:1 gluten-free baking flour blend that includes xanthan gum. Additionally, use gluten-free brownie mix or a homemade gluten-free brownie base. Ensure all other ingredients (especially chocolate chips and melting candy) are labeled gluten-free to avoid cross-contamination.