<?php

$fresh_bakers_shop_custom_css = "";


$fresh_bakers_shop_primary_color = get_theme_mod('fresh_bakers_shop_primary_color');
$fresh_bakers_shop_second_color = get_theme_mod('fresh_bakers_shop_second_color');

/*------------------ Primary Global Color -----------*/

if ($fresh_bakers_shop_primary_color) {
  $fresh_bakers_shop_custom_css .= ':root {';
  $fresh_bakers_shop_custom_css .= '--primary-color: ' . esc_attr($fresh_bakers_shop_primary_color) . ' !important;';
  $fresh_bakers_shop_custom_css .= '} ';
}

/*------------------ Secondary Global Color -----------*/

if ($fresh_bakers_shop_second_color) {
  $fresh_bakers_shop_custom_css .= ':root {';
  $fresh_bakers_shop_custom_css .= '--secondary-color: ' . esc_attr($fresh_bakers_shop_second_color) . ' !important;';
  $fresh_bakers_shop_custom_css .= '} ';
}

/*-------------------- Scroll Top Alignment-------------------*/

$fresh_bakers_shop_scroll_top_alignment = get_theme_mod( 'fresh_bakers_shop_scroll_top_alignment','right-align');

if($fresh_bakers_shop_scroll_top_alignment == 'right-align'){
$fresh_bakers_shop_custom_css .='#button{';
	$fresh_bakers_shop_custom_css .='right: 3%;';
$fresh_bakers_shop_custom_css .='}';
}else if($fresh_bakers_shop_scroll_top_alignment == 'center-align'){
$fresh_bakers_shop_custom_css .='#button{';
	$fresh_bakers_shop_custom_css .='right:0; left:0; margin: 0 auto;';
$fresh_bakers_shop_custom_css .='}';
}else if($fresh_bakers_shop_scroll_top_alignment == 'left-align'){
$fresh_bakers_shop_custom_css .='#button{';
	$fresh_bakers_shop_custom_css .='left: 3%;';
$fresh_bakers_shop_custom_css .='}';
}

/*-------------------- Archive Page Pagination Alignment-------------------*/

$fresh_bakers_shop_archive_pagination_alignment = get_theme_mod( 'fresh_bakers_shop_archive_pagination_alignment','left-align');

if($fresh_bakers_shop_archive_pagination_alignment == 'right-align'){
$fresh_bakers_shop_custom_css .='.pagination{';
	$fresh_bakers_shop_custom_css .='justify-content: end;';
$fresh_bakers_shop_custom_css .='}';
}else if($fresh_bakers_shop_archive_pagination_alignment == 'center-align'){
$fresh_bakers_shop_custom_css .='.pagination{';
	$fresh_bakers_shop_custom_css .='justify-content: center;';
$fresh_bakers_shop_custom_css .='}';
}else if($fresh_bakers_shop_archive_pagination_alignment == 'left-align'){
$fresh_bakers_shop_custom_css .='.pagination{';
	$fresh_bakers_shop_custom_css .='justify-content: start;';
$fresh_bakers_shop_custom_css .='}';
}

/*-------------------- Scroll Top Responsive-------------------*/

$fresh_bakers_shop_resp_scroll_top = get_theme_mod( 'fresh_bakers_shop_resp_scroll_top',true);
if($fresh_bakers_shop_resp_scroll_top == true && get_theme_mod( 'fresh_bakers_shop_scroll_to_top',true) != true){
	$fresh_bakers_shop_custom_css .='#button.show{';
		$fresh_bakers_shop_custom_css .='visibility:hidden !important;';
	$fresh_bakers_shop_custom_css .='} ';
}
if($fresh_bakers_shop_resp_scroll_top == true){
	$fresh_bakers_shop_custom_css .='@media screen and (max-width:575px) {';
	$fresh_bakers_shop_custom_css .='#button.show{';
		$fresh_bakers_shop_custom_css .='visibility:visible !important;';
	$fresh_bakers_shop_custom_css .='} }';
}else if($fresh_bakers_shop_resp_scroll_top == false){
	$fresh_bakers_shop_custom_css .='@media screen and (max-width:575px){';
	$fresh_bakers_shop_custom_css .='#button.show{';
		$fresh_bakers_shop_custom_css .='visibility:hidden !important;';
	$fresh_bakers_shop_custom_css .='} }';
}

/*-------------------- Preloader Responsive-------------------*/

$fresh_bakers_shop_resp_loader = get_theme_mod('fresh_bakers_shop_resp_loader',false);
if($fresh_bakers_shop_resp_loader == true && get_theme_mod('fresh_bakers_shop_header_preloader',false) == false){
	$fresh_bakers_shop_custom_css .='@media screen and (min-width:575px){
		.preloader{';
		$fresh_bakers_shop_custom_css .='display:none !important;';
	$fresh_bakers_shop_custom_css .='} }';
}

if($fresh_bakers_shop_resp_loader == false){
	$fresh_bakers_shop_custom_css .='@media screen and (max-width:575px){
		.preloader{';
		$fresh_bakers_shop_custom_css .='display:none !important;';
	$fresh_bakers_shop_custom_css .='} }';
}

// Scroll to top button shape 

$fresh_bakers_shop_scroll_border_radius = get_theme_mod( 'fresh_bakers_shop_scroll_to_top_radius','curved-box');
if($fresh_bakers_shop_scroll_border_radius == 'box'){
	$fresh_bakers_shop_custom_css .='#button{';
		$fresh_bakers_shop_custom_css .='border-radius: 0px;';
	$fresh_bakers_shop_custom_css .='}';
}else if($fresh_bakers_shop_scroll_border_radius == 'curved-box'){
	$fresh_bakers_shop_custom_css .='#button{';
		$fresh_bakers_shop_custom_css .='border-radius: 4px;';
	$fresh_bakers_shop_custom_css .='}';
}
else if($fresh_bakers_shop_scroll_border_radius == 'circle'){
	$fresh_bakers_shop_custom_css .='#button{';
		$fresh_bakers_shop_custom_css .='border-radius: 50%;';
	$fresh_bakers_shop_custom_css .='}';
}

// Footer Background Image Attachment 

$fresh_bakers_shop_footer_attachment = get_theme_mod( 'fresh_bakers_shop_background_attachment','scroll');
if($fresh_bakers_shop_footer_attachment == 'fixed'){
	$fresh_bakers_shop_custom_css .='.site-footer{';
		$fresh_bakers_shop_custom_css .='background-attachment: fixed;';
	$fresh_bakers_shop_custom_css .='}';
}elseif ($fresh_bakers_shop_footer_attachment == 'scroll'){
	$fresh_bakers_shop_custom_css .='.site-footer{';
		$fresh_bakers_shop_custom_css .='background-attachment: scroll;';
	$fresh_bakers_shop_custom_css .='}';
}

// Menu Hover Style	

$fresh_bakers_shop_menus_item = get_theme_mod( 'fresh_bakers_shop_menus_style','None');
if($fresh_bakers_shop_menus_item == 'None'){
	$fresh_bakers_shop_custom_css .='#site-navigation .menu ul li a:hover, .main-navigation .menu li a:hover{';
		$fresh_bakers_shop_custom_css .='';
	$fresh_bakers_shop_custom_css .='}';
}else if($fresh_bakers_shop_menus_item == 'Zoom In'){
	$fresh_bakers_shop_custom_css .='#site-navigation .menu ul li a:hover, .main-navigation .menu li a:hover{';
		$fresh_bakers_shop_custom_css .='transition: all 0.3s ease-in-out !important; transform: scale(1.2) !important;';
	$fresh_bakers_shop_custom_css .='}';

	$fresh_bakers_shop_custom_css .= '.main-navigation ul ul li a:hover {';
	$fresh_bakers_shop_custom_css .= 'margin-left: 20px;';
	$fresh_bakers_shop_custom_css .= '}';
}	
