<?php

  $tattoo_studio_theme_custom_setting_css = '';

    // Global Color
    $tattoo_studio_first_theme_color = get_theme_mod('tattoo_studio_first_theme_color', '#FF0000');
    $tattoo_studio_second_theme_color = get_theme_mod('tattoo_studio_second_theme_color', '#121212');

    $tattoo_studio_theme_custom_setting_css .=':root {';
        $tattoo_studio_theme_custom_setting_css .='--primary-theme-color: '.esc_attr($tattoo_studio_first_theme_color ).'!important;';
        $tattoo_studio_theme_custom_setting_css .='--secondary-theme-color: '.esc_attr($tattoo_studio_second_theme_color ).'!important;';
    $tattoo_studio_theme_custom_setting_css .='}';

	// Scroll to top alignment
	$tattoo_studio_scroll_alignment = get_theme_mod('tattoo_studio_scroll_alignment', 'right');

    if($tattoo_studio_scroll_alignment == 'right'){
        $tattoo_studio_theme_custom_setting_css .='.scroll-up{';
            $tattoo_studio_theme_custom_setting_css .='right: 30px;!important;';
			$tattoo_studio_theme_custom_setting_css .='left: auto;!important;';
        $tattoo_studio_theme_custom_setting_css .='}';
    }else if($tattoo_studio_scroll_alignment == 'center'){
        $tattoo_studio_theme_custom_setting_css .='.scroll-up{';
            $tattoo_studio_theme_custom_setting_css .='left: calc(50% - 10px) !important;';
        $tattoo_studio_theme_custom_setting_css .='}';
    }else if($tattoo_studio_scroll_alignment == 'left'){
        $tattoo_studio_theme_custom_setting_css .='.scroll-up{';
            $tattoo_studio_theme_custom_setting_css .='left: 30px;!important;';
			$tattoo_studio_theme_custom_setting_css .='right: auto;!important;';
        $tattoo_studio_theme_custom_setting_css .='}';
    }

    // Woocommerce Sale Position
    $tattoo_studio_sale_badge_position = get_theme_mod( 'tattoo_studio_sale_badge_position','right');
    if($tattoo_studio_sale_badge_position == 'left'){
        $tattoo_studio_theme_custom_setting_css .='.woocommerce ul.products li.product .onsale{';
            $tattoo_studio_theme_custom_setting_css .='left: 10px; right: auto;';
        $tattoo_studio_theme_custom_setting_css .='}';
    }else if($tattoo_studio_sale_badge_position == 'right'){
        $tattoo_studio_theme_custom_setting_css .='.woocommerce ul.products li.product .onsale{';
            $tattoo_studio_theme_custom_setting_css .='left: auto; right: 10px;';
        $tattoo_studio_theme_custom_setting_css .='}';
    }

    // Featured Image Hover Effect
    $tattoo_studio_show_featured = get_theme_mod('tattoo_studio_featured_image_hide_show', 1);
    $tattoo_studio_hover_effect = get_theme_mod('tattoo_studio_single_post_featured_image_hover','none');

    if ( $tattoo_studio_show_featured && $tattoo_studio_hover_effect !== 'none' ) {

    $tattoo_studio_theme_custom_setting_css .= '
    .post-img img{
        transition: all 0.4s ease;
    }';

    if ( $tattoo_studio_hover_effect === 'zoom-in' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .post-img:hover img{
            transform: scale(1.2);
        }';
    }

    if ( $tattoo_studio_hover_effect === 'zoom-out' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .post-img img{ transform: scale(1.2); }
        .post-img:hover img{ transform: scale(1); }';
    }

    if ( $tattoo_studio_hover_effect === 'grayscale' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .post-img img{ filter: grayscale(100%); }
        .post-img:hover img{ filter: grayscale(0); }';
    }

    if ( $tattoo_studio_hover_effect === 'sepia' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .post-img:hover img{ filter: sepia(100%); }';
    }

    if ( $tattoo_studio_hover_effect === 'blur' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .post-img:hover img{ filter: blur(3px); }';
    }

    if ( $tattoo_studio_hover_effect === 'bright' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .post-img:hover img{ filter: brightness(1.3); }';
    }

    if ( $tattoo_studio_hover_effect === 'translate' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .post-img:hover img{ transform: translateY(-10px); }';
    }

    if ( $tattoo_studio_hover_effect === 'scale' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .post-img:hover img{ transform: scale(1.1); }';
    }
}
 // Product Featured Image Hover Effect
    $tattoo_studio_show_featured = get_theme_mod('tattoo_studio_featured_image_hide_show', 1);
    $tattoo_studio_hover_effect = get_theme_mod('tattoo_studio_product_featured_image_hover','none');

    if ( $tattoo_studio_show_featured && $tattoo_studio_hover_effect !== 'none' ) {

    $tattoo_studio_theme_custom_setting_css .= '
    .product-img img{
        transition: all 0.4s ease;
    }';

    if ( $tattoo_studio_hover_effect === 'zoom-in' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .product-img:hover img{
            transform: scale(1.2);
        }';
    }

    if ( $tattoo_studio_hover_effect === 'zoom-out' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .product-img img{ transform: scale(1.2); }
        .product-img:hover img{ transform: scale(1); }';
    }

    if ( $tattoo_studio_hover_effect === 'grayscale' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .product-img img{ filter: grayscale(100%); }
        .product-img:hover img{ filter: grayscale(0); }';
    }

    if ( $tattoo_studio_hover_effect === 'sepia' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .product-img:hover img{ filter: sepia(100%); }';
    }

    if ( $tattoo_studio_hover_effect === 'blur' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .product-img:hover img{ filter: blur(3px); }';
    }

    if ( $tattoo_studio_hover_effect === 'bright' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .product-img:hover img{ filter: brightness(1.3); }';
    }

    if ( $tattoo_studio_hover_effect === 'translate' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .product-img:hover img{ transform: translateY(-10px); }';
    }

    if ( $tattoo_studio_hover_effect === 'scale' ) {
        $tattoo_studio_theme_custom_setting_css .= '
        .product-img:hover img{ transform: scale(1.1); }';
    }
}   