<?php

$shipping_company_first_color = get_theme_mod('shipping_company_first_color');
$shipping_company_second_color = get_theme_mod('shipping_company_second_color');
$shipping_company_color_scheme_css = '';

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

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

/*------------------ Global Second Color -----------*/

if ($shipping_company_second_color) {
  $shipping_company_color_scheme_css .= ':root {';
  $shipping_company_color_scheme_css .= '--second-theme-color: ' . esc_attr($shipping_company_second_color) . ' !important;';
  $shipping_company_color_scheme_css .= '} ';
}

// Sticky Header
$shipping_company_resp_stickyheader = get_theme_mod( 'shipping_company_sticky_header',false);
if($shipping_company_resp_stickyheader != true){
    $shipping_company_color_scheme_css .='.header-fixed{';
        $shipping_company_color_scheme_css .='position:static;';
    $shipping_company_color_scheme_css .='} ';
}
if($shipping_company_resp_stickyheader == true){
    $shipping_company_color_scheme_css .='@media screen and (max-width:575px) {';
    $shipping_company_color_scheme_css .='.header-fixed{';
        $shipping_company_color_scheme_css .='position:fixed;';
    $shipping_company_color_scheme_css .='} }';
}else if($shipping_company_resp_stickyheader == false){
    $shipping_company_color_scheme_css .='@media screen and (max-width:575px){';
    $shipping_company_color_scheme_css .='.header-fixed{';
        $shipping_company_color_scheme_css .='position:static;';
    $shipping_company_color_scheme_css .='} }';
}

//---------------------------------Logo-Max-height--------- 
$shipping_company_logo_width = get_theme_mod('shipping_company_logo_width');
if($shipping_company_logo_width != false){
    $shipping_company_color_scheme_css .='.shipping-company-logo img{';
      $shipping_company_color_scheme_css .='width: '.esc_html($shipping_company_logo_width).'px;';
    $shipping_company_color_scheme_css .='}';
}

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

$shipping_company_woo_product_img_border_radius = get_theme_mod('shipping_company_woo_product_img_border_radius');
if($shipping_company_woo_product_img_border_radius != false){
    $shipping_company_color_scheme_css .='.woocommerce-shop.woocommerce .product-content .product-image img{';
    $shipping_company_color_scheme_css .='border-radius: '.esc_attr($shipping_company_woo_product_img_border_radius).'px;';
    $shipping_company_color_scheme_css .='}';
}  

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

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

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

$shipping_company_footer_bg_image = get_theme_mod('shipping_company_footer_bg_image');
if($shipping_company_footer_bg_image != false){
    $shipping_company_color_scheme_css .='#footer{';
        $shipping_company_color_scheme_css .='background: url('.esc_attr($shipping_company_footer_bg_image).');';
        $shipping_company_color_scheme_css .= 'background-size: cover;';  
    $shipping_company_color_scheme_css .='}';
}

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

$shipping_company_footer_img_position = get_theme_mod('shipping_company_footer_img_position','center center');
if($shipping_company_footer_img_position != false){
    $shipping_company_color_scheme_css .='#footer{';
        $shipping_company_color_scheme_css .='background-position: '.esc_attr($shipping_company_footer_img_position).';';
    $shipping_company_color_scheme_css .='}';
}	

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

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

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

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

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

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

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

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

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

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