@import url(./normalize.css);  /*Reset CSS*/

/* Global */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Reusable color variables */
:root {
    --text-color: #000000;
    --text-color-light: #FFFFFF;
    --background-color: #FFFFFF;
    --main-color: #1F496E;
    --accent-color: #FFE432;
    --focus-color: #3498db;
    --product--background: #EEEEEE;
}

body {
    margin: 0;
    font-family: "Lato", "Trebuchet MS", sans-serif;
    min-height: 100vh;
    line-height: 1.65;
    display: flex;
    flex-direction: column;
}


/* Containers */
.container--l {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5 ,h6 {
    font-weight: 700;
    margin-bottom: 0.3rem;
    line-height: normal;
}

h1{
    font-size: 2.986rem;
}

h2{
    font-size: 2.488rem;
}

h3{
    font-size: 2.074rem;
}

h4{
    font-size: 1.728rem;
}

h5{
    font-size: 1.44rem;
}

h6{
    font-size: 1.2rem;
}

.small{
    font-size: 0.833rem;
}

.smallest{
    font-size: 0.694rem;
}

i{
    font-weight: 400;
}
/* Link styles */


/* Other global styles */
hr{
  background-color: var(--main-color);
  border: none;
  height: 1px;

}

.hr--gray{
    background-color: var(--product--background);
    border: none;
    height: 2px;
    width: 200px;
    margin-top: 3rem;
}

.hr--gray--small--left{
    background-color: var(--product--background);
    width: 50px;
    border: none;
    height: 3px;
    margin-left: 0;
}

#notify{
    width: 100%;
    height: 0;
    position: fixed;
    bottom:0;
    left:0;
    color: var(--main-color);
    background-color: var(--accent-color);
    text-align: center;
    transition: all .5s;
}

#notify p{ margin: 0;}
#notify.visible {height: 60px;}

/* Buttons & Links  */

.button--primary{
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    border: 2px solid var(--accent-color);
    color: var(--main-color);
    margin-top: 1em;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
}


.button--primary--blue{
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--main-color);
    border: 2px solid var(--main-color);
    color: var(--accent-color);
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
}

.button--secondary--blue{
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
}

.button--secondary--blue:hover{
    background-color: var(--main-color);
    border: 2px solid var(--main-color);
    color: var(--text-color-light);
}


/* Breadcrumbs */
.breadcrumbs__text a{
    color: var(--main-color);
}

.breadcrumbs__text a:hover{
    font-weight: 700;
}

.breadcrumbs__text span{
    padding: 0 0.5rem 0 0.5rem
}

/* Header */
.header--logo{
    width: 100%;
    max-width: 200px;
}
.header__logo--link{
    max-width: 200px;
}

.header__main--flex{
    display: flex;
    justify-content: space-between;
}

.header__main{
    background-color: var(--main-color);
}

.header__main--icon-wrapper{
    display: flex;
}

.header__top-bar{
    background-color: var(--product--background);
    width: 100%;
    text-align: center;
}

.header__top-bar p{
    margin: 0;
    color: var(--main-color);
    font-weight: 700;
}

/* Navigation */
.nav {
    display: none;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 100%;
    align-items: center;
    text-align: center;
    background-color: var(--main-color);
    z-index: 10;
}

.nav__list {
    margin-top: 10vh;
    padding: 0;
    list-style-type: none;
}

.nav__item {
    font-size: 2rem;
}

.nav__link {
    display: block;
    text-decoration: none;
    padding: 0.5em 1em;
    width: 100%;
    color:var(--text-color-light);
}

.nav__link--active {
    display: block;
    padding: 0.5em 1em;
    width: 100%;
    color:var(--accent-color);
}


/* Menu Button */
.menu__btn {
    display: flex;
    align-items: center;
    align-self: center;
    padding: 0.5em 1em;
    background-color: var(--main-color);
    border: none;
    cursor: pointer;
    gap: 1rem;
}

.bars {
    display: block;
    width: 1.25rem;
    height: 0.1875rem;
    background-color: var(--accent-color);
    margin: 3px 0;
}

/* Close Button */

.close {
    position: absolute;
    top: 0;
    right: 0;
    margin:1.5rem;
    background-color: transparent;
}

/* Cross */
.cross1, .cross2 {
    width: 25px;
    position: relative;
    background-color: var(--accent-color);
}

.cross1 {
    transform: rotate(45deg);
    top: 5px;    
}

.cross2 {
    transform: rotate(135deg);
    top: -1px;
}

/* Cart icon */
.header__main--cart{
    position: relative;
    text-decoration: none;
    color: var(--text-color-light);
    align-items: center;
    align-self: center;
}

.ri-shopping-cart-2-line{
    font-size: 1.5rem;
    font-weight: 400;
}

.items-in-basket{
    font-weight: 1000;
    position: absolute;
    text-align: center;
    margin-left: -0.1em;
    color: var(--main-color);
    background-color: var(--accent-color);
    width: 1rem;
    height: 1rem;
    border-radius: 50%
}


/* Hero Section - Flickity Slider */
.carousel-cell {
    width: 101vw; /* full width */
    height: 100%;
    min-height: 500px; /* min height of carousel */
    background-color: var(--main-color);
    color: var(--text-color-light);
  }

/* Position dots inside carousel */
.flickity-page-dots {
    bottom: 5px;
}

.flickity-page-dots .dot{
    background-color: grey;
}

/* Carousel Image */
.carousel__image{
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
}
/* Text over image */
.carousel__textbox{
    color: var(--text-color-light);
    position: absolute;
    text-align: center;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.carousel__textbox h1, .carousel__textbox h2{
    margin-top: 0;
}

.carousel__button{
    display: block;
    margin-top: 3em;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

/* Categories Section */

.categories{
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax(200px, 1fr) );
    margin-top: 2em;
    text-align: center;
    text-transform: uppercase;
    color: var(--main-color);
    gap: 1rem;
}

.categories a{
    display: block;
    text-decoration: none;
    color: var(--main-color);
    height: 100%;
}

.categories__card{
    min-width: 200px;
    min-height: 163px;
    padding:3rem 0;
    background-color: var(--product--background);
    border: 10px solid var(--product--background);
    box-shadow: inset 0px 0px 0px 2px var(--main-color);
    cursor: pointer;
}

.categories__card:hover{
    box-shadow: inset 0px 0px 0px 3px var(--main-color);
}
.categories__card h2{
    margin: auto;
}

/* Products */


.products h2{
    color: var(--main-color);
    text-transform: uppercase;
    text-align: center;
}

.products__container{
    display: grid;
    grid-template-columns:  repeat(auto-fill , minmax(250px, 1fr) );
    align-content: space-between;
    justify-content: space-between;
    gap: 2rem;
}

.product-card__image--box{
    margin-bottom: 0;
    border: 1px solid transparent;
}

.product-card__image--box:hover{
    border: 1px solid black;
}

.prodct-card__info{
    margin-top: 0;
}

.product__image{
    width: 100%;
    height: auto;
    max-width: 600px;
}

.product-card__title--tag{
    text-decoration: none;
    text-transform: uppercase;
    color: var(--main-color);
}

.product-card__title-name{
    font-weight: 700;
    padding: 0;
    margin: 0;
    color: var(--main-color);
}
.product-card__text--link{
    text-decoration: none;
}
.product-card__text--link:hover{
    text-decoration: underline;
    text-decoration-color: var(--main-color);
}
.product-card__price{
    display: flex;
    align-items: center;
}
.product-card__price--current{
    font-weight: 700;
    padding: 0;
    margin: 0;
}

.product-card__price--original{
    padding: 0;
    margin: 0;
    margin-right: 1rem;
    text-decoration: line-through;
}

/* Call to action */

.cta{
    margin-top: 2rem;
    background-color: var(--product--background);
    text-align: center;
    color: var(--main-color);
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.cta__text{
    max-width: 49ch;
    margin: auto;
}

#newsletter__form{
    display: flex;
    flex-direction: column;
    text-align: left;
    max-width: 350px;
    margin: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#newsletter__form label{
    display: block;
    font-weight: 700;
}

#email{
    min-height: 39px;
}

#newsletter__form button{
   margin-top: 1rem;
}

/* Single Product page */
.main-product{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr) );
    justify-content: center;
    gap: 2rem;
}
.main-product__images{
    width: 100%;
}

.main-product__carousel--image{
    width: 100%;
}

.main-product__carousel--image img{
    width: 100%;
}

.main-product__gallery{
    display: flex;
    gap:0.2rem;
}


.main-product__gallery--image{
    width: 30%;
    height: auto;
    cursor: pointer;
}

.is-nav-selected {
    border: 1px solid black;
}

.main-product__gallery--image + .main-product__gallery--image{
    margin-left: 1rem;
}

/* Single product info */
.main-product__info{
    max-width: 400px;
}

.main-product__info h1{
    color: var(--main-color);
    font-size: 2.5rem;
    margin:0;
}
.main-product__price{
    display: flex;
    align-items: center;
}
.main-product__price--current{
    font-weight: 700;
    padding: 0;
    margin: 0;
}

.main-product__price--original{
    padding: 0;
    margin: 0;
    margin-right: 1rem;
    text-decoration: line-through;
}

.main-product__info--text{
    margin: 0;
    max-width: 65ch;
}

.main-product__input{
    margin: 2rem 0;
}

#antal{
    min-height: 2.4rem;
    max-width: 100px;
    text-align: center;
}

.main-product__payment-badge p{
    margin: 0;
    font-weight: 700;
}

.main-product__meta{
    margin-top: 1rem;
}
.main-product__meta p{
    margin: 0;
    padding: 0 0 0.5rem 0;
    border-top: 2px dashed var(--product--background);
}

.main-product__video{
    width: 100%;
    height: auto;
}


/* Categories page */
.categories__title{
    color: var(--main-color);
    margin-top: 0;
}


/* About page */
.about h2{
    color: var(--main-color);
}
.about__body{
    max-width: 60ch;
    margin: 0;
}


/* Cart page */

.cart__table{
    width: 100%;
    border-collapse: collapse;
}

.cart__table--head{
    font-weight: 700;
    border-bottom: 1px solid black;
}

.cart__table tbody tr{
    border-bottom: 1px solid var(--product--background);
}

.cart__table td:nth-child(2){
    display: none;
}

.cart__table tbody tr:last-of-type{
    border: none;
    font-weight: 700;
}

.checkout-sum{
    text-align: right;
}

.payment{
    display: flex;
    flex-direction: column-reverse;
    margin-top: 2em;
    margin-bottom: 2em;
    gap: 1rem;
    align-content: flex-end;
    justify-content: space-between;
}

/* Footer */

footer{
    background-color: var(--main-color);
    margin-top: auto;
    padding-bottom: 2em;
    color: var(--text-color-light);
    line-height: 1;
}

.footer__heading{
    font-weight: 700;
    font-size: 1.375rem;
    margin-bottom: 0.3rem;
    margin-top: 2rem;
}

footer a{
    color: var(--text-color--accent);
    padding:0.2rem
}

footer p {
    margin: 0.5rem 0 ;
}

.footer__logo{
    max-width: 200px;
    margin-top: 1rem;
}

.footer__info--list{
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer__info--list li + li{
    margin-top:0.5rem;
}


/* MEDIA QUERIES */

@media screen and (min-width: 900px) {

    /* Navigation*/
    .nav {
        display: flex !important;
        position: static;
        align-items: center;
        background-color: transparent;
        width: auto;
        top: 0;
        height: auto;
        margin-left: auto;
    }

    .nav__list {
        display: flex;
        margin-top: 1rem;
    }
    .nav__item {
        font-size: 1.1rem;
    }
    

    .nav__link{
        color: var(--text-color-light);
    }
    .nav__link:hover {
        color: var(--accent-color);
        width: 100%;
        display: block;
        text-decoration: underline;
        background-color: var(--info-color);
    }
    
    .nav__link--active {
        display: block;
        text-decoration: underline;
        color: var(--accent-color);
        font-weight: 700;
        padding: 0.5em 1em;
        width: 100%;
        background-color: var(--info-color);
    }

    /* Hide menu button */
    .menu__btn {
        display: none;
    }

    /* Hero section */
    .carousel__textbox{
        top: 50%;
    }

    /* Products section */
    .products__container{
        gap: 0.5rem;
    }

    /* Call to action */
    #newsletter__form{
        display: block;
        text-align: left;
        max-width: fit-content;
    }

    #newsletter__form button{
        margin-top: 0;
     }
     

    /* Single products page */
    .main-product__images{
        max-width: 430px;
    }

    /* Cart page */
    .payment{
        flex-direction: row;
    }

    /* Footer */
    
    footer{
        padding: 2em 2em;
        margin-top: auto;
        line-height: 1;
    }

    .grid--two-column{
        display: grid;
        grid-template-columns: 1fr 2fr;
    }
    .footer__heading{
    margin-top: 0;
 } 
 } 

