@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");


:root {
  --header-height: 3.5rem;


  --first-color: hsl(24, 100%, 69%);
  --button-color: hsl(0, 15%, 47%);
  --button-color-alt: hsl(0, 0%, 21%);
  --card-color: hsl(0, 0%, 60%);
  --title-color: hsl(0, 0%, 15%);
  --text-color: hsl(0, 0%, 0%);
  --text-color-light: hsl(0, 0%, 23%);
  --body-color: hsl(240, 82%, 83%);
  --container-color: rgba(255, 255, 255, 0.945);
  --border-color: hsl(0, 0%, 94%);

  --body-font: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, 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-medium: 500;
  --font-bold: 700;

  --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-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: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

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;
}

body.dark-theme {
  --first-color: hsl(54, 72%, 80%);
  --button-color: hsl(246, 16%, 12%);
  --button-color-alt: hsl(0, 0%, 28%);
  --card-color: hsla(246, 16%, 5%, .5);
  --title-color: hsl(0, 0%, 95%);
  --text-color: hsl(0, 0%, 75%);
  --body-color: hsl(249, 19%, 14%);
  --container-color: hsl(247, 24%, 53%);
  --border-color: hsl(0, 0%, 20%);
}

.change-theme {
  color: var(--title-color);
  font-size: 1.25rem;
  cursor: pointer;
}

.dark-theme .change-theme,
.dark-theme .nav__toggle,
.dark-theme .nav__shop {
  color: hsl(0, 0%, 15%);
}

.dark-theme .scroll-header {
  box-shadow: 0 1px 4px hsla(0, 0%, 4%, .3);
}


.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%);
}

.container {
  max-width: 1024px;
  margin-left: var(--mb-1-5);
  margin-right: var(--mb-1-5);
}

.grid {
  display: grid;
}

.main {
  overflow: hidden;
}

.section {
  padding: 6.5rem 0 1rem;
}

.subtitle {
  display: flex;
  color: var(--text-color);
  justify-content: center;
}

.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);
}

.load {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--body-color);
  z-index: 1000;
  display: grid;
  justify-content: center;
  align-items: center;
}

.load svg {
  fill: var(--first-color);
  width: 100px;
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(10px);
  }

  100% {
    transform: translateY(0);
  }
}

.header {
  width: 100%;
  background: hsl(240, 82%, 83%);
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  transition: .5s;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo,
.nav__toggle,
.nav__shop,
.nav__close {
  color: var(--title-color);
}

.nav__logo {
  text-transform: uppercase;
  font-weight: var(--font-bold);
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  column-gap: .40rem;
}

.nav__logo img {
  width: 50px;
  height: 48px;
}

.nav__btns {
  display: flex;
  align-items: center;
  column-gap: 1rem;
}

.nav__toggle,
.nav__shop {
  font-size: 1.25rem;
  cursor: pointer;
}

.nav__shop {
  position: relative;
}

.nav__shop .count {
  position: absolute;
  bottom: 0px;
  right: -7px;
  width: 16px;
  height: 16px;
  padding: .25rem;
  background-color: var(--title-color);
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--body-color);
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    background-color: var(--container-color);
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    padding: 6rem 2rem 3.5rem;
    transition: .3s;
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  row-gap: 2rem;
}


.nav__link {
  color: #111;
  font-weight: var(--font-medium);
  text-transform: uppercase;
  font-size: var(--h2-font-size);
  transition: .3s;
}

.nav__link:hover {
  color: rgb(54, 20, 109);
}

.nav__close {
  font-size: 2rem;
  position: absolute;
  top: .9rem;
  right: 1.25rem;
  cursor: pointer;
}

.show-menu {
  right: 0;
}

.scroll-header {
  background-color: var(--container-color);
  box-shadow: 0 1px 4px rgb(145, 139, 139);
}

.active-link {
  color: #111;
}

.home__container {
  position: relative;
  row-gap: 2.5rem;
}

.home__img {
  width: auto;
  transition: transform .3s ease;
  align-content: center;
  justify-content: center;
}

.home__img:hover {
  transform: translateY(-5px);
}

.home__img-bg {
  background-color: var(--first-color);
  margin-top: 3rem;
  width: 100%;
  height: 500px;
  border-radius: 20px 20px 20px 20px;
  padding-bottom: 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  justify-self: flex-end;
  transform: translateX(1.5rem);
}

.home__title {
  font-size: 50px;
  font-weight: var(--font-bold);
  margin-bottom: var(--mb-1);
}

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

.home__price {
  display: inline-block;
  font-size: var(--h2-font-size);
  font-weight: var(--font-medium);
  color: rgb(240, 109, 109);
  margin-bottom: var(--mb-3);
}

.home__btns {
  display: flex;
  align-items: center;
}

.home__button {
  box-shadow: 9px 10px .5px rgba(141, 141, 141, 0.747);
}

.button {
  display: inline-block;
  background-color: var(--button-color);
  color: #FFF;
  padding: 1.25rem 2rem;
  border-radius: 5px;
  font-weight: var(--font-medium);
  transition: .3s;
}

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

.button--transparent {
  background-color: transparent;
  color: var(--title-color);
  border-radius: 5px 0 0 5px;
  border: 1px solid black;
}

.button--gray:hover {
  background-color: hsl(0, 0%, 63%);
}

.button--small {
  padding: 1rem 1.5rem;
}

.products {
  padding: 7rem 0;
}

.products__filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  justify-content: center;
  align-content: center;
  text-align: center;
  margin-bottom: 3.5rem;
}

.products__line {
  position: relative;
}

.products__line::before {
  content: '';
  position: absolute;
  width: 1px;
  height: 40px;
  background-color: var(--text-color-light);
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto 0;
}


.products__item {
  cursor: pointer;
}

.products__title {
  font-size: 15px;
  color: var(--text-color);
  margin: 1rem;
}

.products__stock {
  font-size: var(--small-font-size);
}

.products__content {
  grid-template-columns: 200px;
  gap: 2rem;
  justify-content: center;
}

.products__card {
  background-color: var(--container-color);
  border-radius: .5rem;
}

.products__img {
  width: 150px;
  transition: .4s;
}

.products__shape {
  background-color: var(--card-color);
  border-radius: .5rem .5rem 0 0;
  text-align: center;
  padding: .25rem 0;
}

.products__data {
  padding: 1rem 0 1.25rem 1rem;
  position: relative;
}

.products__price {
  font-size: var(--h3-font-size);
  display: flex;
  align-items: center;
  gap: .25rem;
  color: var(--first-color);
}

.products__quantity {
  font-size: var(--small-font-size);
  color: var(--text-color);
}

.products__name {
  font-size: var(--normal-font-size);
  margin-bottom: var(--mb-0-5);
}

.products__button {
  border-radius: 50%;
  padding: .625rem;
  display: inline-flex;
  font-size: 1.25rem;
  position: absolute;
  right: 1rem;
  top: -1.25rem;
  background-color: var(--body-color);
  color: var(--title-color);
  box-shadow: 0 4px 12px hsla(206, 4%, 4%, .2);
}

.products__card:hover .products__img {
  transform: translateY(-.25rem);
}

.active-product .products__title {
  color: var(--title-color);
}

.footer {
  background-color: var(--card-color);
}

.footer__container {
  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 {
  font-size: 1.25rem;
  color: var(--text-color);
}

.footer__social-link:hover {
  color: var(--title-color);
}

.footer__copy {
  display: block;
  margin: 3.5rem 0 1rem 0;
  text-align: center;
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
}

.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;
}

.scrollup:hover {
  opacity: 1;
}

.scrollup__icon {
  font-size: 1.5rem;
  color: var(--first-color);
}

.show-scroll {
  bottom: 3rem;
}

::-webkit-scrollbar {
  width: .6rem;
  background: hsl(0, 0%, 74%);
}

::-webkit-scrollbar-thumb {
  background: hsl(0, 0%, 17%);
}

.cart {
  position: fixed;
  background-color: var(--container-color);
  z-index: var(--z-fixed);
  width: 100%;
  height: 100%;
  top: 0;
  right: -100%;
  padding: 3.5rem 2rem;
  transition: .4s;
}

.cart__title-center {
  font-size: var(--h2-font-size);
  text-align: center;
  margin-bottom: var(--mb-3);
}

.cart__close {
  font-size: 2rem;
  color: var(--title-color);
  position: absolute;
  top: 1.25rem;
  right: .9rem;
  cursor: pointer;
}

.cart__container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  row-gap: 1.5rem;
  max-height: 450px;
  height: 100%;
  overflow: auto;
}

.cart__card {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 1rem;
  padding: .5rem 1rem;
}

.cart__empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: inherit;
}

.cart__box {
  background-color: var(--container-color);
  width: 85%;
  height: auto;
  padding: .25rem .5rem;
  margin: 0 auto 1rem;
  border: 1px solid var(--border-color);
}

@media screen and (min-width: 400px) {
  .cart__card {
    grid-template-columns: .5fr 1fr;
  }

  .cart__box {
    width: clamp(80px, 100%, 150px);
  }
}

.cart__img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.cart__title {
  font-size: var(--normal-font-size);
  margin-bottom: .5rem;
  display: flex;
  justify-content: space-between;
}

.cart__stock {
  display: block;
  font-size: var(--small-font-size);
  color: var(--text-color);
  margin-bottom: var(--mb-0-5);
}

.cart__price {
  font-size: var(--small-font-size);
  color: var(--first-color);
  margin-bottom: var(--mb-0-5);
}

.cart__checkout {
  display: flex;
  justify-content: flex-end;
  padding-top: 2rem;
  gap: 1rem;
}

.cart__subtotal {
  display: flex;
  justify-content: space-between;
  font-size: var(--small-font-size);
  margin: var(--mb-0-75) 0;

}

.cart__subtotal-price {
  font-size: var(--normal-font-size);
  color: var(--first-color);
  font-weight: var(--font-medium);
}

.cart__amount,
.cart__amount-content {
  display: grid;
  grid-template-columns: 2fr 1fr .5fr;
  column-gap: 1rem;
  align-items: baseline;
}

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

.cart__amount-content {
  grid-template-columns: 1fr 2fr 1fr;
}

.cart__amount-number {
  display: flex;
  justify-content: center;
}

.cart__amount-box {
  display: inline-flex;
  padding: .25rem;
  background-color: var(--container-color);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.cart__amount-trash {
  font-size: 1.15rem;
  color: var(--first-color);
  cursor: pointer;
}

.cart__prices {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
}

.cart__prices-item,
.cart__prices-total {
  color: var(--title-color);
}

.cart__prices-item {
  font-size: var(--small-font-size);
}

.cart__prices-total {
  font-size: var(--h3-font-size);
  font-weight: var(--font-medium);
}

.cart__btn {
  background-color: var(--card-color);
  color: var(--title-color);
}

.cart__btn:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.cart__btn:disabled:hover {
  background-color: var(--card-color);
  color: var(--title-color);
}

.show-cart {
  right: 0;
}

@media screen and (max-width: 320px) {
  .container {
    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);
  }
}

@media screen and (min-width: 576px) {
  .home__img-bg {
    width: 340px;
  }

  .products__content {
    grid-template-columns: repeat(2, 200px);
    column-gap: 3rem;
  }

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

@media screen and (min-width: 767px) {
  .section {
    padding: 8rem 0 1rem;
  }

  .cart {
    width: 420px;
    box-shadow: -2px 0 4px hsla(0, 0%, 15%, .1);
  }

  .nav {
    height: calc(var(--header-height) + 1.5rem);
    justify-content: initial;
    column-gap: 3rem;
  }

  .nav__toggle,
  .nav__close {
    display: none;
  }

  .nav__list {
    flex-direction: row;
    column-gap: 2.5rem;
  }

  .nav__link {
    text-transform: initial;
    font-size: var(--normal-font-size);
  }

  .nav__btns {
    margin-left: auto;
  }

  .home__container {
    padding-top: 6rem;
    grid-template-columns: 1fr max-content;
    align-items: center;
  }

  .home__img-bg {
    order: 1;
    transform: translate(1.5rem, -6rem);
  }

  .home__data {
    padding: 0 0 3rem;
  }

  .products__filters {
    grid-template-columns: repeat(4, 200px);
  }

  .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__container {
    column-gap: 2rem;
  }

  .home__img-bg {
    width: 480px;
    height: 680px;
  }

  .home__img {
    width: auto;
  }

  .home__data {
    padding: 0 0 8rem;
  }

  .products {
    padding: 4rem 0 10rem;
  }

  .products__filters {
    grid-template-columns: repeat(4, 200px);
    margin: 4rem 0 5.5rem;
  }

  .products__content {
    grid-template-columns: repeat(3, 262px);
    justify-content: initial;
    column-gap: 5rem;
  }

  .products__card {
    border-radius: .75rem;
  }

  .products__img {
    width: 200px;
  }

  .products__shape {
    padding: 2rem 0;
    border-radius: .75rem .75rem 0 0;
  }

  .products__data {
    padding: 1rem 0 1.5rem 1.5rem;
  }

  .products__name {
    font-size: var(--h2-font-size);
  }

  .products__button {
    font-size: 1.5rem;
    padding: .75rem;
    right: 1.5rem;
    top: -1.5rem;
  }
}

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

  .scrollup {
    right: 3rem;
  }
}