Buckling analysis of 3D layered structures using a Cosserat continuum approach