<?php

$clothing_store_custom_style= "";

//theme width

$clothing_store_theme_width = get_theme_mod( 'clothing_store_width_options','full_width');

if($clothing_store_theme_width == 'full_width'){

$clothing_store_custom_style .='body{';

	$clothing_store_custom_style .='max-width: 100%;';

$clothing_store_custom_style .='}';

}else if($clothing_store_theme_width == 'container'){

$clothing_store_custom_style .='body{';

	$clothing_store_custom_style .='width: 100%; padding-right: 15px; padding-left: 15px;  margin-right: auto !important; margin-left: auto !important;';

$clothing_store_custom_style .='}';

$clothing_store_custom_style .='@media screen and (min-width: 601px){';

$clothing_store_custom_style .='body{';

    $clothing_store_custom_style .='max-width: 720px;';
    
$clothing_store_custom_style .='} }';

$clothing_store_custom_style .='@media screen and (min-width: 992px){';

$clothing_store_custom_style .='body{';

    $clothing_store_custom_style .='max-width: 960px;';
    
$clothing_store_custom_style .='} }';

$clothing_store_custom_style .='@media screen and (min-width: 1200px){';

$clothing_store_custom_style .='body{';

    $clothing_store_custom_style .='max-width: 1140px;';
    
$clothing_store_custom_style .='} }';

$clothing_store_custom_style .='@media screen and (min-width: 1400px){';

$clothing_store_custom_style .='body{';

    $clothing_store_custom_style .='max-width: 1320px;';
    
$clothing_store_custom_style .='} }';

$clothing_store_custom_style .='.carousel-control-prev, .carousel-control-next{';

	$clothing_store_custom_style .='top:auto';

$clothing_store_custom_style .='}';

$clothing_store_custom_style .='.discount-box {';

	$clothing_store_custom_style .='right: 9px';

$clothing_store_custom_style .='}';

$clothing_store_custom_style .='@media screen and (max-width:600px){';

$clothing_store_custom_style .='body{';

    $clothing_store_custom_style .='max-width: 100%; padding-right:0px; padding-left: 0px';
    
$clothing_store_custom_style .='} }';

}else if($clothing_store_theme_width == 'container_fluid'){

$clothing_store_custom_style .='body{';

	$clothing_store_custom_style .='width: 100%;padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto;';

$clothing_store_custom_style .='}';

$clothing_store_custom_style .='@media screen and (max-width:600px){';

$clothing_store_custom_style .='body{';

    $clothing_store_custom_style .='max-width: 100%; padding-right:0px; padding-left: 0px';
    
$clothing_store_custom_style .='} }';
}

// sticky header

	if (false === get_option('clothing_store_sticky_header')) {
	    add_option('clothing_store_sticky_header', 'off');
	}

	// Define the custom CSS based on the 'clothing_store_sticky_header' option

	if (get_option('clothing_store_sticky_header', 'off') !== 'on') {
	    $clothing_store_custom_style .= '.fixed_header.fixed {';
	    $clothing_store_custom_style .= 'position: static;';
	    $clothing_store_custom_style .= '}';
	}

	if (get_option('clothing_store_sticky_header', 'off') !== 'off') {
	    $clothing_store_custom_style .= '.fixed_header.fixed {';
	    $clothing_store_custom_style .= 'position: fixed; background: #fff; padding: 10px 5px;';
	    $clothing_store_custom_style .= '}';

	    $clothing_store_custom_style .= '.admin-bar .fixed {';
	    $clothing_store_custom_style .= ' margin-top: 32px;';
	    $clothing_store_custom_style .= '}';
	}
	
// Scroll-top-position

$clothing_store_scroll_options = get_theme_mod( 'clothing_store_scroll_options','right_align');

if($clothing_store_scroll_options == 'right_align'){

$clothing_store_custom_style .='.scroll-top button{';

	$clothing_store_custom_style .='';

$clothing_store_custom_style .='}';

}else if($clothing_store_scroll_options == 'center_align'){

$clothing_store_custom_style .='.scroll-top button{';

	$clothing_store_custom_style .='right: 0; left:0; margin: 0 auto; top:85% !important';

$clothing_store_custom_style .='}';

}else if($clothing_store_scroll_options == 'left_align'){

$clothing_store_custom_style .='.scroll-top button{';

	$clothing_store_custom_style .='right: auto; left:5%; margin: 0 auto';

$clothing_store_custom_style .='}';
}

// logo height

$clothing_store_logo_max_height = get_theme_mod('clothing_store_logo_max_height','100');

if($clothing_store_logo_max_height != false){

$clothing_store_custom_style .='.custom-logo-link img{';

	$clothing_store_custom_style .='max-height: '.esc_html($clothing_store_logo_max_height).'px;';

$clothing_store_custom_style .='}';
}

// text-transform

$clothing_store_text_transform = get_theme_mod( 'clothing_store_menu_text_transform','UPPERCASE');
if($clothing_store_text_transform == 'CAPITALISE'){

$clothing_store_custom_style .='nav#top_gb_menu ul li a{';

	$clothing_store_custom_style .='text-transform: capitalize ;';

$clothing_store_custom_style .='}';

}else if($clothing_store_text_transform == 'UPPERCASE'){

$clothing_store_custom_style .='nav#top_gb_menu ul li a{';

	$clothing_store_custom_style .='text-transform: uppercase ;';

$clothing_store_custom_style .='}';

}else if($clothing_store_text_transform == 'LOWERCASE'){

$clothing_store_custom_style .='nav#top_gb_menu ul li a{';

	$clothing_store_custom_style .='text-transform: lowercase ;';

$clothing_store_custom_style .='}';
}

//Slider-content-alignment

$clothing_store_slider_content_alignment = get_theme_mod( 'clothing_store_slider_content_alignment','LEFT-ALIGN');

if($clothing_store_slider_content_alignment == 'LEFT-ALIGN'){

$clothing_store_custom_style .='.carousel-caption{';

	$clothing_store_custom_style .='text-align:left; right: 20%; left: 15%;';

$clothing_store_custom_style .='}';

$clothing_store_custom_style .='@media screen and (max-width:991px){';

$clothing_store_custom_style .='#slider .carousel-caption{';

    $clothing_store_custom_style .='right: 0; left: 5%;';
    
$clothing_store_custom_style .='} }';

$clothing_store_custom_style .='@media screen and (max-width:936px){';

$clothing_store_custom_style .='#slider .carousel-caption{';

    $clothing_store_custom_style .='right: 5%; left: 15%;';
    
$clothing_store_custom_style .='} }';


}else if($clothing_store_slider_content_alignment == 'CENTER-ALIGN'){

$clothing_store_custom_style .='.carousel-caption{';

	$clothing_store_custom_style .='text-align:center; right: 20%; left: 15%;';

$clothing_store_custom_style .='}';

$clothing_store_custom_style .='@media screen and (max-width:991px){';

$clothing_store_custom_style .='#slider .carousel-caption{';

    $clothing_store_custom_style .='right: 0%; left: 5%';
    
$clothing_store_custom_style .='} }';


}else if($clothing_store_slider_content_alignment == 'RIGHT-ALIGN'){

$clothing_store_custom_style .='.carousel-caption{';

	$clothing_store_custom_style .='text-align:right; right: 20%; left: 15%;';

$clothing_store_custom_style .='}';

$clothing_store_custom_style .='@media screen and (max-width:991px){';

$clothing_store_custom_style .='#slider .carousel-caption{';

    $clothing_store_custom_style .='right: 0%; left: 5%';
    
$clothing_store_custom_style .='} }';

}

//related products
if( get_option( 'clothing_store_related_product',true) != 'on') {

$clothing_store_custom_style .='.related.products{';

	$clothing_store_custom_style .='display: none;';
	
$clothing_store_custom_style .='}';
}

if( get_option( 'clothing_store_related_product',true) != 'off') {

$clothing_store_custom_style .='.related.products{';

	$clothing_store_custom_style .='display: block;';
	
$clothing_store_custom_style .='}';
}
// footer text alignment
$clothing_store_footer_content_alignment = get_theme_mod( 'clothing_store_footer_content_alignment','CENTER-ALIGN');

if($clothing_store_footer_content_alignment == 'LEFT-ALIGN'){

$clothing_store_custom_style .='.site-info{';

	$clothing_store_custom_style .='text-align:left; padding-left: 30px;';

$clothing_store_custom_style .='}';

$clothing_store_custom_style .='.site-info a{';

	$clothing_store_custom_style .='padding-left: 30px;';

$clothing_store_custom_style .='}';


}else if($clothing_store_footer_content_alignment == 'CENTER-ALIGN'){

$clothing_store_custom_style .='.site-info{';

	$clothing_store_custom_style .='text-align:center;';

$clothing_store_custom_style .='}';


}else if($clothing_store_footer_content_alignment == 'RIGHT-ALIGN'){

$clothing_store_custom_style .='.site-info{';

	$clothing_store_custom_style .='text-align:right; padding-right: 30px;';

$clothing_store_custom_style .='}';

$clothing_store_custom_style .='.site-info a{';

	$clothing_store_custom_style .='padding-right: 30px;';

$clothing_store_custom_style .='}';

}

// slider button
$mobile_button_setting = get_option('clothing_store_slider_button_mobile_show_hide', '1');
$main_button_setting = get_option('clothing_store_slider_button_show_hide', '1');

$clothing_store_custom_style .= '#slider .home-btn {';

if ($main_button_setting == 'off') {
    $clothing_store_custom_style .= 'display: none;';
}

$clothing_store_custom_style .= '}';

// Add media query for mobile devices
$clothing_store_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_button_setting == 'off' || $mobile_button_setting == 'off') {
    $clothing_store_custom_style .= '#slider .home-btn { display: none; }';
}
$clothing_store_custom_style .= '}';


// scroll button
$mobile_scroll_setting = get_option('clothing_store_scroll_enable_mobile', '1');
$main_scroll_setting = get_option('clothing_store_scroll_enable', '1');

$clothing_store_custom_style .= '.scrollup {';

if ($main_scroll_setting == 'off') {
    $clothing_store_custom_style .= 'display: none;';
}

$clothing_store_custom_style .= '}';

// Add media query for mobile devices
$clothing_store_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_scroll_setting == 'off' || $mobile_scroll_setting == 'off') {
    $clothing_store_custom_style .= '.scrollup { display: none; }';
}
$clothing_store_custom_style .= '}';

// theme breadcrumb
$mobile_breadcrumb_setting = get_option('clothing_store_enable_breadcrumb_mobile', '1');
$main_breadcrumb_setting = get_option('clothing_store_enable_breadcrumb', '1');

$clothing_store_custom_style .= '.archieve_breadcrumb {';

if ($main_breadcrumb_setting == 'off') {
    $clothing_store_custom_style .= 'display: none;';
}

$clothing_store_custom_style .= '}';

// Add media query for mobile devices
$clothing_store_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_breadcrumb_setting == 'off' || $mobile_breadcrumb_setting == 'off') {
    $clothing_store_custom_style .= '.archieve_breadcrumb { display: none; }';
}
$clothing_store_custom_style .= '}';

// single post and page breadcrumb
$mobile_single_breadcrumb_setting = get_option('clothing_store_single_enable_breadcrumb_mobile', '1');
$main_single_breadcrumb_setting = get_option('clothing_store_single_enable_breadcrumb', '1');

$clothing_store_custom_style .= '.single_breadcrumb {';

if ($main_single_breadcrumb_setting == 'off') {
    $clothing_store_custom_style .= 'display: none;';
}

$clothing_store_custom_style .= '}';

// Add media query for mobile devices
$clothing_store_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_single_breadcrumb_setting == 'off' || $mobile_single_breadcrumb_setting == 'off') {
    $clothing_store_custom_style .= '.single_breadcrumb { display: none; }';
}
$clothing_store_custom_style .= '}';

// woocommerce breadcrumb
$mobile_woo_breadcrumb_setting = get_option('clothing_store_woocommerce_enable_breadcrumb_mobile', '1');
$main_woo_breadcrumb_setting = get_option('clothing_store_woocommerce_enable_breadcrumb', '1');

$clothing_store_custom_style .= '.woocommerce-breadcrumb {';

if ($main_woo_breadcrumb_setting == 'off') {
    $clothing_store_custom_style .= 'display: none;';
}

$clothing_store_custom_style .= '}';

// Add media query for mobile devices
$clothing_store_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_woo_breadcrumb_setting == 'off' || $mobile_woo_breadcrumb_setting == 'off') {
    $clothing_store_custom_style .= '.woocommerce-breadcrumb { display: none; }';
}
$clothing_store_custom_style .= '}';

//colors
$color = get_theme_mod('clothing_store_primary_color', '#7dc8db');
$color_heading = get_theme_mod('clothing_store_heading_color', '#3b4358');
$color_text = get_theme_mod('clothing_store_text_color', '#777777');
$color_fade = get_theme_mod('clothing_store_primary_fade', '#e7faff');
$color_footer_bg = get_theme_mod('clothing_store_footer_bg', '#3A4357');
$color_post_bg = get_theme_mod('clothing_store_post_bg', '#ffffff');


$clothing_store_custom_style .= ":root {";
    $clothing_store_custom_style .= "--theme-primary-color: {$color};";
    $clothing_store_custom_style .= "--theme-heading-color: {$color_heading};";
    $clothing_store_custom_style .= "--theme-text-color: {$color_text};";
    $clothing_store_custom_style .= "--theme-primary-fade: {$color_fade};";
    $clothing_store_custom_style .= "--theme-footer-color: {$color_footer_bg};";
    $clothing_store_custom_style .= "--post-bg-color: {$color_post_bg};";
$clothing_store_custom_style .= "}";

$clothing_store_slider_opacity = get_theme_mod( 'clothing_store_slider_opacity','1');

if($clothing_store_slider_opacity == '0'){
$clothing_store_custom_style .='#slider img {';
    $clothing_store_custom_style .='opacity: 0';
$clothing_store_custom_style .='}';

}else if($clothing_store_slider_opacity == '0.1'){
$clothing_store_custom_style .='#slider img {';
    $clothing_store_custom_style .='opacity: 0.1';
$clothing_store_custom_style .='}';

}else if($clothing_store_slider_opacity == '0.2'){
$clothing_store_custom_style .='#slider img {';
    $clothing_store_custom_style .='opacity: 0.2';
$clothing_store_custom_style .='}';

}else if($clothing_store_slider_opacity == '0.3'){
$clothing_store_custom_style .='#slider img {';
    $clothing_store_custom_style .='opacity: 0.3';
$clothing_store_custom_style .='}';

}else if($clothing_store_slider_opacity == '0.4'){
$clothing_store_custom_style .='#slider img {';
    $clothing_store_custom_style .='opacity: 0.4';
$clothing_store_custom_style .='}';

}else if($clothing_store_slider_opacity == '0.5'){
$clothing_store_custom_style .='#slider img {';
    $clothing_store_custom_style .='opacity: 0.5';
$clothing_store_custom_style .='}';

}else if($clothing_store_slider_opacity == '0.6'){
$clothing_store_custom_style .='#slider img {';
    $clothing_store_custom_style .='opacity: 0.6';
$clothing_store_custom_style .='}';

}else if($clothing_store_slider_opacity == '0.7'){
$clothing_store_custom_style .='#slider img {';
    $clothing_store_custom_style .='opacity: 0.7';
$clothing_store_custom_style .='}';

}else if($clothing_store_slider_opacity == '0.8'){
$clothing_store_custom_style .='#slider img {';
    $clothing_store_custom_style .='opacity: 0.8';
$clothing_store_custom_style .='}';

}
else if($clothing_store_slider_opacity == '0.9'){
$clothing_store_custom_style .='#slider img {';
    $clothing_store_custom_style .='opacity: 0.9';
$clothing_store_custom_style .='}';

}
else if($clothing_store_slider_opacity == '1'){
$clothing_store_custom_style .='#slider img {';
    $clothing_store_custom_style .='opacity: 1';
$clothing_store_custom_style .='}';

}

$clothing_store_slider_heading_color = get_theme_mod( 'clothing_store_slider_heading_color','#ffffff');
$clothing_store_custom_style .='#slider .carousel-caption h2 {';
$clothing_store_custom_style .='color: '.esc_attr($clothing_store_slider_heading_color).';';
$clothing_store_custom_style .='}';

$clothing_store_slider_sub_heading_color = get_theme_mod( 'clothing_store_slider_sub_heading_color','#ffffff');
$clothing_store_custom_style .='#slider .carousel-caption h3 {';
$clothing_store_custom_style .='color: '.esc_attr($clothing_store_slider_sub_heading_color).';';
$clothing_store_custom_style .='}';

$clothing_store_slider_excerpt_color = get_theme_mod( 'clothing_store_slider_excerpt_color','#ffffff');
$clothing_store_custom_style .='#slider .slider-excerpt {';
$clothing_store_custom_style .='color: '.esc_attr($clothing_store_slider_excerpt_color).';';
$clothing_store_custom_style .='}';


//-------------------title-font-size----//  
$clothing_store_site_title_fontsize = get_theme_mod('clothing_store_site_title_fontsize','25');

if($clothing_store_site_title_fontsize != false){

$clothing_store_custom_style .='.logo h1,.site-title,.site-title a,.logo h1 a{';

    $clothing_store_custom_style .='font-size: '.esc_html($clothing_store_site_title_fontsize).'px;';

$clothing_store_custom_style .='}';
}

//-------------------tagline-font-size----//  
$clothing_store_site_tagline_fontsize = get_theme_mod('clothing_store_site_tagline_fontsize','15');

if($clothing_store_site_tagline_fontsize != false){

$clothing_store_custom_style .='p.site-description{';

    $clothing_store_custom_style .='font-size: '.esc_html($clothing_store_site_tagline_fontsize).'px;';

$clothing_store_custom_style .='}';
}

//-------------------menu-font-size----//  
$clothing_store_menu_fontsize = get_theme_mod('clothing_store_menu_fontsize','14');

if($clothing_store_menu_fontsize != false){

$clothing_store_custom_style .='.gb_nav_menu li a{';

    $clothing_store_custom_style .='font-size: '.esc_html($clothing_store_menu_fontsize).'px;';

$clothing_store_custom_style .='}';
}

//-------------------first-letter-capital----//
if (false === get_option('clothing_store_first_letter_capital_enable')) {
    add_option('clothing_store_first_letter_capital_enable', 'on');
}
if (get_option('clothing_store_first_letter_capital_enable') === 'off') {
    $clothing_store_custom_style .= '.entry-content > p:first-of-type:first-letter {';
    $clothing_store_custom_style .= 'font-size: 16px; float: none; line-height: unset; padding: 0;';
    $clothing_store_custom_style .= '}';
}