<?php
	if($_SERVER["REQUEST_METHOD"] == "POST"){
		$_SESSION['guest'] = "true";
		if($_SESSION['url']){
			wp_redirect(home_url() .''. $_SESSION['url']);
		}else{
			wp_redirect( home_url());
		}
		exit;
	}
	$currentUrl  = $_SERVER['REQUEST_URI'];
	if(!($_SESSION['guest'] == 'true') and !($currentUrl == "/constant/")){
		$_SESSION['url'] = $currentUrl;
		wp_redirect( home_url(). '/constant' );
		exit;
	}
	if(($_SESSION['guest'] == 'true') and ($currentUrl == "/constant/")){
		wp_redirect( home_url());
		exit;
	}
?>
<!DOCTYPE HTML>
<!--[if IEMobile 7 ]><html class="no-js iem7" manifest="default.appcache?v=1"><![endif]--> 
<!--[if lt IE 7 ]><html class="no-js ie6" lang="en"><![endif]--> 
<!--[if IE 7 ]><html class="no-js ie7" lang="en"><![endif]--> 
<!--[if IE 8 ]><html class="no-js ie8" lang="en"><![endif]--> 
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
	<head>
		<title><?php bloginfo( 'name' ); ?><?php wp_title( '|' ); ?></title>
		<meta charset="<?php bloginfo( 'charset' ); ?>" />
	  	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- Remove if you're not building a responsive site. (But then why would you do such a thing?) -->
		<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
		<link rel="shortcut icon" href="<?php //echo get_stylesheet_directory_uri(); ?>/"/>

		<?php wp_head(); ?>

		<style>
			.product-page-banner:after{
				background: linear-gradient(90deg, rgba(255,255,255,0) 0%, <?php the_field('product_page_color_picker'); ?> 70%, <?php the_field('product_page_color_picker'); ?> 100%);
			}
			.product-page-banner-left:after{
				background: linear-gradient(270deg, rgba(255,255,255,0) 0%, <?php the_field('product_page_color_picker'); ?> 70%, <?php the_field('product_page_color_picker'); ?> 100%);
			}
			@media (max-width: 768px) { 
				.product-page-banner:after{
					background: linear-gradient(180deg, rgba(255,255,255,0) 0%, <?php the_field('product_page_color_picker'); ?> 70%, <?php the_field('product_page_color_picker'); ?> 100%);
				}
			}
			.product-page-content .product-accordion--header{
				background: <?php the_field('product_accordion_color'); ?>;
			}
			
			.fertility-listing .nav-pills .nav-link.active, .fertility-listing .nav-pills .nav-pills .show > .nav-link,
			.product-accordion--body-nestedAccordion .card-body .button-primary:hover,
			.product-accordion--body-nestedAccordion .card-header,
			.product-accordion--body-content,
			.product-page-content--intro,
			.product-page-sub-menu ul li a{
				background: <?php the_field('product_page_color_picker'); ?>;
			}

			.product-page-sub-menu ul li ul.dropdown-menu li a:hover{
				color: <?php the_field('product_page_color_picker'); ?>;
			}

			.product-accordion--body-nestedAccordion .card-body .button-primary{
				border: 1px solid <?php the_field('product_page_color_picker'); ?>;
                color: <?php the_field('product_page_color_picker'); ?>;
			}

			.product-page-sub-menu .navbar-toggler,
			.product-page-sub-menu ul li.active a,
			.product-page-content .product-accordion--body-tabs .nav-item .nav-link.active, .product-page-content .product-accordion--body-tabs .nav-item .nav-link:hover,
			.product-page-sub-menu ul li a:hover{
				background: <?php the_field('product_hover_color'); ?>;
			}

		</style>

	</head>
	<body <?php body_class(); ?>>
