<?php

$cleaning_maintenance_custom_css = "";

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

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

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

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

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

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

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

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

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

	$cleaning_maintenance_global_color = get_theme_mod('cleaning_maintenance_global_color', '#0E1B48'); // Add a fallback if the color isn't set

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

	/*-------------------- Secondary First Color -------------------*/

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

	if ($cleaning_maintenance_secondary_color) {
		$cleaning_maintenance_custom_css .= ':root {';
		$cleaning_maintenance_custom_css .= '--secondary-color: ' . esc_attr($cleaning_maintenance_secondary_color) . ';';
		$cleaning_maintenance_custom_css .= '}';
	}

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

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

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

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

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

	if ($cleaning_maintenance_heading_typography_font) {
		$cleaning_maintenance_custom_css .= ':root {';
		$cleaning_maintenance_custom_css .= '--font-head: ' . esc_attr($cleaning_maintenance_heading_typography_font) . ';';
		$cleaning_maintenance_custom_css .= '}';
	}
									
	$cleaning_maintenance_columns = get_theme_mod('cleaning_maintenance_posts_per_columns', 3);
	$cleaning_maintenance_columns = absint($cleaning_maintenance_columns);
	if ( $cleaning_maintenance_columns < 1 || $cleaning_maintenance_columns > 6 ) {
		$cleaning_maintenance_columns = 3;
	}
	$cleaning_maintenance_custom_css .= "
		.site-content .article-wraper-archive {
			grid-template-columns: repeat({$cleaning_maintenance_columns}, 1fr);
		}
	";

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

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

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

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

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

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

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

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

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

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

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