<?php

$sneakers_sports_shoes_custom_css = "";

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

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

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

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

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

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

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

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

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

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

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

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

	$sneakers_sports_shoes_content_typography_font = get_theme_mod('sneakers_sports_shoes_content_typography_font', 'Roboto", sans-serif'); // Add a fallback if the color isn't set

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

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

	$sneakers_sports_shoes_heading_typography_font = get_theme_mod('sneakers_sports_shoes_heading_typography_font', 'Outfit", sans-serif'); // Add a fallback if the color isn't set

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

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

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

	// FOOTER

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

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

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

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

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

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

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

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

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

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