<?php

  $tour_booking_agency_theme_custom_setting_css = '';

    // Global Color
    $tour_booking_agency_first_theme_color = get_theme_mod('tour_booking_agency_first_theme_color', '#3b71fe');
    $tour_booking_agency_second_theme_color = get_theme_mod('tour_booking_agency_second_theme_color', '#cccccc');

    $tour_booking_agency_theme_custom_setting_css .=':root {';
        $tour_booking_agency_theme_custom_setting_css .='--primary-theme-color: '.esc_attr($tour_booking_agency_first_theme_color ).'!important;';
        $tour_booking_agency_theme_custom_setting_css .='--secondary-theme-color: '.esc_attr($tour_booking_agency_second_theme_color ).'!important;';
    $tour_booking_agency_theme_custom_setting_css .='}';

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

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

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

    // Featured Image Hover Effect
    $tour_booking_agency_show_featured = get_theme_mod('tour_booking_agency_featured_image_hide_show', 1);
    $tour_booking_agency_hover_effect = get_theme_mod('tour_booking_agency_single_post_featured_image_hover','none');

    if ( $tour_booking_agency_show_featured && $tour_booking_agency_hover_effect !== 'none' ) {

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

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

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

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

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

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

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

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

    if ( $tour_booking_agency_hover_effect === 'scale' ) {
        $tour_booking_agency_theme_custom_setting_css .= '
        .post-img:hover img{ transform: scale(1.1); }';
    }
}

// Product Featured Image Hover Effect
    $tour_booking_agency_show_featured = get_theme_mod('tour_booking_agency_featured_image_hide_show', 1);
    $tour_booking_agency_hover_effect = get_theme_mod('tour_booking_agency_product_featured_image_hover','none');

    if ( $tour_booking_agency_show_featured && $tour_booking_agency_hover_effect !== 'none' ) {

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

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

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

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

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

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

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

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

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