/* google Open Sans font */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&display=swap");

/* variable */
:root {
  --header-height: 3.5rem;

  /* color  */
  --hue: 14;
  --first-color: hsl(var(--hue), 91%, 54%);
  --first-color-alt: hsl(var(--hue), 91%, 50%);
  --title-color: hsl(var(--hue), 4%, 100%);
  --text-color: hsl(var(--hue), 4%, 85%);
  --text-color-light: hsl(var(--hue), 4%, 55%);

  --body-color: #85726c;
  --container-color: #6c6062;

  /* font and typography */
  --body-font: "Open Sans", sans-serif;
  --biggest-font-size: 2rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;
  --smaller-font-size: 0.75rem;

  /* font weight */
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-black: 900;

  /* margenes bottom */
  --mb-0-25: 0.25rem;
  --mb-0-5: 0.5rem;
  --mb-0-75: 0.75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;

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

/* responsive typography */
@media screen and (min-width: 992px) {
  :root {
    --biggest-font-size: 4rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background: var(--body-color);
  color: var(--text-color);
}

h1,
h2,
h3,
h4 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

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

button {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

/* reusable css classes */
.section {
  padding: 4.5rem 0 2rem;
}

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

/* layout */
.container {
  max-width: 968px;
  margin-left: var(--mb-1-5);
  margin-right: var(--mb-1-5);
}

.grid {
  display: grid;
}

.main {
  overflow: hidden;
}

/* header */
.header {
  width: 100%;
  background: var(--body-color);
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
}

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

.nav___logo {
  display: flex;
  align-items: center;
  column-gap: 0.5rem;
  font-weight: var(--font-medium);
}

.nav___logo-img {
  width: 1.25rem;
}

.nav___link,
.nav___logo,
.nav___toggle,
.nav___close {
  color: var(--title-color);
}

.nav___toggle {
  font-size: 1.25rem;
  cursor: pointer;
}

@media screen and (max-width: 767px) {
  .nav___menu {
    position: fixed;
    width: 100%;
    background: var(--container-color);
    top: -150%;
    left: 0;
    padding: 3.5rem 0;
    transition: 0.4s;
    z-index: var(--z-fixed);
    border-radius: 0 0 1.5rem 1.5rem;
  }
}

.nav___close {
  font-size: 1.8rem;
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  cursor: pointer;
}

.nav___list {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 1.5rem;
}

.nav___link {
  text-transform: uppercase;
  font-weight: var(--font-black);
  transition: 0.4s;
}

.nav___link:hover {
  color: var(--text-color);
}

/* show menu */
.show-menu {
  top: 0;
}

/* change background header */
.scroll-header {
  background: var(--container-color);
}

/* active link */
.active-link {
  position: relative;
}

.active-link::before {
  content: "";
  position: absolute;
  bottom: -0.75rem;
  left: 45%;
  width: 5px;
  height: 5px;
  background-color: var(--title-color);
  border-radius: 50%;
}

/* swiper class */
.swiper-pagination {
  position: initial;
  margin-top: var(--mb-1);
}

.swiper-pagination-bullet {
  width: 5px;
  height: 5px;
  background-color: var(--title-color);
  opacity: 1;
}

.swiper-pagination-horizontal.swiper-pagination-bullets
  .swiper-pagination-bullet {
  margin: 0 0.5rem;
}

.swiper-pagination-bullet-active {
  width: 1.5rem;
  height: 5px;
  border-radius: 0.5rem;
}

/* button */
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: var(--title-color);
  padding: 1rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: var(--font-medium);
  transition: 0.3s;
}

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

.button--login {
  border: 2px solid;
  background-color: transparent;
  border-radius: 3rem;
  padding: 0.75rem 1.5rem;
}

.button--login:hover {
  background: none;
}

/* star */
.star___container {
  row-gap: 2rem;
}

.star___data {
  text-align: center;
}

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

.star___img {
  width: 200px;
  justify-self: center;
}

/* component */
.component___container {
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding-top: 1rem;
}

.component___content {
  position: relative;
  background: var(--container-color);
  border-radius: 1rem;
  padding: 1.5rem 0 1rem 0;
  text-align: center;
  overflow: hidden;
}

.component___img {
  width: 90px;
  transition: 0.3s;
}

.component___price {
  display: block;
}

.component___title,
.component___price {
  color: var(--title-color);
  font-weight: var(--font-medium);
  font-size: var(--normal-font-size);
}

.component___button {
  display: inline-flex;
  padding: 0.5rem;
  border-radius: 0.25rem 0.25rem 0.75rem 0.25rem;
  position: absolute;
  right: -3rem;
  bottom: 0;
}

.component___icon {
  font-size: 1.25rem;
  color: var(--title-color);
}

.component___content:hover .component___img {
  transform: translateY(-0.5rem);
}

.component___content:hover .component___button {
  right: 0;
}

/* discount */
.discount___container {
  background: var(--container-color);
  border-radius: 1rem;
  padding: 2.5rem 0 1.5rem;
  row-gap: 0.75rem;
}

.discount___data {
  text-align: center;
}

.discount___title {
  font-size: var(--h2-font-size);
  margin-bottom: var(--mb-2);
}

.discount___img {
  width: 200px;
  justify-self: center;
}

/* new product */
.new___container {
  padding-top: 1rem;
}

.new___img {
  width: 120px;
  margin-bottom: var(--mb-0-5);
  transition: 0.3s;
}

.new___content {
  position: relative;
  background: var(--container-color);
  width: 242px;
  padding: 2rem 0 1.5rem 0;
  border-radius: 0.75rem;
  text-align: center;
  overflow: hidden;
}

.new___tag {
  position: absolute;
  top: 8%;
  left: 8%;
  background-color: var(--first-color);
  color: var(--title-color);
  font-size: var(--small-font-size);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.new___title {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
}

.new___prices {
  display: inline-flex;
  align-items: center;
  column-gap: 0.5rem;
}

.new___price {
  font-weight: var(--font-medium);
  color: var(--title-color);
}

.new___discount {
  color: var(--first-color);
  font-size: var(--smaller-font-size);
  text-decoration: line-through;
  font-weight: var(--font-medium);
}

.new___button {
  display: inline-flex;
  padding: 0.5rem;
  border-radius: 0.25rem 0.25rem 0.75rem 0.25rem;
  position: absolute;
  bottom: 0;
  right: -3rem;
}

.new___icon {
  font-size: 1.25rem;
}

.new___content:hover .new___img {
  transform: translateY(-0.5rem);
}

.new___content:hover .new___button {
  right: 0;
}

/* footer */
.footer {
  position: relative;
  overflow: hidden;
}

.footer___container {
  row-gap: 2rem;
}

.footer___logo {
  display: flex;
  align-items: center;
  column-gap: 0.5rem;
  margin-bottom: var(--mb-1);
  font-weight: var(--font-medium);
  color: var(--title-color);
}

.footer___logo-img {
  width: 20px;
}

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

.footer___social {
  display: flex;
  column-gap: 0.75rem;
}

.footer___social-link {
  display: inline-flex;
  background: var(--container-color);
  padding: 0.25rem;
  border-radius: 0.25rem;
  color: var(--title-color);
  font-size: 1rem;
}

.footer___social-link:hover {
  background: var(--body-color);
}

.footer___title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
}

.footer___links {
  display: grid;
  row-gap: 0.35rem;
}

.footer___link {
  font-size: var(--small-font-size);
  color: var(--text-color);
  transition: 0.3s;
}

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

.footer___copy {
  display: block;
  text-align: center;
  font-size: var(--smaller-font-size);
  margin-top: 4.5rem;
}

/* scroll to top */
.scrollup {
  position: fixed;
  background: var(--container-color);
  right: 1rem;
  bottom: -20%;
  display: inline-flex;
  padding: 0.3rem;
  border-radius: 0.25rem;
  z-index: var(--z-tooltip);
  opacity: 0.8;
  transition: 0.4s;
}

.scrollup___icon {
  font-size: 1.25rem;
  color: var(--title-color);
}

.scrollup:hover {
  background: var(--container-color);
  opacity: 1;
}

/* show scroll up */
.show-scroll {
  bottom: 3rem;
}

/* scroll bar */
::-webkit-scrollbar {
  width: 0.6rem;
  background: #413e3e;
}

::-webkit-scrollbar-thumb {
  background: #272525;
  border-radius: 0.5rem;
}

/*  breakpoint */
/* small devices */
@media screen and (max-width: 320px) {
  .container {
    margin-left: var(--mb-1);
    margin-right: var(--mb-1);
  }

  .component___container {
    grid-template-columns: 0.8fr;
    justify-content: center;
  }
}

/* medium devices */
@media screen and (min-width: 576px) {
  .star___container {
    grid-template-columns: 0.8fr;
    justify-content: center;
  }
}

@media screen and (min-width: 767px) {
  body {
    margin: 0;
  }

  .section {
    padding: 7rem 0 2rem;
  }

  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  .nav___close,
  .nav___toggle {
    display: none;
  }
  .nav___list {
    flex-direction: row;
    column-gap: 3rem;
  }
  .nav___link {
    text-transform: initial;
    font-weight: initial;
  }

  .swiper-pagination {
    margin-top: var(--mb-2);
  }

  .star___container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
  .star___title,
  .star___data {
    text-align: initial;
  }
  .star___img {
    width: 250px;
  }

  .component___container {
    grid-template-columns: repeat(3, 200px);
    justify-content: center;
    gap: 2rem;
  }

  .discount___container {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    align-items: center;
    column-gap: 3rem;
    padding: 3rem 0;
    border-radius: 3rem;
  }
  .discount___img {
    width: 350px;
    order: -1;
  }
  .discount___data {
    padding-right: 6rem;
  }

  .footer___container {
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    column-gap: 1rem;
  }
}

/* large devices */
@media screen and (min-width: 992px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }

  .section___title {
    font-size: var(--h1-font-size);
    margin-bottom: 3rem;
  }

  .star___container {
    column-gap: 7rem;
  }
  .star___img {
    width: 350px;
  }
  .star___description {
    padding-right: 2rem;
  }

  .component___container {
    gap: 3.5rem;
  }
  .component___content {
    border-radius: 1.5rem;
  }
  .component___img {
    width: 110px;
  }
  .component___title {
    font-size: var(--h3-font-size);
  }

  .discount___container {
    column-gap: 7rem;
  }

  .new___content {
    width: 310px;
    border-radius: 1rem;
    padding: 2rem 0;
  }
  .new___img {
    width: 150px;
  }
  .new___img {
    margin-bottom: var(--mb-1);
  }
  .new___title {
    font-size: var(--h3-font-size);
  }

  .footer___copy {
    margin-top: 6rem;
  }
}

@media screen and (min-width: 1200px) {
  .swiper-pagination {
    margin-top: var(--mb-2-5);
  }
}
