#productspage,
#cartpage {
  display: none;
  transition: all 0.3s ease;
}

#navbar {
  background: #092635;
  border-bottom: 1px solid grey;
  position: sticky;
  width: 100%;
  top: 0;
  transition: top 0.3s;
  z-index: 1000;
}

.products-title {
  text-align: center;
  font-size: 30px;
  font-weight: 600;
  margin-top: 20px;
}

.products-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  transition: all 0.3s ease;
}

.categories {
  display: flex;
  gap: 10px;
  transition: all 0.3s ease;
}

.categories input[type="button"]:focus {
  background: #1b4242;
  color: #f2f2f2;
}

.user-profile,
.view-cart,
.adminbutton,
.themechanger {
  padding: 8px 10px;
  color: #f2f2f2;
  border-radius: 100px;
  background-color: #5c8374;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.user-profile:hover,
.view-cart:hover,
.adminbutton:hover,
.themechanger:hover {
  background: #1b4242;
  color: #f2f2f2;
  scale: 1.1;
}

.adminbutton {
  display: none;
}

.user-name {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.user-name p {
  font-weight: 500;
}

.user-details {
  margin-left: 20px;
  display: none;
  transition: all 0.3s ease;
  align-items: center;
}

.details {
  display: flex;
  gap: 10px;
  /* margin-bottom: 10px; */
  transition: all 0.3s ease;
}

.change-password {
  display: flex;
  gap: 10px;
  transition: all 0.3s ease;
}

.password-input {
  display: none;
  gap: 10px;
}

#cards-container {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 20px;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.product-card {
  border-radius: 15px;
  /* padding: 10px; */
  background-color: #5c8374;
  display: flex;
  /* gap: 10px; */
  transition: all 0.3s ease;
}

.product-image {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  gap: 10px;
}

.product-image img {
  max-width: 200px;
  border-radius: 15px;
  /* margin: 10px; */
}

.product-details {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  width: 100%;
  border-radius: 15px;
  background-color: #9ec8b9;
  color: #092635;
}

#product-name {
  font-size: 25px;
  font-weight: 700;
}
#product-description {
  font-size: 15px;
  font-weight: 400;
}
#product-price {
  font-size: 20px;
  font-weight: 700;
}
#product-category {
  font-size: 10px;
  font-weight: 500;
  padding: 5px;
  border-radius: 5px;
  background-color: #1b4242;
  max-width: 100px;
  color: #f2f2f2;
}

.product-card input[type="button"] {
  background-color: #1b4242;
  transition: all 0.3s ease;
}
.product-card input[type="button"]:hover {
  background-color: #5c8374;
}

.logout {
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.addedtocart {
  display: none;
  padding: 10px;
  border-radius: 10px;
  background-color: red;
  font-size: 15px;
  font-weight: 500;
  color: #092635;
  position: relative;
  z-index: 2;
}

.addedtocart::after {
  content: "";
  position: absolute;
  padding: 10px;
  background-color: red;
  top: -20%;
  left: 50%;
  z-index: -1;
  transform: translate(-50%, 0) rotate(45deg);
}

.tooltip {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  padding: 5px;
  background-color: black;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.view-cart:hover .tooltip {
  display: block;
}

.adminbutton:hover .tooltip {
  display: block;
}

.themechanger:hover .tooltip {
  display: block;
}

.user-profile:hover .tooltip {
  display: block;
}

#cartitems {
  display: none;
  padding: 2px 8px;
  border-radius: 100px;
  background-color: red;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: -45%;
  right: 10%;
  transform: translate(50%, 50%);
  transition: all 0.3s ease;
}

@media screen and (max-width: 767px) {
  .products-nav {
    display: grid;
    grid-template-columns: repeat(4, auto);
    padding: 5px;
    gap: 15px;
    transition: all 0.3s ease;
  }

  .user-name {
    grid-column: span 4;
  }

  .user-details {
    padding: 10px;
    background: #1b4242;
    border-radius: 20px;
    margin: 10px;
    top: 110px;
  }

  .password-input {
    flex-direction: column;
  }

  .details {
    flex-direction: column;
  }

  .change-password {
    justify-content: center;
    margin-top: 10px;
  }

  .categories {
    grid-column: span 4;
    overflow-x: scroll;
  }

  .view-cart,
  .adminbutton,
  .themechanger {
    justify-self: center;
  }

  #cards-container {
    grid-template-columns: auto;
    padding: 10px;
    margin-top: 10px;
  }

  .product-card {
    flex-direction: column;
  }

  .product-image {
    align-items: center;
  }

  .product-details {
    height: 100%;
  }
}
