01 - Preheat oven to 350°F (175°C). Grease and line two 8-inch round cake pans with parchment paper.
02 - In a medium bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, cloves, and ginger until evenly blended.
03 - In a large bowl, beat granulated sugar, brown sugar, eggs, vegetable oil, applesauce, and vanilla extract until smooth and thoroughly combined.
04 - Gradually add the dry mixture to the wet ingredients, mixing gently until just combined to avoid overmixing.
05 - Fold in grated carrots, chopped nuts, and raisins if using, ensuring even distribution within the batter.
06 - Evenly divide the batter between the prepared cake pans, smoothing the surfaces.
07 - Bake for 40 to 45 minutes, or until a toothpick inserted into the center comes out clean.
08 - Allow cakes to cool in pans for 10 minutes before transferring to a wire rack to cool completely.
09 - In a large bowl, beat softened cream cheese and butter until creamy. Gradually blend in powdered sugar, orange zest, orange juice, vanilla extract, and salt. Beat until smooth and fluffy.
10 - Once cooled, spread frosting evenly over one cake layer. Top with the second layer and frost the top and sides.
11 - Refrigerate the assembled cake for 30 minutes to set the frosting before slicing and serving.