=============== GOOGLE FONTS ===============
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
    --header-height: 3.5rem;

    /*========== Цвета ==========*/
    --first-color: #dc4a1a;
    --button-color: hsl(0, 0%, 17%);
    --button-color-alt: hsl(0, 0%, 21%);
    --title-color: hsl(0, 0%, 15%);
    --text-color: hsl(0, 0%, 35%);
    --text-color-light: hsl(0, 0%, 55%);
    --body-color: rgb(237, 234, 232);
    --container-color: #dc4a1a;
    --border-color: hsl(0, 0%, 94%);
    --price-color: #fff;
    --gray-color: hsl(20, 8%, 7%);

    /*========== Шрифт размры ==========*/
    --body-font: 'Roboto', sans-serif;
    --biggest-font-size: 2rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
    --smaller-font-size: .75rem;

    /*========== Font weight ==========*/
    --font-medium: 500;
    --font-bold: 700;

    /*========== Margenes Bottom ==========*/
    --mb-0-5: .5rem;
    --mb-0-75: .75rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;
    --mb-3: 3rem;

    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;
}
@media screen and (min-width: 968px) {
    :root {
        --biggest-font-size: 2.5rem;
        --h1-font-size: 2.25rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1.3rem;
        --small-font-size: .875rem;
        --smaller-font-size: .813rem;
    }
}

/*=============== BASE ===============*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
    font-family: 'Roboto', sans-serif;
}

body,
button,
input {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

body {
    margin: 0;
    background-color: var(--body-color);
    color: var(--text-color);
    /*For animation dark mode*/
    transition: .4s;
}

h1, h2, h3, h4 {
    color: var(--title-color);
    font-weight: var(--font-medium);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}


/*=============== REUSABLE CSS CLASSES ===============*/
.containerh {
    max-width: 1200px !important;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}



.section {
    padding: 6.5rem 0 1rem;
}

.section_title {
    position: relative;
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-3);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.section_title::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 67px;
    height: 1px;
    background-color: var(--first-color);
}

/*=============== HEADER & NAV ===============*/




/*=============== HOME ===============*/
.home_container {
    position:relative;
    gap: 1rem;
}

.home_img {
    width: 500px;
    margin: auto;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.home_img-bg {
    background-color: var(--first-color);
    width: 258px;
    padding-bottom: 0;
    display: flex;
    position: relative;
    justify-content: center;
    align-items: flex-end;
    transform: translateX(0) !important;
    border-radius: 10px; 
}

.home_social {
    position: absolute;
    top: 20%;
    left: -7%;
    transform: rotate(-90deg);
    display: flex;
    column-gap: 1rem;
    z-index: 2 !important;
}

.home_data{
    background-color: var(--body-color);
    width: 550px;
    position: relative;
    top: -15px;
    border-radius: 15px;
    padding: 5% 5%;
}

.home_social-link {
    display: inline-block;
    font-size: 25px;
    color: var(--text-color-light);
    transition: .3s;
    z-index: 2 !important;
}

.home_social-link:hover {
    color: var(--title-color);
}

.home_title {
    font-size: var(--biggest-font-size);
    font-weight: var(--font-bold);
    margin-bottom: var(--mb-1);
}

.parameter{
    display: flex;
    justify-content: space-between;
    margin: 10px auto;
    font-size: 23px;
}

.line{
    flex: 1 0;
    border-bottom: 1px dashed #9b4318;
    height: 1em;
    margin: 0 .4em;
}

.home_description {
    margin-bottom: var(--mb-1-5);
}



.home_price {
    display: block;
    margin-top: 17px;
    font-size: var(--h1-font-size);
    font-weight: var(--font-medium);
    color: var(--first-color);
    text-align: end;
    margin-bottom: var(--mb-3);
}

.memory_btns{
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(5, 1fr);
    margin:20px auto;
}

.memory-button {
    display: inline-block;
    background-color: var(--button-color);
    color: #FFF;
    padding: .85rem 1.1rem;
    border-radius: 2px;
    font-weight: var(--font-medium);
    transition: .3s;
    cursor: pointer;
}
.memory-button.active {
    background-color: var(--first-color);
    color: #fff;
    /* padding: .95rem 1.2rem; */
    transform: scale(1.05);

}

.home_btns {
    display: flex;
    align-items: center;
}

.home_button {
    box-shadow: 0 12px 24px hsla(0, 0%, 10%, .2);
}




/*=============== BUTTONS ===============*/
.button {
    display: inline-block;
    background-color: var(--button-color);
    color: #FFF;
    padding: 1.25rem 2rem;
    font-weight: var(--font-medium);
    transition: .3s;
    border-radius: 5px;
}

.button:hover {
    background-color: var(--button-color-alt);
}

.button--gray {
    background-color: hsl(0, 0%, 75%);
    color: var(--title-color);
}

.button--gray:hover {
    background-color: hsl(0, 0%, 63%);
}

.button--small {
    padding: 1rem 1.5rem;
}


/*=============== NEW ===============*/
.new_card {
    position: relative;
    text-align: center;
    background-color: var(--container-color);
    padding-top: 3.5rem;
    border: 1px solid var(--border-color);
    overflow-y: hidden;
    transition: .3s;
    border-radius: 10px;
}

.new_tag {
    background-color: var(--price-color);
    padding: .5rem 1rem;
    color: var(--text-color);
    text-transform: uppercase;
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    position: absolute;
    top: 1rem;
    right: 1rem;
    transition: .3s;
}

.new_img {
    height: 215px;
    margin-bottom: var(--mb-1);
}

.new_data{
    min-height: 70px;
}

.new_title, 
.new_price {
    font-size: var(--h3-font-size);
    font-weight: var(--font-bold);
    transition: 0.3s ease;
}

.new_title {
    text-transform: uppercase;
    margin-bottom: var(--mb-0-75);
}

.new_price {
    display: block;
    color: var(--price-color);
    transition: .3s;
}

.new_button {
    font-size: var(--small-font-size);
    transform: translateY(1rem);
    opacity: 0;
    margin-top: 20px !important;
}

.new_card:hover {
    background-color: var(--first-color);
    box-shadow: 0 12px 32px hsla(0, 0%, 20%, .1);
    padding: 2rem 0 3rem 0;
    background-color: #c14117;
}

.new_card:hover .new_tag {
    display: none;
}

.new_card:hover .new_button {
    transform: translateY(0);
    opacity: 1;
}

.new_card:hover .new_title {
    color: hsl(0, 0%, 15%);
}

.new_card:hover .new_price {
    color: var(--price-color);
    margin-bottom: var(--mb-1-5);
}


/*=============== FOOTER ===============*/
.footer{
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 50%;
}

.footer_container {
    display: flex;
    justify-content: space-between;
    row-gap: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3rem;
}

.footer_title {
    font-size: var(--h2-font-size);
    margin-bottom: var(--mb-1-5);
}

.footer_list, 
.footer_links {
    display: flex;
    flex-direction: column;
    row-gap: .75rem;
}

.footer_link {
    color: var(--text-color);
}

.footer_link:hover {
    color: var(--title-color);
}

.footer_social {
    display: flex;
    column-gap: 1rem;
}



.footer_social-link:hover {
    color: var(--title-color);
}

.footer_copy {
    display: block;
    margin: 3.5rem 0 1rem 0;
    text-align: center;
    font-size: var(--h3-font-sizefont-size);
    color: var(--text-color-light);
}

/*=============== SCROLL UP ===============*/
.scrollup {
    position: fixed;
    right: 1rem;
    bottom: -30%;
    background-color: var(--container-color);
    box-shadow: 0 4px 12px hsla(0, 0%, 20%, .1);
    display: inline-flex;
    padding: .25rem;
    z-index: var(--z-tooltip);
    opacity: .8;
    transition: .4s;
    border-radius: 30%;
}

.scrollup:hover {
    opacity: 1;
}

.scrollup_icon {
    font-size: 1.5rem;
    color: white;
}

/* Show Scroll Up*/
.show-scroll {
    bottom: 3rem;
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
    width: .6rem;
    background: hsl(0, 0%, 74%);
}

::-webkit-scrollbar-thumb {
    background: hsl(0, 0%, 17%);
}

@media screen and (max-width: 867px) {
    .nav_menu {
        /* position: fixed;
        background-color: var(--body-color);
        top: 0;
        right: -100%;
        width: 100%;
        height: 100%;
        padding: 6rem 2rem 3.5rem;
        transition: .3s; */
    }
}

.show-menu {
    right: 0;
}

.prod_img_bg{
    height: auto !important;
    margin-top: 10% !important;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
    .containerh {
        margin-left: var(--mb-1);
        margin-right: var(--mb-1);
    }
    .home_img-bg {
        width: 220px;

    }
    .home_title {
        font-size: var(--h1-font-size);
    }
    .home_button {
        font-size: var(--smaller-font-size);
    }

    .home_social {
        top: 20%;
        left: 3%;
    }

    .prod_img_bg{
        margin-bottom: 12% !important;
        z-index: 5 !important;
        margin-top: 0 !important;
    }
}

@media screen and (min-width: 280px) and (max-width: 575px) {
   .prod_img_bg{
        margin-top: 0 !important;
        margin-bottom: 12% !important;
    }

    .dark-theme .home_data{
        background-color: #000 !important;
    }
}

@media screen and (min-width: 320px) {
    .home_social {
        top: 20%;
        left: -1%;
    }
    .home_img-bg {
        width: 95%;
        margin: auto;
        padding: 8px;
        align-self: center;
    }
    .footer_container {
        grid-template-columns: repeat(2, 1fr);
    }
    .home_social {
        top: 20%;
        left: 1%;
    }
    
    .home_data{
        width: 95%;
        margin: auto auto;
        margin-top: 100px;
    }


    .parameter{
        font-size: 16px;
    }

    .memory_btns{
        grid-template-columns: repeat(4, 1fr) ;
    }
    .memory-button{
        font-size: 12px;
    }
}

/* For medium devices */
@media screen and (min-width: 523px) {
    .home_img-bg {
        width: 95%;
        margin: auto;
    }
    .footer_container {
        grid-template-columns: repeat(2, 1fr);
    }

    .home_social {
        top: 20%;
        left: 1%;
    }
    .memory_btns{
    grid-template-columns: repeat(4, 1fr) !important;
    }

    .memory-button{
        font-size: 20px;
    }


    .home_data{
        width: 95%;
        margin: auto auto;
        margin-top: 22px;
    }

}



@media screen and (min-width: 767px) {
    .section {
        padding: 8rem 0 1rem;
    }



    .navy {
        /* height: calc(var(--header-height) + 1.5rem);
        justify-content: initial;
        column-gap: 3rem; */
    }

    .nav_btns {
        /* margin-left: auto; */
    }


    
    .home_img-bg {
        order: 1;
        transform: translate(0, -5rem);
    }
    .home_data {
        /* padding: 0 0 3rem 6rem; */
    }
    .home_social {
        top: 29%;
        column-gap: 2rem;
        left:-1%;
    }

    .new_title,
    .new_price {
        font-size: var(--normal-font-size);
    }

    .footer_container {
        grid-template-columns: repeat(4, max-content);
        justify-content: space-between;
    }
    .footer_title {
        font-size: var(--h3-font-size);
    }
}

@media screen and (min-width: 992px) {
    .section_title {
        font-size: var(--h2-font-size);
    }
    .home_img-bg {
        width: 680px;
        height: 630px;
    }
    .home_img {
        width: 520px;
    }
    .home_social {
        top: 20%;
        left: -1%;
    }
    .home_data {
        /* padding: 0 0 8rem 6rem; */
    }
}

/* For large devices */
@media screen and (min-width: 1024px) {
    .containerh {
        margin-left: auto;
        margin-right: auto;
    }
    .scrollup {
        right: 3rem;
    }
    .home_social {
        top: 20%;
        left: -1%;
    }
}

@media screen and (min-width: 1149px){
    .home_social {
        top: 20%;
        left: -1%;
    }
}
@media screen and (max-width: 1320px){
    .home_social {
        display: none;
    }
}


body.dark-theme{
    --first-color: #dc4a1a;
    --button-color: hsl(0, 0%, 21%);
    --button-color-alt: hsl(0, 0%, 28%);
    --title-color: hsl(0, 0%, 95%);
    --text-color: hsl(0, 0%, 75%);
    --body-color: hsl(0, 0%, 0%);
    --container-color: hsl(0, 0%, 16%);
    --border-color: hsl(0, 0%, 20%);
}

/*========== Button Dark/Light ==========*/
.change-theme {
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
}

/*========== 
    Color changes in some parts of 
    the website, in dark theme 
==========*/

.dark-theme .change-theme,
.dark-theme .nav_toggle,
.dark-theme .nav_shop,
.dark-theme .button--gray
{
    /* color: var(--gray-color); */
}

.dark-theme .bx-shopping-bag{
    color: var(--first-color) !important;
}

.dark-theme .bx-search-alt{
    color: white;
}

.bx-sun{
    color: var(--first-color) !important;
}

.dark-theme .cart
{
    background-color: hsl(20, 8%, 7%);
}

.dark-theme .scrollup_icon{
    color: var(--first-color);
}

.dark-theme .scroll-header{
    box-shadow: 0 1px 4px hsla(0, 0%, 4%, .3);
}

.dark-theme .new_tag{
    background-color: var(--first-color);
}


.dark-theme .featured_price,
.dark-theme .products_price,
.dark-theme .new_price{
    color: var(--first-color);
}


.scroll-header .change-theme,
.scroll-header .nav_toggle,
.scroll-header .nav_shop{
    /* color: var(--title-color); */
}

.dark-theme::-webkit-scrollbar{
    background: hsl(0, 0%, 30%)
}

.dark-theme .swiper-button-prev-home , .dark-theme .swiper-button-next-home{
    color: #FFF;
}

.dark-theme .home_data{
    background-color: transparent;
}
.dark-theme .featured_card:hover {
    box-shadow: 0 12px 32px hsla(0, 0%, 20%, .1);
    padding: 2rem 0 3rem 0;
    background-color: rgb(27, 26, 26);
}

.dark-theme .new_card:hover {
    background-color: var(--first-color);
    box-shadow: 0 12px 32px hsla(0, 0%, 20%, .1);
    padding: 2rem 0 3rem 0;
    background-color: rgb(27, 26, 26);
}

.dark-theme .new_card:hover .new_title{
    color: var(--first-color);
}

/* Стили для плавной анимации смены изображений */
.fading-out {
    opacity: 0;
}

.fading-in {
    opacity: 1;
}
