<?php

$cargo_and_shipping_company_custom_css = "";

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

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

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

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

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

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

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

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

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

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

	$cargo_and_shipping_company_global_color = get_theme_mod('cargo_and_shipping_company_global_color', '#15212A'); // Add a fallback if the color isn't set

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

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

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

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

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

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

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

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

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

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

	/*-------------------- column -------------------*/	

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

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

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

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

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

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

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

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

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

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

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

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