A Ginzburg-Landau approach to fluctuations of a layered superconductor in a magnetic field is used to show that the interlayer coupling can be incorporated within an interacting self-consistent theory of a single layer, in the limit of a large number of neighboring layers. The theory exhibits two phase transitions-a vortex liquid-to-solid transition is followed by a Bose-Einstein condensation into the Abrikosov lattice-illustrating the essential role of interlayer coupling. By using this theory, explicit expressions for magnetization, specific heat, and fluctuation conductivity are derived. We compare our results with recent experimental data on the iron-pnictide superconductors.