You make a _CategoryLayout.cshtml within the category folder and put the following in the category page(s):
@{ Layout = "~/Views/Category/_CategoryLayout.cshtml"; }
Then you can use this layout to add footers and headers to your page, in turn this layout page (_CategoryLayout) can have its own layout. So you can add the following code in that layout:
@{ Layout = "~/Views/Shared/_Layout.cshtml"; }
This way it makes use of both layouts. You can ofcourse get more out of it by applying the right Sections, don't forget to fill a section in the page itself you need to define the section in every layer of layout till you display it. So if you for example have a CSS section which you want to use in the category page, you also would need to define it in the categorylayout.