  The nuclear mean-field potential built up by the $^{12}$C+$^{12}$C
interaction at energies relevant for the carbon burning process is calculated
in the double-folding model (DFM) using the realistic ground-state density of
$^{12}$C and the CDM3Y3 density dependent nucleon-nucleon (NN) interaction,
with the rearrangement term properly included. To validate the use of a density
dependent NN interaction in the DFM calculation in the low-energy regime, an
adiabatic approximation is suggested for the nucleus-nucleus overlap density.
The reliability of the nuclear mean-field potential predicted by this
low-energy version of the DFM is tested in a detailed optical model analysis of
the elastic $^{12}$C+$^{12}$C scattering data at energies below 10 MeV/nucleon.
The folded mean-field potential is then used to study the astrophysical $S$
factor of the $^{12}$C+$^{12}$C fusion in the barrier penetration model.
Without any adjustment of the potential strength, our results reproduce very
well the non-resonant behavior of the $S$ factor of the $^{12}$C+$^{12}$C
fusion over a wide range of energies.
