<?php

$jewellery_shop_first_color = get_theme_mod('jewellery_shop_first_color');
$jewellery_shop_second_color = get_theme_mod('jewellery_shop_second_color');
$jewellery_shop_color_scheme_css = '';

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

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

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

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

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

if($jewellery_shop_logo_width != false){

$jewellery_shop_color_scheme_css .='.jewellery-shop-logo img{';

    $jewellery_shop_color_scheme_css .='width: '.esc_html($jewellery_shop_logo_width).'px;';

$jewellery_shop_color_scheme_css .='}';
}

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

$jewellery_shop_slider_img_height = get_theme_mod('jewellery_shop_slider_img_height');
if($jewellery_shop_slider_img_height != false){
    $jewellery_shop_color_scheme_css .='.slidesection img{';
        $jewellery_shop_color_scheme_css .='height: '.esc_attr($jewellery_shop_slider_img_height).' !important;';
    $jewellery_shop_color_scheme_css .='}';
}

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

$jewellery_shop_footer_bg_image = get_theme_mod('jewellery_shop_footer_bg_image');
if($jewellery_shop_footer_bg_image != false){
    $jewellery_shop_color_scheme_css .='.footer-widget{';
        $jewellery_shop_color_scheme_css .='background: url('.esc_attr($jewellery_shop_footer_bg_image).')!important;';
    $jewellery_shop_color_scheme_css .='}';
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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