* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #000;
  overflow-x: hidden;
}

/* Header section */

header {
  width: 100%;
  max-width: 100%;
  padding-left: 100px;
  height: 50px;
  display: flex;
  align-items: center;
  position: fixed;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.5);
  top: 0;
}

header nav a {
  color: #fff;
  margin-right: 5px;
  padding: 5px 10px;
  font-size: 16px;
  transition: 0.2s;
  text-decoration: none;
}

a.active {
  background: #14ff72cb;
  border-radius: 2px;
}

a:hover {
  background: #14ff72cb;
  border-radius: 2px;
}

@media screen and (max-width: 690px) {
  header {
    padding-left: 5px;
  }
  header nav a {
    font-size: 14px;
    margin-right: 0;
  }
}

/* Header section */

/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100..900&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: #14ff72cb;
  --first-color-alt: #14ff72cb;
  --title-color: hsl(0, 22%, 93%);
  --text-color: hsl(5, 8%, 35%);
  --white-color: hsl(0, 0%, 100%);
  --body-color: hsl(0, 4%, 11%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Montserrat", sans-serif;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: 0.938rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-semi-bold: 600;
  --font-bold: 700;

  /*========== z index ==========*/
  --z-normal: 1;
  --z-modal: 1000;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
  }
}

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

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
} */

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

/*=============== CARD ===============*/
.products .container {
  margin-inline: 1.5rem;
  padding-block: 5rem;
}

.products .container__title {
  font-size: var(--h1-font-size);
  text-align: center;
  color: #fff;
  margin-bottom: 3rem;
}

.products .card__container {
  display: grid;
  grid-template-columns: 1fr;
  justify-content: center;
  gap: 2rem;
}

.products .card__product {
  background-color: var(--body-color);
  border: 2px solid #bfbfbf;
  padding-block: 1.25rem;
  text-align: center;
  display: grid;
  row-gap: 1.5rem;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 1);
}

.products .card__img {
  width: 90%;
  justify-self: center;
  filter: drop-shadow(0 8px 16px hsla(10, 37%, 97%, 0.2));
  transition: transform 0.3s;
  box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 1);
}

.products .card__name {
  font-size: var(--h2-font-size);
  color: var(--title-color);
  margin-bottom: 0.5rem;
}

.products .card__price {
  font-size: var(--h2-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
}

.products .card__product:hover .card__img {
  transform: scale(1.1);
}

/*=============== POPUP MODAL ===============*/
.products .modal {
  position: fixed;
  inset: 0;
  background-color: hsla(5, 90%, 4%, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(24px);
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: var(--z-modal);
  transition: opacity 0.4s, visibility 0.4s;
}

.products .modal__card {
  position: relative;
  background-color: var(--body-color);
  padding: 0;
  display: grid;
  row-gap: 1.5rem;
  text-align: center;
  transform: rotateX(90deg);
  transition: transform 0.6s;
}

.products .modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  z-index: 1000;
  background-color: #000;
}

.products .modal__img {
  width: 100%;
  justify-self: center;
  filter: drop-shadow(0 8px 16px hsla(5, 90%, 4%, 0.2));
}

.products .modal__name {
  font-size: var(--h2-font-size);
  color: var(--title-color);
  margin-bottom: 0.5rem;
}

.modal__info {
  margin-bottom: 1rem;
  color: #fff;
}

.modal__info i {
  font-size: 36px;
  color: #555353;
  position: relative;
  top: 30px;
}

.products .modal__price {
  font-size: var(--h2-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--first-color);
}

.products .modal__buttons {
  display: flex;
  gap: 0.5rem;
}

.products .modal__button {
  flex-grow: 1;
  outline: none;
  border: none;
  background-color: var(--first-color);
  padding-block: 1rem;
  color: var(--white-color);
  font: var(--font-semi-bold) var(--normal-font-size) var(--body-font);
  cursor: pointer;
  transition: background-color 0.4s;
}

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

.products .modal__button-ghost {
  background-color: var(--body-color);
  color: var(--title-color);
  border: 3px solid var(--first-color);
}

.products .modal__button-ghost:hover {
  background-color: var(--body-color);
}

/* Active modal */
.products .active-modal {
  opacity: 1;
  visibility: visible;
  pointer-events: initial;
}

.products .active-modal .modal__card {
  transform: rotateX(0);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 300px) {
  .products .container {
    margin-inline: 1rem;
  }

  .products .modal {
    padding-inline: 1rem;
  }
  .products .modal__buttons {
    flex-direction: column;
  }
}

/* For medium devices */
@media screen and (min-width: 540px) {
  .products .card__container {
    grid-template-columns: 330px;
  }

  .products .modal__card {
    max-width: 100%;
    padding: 0;
  }
}

@media screen and (min-width: 768px) {
  .products .card__container {
    grid-template-columns: repeat(2, 330px);
  }
  .products .modal__card {
    max-width: 600px;
    padding: 0;
  }
}

/* For large devices */
@media screen and (min-width: 1150px) {
  .products .container__title {
    margin-bottom: 4.5rem;
  }

  .products .card__container {
    grid-template-columns: repeat(3, 330px);
    gap: 3rem;
  }
  .products .card__product {
    padding-block: 2rem;
  }
  .products .card__name,
  .products .card__price {
    font-size: var(--h3-font-size);
  }

  .products .modal__card {
    max-width: 600px;
    padding: 0;
  }
  .products .modal__name,
  .products .modal__price {
    font-size: var(--h3-font-size);
  }
  .products .modal__buttons {
    column-gap: 1rem;
  }
}
