<?php 

	$cosmetic_shop_custom_style = '';

	// Logo Size
	$cosmetic_shop_logo_top_padding = get_theme_mod('cosmetic_shop_logo_top_padding');
	$cosmetic_shop_logo_bottom_padding = get_theme_mod('cosmetic_shop_logo_bottom_padding');
	$cosmetic_shop_logo_left_padding = get_theme_mod('cosmetic_shop_logo_left_padding');
	$cosmetic_shop_logo_right_padding = get_theme_mod('cosmetic_shop_logo_right_padding');

	if( $cosmetic_shop_logo_top_padding != '' || $cosmetic_shop_logo_bottom_padding != '' || $cosmetic_shop_logo_left_padding != '' || $cosmetic_shop_logo_right_padding != ''){
		$cosmetic_shop_custom_style .=' .logo {';
			$cosmetic_shop_custom_style .=' padding-top: '.esc_attr($cosmetic_shop_logo_top_padding).'px; padding-bottom: '.esc_attr($cosmetic_shop_logo_bottom_padding).'px; padding-left: '.esc_attr($cosmetic_shop_logo_left_padding).'px; padding-right: '.esc_attr($cosmetic_shop_logo_right_padding).'px;';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_logo_size = get_theme_mod('cosmetic_shop_logo_size');
	if( $cosmetic_shop_logo_size != '' ) {
		if($cosmetic_shop_logo_size >= 0 && $cosmetic_shop_logo_size <= 100) {
			$calculated_width = $cosmetic_shop_logo_size * 3.5;
			$cosmetic_shop_custom_style .= ' .custom-logo-link img {';
			$cosmetic_shop_custom_style .= ' width: ' . esc_attr($calculated_width) . 'px;';
			$cosmetic_shop_custom_style .= ' }';
		}
	}

	//Site title color
	$cosmetic_shop_site_title_color = get_theme_mod('cosmetic_shop_site_title_color');
	if ( $cosmetic_shop_site_title_color != '') {
		$cosmetic_shop_custom_style .=' h1.site-title a, p.site-title a {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_site_title_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	//Site tagline color
	$cosmetic_shop_site_tagline_color = get_theme_mod('cosmetic_shop_site_tagline_color');
	if ( $cosmetic_shop_site_tagline_color != '') {
		$cosmetic_shop_custom_style .=' p.site-description {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_site_tagline_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_menu_color = get_theme_mod('cosmetic_shop_menu_color');
	if ( $cosmetic_shop_menu_color != '') {
		$cosmetic_shop_custom_style .=' .nav-menu ul li a {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_menu_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_submenu_color = get_theme_mod('cosmetic_shop_submenu_color');
	$cosmetic_shop_submenubg_color = get_theme_mod('cosmetic_shop_submenubg_color');
	if ( $cosmetic_shop_submenu_color != '') {
		$cosmetic_shop_custom_style .=' .nav-menu ul ul a {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_submenu_color).'; background-color:'.esc_attr($cosmetic_shop_submenubg_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_cartic_color = get_theme_mod('cosmetic_shop_cartic_color');
	if ( $cosmetic_shop_cartic_color != '') {
		$cosmetic_shop_custom_style .=' #header .s-btn a i, #header .hbtn.Nmob span.cart-value {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_cartic_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_hdrbtn_color = get_theme_mod('cosmetic_shop_hdrbtn_color');
	$cosmetic_shop_hdrbtnbg_color = get_theme_mod('cosmetic_shop_hdrbtnbg_color');
	if ( $cosmetic_shop_hdrbtn_color != '') {
		$cosmetic_shop_custom_style .=' #header .accnt a {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_hdrbtn_color).'; background-color:'.esc_attr($cosmetic_shop_hdrbtnbg_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	//layout width
	$cosmetic_shop_boxfull_width = get_theme_mod('cosmetic_shop_boxfull_width');
	if ($cosmetic_shop_boxfull_width !== '') {
		switch ($cosmetic_shop_boxfull_width) {
			case 'container':
				$cosmetic_shop_custom_style .= ' body, #header, .bottom-header {
					max-width: 1140px;
					width: 100%;
					padding-right: 15px;
					padding-left: 15px;
					margin-right: auto;
					margin-left: auto;
					}';
				break;
			case 'container-fluid':
				$cosmetic_shop_custom_style .= ' body, #header, .bottom-header { 
					width: 100%;
					padding-right: 15px;
					padding-left: 15px;
					margin-right: auto;
					margin-left: auto;
					}';
				break;
			case 'none':
				// No specific width specified, so no additional style needed.
				break;
			default:
				// Handle unexpected values.
				break;
		}
	}

	//Menu animation
	$cosmetic_shop_dropdown_anim = get_theme_mod('cosmetic_shop_dropdown_anim');

	if ( $cosmetic_shop_dropdown_anim != '') {
		$cosmetic_shop_custom_style .=' .nav-menu ul ul {';
			$cosmetic_shop_custom_style .=' animation:'.esc_attr($cosmetic_shop_dropdown_anim).' 1s ease;';
		$cosmetic_shop_custom_style .=' }';
	}

	//Slider color
	$cosmetic_shop_slider_font_size = get_theme_mod('cosmetic_shop_slider_font_size');
	if ( $cosmetic_shop_slider_font_size != '') {
		$cosmetic_shop_custom_style .=' #slider h2 {';
			$cosmetic_shop_custom_style .=' font-size:'.esc_attr($cosmetic_shop_slider_font_size).'px;';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_slider_text_font_size = get_theme_mod('cosmetic_shop_slider_text_font_size');
	if ( $cosmetic_shop_slider_text_font_size != '') {
		$cosmetic_shop_custom_style .=' #slider p {';
			$cosmetic_shop_custom_style .=' font-size:'.esc_attr($cosmetic_shop_slider_text_font_size).'px;';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_slider_title_color = get_theme_mod('cosmetic_shop_slider_title_color');
	if ( $cosmetic_shop_slider_title_color != '') {
		$cosmetic_shop_custom_style .=' #slider h2 {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_slider_title_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_slider_bdr_color = get_theme_mod('cosmetic_shop_slider_bdr_color');
	if ( $cosmetic_shop_slider_bdr_color != '') {
		$cosmetic_shop_custom_style .=' #slider .sld-brd {';
			$cosmetic_shop_custom_style .=' border-top-color:'.esc_attr($cosmetic_shop_slider_bdr_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_slider_text_color = get_theme_mod('cosmetic_shop_slider_text_color');
	if ( $cosmetic_shop_slider_text_color != '') {
		$cosmetic_shop_custom_style .=' #slider p {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_slider_text_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_slider_btn_color = get_theme_mod('cosmetic_shop_slider_btn_color');
	$cosmetic_shop_slider_btnbg_color = get_theme_mod('cosmetic_shop_slider_btnbg_color');
	if ( $cosmetic_shop_slider_btn_color != '') {
		$cosmetic_shop_custom_style .=' #slider a.read-btn {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_slider_btn_color).'; background-color:'.esc_attr($cosmetic_shop_slider_btnbg_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_slider_np_color = get_theme_mod('cosmetic_shop_slider_np_color');
	$cosmetic_shop_slider_npbg_color = get_theme_mod('cosmetic_shop_slider_npbg_color');
	if ( $cosmetic_shop_slider_np_color != '') {
		$cosmetic_shop_custom_style .=' #slider .carousel-control-prev-icon i, #slider .carousel-control-next-icon i {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_slider_np_color).'; background-color:'.esc_attr($cosmetic_shop_slider_npbg_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	//product category color
	$cosmetic_shop_productcategorysection_title_font_size = get_theme_mod('cosmetic_shop_productcategorysection_title_font_size');
	if ( $cosmetic_shop_productcategorysection_title_font_size != '') {
		$cosmetic_shop_custom_style .=' #productcategory-section .productcategory-head h3 {';
			$cosmetic_shop_custom_style .=' font-size:'.esc_attr($cosmetic_shop_productcategorysection_title_font_size).'px;';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_productcategorysection_subtitle_font_size = get_theme_mod('cosmetic_shop_productcategorysection_subtitle_font_size');
	if ( $cosmetic_shop_productcategorysection_subtitle_font_size != '') {
		$cosmetic_shop_custom_style .=' #productcategory-section .productcategory-head p {';
			$cosmetic_shop_custom_style .=' font-size:'.esc_attr($cosmetic_shop_productcategorysection_subtitle_font_size).'px;';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_productcategorysection_title_color = get_theme_mod('cosmetic_shop_productcategorysection_title_color');
	if ( $cosmetic_shop_productcategorysection_title_color != '') {
		$cosmetic_shop_custom_style .=' #productcategory-section .productcategory-head h3 {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_productcategorysection_title_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	$cosmetic_shop_productcategorysection_subtitle_color = get_theme_mod('cosmetic_shop_productcategorysection_subtitle_color');
	if ( $cosmetic_shop_productcategorysection_subtitle_color != '') {
		$cosmetic_shop_custom_style .=' #productcategory-section .productcategory-head p {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_productcategorysection_subtitle_color).';';
		$cosmetic_shop_custom_style .=' }';
	}

	//featureproduct color
	$cosmetic_shop_featureproduct_color = get_theme_mod('cosmetic_shop_featureproduct_color');
	if ( $cosmetic_shop_featureproduct_color != '') {
		$cosmetic_shop_custom_style .=' .featureproduct-box .featureproduct-content h4 {';
			$cosmetic_shop_custom_style .=' color:'.esc_attr($cosmetic_shop_featureproduct_color).';';
		$cosmetic_shop_custom_style .=' }';
	}