@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
@import url('https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');

body{
    margin: 0;
    padding: 0;
    background-image: url(/images/background2.jpg);
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

.layout{
    display: flex;
    flex-direction: column;
    height: 200vh;
    position: relative;
    gap: 1em;
}

/* ---------- header ---------- */
header{
    background-color: rgb(35, 35, 35);
    width: 100%;
    height: 4%;
    padding-top: 1%;
    padding-bottom: 1%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    top: 0;
}

.logo{
    display: flex;
    align-items: center;
    position: absolute;
    left: 45vw;
}

.logo img{
    width: 4vw;
}

.logo-name{
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 5vw;
}

.logo-name p{
    margin: 0;
    font-size: 1.6vw;
    color: rgb(240, 240, 240);
}

.list{
    width: 35%;
    display: flex;
    align-items: center;
    position: absolute;
}

.list ul{
    list-style: none;
    width: 25em;
    display: flex;
    justify-content: space-around;
    font-size: 1.6vw;
}

.list a{
    position: relative; /* для анимации */
}

a{
    text-decoration: none;
    color: rgb(240, 240, 240);
}

.basket {
    display: flex;
    align-items: center;
    position: absolute;
    right: 5vw;
    cursor: pointer;
}

.basket img{
    width: 30px;
}

/* ---------- main ---------- */
main{
    flex-grow: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cards{
    width: 85%;
    height: 100%;
    display: flex;
    gap: 5rem;
    justify-content: center;
    align-items: center;
}

.card{
    background-color: rgba(155, 155, 155, 0.8);
    width: 27%;
    height: 75%;
    border-radius: 13px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.7);
}

.card-img{
    height: 70%;
    overflow: hidden;
}

.card-img img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-start-start-radius: 13px;
    border-start-end-radius: 13px;
    transition: 0.5s;
}

.buy-info{
    height: 30%;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0.5em;
    padding-top: 2%;
}

.info-price{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    gap: 0.8em;
}

.buy-info p{
    margin: 0;
    font-size: 1.3vw;
    font-family: "Oswald", sans-serif;
    font-weight: 350;
}

.button-buy{
    background-color: rgb(35, 35, 35);
    color: white;
    width: 80%;
    height: 30%;
    display: grid;
    place-items: center;
    border-radius: 50px;
    font-size: 1vw;
    transition: 0.3s;
    border: 0;
    cursor: pointer;
}

/* ---------- footer ---------- */
footer{
    background-color: rgba(35, 35, 35);
    width: 100%;
    height: 4vw;
    padding-top: 1%;
    padding-bottom: 1%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    position: relative;
    bottom: 0;
}

.contacts{
    color: rgb(240, 240, 240);
    width: 25em;
    display: flex;
    justify-content: space-around;
    position: relative;
    left: 10vw;
    font-size: 1.1vw;
}

.listInFooter{
    position: relative;
    left: 50vw;
}

.listInFooter ul{
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1.1vw;    
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

/* ---------- Animation ---------- */
@media (min-width: 768px){
    
    .card-img img:hover{
        transform: scale(1.1);
    }

    .button-buy:hover{
        background-color: rgb(49, 49, 49);
    }

    .list a:hover{
        color: rgb(179, 179, 179);
    }

    .listInFooter a:hover{
        color: rgb(179, 179, 179);
    }
}


/* ---------- верстка ---------- */
@media (max-width: 768px){

    /* ----- header ----- */
    header{
        width: 100%;
        height: 10%;
    }

    .logo img{
        width: 13vw; 
    }

    .list ul{
        font-size: 5vw;
        width: auto;
        gap: 7px;
        flex-direction: column;
    }

    .basket img{
        width: 8vw;
        margin-right: 1em;
    }

    .logo-name{
        display: none;
    }

    /* ----- main ----- */
    .cards{
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }   
    .card{
        width: 100%;
    }

    .buy-info p{
        font-size: 2.5vh;
        font-weight: 350;
    }

    .button-buy{
        font-size: 1.8vh;
        font-weight: 550;
    }

    /* ----- footer ----- */
    footer{
        width: 100%;
        height: 5%;
    }

    .contacts{
        width: 30%;
        height: 100%;
        flex-direction: column;
        justify-content: space-around;
        font-size: 1.8vh;
    }

    .contacts p{
        margin: 0;
    }

    .listInFooter{
        width: 20%;
        height: 100%;
        left: 40vw;
        align-content: center;
    }

    .listInFooter a{
        font-size: 1.6vh;
    }
}