Diagenesis of shallow-marine carbonates