<?php

  $film_production_theme_custom_setting_css = '';

    // Global Color
    $film_production_first_theme_color = get_theme_mod('film_production_first_theme_color', '#FEBD01');
    $film_production_second_theme_color = get_theme_mod('film_production_second_theme_color', '#3C3D3E');

    $film_production_theme_custom_setting_css .=':root {';
        $film_production_theme_custom_setting_css .='--primary-theme-color: '.esc_attr($film_production_first_theme_color ).'!important;';
        $film_production_theme_custom_setting_css .='--secondary-theme-color: '.esc_attr($film_production_second_theme_color ).'!important;';
    $film_production_theme_custom_setting_css .='}';

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

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

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

    // Product Featured Image Hover Effect
    $film_production_show_featured = get_theme_mod('film_production_featured_image_hide_show', 1);
    $film_production_hover_effect = get_theme_mod('film_production_product_featured_image_hover','none');

    if ( $film_production_show_featured && $film_production_hover_effect !== 'none' ) {

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

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

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

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

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

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

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

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

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