<?php

$swimwear_shop_first_color = get_theme_mod('swimwear_shop_first_color');
$swimwear_shop_color_scheme_css = '';

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

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

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

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

  if($swimwear_shop_logo_width != false){

    $swimwear_shop_color_scheme_css .='.swimwear-shop-logo img{';

      $swimwear_shop_color_scheme_css .='width: '.esc_html($swimwear_shop_logo_width).'px;';

    $swimwear_shop_color_scheme_css .='}';
  }

// by default header
$swimwear_shop_slider = get_theme_mod('swimwear_shop_slider');

if($swimwear_shop_slider != true){

$swimwear_shop_color_scheme_css .='.page-template-template-home-page .header{';

  $swimwear_shop_color_scheme_css .='position: static; background-color: var(--first-theme-color);';

$swimwear_shop_color_scheme_css .='}';
$swimwear_shop_color_scheme_css .='.page-template-template-home-page .main-nav a:hover, .page-template-template-home-page .main-nav .current_page_item a, .page-template-template-home-page .product-account a:hover, .page-template-template-home-page .wishlist a:hover, .page-template-template-home-page .product-cart a:hover,.page-template-template-home-page .search-box i:hover, .page-template-template-home-page p.site-title a:hover{';

  $swimwear_shop_color_scheme_css .='color:#000;';

$swimwear_shop_color_scheme_css .='}';
$swimwear_shop_color_scheme_css .='.page-template-template-home-page .product-cart .cart-count{';

  $swimwear_shop_color_scheme_css .='background-color:#000;';

$swimwear_shop_color_scheme_css .='}';
}

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

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

/*--------------------------- Woocommerce Product Sale Position -------------------*/    

$swimwear_shop_product_sale_position = get_theme_mod( 'swimwear_shop_product_sale_position','Left');
if($swimwear_shop_product_sale_position == 'Right'){
    $swimwear_shop_color_scheme_css .='.woocommerce ul.products li.product .onsale{';
        $swimwear_shop_color_scheme_css .='left:auto !important; right:.5em !important;';
    $swimwear_shop_color_scheme_css .='}';
}else if($swimwear_shop_product_sale_position == 'Left'){
    $swimwear_shop_color_scheme_css .='.woocommerce ul.products li.product .onsale {';
        $swimwear_shop_color_scheme_css .='right:auto !important; left:.5em !important;';
    $swimwear_shop_color_scheme_css .='}';
}   

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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