/*===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");

/*===== VARIABLES CSS =====*/
:root {
  --header-height: 3rem;
  --font-semi: 600;
  --font-bold: 700;
}

/*===== Colors =====*/
:root {
  --first-color-alt: #158484;
  --first-color: #20c5a4;
  --white-color: #FAFAFF;
  --dark-color: #101010;
  --dark-color-light: #606060;
  --gray-color: #e0e0d1;
}

/*===== Font & typography=====*/
:root {
  --body-font: 'Open Sans', sans-serif;
  --big-font-size: 3rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --normal-font-size: .938rem;
  --small-font-size: .75rem;
}

@media screen and (min-width: 1024px) {
  :root {
    --big-font-size: 6rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --normal-font-size: 1rem;
    --small-font-size: .813rem;
  }
}

/*===== Margins =====*/
:root {
  --mb-1: 0.5rem;
  --mb-2: 1rem;
  --mb-3: 1.5rem;
  --mb-4: 2rem;
}

/*===== z index =====*/
:root {
  --z-tooltip: 10;
  --z-fixed: 100;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--dark-color);
  line-height: 1.6;
}

h1, h2, p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--dark-color);
}

img {
  max-width: 100%;
  height: auto;
}

/*===== CLASS CSS ===== */
.section{
  padding: 3rem 0;
}

.section-title{
  font-size: var(--h2-font-size);
  color: var(--dark-color);
  margin: var(--mb-4) 0 --mb-1;
  text-align: center;
}

.section-all{
  display: block;
  font-size: var(--small-font-size);
  font-weight: var(--font-semi);
  color: var(--dark-color-light);
  text-align: center;
  margin-bottom: var(--mb-2);
}

/*===== LAYOUT =====*/
.bd-grid{
  max-width: 1024px;
  display: grid;
  grid-template-columns: 100%;
  grid-column-gap: 2rem;
  width: calc(100% -3rem);
  margin-left: var(--mb-3);
  margin-right: var(--mb-3);
}

.l-header{
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--gray-color);
}
/*===== NAV =====*/
.nav{
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media screen and (max-width: 768px){
  .nav__menu{
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 80%;
    height: 100%;
    padding: 2rem;
    background-color: var(--dark-color-light);
    transition: .5s;
  }
}

.nav__item{
  margin-bottom: var(--mb-4);
}

.nav__link{
  color: var(--dark-color);
  font-weight: var(--font-semi);
}

.nav__link:hover{
  color: var(--first-color);
}

.nav__logo{
  font-weight: var(--font-bold);
}

.nav__cart{
  font-size: 1.5rem;
  margin-right: var(--mb-2);
  cursor: pointer;
  transition: .3s;
}

.nav__cart:hover{
  color: #20c5a4;
}

.nav__toggle{
  font-size: 1.5rem;
  cursor: pointer;
}
/* === CART === */
.cart{
  position: fixed;
  top: 0;
  right: -100%;
  width: 360px;
  min-height: 100vh;
  padding: 20px;
  background: var(--white-color);
  box-shadow: -2px 0 4px hsl(0 4% 15%/10%);
  transition: .3s;
}

.cart.active{
  right:0;
}

.cart-title{
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  color: #101010;
}

.cart-box{
  display: grid;
  grid-template-columns: 32% 50% 18%;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.cart-img{
  width: 100px;
  height: 100px;
  object-fit: contain;
  padding: 10px;
}

.detail-box{
  display: grid;
  row-gap: 0.5rem;
}

.cart-product-title{
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 600;
  color: #101010;
}

.cart-price{
  font-weight: 500;
  color: #101010;
}

.cart-quantity{
  border: 1px solid black;
  outline-color: #101010;
  width: 2.4rem;
  text-align: center;
  font-size: 1rem;
}

.remove-cart{
  font-size: 2rem;
  cursor: pointer;
  background-color: none;
  color: #606060;
  transition: .3s;
}

.remove-cart:hover{
  color: hsl(0, 100%, 56%);
}

.total{
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
  border-top: 1px solid var(--dark-color-light);
}

.total-title{
  font-size: 1rem;
  font-weight: 600;
  color: #158484;
}

.total-price{
  margin-left: 0.5rem;
  color: #101010;
  font-weight: 600;
}

.btn-buy{
  display: flex;
  margin: 1.5rem auto 0 auto;
  padding: 12px 20px;
  border: none;
  background: #20c5a4;
  color: white;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: .5rem;
}

.btn-buy:hover{
  background: #158484;
}

#close-cart{
  position: absolute;
  top: 1rem;
  right: 0.8rem;
  font-size: 2rem;
  color: black;
  cursor: pointer;
  transition: .3s;
}

#close-cart:hover{
  color: #20c5a4;
}
/*=== Show menu ===*/
.show{
  right: 0;
}

.active{
  color: var(--first-color);
}

/*===== HOME =====*/
.home{
  background-color: var(--gray-color);
}

.home__container{
  height: calc(100vh - var(--header-height));
}

.home__data{
  padding-top: 6rem;
}

.home__title{
  align-self: center;
  font-size: var(--big-font-size);
  line-height: 1;
  letter-spacing: .5rem;
  margin-bottom: 4rem;
}

.home__title span{
  font-size: var(--h1-font-size);
}

.home__img{
  position: absolute;
  right: 0;
  bottom: 0;
  width: 260px;
}

/*BUTTONS*/
.add-cart{
  margin-left: 1rem;
  padding: .5rem;
  font-size: 1.5rem;
  color: white;
  background-color: var(--dark-color-light);
  border-radius: .5rem;
  z-index: 3;
  cursor: pointer;
}

.add-cart:hover{
  background-color: #158484;
}

.button{
  display: inline-block;
  background-color: var(--first-color);
  color: var(--white-color);
  padding: 1rem;
  font-size: var(--small-font-size);
  font-weight: var(--font-semi);
  transition: .3s;
  border-radius: .5rem;
}

.button:hover{
  background-color: var(--first-color-alt);
}

/*===== COLLECTION =====*/
.collection__container{
  row-gap: 2rem;
}

.collection__box{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  background-color: var(--gray-color);
  transition: .3s;
}

.collection__box:hover{
  transform: translateY(-.5rem);
}

.collection__img{
  width: 100px;
}

.collection__title{
  font-size: var(--h1-font-size);
  line-height: 1.2;
  margin-bottom: var(--mb-2);
  text-transform: uppercase;
  font-weight: var(--font-semi);
}

.collection__subtitle{
  font-size: var(--h2-font-size);
  color: var(--dark-color-light);
}

.collection__view{
  font-size: var(--small-font-size);
  color: var(--dark-color-light);
}

.collection__view:hover{
  text-decoration: underline;
}
/*===== FEATURED PRODUCTS =====*/
.featured__container{
  row-gap: 2rem;
}

.featured__product{
  transition: .3s;
}

.featured__product:hover{
  transform: translateY(-.5rem);
}

.featured__box{
  position: relative;
  display: flex;
  justify-content: center;
  background-color: var(--gray-color);
}

.featured__new{
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--first-color);
  color: var(--white-color);
  padding: .3rem .75rem;
  font-size: var(--small-font-size);
}

.featured__data{
  text-align: center;
}

.featured__name{
  margin-bottom: var(--mb-1);
  text-transform: uppercase;
  font-size: var(--normal-font-size);
}

.featured__price{
  color: var(--dark-color-light);
  font-weight: var(--font-semi);
}
/*===== OFFER =====*/
.offer__bg{
  background: url('/assets/img/offer.jpg') no-repeat center/cover;
  text-align: center;
}

.offer__data{
  padding: 3.5rem .25rem;
  background: rgba(0, 0, 0, .5);
  color: var(--white-color);
}

.offer__title{
  font-size: var(--h1-font-size);
  letter-spacing: .2rem;
  text-transform: uppercase;
  font-weight: var(--font-semi);
}

.offer__description{
  margin-bottom: var(--mb-2);
  letter-spacing: .2rem;
}

/*===== NEW ARRIVALS =====*/

/* HACE FALTA DAR BORDER RADIUS Y CAMBIAR COLORES */
.new__container{
  row-gap: 2rem;
}

.new__box{
  position: relative;
  display: flex;
  justify-content: center;
  background-color: var(--gray-color);
  overflow: hidden;
  border-radius: 1rem;
}

.new__box:hover .new__link{
  bottom: 0;
}

.new__link{
  position: absolute;
  bottom: -100%;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(188, 246, 246,.5);
  transition: .3s;
}
/*===== FOOTER =====*/
.footer{
  color: var(--white-color);
  background-color: var(--dark-color);
}

.footer__container{
  row-gap: 1.5rem;
  margin-bottom: var(--mb-4);
}

.footer__title{
  margin-bottom: var(--mb-1);
}

.footer__deal{
  margin-bottom: var(--mb-2);
}

.footer__store{
  width: 100px;
}

.footer__link, .footer__social{
  color: var(--dark-color-light);
}

.footer__link:hover{
  text-decoration: underline;
}

.footer__social{
  font-size: 1.3rem;
  margin-right: var(--mb-1);
}

.footer__copy{
  border-top: 1px solid --dark-color-light;
  padding-top: 3rem;
  text-align: center;
  color: var(--dark-color-light);
  font-size: var(--small-font-size);
}
/* ===== MEDIA QUERIES=====*/
@media screen and (min-width: 768px){
  body{
    margin: 0;
  }

  .section-all{
    margin-bottom: var(--mb-4);
  }

  .nav{
    height: calc(var(--header-height) + 1rem);
    justify-content: initial;
  }

  .nav__menu{
    margin-left: auto;
    transition: .3s;
  }

  .nav__list{
    display: flex;
  }

  .nav__item{
    margin-left: var(--mb-4);
    margin-bottom: 0;
  }

  .nav__toggle{
    display: none;
  }

  .home__container{
    height: 100vh;
  }

  .home__data{
    padding: 0;
    height: max-content;
    align-self: center;
  }

  .home__title{
    line-height: .8;
    letter-spacing: 1.5rem;
  }

  .home__img{
    width: 370px;
  }

  .collection__container{
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr;
  }

  .collection__box{
    padding: .5rem 3rem 0;
  }

  .collection__img{
    width: 130px;
  }

  .featured__container{
    grid-template-columns: repeat(4, 1fr);
  }

  .offer__data{
    padding: 5rem 0;
  }

  .new__container{
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__container{
    padding: 2rem 0;
  }
}

@media screen and (min-width: 1024px){
  .bd-grid{
    margin-left: auto;
    margin-right: auto;
  }

  .home__data{
    padding-left: 7rem;
  }

  .home__img{
    right: 15%;
  }

  .home__title{
    padding-top: 6rem;
  }
}

@media screen and (max-width:400px){
  .cart{
    width: 320px;
  }
}

@media screen and (max-width: 360px){
  .cart{
    width: 280px;
  }
}