<?php

$restaurant_culinary_custom_css = "";

	$restaurant_culinary_theme_pagination_options_alignment = get_theme_mod('restaurant_culinary_theme_pagination_options_alignment', 'Center');
	if ($restaurant_culinary_theme_pagination_options_alignment == 'Center') {
		$restaurant_culinary_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		$restaurant_culinary_custom_css .= 'justify-content: center;margin: 0 auto;';
		$restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_theme_pagination_options_alignment == 'Right') {
		$restaurant_culinary_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		$restaurant_culinary_custom_css .= 'justify-content: right;margin: 0 0 0 auto;';
		$restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_theme_pagination_options_alignment == 'Left') {
		$restaurant_culinary_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		$restaurant_culinary_custom_css .= 'justify-content: left;margin: 0 auto 0 0;';
		$restaurant_culinary_custom_css .= '}';
	}

	$restaurant_culinary_theme_breadcrumb_enable = get_theme_mod('restaurant_culinary_theme_breadcrumb_enable',true);
    if($restaurant_culinary_theme_breadcrumb_enable != true){
        $restaurant_culinary_custom_css .='nav.breadcrumb-trail.breadcrumbs,nav.woocommerce-breadcrumb{';
            $restaurant_culinary_custom_css .='display: none;';
        $restaurant_culinary_custom_css .='}';
    }

	$restaurant_culinary_theme_breadcrumb_options_alignment = get_theme_mod('restaurant_culinary_theme_breadcrumb_options_alignment', 'Left');
	if ($restaurant_culinary_theme_breadcrumb_options_alignment == 'Center') {
	    $restaurant_culinary_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
	    $restaurant_culinary_custom_css .= 'text-align: center !important;';
	    $restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_theme_breadcrumb_options_alignment == 'Right') {
	    $restaurant_culinary_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
	    $restaurant_culinary_custom_css .= 'text-align: Right !important;';
	    $restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_theme_breadcrumb_options_alignment == 'Left') {
	    $restaurant_culinary_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
	    $restaurant_culinary_custom_css .= 'text-align: Left !important;';
	    $restaurant_culinary_custom_css .= '}';
	}

	$restaurant_culinary_single_page_content_alignment = get_theme_mod('restaurant_culinary_single_page_content_alignment', 'left');
	if ($restaurant_culinary_single_page_content_alignment == 'left') {
	    $restaurant_culinary_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
	    $restaurant_culinary_custom_css .= 'text-align: left !important;';
	    $restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_single_page_content_alignment == 'center') {
	    $restaurant_culinary_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
	    $restaurant_culinary_custom_css .= 'text-align: center !important;';
	    $restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_single_page_content_alignment == 'right') {
	    $restaurant_culinary_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
	    $restaurant_culinary_custom_css .= 'text-align: right !important;';
	    $restaurant_culinary_custom_css .= '}';
	}

	$restaurant_culinary_single_post_content_alignment = get_theme_mod('restaurant_culinary_single_post_content_alignment', 'left');
	if ($restaurant_culinary_single_post_content_alignment == 'left') {
	    $restaurant_culinary_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
	    $restaurant_culinary_custom_css .= 'text-align: left !important;justify-content: left;';
	    $restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_single_post_content_alignment == 'center') {
	    $restaurant_culinary_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
	    $restaurant_culinary_custom_css .= 'text-align: center !important;justify-content: center;';
	    $restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_single_post_content_alignment == 'right') {
	    $restaurant_culinary_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
	    $restaurant_culinary_custom_css .= 'text-align: right !important;justify-content: right;';
	    $restaurant_culinary_custom_css .= '}';
	}

	$restaurant_culinary_menu_text_transform = get_theme_mod('restaurant_culinary_menu_text_transform', 'Capitalize');
	if ($restaurant_culinary_menu_text_transform == 'Capitalize') {
	    $restaurant_culinary_custom_css .= '.site-navigation .primary-menu > li a{';
	    $restaurant_culinary_custom_css .= 'text-transform: Capitalize !important;';
	    $restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_menu_text_transform == 'uppercase') {
	    $restaurant_culinary_custom_css .= '.site-navigation .primary-menu > li a{';
	    $restaurant_culinary_custom_css .= 'text-transform: uppercase !important;';
	    $restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_menu_text_transform == 'lowercase') {
	    $restaurant_culinary_custom_css .= '.site-navigation .primary-menu > li a{';
	    $restaurant_culinary_custom_css .= 'text-transform: lowercase !important;';
	    $restaurant_culinary_custom_css .= '}';
	}

	$restaurant_culinary_footer_widget_title_alignment = get_theme_mod('restaurant_culinary_footer_widget_title_alignment', 'left');
	if ($restaurant_culinary_footer_widget_title_alignment == 'left') {
	    $restaurant_culinary_custom_css .= 'h2.widget-title{';
	    $restaurant_culinary_custom_css .= 'text-align: left !important;';
	    $restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_footer_widget_title_alignment == 'center') {
	    $restaurant_culinary_custom_css .= 'h2.widget-title{';
	    $restaurant_culinary_custom_css .= 'text-align: center !important;';
	    $restaurant_culinary_custom_css .= '}';
	} else if ($restaurant_culinary_footer_widget_title_alignment == 'right') {
	    $restaurant_culinary_custom_css .= 'h2.widget-title{';
	    $restaurant_culinary_custom_css .= 'text-align: right !important;';
	    $restaurant_culinary_custom_css .= '}';
	}

    $restaurant_culinary_show_hide_related_product = get_theme_mod('restaurant_culinary_show_hide_related_product',true);
    if($restaurant_culinary_show_hide_related_product != true){
        $restaurant_culinary_custom_css .='.related.products{';
            $restaurant_culinary_custom_css .='display: none;';
        $restaurant_culinary_custom_css .='}';
    }

	$restaurant_culinary_sticky_sidebar = get_theme_mod('restaurant_culinary_sticky_sidebar',true);
    if($restaurant_culinary_sticky_sidebar != true){
        $restaurant_culinary_custom_css .='.widget-area-wrapper{';
            $restaurant_culinary_custom_css .='position: relative !important;';
        $restaurant_culinary_custom_css .='}';
    }

	/*-------------------- Global First Color -------------------*/

	$restaurant_culinary_global_color = get_theme_mod('restaurant_culinary_global_color', '#50A96E');

	if ($restaurant_culinary_global_color) {
		$restaurant_culinary_custom_css .= ':root {';
		$restaurant_culinary_custom_css .= '--global-color: ' . esc_attr($restaurant_culinary_global_color) . ';';
		$restaurant_culinary_custom_css .= '}';
	}	

	/*-------------------- Content Font -------------------*/

	$restaurant_culinary_content_typography_font = get_theme_mod('restaurant_culinary_content_typography_font', 'Lato'); // Add a fallback if the color isn't set

	if ($restaurant_culinary_content_typography_font) {
		$restaurant_culinary_custom_css .= ':root {';
		$restaurant_culinary_custom_css .= '--font-main: ' . esc_attr($restaurant_culinary_content_typography_font) . ';';
		$restaurant_culinary_custom_css .= '}';
	}

	/*-------------------- Heading Font -------------------*/

	$restaurant_culinary_heading_typography_font = get_theme_mod('restaurant_culinary_heading_typography_font', 'Lato'); // Add a fallback if the color isn't set

	if ($restaurant_culinary_heading_typography_font) {
		$restaurant_culinary_custom_css .= ':root {';
		$restaurant_culinary_custom_css .= '--font-head: ' . esc_attr($restaurant_culinary_heading_typography_font) . ';';
		$restaurant_culinary_custom_css .= '}';
	}

	$restaurant_culinary_columns = get_theme_mod('restaurant_culinary_posts_per_columns', 3);
	$restaurant_culinary_columns = absint($restaurant_culinary_columns);
	if ( $restaurant_culinary_columns < 1 || $restaurant_culinary_columns > 6 ) {
		$restaurant_culinary_columns = 3;
	}
	$restaurant_culinary_custom_css .= "
		.site-content .article-wraper-archive {
			grid-template-columns: repeat({$restaurant_culinary_columns}, 1fr);
		}
	";

	$restaurant_culinary_copyright_alignment = get_theme_mod( 'restaurant_culinary_copyright_alignment', 'Default' );
	if ( $restaurant_culinary_copyright_alignment === 'Reverse' ) {
		$restaurant_culinary_custom_css .= '.site-info .column-row { flex-direction: row-reverse; }';
		$restaurant_culinary_custom_css .= '.footer-credits { justify-content: flex-end; }';
		$restaurant_culinary_custom_css .= '.footer-copyright { text-align: right; }';
		$restaurant_culinary_custom_css .= '.site-info .column.column-3 { text-align: left; }';
	} elseif ( $restaurant_culinary_copyright_alignment === 'Center' ) {
		$restaurant_culinary_custom_css .= '.site-info .column-row { flex-direction: column; align-items: center; gap: 15px; }';
		$restaurant_culinary_custom_css .= '.footer-credits { justify-content: center; }';
		$restaurant_culinary_custom_css .= '.footer-copyright { text-align: center; }';
		$restaurant_culinary_custom_css .= '.site-info .column.column-3 { text-align: center; }';
	}

	$restaurant_culinary_footer_widget_background_color = get_theme_mod('restaurant_culinary_footer_widget_background_color');
	if ($restaurant_culinary_footer_widget_background_color) {

		$restaurant_culinary_custom_css .= "
			.footer-widgetarea {
				background-color: ". esc_attr($restaurant_culinary_footer_widget_background_color) .";
			}
		";
	}

	$restaurant_culinary_footer_widget_background_image = get_theme_mod('restaurant_culinary_footer_widget_background_image');
	if ($restaurant_culinary_footer_widget_background_image) {
		$restaurant_culinary_custom_css .= "
			.footer-widgetarea {
				background-image: url(" . esc_url($restaurant_culinary_footer_widget_background_image) . ");
			}
		";
	}

	$restaurant_culinary_copyright_font_size = get_theme_mod('restaurant_culinary_copyright_font_size');
	if ($restaurant_culinary_copyright_font_size) {

		$restaurant_culinary_custom_css .= "
			.footer-copyright {
				font-size: ". esc_attr($restaurant_culinary_copyright_font_size) ."px;
			}
		";
	}

	/*-------------------- Menu Color CSS -------------------*/

	$restaurant_culinary_header_menus_color = get_theme_mod('restaurant_culinary_header_menus_color');
	if($restaurant_culinary_header_menus_color != false){
		$restaurant_culinary_custom_css .='.site-navigation .primary-menu a{';
			$restaurant_culinary_custom_css .='color: '.esc_attr($restaurant_culinary_header_menus_color).'!important;';
		$restaurant_culinary_custom_css .='}';
	}

	$restaurant_culinary_header_menus_hover_color = get_theme_mod('restaurant_culinary_header_menus_hover_color');
	if($restaurant_culinary_header_menus_hover_color != false){
		$restaurant_culinary_custom_css .='.site-navigation .primary-menu a:hover{';
			$restaurant_culinary_custom_css .='color: '.esc_attr($restaurant_culinary_header_menus_hover_color).'!important;';
		$restaurant_culinary_custom_css .='}';
	}

	$restaurant_culinary_header_submenus_color = get_theme_mod('restaurant_culinary_header_submenus_color');
	if($restaurant_culinary_header_submenus_color != false){
		$restaurant_culinary_custom_css .='.site-navigation .primary-menu ul.sub-menu li a,.site-navigation .primary-menu li ul li a{';
			$restaurant_culinary_custom_css .='color: '.esc_attr($restaurant_culinary_header_submenus_color).'!important;';
		$restaurant_culinary_custom_css .='}';
	}

	$restaurant_culinary_header_submenus_hover_color = get_theme_mod('restaurant_culinary_header_submenus_hover_color');
	if($restaurant_culinary_header_submenus_hover_color != false){
		$restaurant_culinary_custom_css .='.site-navigation .primary-menu > li ul.sub-menu a:hover,.site-navigation .primary-menu li ul li a:hover{';
			$restaurant_culinary_custom_css .='color: '.esc_attr($restaurant_culinary_header_submenus_hover_color).'!important;';
		$restaurant_culinary_custom_css .='}';
	}