<?php

$astronomy_store_first_color = get_theme_mod('astronomy_store_first_color');
$astronomy_store_color_scheme_css = '';

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

if ($astronomy_store_first_color) {
  $astronomy_store_color_scheme_css .= ':root {';
  $astronomy_store_color_scheme_css .= '--first-theme-color: ' . esc_attr($astronomy_store_first_color) . ' !important;';
  $astronomy_store_color_scheme_css .= '} ';
}

  // slider hide css
  $astronomy_store_hidcatslide = get_theme_mod( 'astronomy_store_hide_categorysec', false);
    $astronomy_store_slidersection = get_theme_mod('astronomy_store_slidersection');
  
  if($astronomy_store_hidcatslide != true || $astronomy_store_slidersection != true){
    $astronomy_store_color_scheme_css .='.page-template-template-home-page .main-nav ul li a, .page-template-template-home-page #header .text-white, .page-template-template-home-page .social-icon a, .page-template-template-home-page .site-tagline, .page-template-template-home-page .site-title a, .page-template-template-home-page p.site-title a {';
      $astronomy_store_color_scheme_css .='color: #141414 !important;';
    $astronomy_store_color_scheme_css .='}';
    $astronomy_store_color_scheme_css .=' .page-template-template-home-page #header {';
      $astronomy_store_color_scheme_css .='background-color: var(--first-theme-color); position:static;';
    $astronomy_store_color_scheme_css .='}';

}

//---------------------------------Logo-Max-height--------- 
  $astronomy_store_logo_width = get_theme_mod('astronomy_store_logo_width');

  if($astronomy_store_logo_width != false){

    $astronomy_store_color_scheme_css .='.astronomy-store-logo img{';

      $astronomy_store_color_scheme_css .='width: '.esc_html($astronomy_store_logo_width).'px;';

    $astronomy_store_color_scheme_css .='}';
}

/*---------------------------Slider Height ------------*/

  $astronomy_store_slider_img_height = get_theme_mod('astronomy_store_slider_img_height');
  if($astronomy_store_slider_img_height != false){
      $astronomy_store_color_scheme_css .='#slider .content{';
          $astronomy_store_color_scheme_css .='height: '.esc_attr($astronomy_store_slider_img_height).' !important;';
      $astronomy_store_color_scheme_css .='}';
  }

/*--------------------------- Footer background image -------------------*/

  $astronomy_store_footer_bg_image = get_theme_mod('astronomy_store_footer_bg_image');
  if($astronomy_store_footer_bg_image != false){
      $astronomy_store_color_scheme_css .='.footer-content{';
          $astronomy_store_color_scheme_css .='background: url('.esc_attr($astronomy_store_footer_bg_image).');';
      $astronomy_store_color_scheme_css .='}';
  }

/*--------------------------- Footer image position -------------------*/

  $astronomy_store_footer_img_position = get_theme_mod('astronomy_store_footer_img_position','center center');
  if($astronomy_store_footer_img_position != false){
      $astronomy_store_color_scheme_css .='.footer-content{';
          $astronomy_store_color_scheme_css .='background-position: '.esc_attr($astronomy_store_footer_img_position).';';
      $astronomy_store_color_scheme_css .='}';
  }	

/*--------------------------- Scroll to top positions -------------------*/

  $astronomy_store_scroll_position = get_theme_mod( 'astronomy_store_scroll_position','Right');
  if($astronomy_store_scroll_position == 'Right'){
      $astronomy_store_color_scheme_css .='#button{';
          $astronomy_store_color_scheme_css .='right: 20px;';
      $astronomy_store_color_scheme_css .='}';
  }else if($astronomy_store_scroll_position == 'Left'){
      $astronomy_store_color_scheme_css .='#button{';
          $astronomy_store_color_scheme_css .='left: 20px;';
      $astronomy_store_color_scheme_css .='}';
  }else if($astronomy_store_scroll_position == 'Center'){
      $astronomy_store_color_scheme_css .='#button{';
          $astronomy_store_color_scheme_css .='right: 50%;left: 50%;';
      $astronomy_store_color_scheme_css .='}';
  }  

  /*--------------------------- Woocommerce Product Image Border Radius -------------------*/

  $astronomy_store_woo_product_img_border_radius = get_theme_mod('astronomy_store_woo_product_img_border_radius');
  if($astronomy_store_woo_product_img_border_radius != false){
      $astronomy_store_color_scheme_css .='.woocommerce ul.products li.product a img{';
          $astronomy_store_color_scheme_css .='border-radius: '.esc_attr($astronomy_store_woo_product_img_border_radius).'px;';
      $astronomy_store_color_scheme_css .='}';
  }

  /*--------------------------- Shop page pagination -------------------*/

  $astronomy_store_wooproducts_nav = get_theme_mod('astronomy_store_wooproducts_nav', 'Yes');
  if($astronomy_store_wooproducts_nav == 'No'){
    $astronomy_store_color_scheme_css .='.woocommerce nav.woocommerce-pagination{';
      $astronomy_store_color_scheme_css .='display: none;';
    $astronomy_store_color_scheme_css .='}';
  }

  /*--------------------------- Related Product -------------------*/

  $astronomy_store_related_product_enable = get_theme_mod('astronomy_store_related_product_enable',true);
  if($astronomy_store_related_product_enable == false){
    $astronomy_store_color_scheme_css .='.related.products{';
      $astronomy_store_color_scheme_css .='display: none;';
    $astronomy_store_color_scheme_css .='}';
  }    

/*--------------------------- Scroll to Top Button Shape -------------------*/

	$astronomy_store_scroll_top_shape = get_theme_mod('astronomy_store_scroll_top_shape', 'circle');
	if($astronomy_store_scroll_top_shape == 'box' ){
		$astronomy_store_color_scheme_css .='#button{';
			$astronomy_store_color_scheme_css .=' border-radius: 0%';
		$astronomy_store_color_scheme_css .='}';
	}elseif($astronomy_store_scroll_top_shape == 'curved' ){
		$astronomy_store_color_scheme_css .='#button{';
			$astronomy_store_color_scheme_css .=' border-radius: 20%';
		$astronomy_store_color_scheme_css .='}';
	}elseif($astronomy_store_scroll_top_shape == 'circle' ){
		$astronomy_store_color_scheme_css .='#button{';
			$astronomy_store_color_scheme_css .=' border-radius: 50%;';
		$astronomy_store_color_scheme_css .='}';
	}

  /*--------------------------- Menu Typography -------------------*/

  $astronomy_store_theme_lay = get_theme_mod( 'astronomy_store_menu_text_transform','Capitalize');
  if($astronomy_store_theme_lay == 'Uppercase'){
      $astronomy_store_color_scheme_css .='.main-nav a{';
          $astronomy_store_color_scheme_css .='text-transform: uppercase;';
      $astronomy_store_color_scheme_css .='}';
  }else if($astronomy_store_theme_lay == 'Lowercase'){
      $astronomy_store_color_scheme_css .='.main-nav a{';
          $astronomy_store_color_scheme_css .='text-transform: lowercase;';
      $astronomy_store_color_scheme_css .='}';
  }
  else if($astronomy_store_theme_lay == 'Capitalize'){
      $astronomy_store_color_scheme_css .='.main-nav a{';
          $astronomy_store_color_scheme_css .='text-transform: capitalize;';
      $astronomy_store_color_scheme_css .='}';
  }

/*--------------------------- Post Layout -------------------*/

$astronomy_store_blog_layouts = get_theme_mod('astronomy_store_blog_layout_option_setting', 'Left');
if ($astronomy_store_blog_layouts == 'Left') {
    $astronomy_store_color_scheme_css .= '.postsec-list .listarticle{';
    $astronomy_store_color_scheme_css .= 'text-align:left;';
    $astronomy_store_color_scheme_css .= '}';
} elseif ($astronomy_store_blog_layouts == 'Center') {
    $astronomy_store_color_scheme_css .= '.postsec-list .listarticle{';
    $astronomy_store_color_scheme_css .= 'text-align:center;';
    $astronomy_store_color_scheme_css .= '}';
} elseif ($astronomy_store_blog_layouts == 'Right') {
    $astronomy_store_color_scheme_css .= '.postsec-list .listarticle{';
    $astronomy_store_color_scheme_css .= 'text-align:right;';
    $astronomy_store_color_scheme_css .= '}';
}