<?php

$omega_food_delivery_custom_css = "";

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

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

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

	$omega_food_delivery_single_page_content_alignment = get_theme_mod('omega_food_delivery_single_page_content_alignment', 'left');
	if ($omega_food_delivery_single_page_content_alignment == 'left') {
	    $omega_food_delivery_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{';
	    $omega_food_delivery_custom_css .= 'text-align: left !important;';
	    $omega_food_delivery_custom_css .= '}';
	} else if ($omega_food_delivery_single_page_content_alignment == 'center') {
	    $omega_food_delivery_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{';
	    $omega_food_delivery_custom_css .= 'text-align: center !important;';
	    $omega_food_delivery_custom_css .= '}';
	} else if ($omega_food_delivery_single_page_content_alignment == 'right') {
	    $omega_food_delivery_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{';
	    $omega_food_delivery_custom_css .= 'text-align: right !important;';
	    $omega_food_delivery_custom_css .= '}';
	}

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

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

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

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

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

	$omega_food_delivery_global_color = get_theme_mod('omega_food_delivery_global_color', '#F7B614'); // Add a fallback if the color isn't set

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


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

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

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

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

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

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

	/*-------------------- FOOTER -------------------*/

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

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

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

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

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

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

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

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

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

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

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

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