Building a countertop with a base and overhead cabinet in the pantry is not as difficult as we imagine. Most overhead cabinets are simply bolted or screwed together from wall to wall.
Here is another design detail from a pantry countertop. An angular bar for framing, marine plywood for the substrate, and a screw to attach the substrate to the framing finish with actual stone (marble, granite) or solid surface in the designer's preferred material finish.