* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  outline: none;
  list-style: none;
}

body {
  font-family: cairo, sans-serif;
  width: 100%;
  overflow-x: hidden;
}

header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 10%;
  background: #0e3356;
  position: fixed;
  z-index: 1000;
}
::-webkit-scrollbar {
  width: 0.6rem;
}
::-webkit-scrollbar-track {
  background: #ebebeb;
}
::-webkit-scrollbar-thumb {
  background: #0e3356;
}

.logo {
  color: #fff;
  font-size: 25px;
}

.menu_links li {
  display: inline-block;
  margin: 0 1rem;
}

#user_info li a:nth-child(1),
.menu_links li a {
  color: #0e3356;
  width: 80px;
  display: inline-block;
  text-align: center;
  background: #fff;
  border-radius: 1px;
  font-size: 15px;
  font-weight: 600;
  transition: 0.2s;
}

#user_info li a:nth-child(1):hover,
.menu_links li a:hover {
  background: #045eb1;
  color: #fff;
}

/* ================== FORM ==================== */
.section-form {
  width: 100%;
  /* height: calc(100vh - 64px); */
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-form form {
  padding: 1.5rem;
  background-color: #ccc;
  border-radius: 5px;
  width: 470px;
}

.form_title {
  text-align: center;
  color: #0e3356;
  margin-bottom: 1rem;
}

.section-form form input {
  font-family: cairo, sans-serif;
  display: block;
  width: 100%;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  border: 2px solid #999;
  transition: 0.2s;
  font-size: 18px;
}

.section-form form input:focus {
  border-color: #0e3356;
}

.section-form form input[type="submit"] {
  cursor: pointer;
  width: 70%;
  padding: 0.2rem 0;
  margin: auto;
  margin-top: 1.5rem;
  background-color: #0e3356;
  color: #fff;
  font-weight: bold;
  border: none;
  transition: 0.2s;
}

.section-form form input[type="submit"]:hover {
  background-color: #045eb1;
}

.section-form form .account {
  display: block;
  margin-top: 1rem;
}

.section-form form .account a:hover {
  text-decoration: underline;
}

/* HOME PAGE */
#user_info {
  display: none;
  align-items: center;
  justify-content: space-between;
}

#user_info li {
  display: inline-block;
  margin: 0 1rem;
}

#user_info i {
  color: #fff;
}

#user_info #user {
  color: #fff;
  font-size: 19px;
  font-weight: bold;
  margin-left: 0.4rem;
}
.favorite_cart,
#user_info .shopping_cart {
  position: relative;
}
.favorite_cart:hover,
#user_info .shopping_cart:hover {
  cursor: pointer;
}

.num_of_fav,
#user_info .shopping_cart .num_of_products {
  position: absolute;
  top: 0;
  right: -1rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f00;
  color: #fff;
  font-size: 12px;
  display: none;
}

.products_fav_list,
.products_list {
  position: absolute;
  top: 100%;
  right: 0;
  width: 450px;
  max-height: 70vh;
  background-color: rgba(10, 10, 10, 0.734);
  overflow-y: auto;
  padding: 1rem;
  z-index: 100;
  transform: translateX(100%);
  transition: 0.3s;
}
.products_fav_list.active,
.products_list.active {
  transform: translateX(0%);
}

.product_item {
  border-radius: 3px;
  background: #ffffff;
  display: flex;
  padding: 0.5rem;
  align-items: center;
  margin: 1rem 0;
  justify-content: space-around;
  border: 3px solid transparent;
  transition: 0.2s;
}
.product_item:hover {
  border-color: #045eb1;
}
.product_item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
}

.product_item .product_info {
  color: #0e3356;
}

.product_item .remove {
  padding: 0.5rem 1rem;
  border: none;
  background: #f00;
  color: #fff;
  border-radius: 2px;
  cursor: pointer;
  transition: 0.3s;
}

.product_item .remove:hover {
  background-color: #e45134;
}

.viewAllProducts {
  display: block;
  text-align: center;
  margin: 0.5rem 0;
  background-color: #7aa736;
  padding: 0.5rem;
  color: #fff;
  border-radius: 3px;
  transition: 0.2s;
}

.viewAllProducts:hover {
  background: green;
}

section {
  min-height: 100vh;
  padding: 6rem 0;
}

.home .container {
  width: 85%;
  margin: auto;
}

#search {
  width: 100%;
  display: block;
  margin: 1rem auto;
  padding: 0.4rem 1rem;
  font-size: 16px;
  font-family: cairo, sans-serif;
  border: 2px solid #ccc;
  border-radius: 4px;
}

#search:focus {
  border-color: #0e3356;
}

.home .container .products {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.product-item {
  border: 2px solid #ccc;
  border-radius: 4px;
  padding: 1rem;
  overflow: hidden;
}

.product_item_img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: 0.3s;
}

.product-item:hover .product_item_img {
  transform: scale(1.1);
}

.product_item_desc {
  margin-top: 5px;
  border-top: 2px solid #ccc;
}

.product_item_desc h2 {
  text-align: center;
}
.product_item_desc h2 a {
  color: #0e3356;
  cursor: pointer;
  text-transform: uppercase;
}
.product_item_desc h2 a:hover {
  text-decoration: underline;
}
.product_item_desc h2 span {
  color: #045eb1;
  font-size: 18px;
}
.product_item_desc p {
  color: #555;
}
.product_item_desc > span {
  display: block;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  color: #0e3356;
}

.product_item_action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.6rem 0;
}

.btn {
  padding: 0.7rem 1rem;
  cursor: pointer;
  border: none;
  border-radius: 3px;
  color: #fff;
  transition: 0.2s;
  background: green;
}
.btn i {
  margin-left: 0.7rem;
}

.btn.remove_from_cart {
  background: #f00;
  margin: auto;
}

.btn:hover {
  background: #7aa736;
}
.btn.remove_from_cart:hover {
  background-color: #e45134;
}

.fa-heart {
  width: 3rem;
  height: 2rem;
  background-color: #0e3356;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.fa-heart:hover {
  background-color: #e45134;
}

.footer {
  text-align: center;
  padding: 1rem 0;
  background: #0e3356;
  color: #fff;
}

.footer p {
  font-size: 1.3rem;
}

.footer p a {
  color: #7aa736;
}

.footer p a:hover {
  color: #e45134;
}

.create_product {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  font-size: 1.2rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0e3356;
  border-radius: 50%;
  color: #fff;
  transition: 0.2s;
  border-bottom: 2px solid #fff;
  box-shadow: 0 0.5rem 1rem rgba(9, 50, 88, 0.54);
}

.create_product:hover {
  background-color: #7aa736;
}

/* media query */

@media (max-width: 660px) {
  header {
    display: block;
    text-align: center;
    padding: 0.5rem 0;
  }
  .logo {
    display: block;
    margin-bottom: 1rem;
  }
  section {
    padding: 9rem 0;
  }
  .products_fav_list,
  .products_list {
    width: 100%;
  }

  #user_info {
    padding: 0 0.6rem;
  }

  #user_info li {
    margin: 0 0.5rem;
  }
  .footer p {
    font-size: 1rem;
  }
  .no_products {
    font-size: 0.76rem;
  }
  #user_info #user {
    font-size: 1rem;
  }
  .product_item_desc h2 a {
    font-size: 1.2rem;
  }
  .product_item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
  }

  .product_info h3 {
    font-size: 1rem;
  }
  .product_item .remove,
  .product_info p {
    font-size: 0.7rem;
  }
  .viewAllProducts {
    font-size: 0.8rem;
  }

  .section-form form {
    width: 100%;
    height: 100%;
  }

  .section-form form input {
    margin-bottom: 2rem;
  }
}
