<?php

$car_rental_service_custom_css = "";

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

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

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

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

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

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

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

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

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

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

	$car_rental_service_global_color = get_theme_mod('car_rental_service_global_color', '#1A1A1A'); // Add a fallback if the color isn't set

	if ($car_rental_service_global_color) {
		$car_rental_service_custom_css .= ':root {';
		$car_rental_service_custom_css .= '--global-color: ' . esc_attr($car_rental_service_global_color) . ';';
		$car_rental_service_custom_css .= '}';
	}
	
	/*-------------------- Global Second Color -------------------*/

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

	if ($car_rental_service_secondary_color) {
		$car_rental_service_custom_css .= ':root {';
		$car_rental_service_custom_css .= '--global-colorr: ' . esc_attr($car_rental_service_secondary_color) . ';';
		$car_rental_service_custom_css .= '}';
	}


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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