The nuclear mean-field potential arising from the 12C+12C interaction at the low energies relevant for the astrophysical carbon burning process has been constructed within the double-folding model, using the realistic nuclear ground-state density of the 12C nucleus and the effective M3Y nucleon-nucleon (NN) interaction constructed from the G-matrix of the Paris (free) NN potential. To explore the nuclear medium effect, both the original density independent M3Y-Paris interaction and its density dependent CDM3Y6 version have been used in the folding model calculation of the 12C+12C potential. The folded potentials at the different energies were used in the optical model description of the elastic 12C+12C scattering at the energies around and below the Coulomb barrier, as well as in the barrier penetration model to estimate the fusion cross section and astrophysical S factor of the 12C+12C reactions at the low energies. The obtained results are in good agreement with experimental data over a wide range of energies.