<!doctype html>
<html class="no-js" <?php language_attributes(); ?>>
    <head>
        <meta charset="<?php bloginfo( 'charset' ); ?>"> 
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title><?php wp_title(); ?></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">
        <link rel="apple-touch-icon" href="apple-touch-icon.png">
        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
        <link rel="stylesheet" href="<?php bloginfo( 'template_url' );?>/css/boilerplate.css">
        <link rel="stylesheet" href="<?php bloginfo( 'template_url' );?>/css/owl.carousel.css">
        <link rel="stylesheet" href="<?php bloginfo( 'template_url' );?>/css/owl.transitions.css">
        <link rel="stylesheet" href="<?php bloginfo( 'template_url' );?>/css/flexslider.css">
        <link rel="stylesheet" href="<?php bloginfo( 'template_url' );?>/css/main.css?v=2.88">
        <link rel="stylesheet" href="<?php bloginfo( 'template_url' );?>/css/fonts/fonts.css">
        <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300italic,300,400italic,700italic,700,600italic,600' rel='stylesheet' type='text/css'>
        <script src="<?php bloginfo( 'template_url' );?>/js/vendor/modernizr-2.8.3.min.js"></script>  
        <?php wp_head(); ?>
    </head>
    <body>
    <header class="container full">
        <div class="container center">
            <div class="main-col left">
                <div class="logo">
                    <h1>
                        <a href="<?php bloginfo("url"); ?>">
                            ESCOLHA-SAUDE
                        </a>
                    </h1>
                </div>
            </div>
            <div class="main-col right anim-medium">
                <div class="header-store-buttons">
                     <?php if ( is_user_logged_in() ) { ?>
                        <a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>">
                            <div class="login-button anim-fast">
                                <div class="aligner"></div>
                                <div class="inner align-middle">
                                    <div class="aligner"></div>
                                    <div class="button-text-wrapper align-middle">
                                        <div class="button-text">A MINHA CONTA</div>
                                    </div>
                                </div>
                            </div>
                        </a>
                     <?php } 
                     else { ?>
                        <a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('Login / Register','woothemes'); ?>">
                            <div class="login-button anim-fast">
                                <div class="aligner"></div>
                                <div class="inner align-middle">
                                    <div class="aligner"></div>
                                    <div class="button-text-wrapper align-middle">
                                        <div class="button-text">LOGIN/REGISTO</div>
                                    </div>
                                </div>
                            </div>
                        </a>
                     <?php } ?>
                    <div class="sep"></div>
                    <?php
                    global $woocommerce;
                    ?>
                        <a href="<?php echo $woocommerce->cart->get_cart_url() . '" title="' . __( 'Checkout' );?>">
                            <div class="cart-button anim-fast">
                                <div class="aligner"></div>
                                <div class="inner align-middle">
                                    <div class="icon align-middle"><img src="<?php bloginfo("template_url" ); ?>/img/cart-icon.svg"></div>
                                    <div class="button-text-wrapper align-middle">
                                        <div class="button-text">CARRINHO<span class="qtd"><?php echo WC()->cart->get_cart_contents_count(); ?></span></div>
                                        <div class="current-price">
                                            
                                            <?php echo WC()->cart->get_cart_total(); ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </a>
                </div>
                <?php
                $defaults = array(
                    'theme_location'  => 'header-menu',
                    'menu'            => 'header menu',  
                    'container'       => 'nav',
                    'container_class' => 'main-nav',
                    'container_id'    => 'main-nav',
                    'menu_class'      => 'main-menu' 
                );

                wp_nav_menu( $defaults );

                ?> 
            </div>
                <div class="menu-button hamburger anim-medium">
                    <div></div>
                    <div></div>
                    <div></div>
                </div>
                <div class="menu-button close anim-medium">
                    <div></div>
                    <div></div>
                </div>
        </div>
    </header>




    <?php get_template_part( 'template','main-slider' ); ?>

    <?php 
    if(is_woocommerce() || is_cart() || is_checkout() || is_account_page()){
        ?>
        <div class="container full">
            <div class="container center woocommerce <?php if(is_cart() || is_checkout() || is_account_page()){ echo "no-main-col";} ?>">
        <?php
    } ?>