:root {
  --header-height: 4rem;

  /*========== Cores ==========*/
  --first-color: hsl(189, 96%, 36%);
  --first-color-alt: hsl(189, 55%, 85%);
  --second-color: hsl(34, 94%, 87%);
  --title-color: hsl(0, 0%, 13%);
  --text-color: hsl(189, 13%, 32%);
  --text-color-light: hsl(60, 1%, 56%);
  --body-color: hsl(0, 0%, 100%);
  --container-color: hsl(0, 0%, 93%);
  --border-color: hsl(189, 36%, 85%);
  --border-color-alt: hsl(189, 15%, 90%);

  /*========== Tipografia ==========*/
  --body-font: "Lato", sans-serif;
  --second-font: "DM Serif Display", serif;

  --big-font-size: 3.5rem;
  --h1-font-size: 2.75rem;
  --h2-font-size: 2rem;
  --h3-font-size: 1.75rem;
  --h4-font-size: 1.375rem;
  --large-font-size: 1.125rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.75rem;
  --tiny-font-size: 0.6875rem;

  /*========== Pesos ==========*/
  --weight-400: 400;
  --weight-500: 500;
  --weight-600: 600;
  --weight-700: 700;

  /*========== Transição ==========*/
  --transition: cubic-bezier(0, 0, 0.5, 1);
}

button,
textarea,
input {
  background-color: transparent;
  border: none;
  outline: none;
}


/*=============== HEADER ===============*/
.header__top {
  background-color: var(--first-color-alt);
  border-bottom: 1px solid var(--first-color);
  padding-block: 0.875rem;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__contact span:first-child {
  margin-right: 2rem;
}

.header__contact span,
.header__alert-news,
.header__top-action {
  font-size: var(--small-font-size);
}

.header__alert-news {
  color: hsl(0deg 0% 27.56%);
  font-weight: var(--weight-600);
}

.header__top-action {
  color: var(--text-color);
}

.nav,
.nav__menu,
.nav__list,
.header__user-actions {
  display: flex;
  align-items: center;
}

.nav {
  height: calc(var(--header-height) + 2.5rem);
  justify-content: space-between;
  column-gap: 1rem;
}

.nav__logo-img {
  width: 170px;
}

.nav__menu {
  flex-grow: 1;
  margin-left: 2.5rem;
}

.nav__list {
  column-gap: 2.5rem;
  margin-right: auto;
}

.nav__link {
  color: var(--title-color);
  font-weight: var(--weight-700);
  transition: all 0.2s var(--transition);
}

.active-link,
.nav__link:hover {
  color: var(--first-color);
}

.nav__menu-top,
.nav__toggle {
  display: none;
}

.header__search {
  width: 340px;
  position: relative;
}

.header__search .form__input {
  width: 100%;
  border: 1px solid var(--border-color-alt);
  padding-inline: 1rem;
  height: 45px;
  border-radius: 0.25rem;
  font-size: var(--small-font-size);
}

.search__btn {
  position: absolute;
  top: 24%;
  right: 1.25rem;
  cursor: pointer;
}

.header__user-actions {
  column-gap: 1.15rem;
}

.header__action-btn {
  position: relative;
}

.header__action-btn img {
  width: 24px;
}

#user-icon {
  width: 30px;
}

.user-icon-popup {
  position: absolute;
  top: 160%;
  padding: 20px;
  font-family: sans-serif;
  width: 244px;
  right: -73px;
  border-radius: 5px;
  text-align: center;
  border: 1px solid #009ac9;
  background: #fff;
  display: none;
  z-index: 100;
}

.user-icon-popup.active {
  display: block;
}

.user-icon-popup p {
  font-size: 1.3rem;
  line-height: 2rem;
  color: #000000;
}

.user-icon-popup s {
  display: block;
  margin: 20px auto 0;
  text-decoration: none;
  color: #fff;
  background: #009ac9;
  padding: 10px;
  width: 100px;
  text-transform: capitalize;
  border-radius: 5px;
}

.header__action-btn .count {
  position: absolute;
  top: -0.625rem;
  right: -0.625rem;
  background-color: var(--first-color);
  color: var(--body-color);
  height: 18px;
  width: 18px;
  line-height: 18px;
  border-radius: 50%;
  text-align: center;
  font-size: var(--tiny-font-size);
}

#cart-icon[data-quantity]::after {
  content: attr(data-quantity);
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  background: var(--first-color);
  border-radius: 50%;
  color: white;
  font-size: 12px;
  font-weight: var(--weight-500);
  display: flex;
  justify-content: center;
  align-items: center;
}

/*=============== CART ===============*/
.cart {
  position: fixed;
  top: 0;
  right: -100%;
  width: 360px;
  min-height: 100vh;
  padding: 20px;
  background: var(--container-color);
  box-shadow: -2px 0 4px hsla(0, 0%, 76%, 0.1);
  transition: 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
  z-index: 100;
}

.cart.active {
  right: 0;
}

.cart-title {
  text-align: center;
  font-size: var(--body-font);
  font-weight: var(--weight-600);
  margin-top: 2rem;
  color: var(--first-color);
}

.total {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
  border-top: 1px solid var(--text-color-light);
}

.total-title {
  font-size: var(--body-font);
  font-weight: var(--weight-600);
  margin-top: 1rem;
  color: var(--first-color);
}

.total-price {
  font-size: var(--small-font-size);
  margin: 1rem 0 0 0.7rem;
  color: var(--first-color);
}

.btn-buy {
  display: flex;
  justify-content: center;
  margin: 1.5rem auto 0 auto;
  padding: 12px 20px;
  width: 50%;
  text-align: center;
  border: none;
  border-radius: 2rem;
  background: var(--first-color);
  color: var(--body-color);
  font-size: var(--small-font-size);
  font-weight: var(--weight-500);
  cursor: pointer;
}

#close-cart {
  position: absolute;
  top: 1rem;
  right: 0.8rem;
  font-size: var(--normal-font-size);
  color: var(--first-color);
  cursor: pointer;
}
@media screen and (max-width: 1200px) {
  .container {
    max-width: 960px;
  }

  .header__top {
    display: none;
  }

  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }

 

  .nav__logo-img {
    width: 150px;
  }

  .nav__menu {
    position: fixed;
    right: -100%;
    top: 0;
    max-width: 400px;
    width: 100%;
    height: 100%;
    padding: 1.25rem;
    background-color: var(--body-color);
    z-index: 100;
    flex-direction: column;
    align-items: flex-start;
    row-gap: 2rem;
    box-shadow: 0 0 15px hsla(0, 0%, 0%, 0.1);
    transition: all 0.35s var(--transition);
  }

  .show-menu {
    right: 0;
  }
   
  .nav__list { 
    order: 1;
    flex-direction: column;
    align-items: flex-start;
    row-gap: 1.5rem;
  }

  .nav__link {
    font-style: var(--large-font-size);
  }

  .header__search .form__input {
    border-color: var(--first-color);
  }

  .nav__menu-top,
  .nav__toggle {
    display: flex;
  }

  .nav__menu-top {
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 1.25rem;
  }

  .nav__menu-logo img {
    width: 100px;
  }

  .nav__close {
    font-size: var(--h2-font-size);
    line-height: 1rem;
  }

  .header__action-btn img {
    width: 21px;
  }
}

/* For medium devices */
@media screen and (max-width: 992px) {
  #navbar.nav.container.bg {
    max-width: -webkit-fill-available;
  }
}

@media screen and (max-width: 768px) {
  #navbar.nav.container.bg {
    max-width: -webkit-fill-available;
  }

}
/* For small devices */
@media screen and (max-width: 576px) {
  #navbar.nav.container.bg {
    align-items: center;
    margin: 0;
  }
}