/*=============== Google font ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montagu+Slab:wght@500&family=Montserrat:wght@400;500;600&display=swap");

/*=============== Variable css ===============*/
:root{

  --header: 3.5rem;

  /*========== Colors ==========*/
  --container-color: hsl(230, 100%, 97%);
  --body-color: hsl(230, 100%, 96%);
  --white-color: hsl(0, 0%, 100%);
  --first-color: hsl(230, 62%, 56%);
  --title-color: hsl(230, 70%, 16%);
  --text-color: hsl(230, 16%, 45%);
  --border-color: hsl(230, 50%, 90%);
  

  /*========== Font ==========*/
  /* .5rem = 8px & 1rem = 16px */
  --body-font: "Montserrat", sans-serif;
  --second-font: "Montagu Slab", 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;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root{
    --biggest-font-size: 3.5rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

/*=============== Base ===============*/
*{
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html{
  scroll-behavior: smooth;
}

body,
input,
button{
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body{
  background-color: var(--body-color);
  color: var(--text-color);
  transition: background-color .4s;
}

input,
button{
  border: none;
  outline: none;
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-family: var(--second-font);
  font-weight: var(--font-medium);
}

ul{
  list-style: none;
}

a{
  text-decoration: none;
}

img{
  display: block;
  max-width: 100%;
  height: auto;
}


/*=============== THEME ===============*/
/*========== Variables Dark theme ==========*/
body.dark-theme{
  --container-color: hsl(230, 12%, 12%);
  --body-color: hsl(230, 12%, 8%);
  --title-color: hsl(230, 48%, 85%);
  --text-color: hsl(230, 16%, 70%);
  --border-color: hsl(230, 12%, 18%);
}

/*========== Color changes in some parts of the website, in dark theme ==========*/
.dark-theme .shadow-header{
  box-shadow: 0 2px 16px hsla(0, 0%, 0%, .4);
}

.dark-theme .nav-menu{
  box-shadow: 0 -8px 32px hsla(0, 0%, 0%, .4);
}


.dark-theme .scrollup{
  box-shadow: 0 2px 8px hsla(0, 0%, 0%, .4);
}

.dark-theme::-webkit-scrollbar{
  background-color: hsl(230, 16%, 15%);
}

.dark-theme::-webkit-scrollbar-thumb{
  background-color: hsl(230, 16%, 25%);
}

.dark-theme::-webkit-scrollbar-thumb:hover{
  background-color: hsl(230, 16%, 35%);
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container{
  max-width: 1220px;
  margin-inline: 1.5rem;
}

.grid{
  display: grid;
  gap: 1.5rem;
}

.section{
  padding-block: 5rem 1rem;
}

.section-title{
  text-align: center;
  font-size: var(--h1-font-size);
  font-family: var(--second-font);
  margin-bottom: 2rem;
}

.main{
  overflow: hidden; /* For animation ScrollReveal */
}

/*=============== HEADER & NAV ===============*/
.header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--body-color);
  border-bottom-right-radius: 26px;
  border-bottom-left-radius: 26px;
  transition: box-shadow .4s, background-color .4s;
  z-index: 100;
}

.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header);

}

.nav-logo{
  display: inline-flex;
  align-items: center;
  column-gap: .5rem;
  color: var(--first-color);
  font-weight: 900;
  font-size: 1.5rem;
  font-family: 'Dancing Script', cursive;
}

.nav-logo i{
  font-size: 1.25rem;
  color: var(--title-color);
}

/* Navigation for mobile devices */
@media screen and (max-width: 1150px) {
  .nav-menu{
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1rem 2rem;
    border-top-right-radius: 26px;
    border-top-left-radius: 26px;
    background-color: var(--container-color);
    box-shadow: 0 -8px 32px hsla(0, 0%, 0%, .1);
    transition: background-color .4s;
  }
}

.nav-list{
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.nav-link{
  color: var(--text-color);
  transition: color .4s;
}

.nav-link:hover{
  color: var(--first-color);
}

.nav-link span{
  display: none;
}

.nav-link i{
  font-size: 1.25rem;
}

.nav-actions{
  display: flex;
  align-items: center;
  column-gap: 1rem;
}

.nav-actions i{
  font-size: 1.25rem;
  color: var(--title-color);
  transition: color .4s;
  cursor: pointer;
}

.nav-actions i:hover{
  color: var(--first-color);
}


/* Add shadow header */
.shadow-header{
  box-shadow: 0 2px 16px hsla(0, 0%, 0%, .1);
}


/* Active link */
.active-link{
  color: var(--first-color);
}


/*=============== SEARCH ===============*/
.search{
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 8rem 1.5rem;
  background-color: var(--body-color);
  transition: top .4s;
  z-index: 100;
}

.search-form{
  display: flex;
  align-items: center;
  padding-inline: 1rem;
  column-gap: .5rem;
  background-color: var(--container-color);
  border: 2px solid var(--border-color);
  border-radius: 18px;
}

.search-icon{
  font-size: 1.25rem;
  color: var(--title-color);
}

.search-input{
  width: 100%;
  padding-block: 1rem;
  color: var(--text-color);
  background-color: var(--container-color);
}

.search-close{
  position: absolute;
  top: 4rem;
  right: 2rem;
  font-size: 2.5rem;
  color: var(--title-color);
  transition: .4s;
  cursor: pointer;
}

.search-close:hover{
  color: #fb0157;
  transform: rotate(180deg);
}


/* Show search */
.show-search{
  top: 0;
}


/*=============== LOGIN ===============*/
.login{
  position: fixed;
  align-items: center;
  text-align: center;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  background-color: var(--body-color);
  transition: top .4s;
  z-index: 100;
}

.login-form{
  padding: 2rem 1.5rem;
  row-gap: 1.25rem;
  background-color: var(--container-color);
  border: 2px solid var(--border-color);
  border-radius: 18px;
}

.login-title{
  font-size: var(--h2-font-size);
}

.login-group{
  row-gap: 1.25rem;
}

.login-label{
  display: block;
  text-align: initial;
  margin-bottom: .25rem;
  color: var(--title-color);
  font-weight: 500;
}

.login-input{
  width: 100%;
  padding: 1rem;
  color: var(--text-color);
  background-color: var(--container-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
}

.login-signup,
.login-forget{
  display: block;
  font-size: var(--small-font-size);
}

.login-signup{
  margin-bottom: .5rem;
}

.login-signup a{
  color: var(--first-color);
  font-weight: 500;
}

.login-forget{
  color: var(--first-color);
  margin-bottom: 1.25rem;
}

.login-button{
  width: 100%;
  cursor: pointer;
}

.login-close{
  position: absolute;
  top: 5rem;
  right: 2rem;
  font-size: 2.5rem;
  color: var(--title-color);
  transition: .4s;
  cursor: pointer;
}

.login-close:hover{
  color: #fb0157;
  transform: rotate(180deg);
}


/* Show login */
.show-login{
  top: 0;
}


/*=============== HOME ===============*/
.home-swiper{
  margin: initial;
}

.home-container{
  padding-top: 2rem;
  row-gap: 2.5rem;
}

.home-data{
  text-align: center;
}

.home-title{
  margin-bottom: 1rem;
  font-size: var(--biggest-font-size);
  animation: home 5s infinite;
}

@keyframes home {
  0%, 100%{
    transform: translateY(0rem);
}
50%{
    transform: translateY(-2rem);
}
}

.home-description{
  margin-bottom: 2rem;
}

.home-image{
  display: grid;
}

.home-article,
.home-img{
  width: 220px;
  transition: scale .4s;
}

.home-article{
  scale: .8;
}



/* Swiper class */
.swiper-slide-active,
.swiper-slide-duplicate-active{
  scale: 1;
}

/*=============== BUTTON ===============*/
.button{
  display: inline-block;
  background-color: var(--first-color);
  color: var(--white-color);
  font-weight: 600;
  padding: 1rem 1.5rem;
  transition: box-shadow .4s, letter-spacing .4s;
  border-top-right-radius: 18px;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 2px;
}

.button:hover{
  box-shadow: 0 4px 32px hsla(230, 72%, 32%, .4);
  color: hsl(84, 100%, 59%);
  letter-spacing: 2px;
}

/*=============== SERVICES ===============*/
.services-container{
  row-gap: 3rem;
}

.services-card{
  text-align: center;
}

.services-card i{
  display: block;
  margin-bottom: 1rem;
  font-size: 3rem;
  color: var(--first-color);
}

.services-title{
  margin-bottom: .5rem;
  font-size: var(--h3-font-size);
}


/*=============== FEATURED ===============*/
.featured-card{
  position: relative;
  text-align: center;
  padding: 2rem;
  background-color: var(--container-color);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: border .4s, background-color .4s; 
}

.featured-img{
  width: 150px;
  margin: 0 auto .75rem;
}

.featured-title{
  margin-bottom: .5rem;
  font-size: var(--h2-font-size);
}

.featured-prices{
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  column-gap: .75rem;
}

.featured-discount{
  color: var(--title-color);
  font-size: 1.3rem;
}

.featured-price{
  color: #fb0157;
  font-size: var(--small-font-size);
  text-decoration: line-through;
}

.featured-card .button{
  cursor: pointer;
}

.featured-actions{
  position: absolute;
  display: inline-flex;
  flex-direction: column;
  row-gap: .75rem;
  top: 2rem;
  right: -1.5rem;
  transition: right .4s;
}

.featured-actions button{
  font-size: 1.25rem;
  color: var(--first-color);
  background: transparent;
  cursor: pointer;
}

.featured-card:hover .featured-actions{
  right: 1.5rem;
}


/* Swiper class */
.swiper-button-next::after,
.swiper-button-prev::after{
  content: '';
}

.swiper-button-next i,
.swiper-button-prev i{
  background-color: #ff771a;
  border-radius: 50%;
  font-size: 2rem;
  color: var(--white-color);
}

/*=============== Discount ===============*/
.discount-container{
  row-gap: 3.5rem;
}

.discount-data{
  text-align: center;
}

.discount-title{
  margin-bottom: 1rem;
}

.discount-description{
  margin-bottom: 2rem;
}

.discount-imgs{
  display: flex;
  justify-content: center;
}

.discount-img-1,
.discount-img-2{
  width: 170px;
}

.discount-img-1{
  transform: translateX(1rem) rotate(-10deg);
}

.discount-img-2{
  transform: translateX(-1rem) rotate(10deg);
}


/*=============== New ===============*/
.new-card{
  display: flex;
  align-items: center;
  column-gap: 2.5rem;
  padding: 1.5rem 1rem;
  color: var(--text-color);
  background-color: var(--container-color);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  transition: border .4s, background-color .4s;
}

.new-card:hover{
  border: 2px solid var(--text-color);
}

.new-img{
  width: 100px;
}

.new-title{
  font-size: var(--h2-font-size);
  margin-bottom: .5rem;
}


.new-price{
  display: flex;
  align-items: center;
  column-gap: .75rem;
  margin-bottom: .75rem;
  color: var(--title-color);
  font-size: 1.1rem;
}

.new-pric{
  font-size: var(--small-font-size);
  text-decoration: line-through;
  color: #fb0157;
}

.new-star{
  color: var(--first-color);
}

.new-swiper:nth-child(1){
  margin-bottom: 2rem;
}


/*=============== Join ===============*/
.join-container{
  position: relative;
  padding-block: 3rem;
}

.join-bg{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100%;
}

.join-data{
  position: relative;
}

.join-title{
  text-align: left;
  color: #fff;
  margin-top: 50px;
}

.join-form{
  display: grid;
  row-gap: 1rem;
}

.join-input{
  padding: 1.25rem 1rem;
  color: var(--title-color);
  background-color: var(--body-color);
  border-top-right-radius: 18px;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 2px;
  transition: background-color .4s;
}

.join-input::placeholder{
  color: var(--text-color);
}

.join-button{
  max-width: 40%;
  padding-block: 1.25rem;
  cursor: pointer;
}


/*=============== Testimonial ===============*/
.testimonial-card{
  text-align: center;
  padding: 2rem 3rem 2.5rem;
  background-color: var(--container-color);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  transition: border .4s, background-color 4s;
}

.testimonial-img{
  width: 100px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
}

.testimonial-title{
  margin-bottom: .75rem;
  font-size: var(--h2-font-size);
}

.testimonial-description{
  margin-bottom: 1.25rem;
  font-size: var(--small-font-size);
}

.testimonial-stars{
  color: var(--first-color);
}


/*=============== Footer ===============*/
.footer{
  padding-block: 4rem 6rem;
}

.footer-container{
  row-gap: 3rem;
}

.footer-logo{
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.25rem;
  column-gap: .5rem;
  color: var(--first-color);
  font-size: var(--h3-font-size);
  font-family: var(--second-font);
}

.footer-logo i{
  font-size: 1.25rem;
  color: var(--title-color);
}

.footer-data{
  grid-template-columns: repeat(2, max-content);
  gap: 3rem 2rem;
}

.footer-title{
  font-size: var(--h3-font-size);
  margin-bottom: 1.25rem;
}

.footer-links{
  display: grid;
  row-gap: .5rem;
}

.footer-link{
  color: var(--text-color);
  transition: color .4s;
}

.footer-link:hover{
  color: var(--first-color);
}

.footer-info{
  font-style: normal;
}

.footer-info i{
  color: var(--title-color);
}

.footer-social{
  display: flex;
  column-gap: 1.25rem;
}

.footer-social-link{
  font-size: 1.25rem;
  color: var(--first-color);
}

.footer-copy{
  display: block;
  margin-top: 5rem;
  text-align: center;
  font-size: var(--small-font-size);
  color: var(--first-color);
}


/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar{
  width: .6rem;
  border-radius: .5rem;
  background-color: hsl(230, 16%, 85%);
}

::-webkit-scrollbar-thumb{
  border-radius: .5rem;
  background-color: hsl(230, 16%, 65%);
}

::-webkit-scrollbar-thumb:hover{
  background-color: hsl(230, 16%, 55%);
}


/*=============== SCROLL UP ===============*/
.scrollup{
  position: fixed;
  display: inline-flex;
  right: 1rem;
  bottom: -50%;
  padding: 6px;
  color: var(--first-color);
  background-color: var(--container-color);
  box-shadow: 0 2px 8px hsla(0, 0%, 0%, .1);
  border-radius: 4px;
  font-size: 1.25rem;
  z-index: 10;
  transition: bottom .4s, transform .4s, background-color .4s;
}

.scrollup:hover{
  transform: translateY(-.5rem);
}

/* Show Scroll Up */
.show-scroll{
  bottom: 6rem;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px){
  .container{
    margin-inline: 1rem;
  }

  .nav-menu{
    padding-inline: 3rem;
  }

  .discount-img-1,
  .discount-img-2{
    width: 140px;
  }

  .new-card{
    flex-direction: column;
  }

  .testimonial-card{
    padding-inline: 1rem;
  }

  .footer-data{
    grid-template-columns: 1fr;
    row-gap: 1rem;
  }
} 

/* For medium devices */
@media screen and (min-width: 450px){
  .featured-card{
    width: 290px;
  }

  .new-card{
    width: 390px;
  }

  .testimonial-card{
    width: 320px;
  } 
}

@media screen and (min-width: 576px){
  .search-form{
    width: 500px;
    margin-inline: auto;
  }

  .login-form{
    width: 500px;
    justify-self: center;
  }

  .search-close,
  .login-close{
    width: max-content;
    margin-inline: auto;
    left: 0;
    right: 0;
    top: 4rem;
  }

  .home-container,
  .discount-container{
    grid-template-columns: 420px;
    justify-content: center;
  }

  .join-form{
    width: 330px;
  }


  .footer-data{
    grid-template-columns: repeat(3, max-content);
    column-gap: 4rem;
  }
}

@media screen and (min-width: 768px) {
  .home-container{
    grid-template-columns: 580px;
  }

  .home-data{
    width: 420px;
    justify-self: center;
  }

  .services-container{
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
    column-gap: 5rem;
  }

  .footer-data{
    grid-template-columns: repeat(4, max-content);
    column-gap: 4rem;
  }
}

/* For large devices */
@media screen and (min-width: 1150px) {
  .section{
    padding-block: 7rem 2rem;
  }

  .nav{
    column-gap: 4rem;
  }

  .nav-link i{
    display: none;
  }

  .nav-link span{
    display: block;
  }

  .nav-menu{
    width: initial;
    margin-inline: auto 0;
    margin-top: 1rem;
  }

  .nav-list{
    column-gap: 4rem;
  }

  .nav-link{
    font-weight: 500;
  }

  .dark-theme .nav-menu{
    box-shadow: none;
  }

  .home-data{
    width: initial;
  }

  .services-container{
    column-gap: 10rem;
  }

  .services-card i{
    font-size: 3.5rem;
  }

  .featured-container{
    padding-top: 2rem;
  }

  .featured-title{
    font-size: var(--h3-font-size);
  }

  .discount-container{
    grid-template-columns: 615px 500px;
    justify-content: space-between;
    align-items: center;
  }

  .discount-img-1,
  .discount-img-2{
    width: 300px;
}

.discount-data{
  order: 1;
}

.discount-data,
.discount-title{
  text-align: initial;
}

.join-title{
  text-align: center;
}

.discount-description{
  margin-bottom: 3.5rem;
}

.new-container{
  padding-top: 2rem;
}

.new-card{
  padding: 1.5rem;
}

.new-img{
  width: 120px;
}

.new-title{
  font-size: var(--h3-font-size);
}

.testimonial-container{
  padding-top: 2rem;
}

.testimonial-card{
  padding-inline: 2rem;
}

.testimonial-title{
  font-size: var(--h3-font-size);
}

.testimonial-description{
  font-size: var(--normal-font-size);
}

.footer{
  padding-block: 6rem 3rem;
}

  .footer-data{
    grid-template-columns: repeat(4, max-content);
    column-gap: 7.5rem;
  }

  .footer-logo,
  .footer-title{
    margin-bottom: 1.5rem;
    font-size: var(--h2-font-size);
  }

  .footer-links{
    row-gap: 1rem;
  }

  .footer-social{
    column-gap: 1.5rem;
  }

  .footer-social-link{
    font-size: 1.5rem;
  }

  .footer-copy{
    margin-top: 7.5rem;
  }

  .scrollup{
    right: 3rem;
  }

  .show-scroll{
    bottom: 3rem;
  }
}

@media screen and (min-width:1220px) {
  .container{
    margin-inline: auto;
  }

  .home-container{
    grid-template-columns: 435px 746px;
    align-items: center;
    padding-block: 7rem 2rem;
  }
  
  .home-data{
    text-align: initial;
  }

  .home-description{
    margin-bottom: 4rem;
  }

  .home-article,
  .home-img{
    width: 290px;
  }

  .join-bg{
    object-position: 0rem -3rem;
  }
}