The excellent preservation of the primary textures is to to the fine crystal size of the dolomite and probably formed in a sabkha environmnet. Initially, the carbonate was replaced by aphanocrystalline dolomite. It preserves the finest of details and probably occurred in a supratidal environments. The pore has a first generation of calcite cement which is followed by a generation of euhedral dolomite cement which id followed by more calcite cementation.
Porosity is indicated by the blue-stained epoxy.
Note the curved faces on the dolomite crystals. The dolomite is probably a result of thermochemical sulfate reduction where sulfates and hydrocarbons react at elevated temperatures to cause dissolution of evaporites, and sometimes precipitates baroque dolomite and other high temperature phases. The euhedral, finely crystalline dolomite rhombs are zoned and contain very finely disseminated hematite. Make sure you get familiar with the crystal habit of dolomite and can easily tell it from calcite.