<?php

$electronic_supermarket_tp_theme_css = '';


$electronic_supermarket_tp_color_option = get_theme_mod('electronic_supermarket_tp_color_option');

// 1st color
$electronic_supermarket_tp_color_option = get_theme_mod('electronic_supermarket_tp_color_option', '#0D6EFD');
if ($electronic_supermarket_tp_color_option) {
	$electronic_supermarket_tp_theme_css .= ':root {';
	$electronic_supermarket_tp_theme_css .= '--color-primary1: ' . esc_attr($electronic_supermarket_tp_color_option) . ';';
	$electronic_supermarket_tp_theme_css .= '}';
}

// linear gradient
// Check if either color option is set and apply CSS
if($electronic_supermarket_tp_color_option != false){
    // Apply dynamic linear gradient background
    $electronic_supermarket_tp_theme_css .= '.product-search input {';
    $electronic_supermarket_tp_theme_css .= 'background-image: linear-gradient(90deg, #ffffff 84%, '.esc_attr($electronic_supermarket_tp_color_option).' 18%);';
    $electronic_supermarket_tp_theme_css .= '}';
}

//Second color
$electronic_supermarket_tp_color_option_second = get_theme_mod('electronic_supermarket_tp_color_option_second', '#0F58C3');
if ($electronic_supermarket_tp_color_option_second) {
	$electronic_supermarket_tp_theme_css .= ':root {';
	$electronic_supermarket_tp_theme_css .= '--color-primary2: ' . esc_attr($electronic_supermarket_tp_color_option_second) . ';';
	$electronic_supermarket_tp_theme_css .= '}';
}

//preloader

$electronic_supermarket_tp_preloader_color1_option = get_theme_mod('electronic_supermarket_tp_preloader_color1_option');
$electronic_supermarket_tp_preloader_color2_option = get_theme_mod('electronic_supermarket_tp_preloader_color2_option');
$electronic_supermarket_tp_preloader_bg_color_option = get_theme_mod('electronic_supermarket_tp_preloader_bg_color_option');

if($electronic_supermarket_tp_preloader_color1_option != false){
$electronic_supermarket_tp_theme_css .='.center1{';
	$electronic_supermarket_tp_theme_css .='border-color: '.esc_attr($electronic_supermarket_tp_preloader_color1_option).' !important;';
$electronic_supermarket_tp_theme_css .='}';
}
if($electronic_supermarket_tp_preloader_color1_option != false){
$electronic_supermarket_tp_theme_css .='.center1 .ring::before{';
	$electronic_supermarket_tp_theme_css .='background: '.esc_attr($electronic_supermarket_tp_preloader_color1_option).' !important;';
$electronic_supermarket_tp_theme_css .='}';
}
if($electronic_supermarket_tp_preloader_color2_option != false){
$electronic_supermarket_tp_theme_css .='.center2{';
	$electronic_supermarket_tp_theme_css .='border-color: '.esc_attr($electronic_supermarket_tp_preloader_color2_option).' !important;';
$electronic_supermarket_tp_theme_css .='}';
}
if($electronic_supermarket_tp_preloader_color2_option != false){
$electronic_supermarket_tp_theme_css .='.center2 .ring::before{';
	$electronic_supermarket_tp_theme_css .='background: '.esc_attr($electronic_supermarket_tp_preloader_color2_option).' !important;';
$electronic_supermarket_tp_theme_css .='}';
}
if($electronic_supermarket_tp_preloader_bg_color_option != false){
$electronic_supermarket_tp_theme_css .='.loader{';
	$electronic_supermarket_tp_theme_css .='background: '.esc_attr($electronic_supermarket_tp_preloader_bg_color_option).';';
$electronic_supermarket_tp_theme_css .='}';
}

// footer-bg-color
$electronic_supermarket_tp_footer_bg_color_option = get_theme_mod('electronic_supermarket_tp_footer_bg_color_option');

if($electronic_supermarket_tp_footer_bg_color_option != false){
$electronic_supermarket_tp_theme_css .='#footer{';
	$electronic_supermarket_tp_theme_css .='background: '.esc_attr($electronic_supermarket_tp_footer_bg_color_option).' !important;';
$electronic_supermarket_tp_theme_css .='}';
}

// logo tagline color
$electronic_supermarket_site_tagline_color = get_theme_mod('electronic_supermarket_site_tagline_color');

if($electronic_supermarket_site_tagline_color != false){
$electronic_supermarket_tp_theme_css .='.logo h1 a, .logo p a{';
$electronic_supermarket_tp_theme_css .='color: '.esc_attr($electronic_supermarket_site_tagline_color).';';
$electronic_supermarket_tp_theme_css .='}';
}

$electronic_supermarket_logo_tagline_color = get_theme_mod('electronic_supermarket_logo_tagline_color');
if($electronic_supermarket_logo_tagline_color != false){
$electronic_supermarket_tp_theme_css .='p.site-description{';
$electronic_supermarket_tp_theme_css .='color: '.esc_attr($electronic_supermarket_logo_tagline_color).';';
$electronic_supermarket_tp_theme_css .='}';
}

// footer widget title color
$electronic_supermarket_footer_widget_title_color = get_theme_mod('electronic_supermarket_footer_widget_title_color');
if($electronic_supermarket_footer_widget_title_color != false){
$electronic_supermarket_tp_theme_css .='#footer h3{';
$electronic_supermarket_tp_theme_css .='color: '.esc_attr($electronic_supermarket_footer_widget_title_color).';';
$electronic_supermarket_tp_theme_css .='}';
}

// copyright text color
$electronic_supermarket_footer_copyright_text_color = get_theme_mod('electronic_supermarket_footer_copyright_text_color');
if($electronic_supermarket_footer_copyright_text_color != false){
$electronic_supermarket_tp_theme_css .='#footer .site-info p, #footer .site-info a {';
$electronic_supermarket_tp_theme_css .='color: '.esc_attr($electronic_supermarket_footer_copyright_text_color).'!important;';
$electronic_supermarket_tp_theme_css .='}';
}


// header image title color
$electronic_supermarket_header_image_title_text_color = get_theme_mod('electronic_supermarket_header_image_title_text_color');
if($electronic_supermarket_header_image_title_text_color != false){
$electronic_supermarket_tp_theme_css .='.box-text h2{';
$electronic_supermarket_tp_theme_css .='color: '.esc_attr($electronic_supermarket_header_image_title_text_color).';';
$electronic_supermarket_tp_theme_css .='}';
}

// menu color
$electronic_supermarket_menu_color = get_theme_mod('electronic_supermarket_menu_color');
if($electronic_supermarket_menu_color != false){
$electronic_supermarket_tp_theme_css .='.main-navigation a{';
$electronic_supermarket_tp_theme_css .='color: '.esc_attr($electronic_supermarket_menu_color).';';
$electronic_supermarket_tp_theme_css .='}';
}

//Footer Font Weight
$electronic_supermarket_footer_copyright_title_font_weight = get_theme_mod( 'electronic_supermarket_footer_copyright_title_font_weight','');
if($electronic_supermarket_footer_copyright_title_font_weight == '100'){
$electronic_supermarket_tp_theme_css .='#footer .site-info p {';
    $electronic_supermarket_tp_theme_css .='font-weight: 100;';
$electronic_supermarket_tp_theme_css .='}';
}else if($electronic_supermarket_footer_copyright_title_font_weight == '200'){
$electronic_supermarket_tp_theme_css .='#footer .site-info p {';
    $electronic_supermarket_tp_theme_css .='font-weight: 200;';
$electronic_supermarket_tp_theme_css .='}';
}else if($electronic_supermarket_footer_copyright_title_font_weight == '300'){
$electronic_supermarket_tp_theme_css .='#footer .site-info p {';
    $electronic_supermarket_tp_theme_css .='font-weight: 300;';
$electronic_supermarket_tp_theme_css .='}';
}else if($electronic_supermarket_footer_copyright_title_font_weight == '400'){
$electronic_supermarket_tp_theme_css .='#footer .site-info p {';
    $electronic_supermarket_tp_theme_css .='font-weight: 400;';
$electronic_supermarket_tp_theme_css .='}';
}else if($electronic_supermarket_footer_copyright_title_font_weight == '500'){
$electronic_supermarket_tp_theme_css .='#footer .site-info p {';
    $electronic_supermarket_tp_theme_css .='font-weight: 500;';
$electronic_supermarket_tp_theme_css .='}';
}else if($electronic_supermarket_footer_copyright_title_font_weight == '600'){
$electronic_supermarket_tp_theme_css .='#footer .site-info p {';
    $electronic_supermarket_tp_theme_css .='font-weight: 600;';
$electronic_supermarket_tp_theme_css .='}';
}else if($electronic_supermarket_footer_copyright_title_font_weight == '700'){
$electronic_supermarket_tp_theme_css .='#footer .site-info p {';
    $electronic_supermarket_tp_theme_css .='font-weight: 700;';
$electronic_supermarket_tp_theme_css .='}';
}else if($electronic_supermarket_footer_copyright_title_font_weight == '800'){
$electronic_supermarket_tp_theme_css .='#footer .site-info p {';
    $electronic_supermarket_tp_theme_css .='font-weight: 800;';
$electronic_supermarket_tp_theme_css .='}';
}else if($electronic_supermarket_footer_copyright_title_font_weight == '900'){
$electronic_supermarket_tp_theme_css .='#footer .site-info p {';
    $electronic_supermarket_tp_theme_css .='font-weight: 900;';
$electronic_supermarket_tp_theme_css .='}';
}