/**
 * ! Changing default styles of the browser
 **/

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;

  color: #070000;
}
body {
  background-image: url(../images/bg11.png);
  background-size: cover;
  background-position: center;
  background-repeat: repeat;
  height: 100vh;
  margin: 0;
  padding: 0;
}

i {
  cursor: pointer;
}

a {
  text-decoration: none;
  color: rgb(17, 2, 2);
}

/**
 * ! Navbar STyles are here
 **/
.navbar {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background-image: url("images/logo2.png");
  color: black;
  font-family: Georgia, "Times New Roman", Times, serif;
  padding: 25px 60px;
  margin-bottom: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000; /* Ensures the navbar is on top of other content */
}

.navbar img {
  width: 133px;
  height: fit-content;
  margin-right: 10px;
  border-radius: 49%;
}

.cart {
  position: relative;
  background-color: #fff;
  color: #212529;
  font-size: 30px;
  padding: 10px 15px;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.cart:hover {
  background-color: #212529;
  color: white;
}

.cartAmount {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 16px;
  background-color: red;
  color: white;
  padding: 5px;
  border-radius: 50%;
}

/**
 * ! Shop items styles are here
 **/

.shop {
  display: grid;
  grid-template-columns: repeat(4, 223px);
  gap: 30px;
  justify-content: center;
}
.searchbar {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

#searchBar {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-right: 10px;
  width: 300px; /* Adjust width as needed */
  font-size: 16px;
}

.fa-magnifying-glass {
  font-size: 20px;
  color: #777;
  cursor: pointer;
}

/* Product item styles */
.item {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Ensure content fills nicely */
  align-items: center;
  width: 250px; /* Fixed width */
  height: 400px; /* Fixed height */
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s, background-color 0.3s;
  background-color: rgb(226, 14, 14);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin: 10px;
  padding: 10px;
}

.item img {
  width: 100%;
  height: 200px;
  object-fit: cover; /* Image will not overflow */
}

.item h2 {
  font-size: 20px;
  text-align: center;
  margin: 10px 0 5px 0;
}

.item p {
  font-size: 14px;
  text-align: center;
  color: #555;
  margin: 5px 0;
}

.item:hover {
  border-color: #0ce90cb8;
  background-color: #f8f9fa;
}

.product-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.details {
  padding: 20px;
  text-align: center;
}
h2 {
  font-family: "Playwrite IT Moderna", cursive;
  font-optical-sizing: auto;
  font-weight: weight;
  font-style: normal;
}
h3 {
  margin: 0;
  font-size: 18px;
  margin-bottom: 5px;
  color: #3dbc1a;
  font-family: "Playwrite DE Grund", cursive;
  font-optical-sizing: auto;
  font-weight: weight;
  font-style: normal;
}

p {
  margin: 0;
  color: #050505;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.price-quantity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

button {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

/* Responsive styles */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    padding: 10px;
  }

  .searchbar {
    margin-bottom: 10px;
  }

  .cart {
    margin-top: 10px;
  }

  .shop {
    grid-template-columns: repeat(2, 223px);
  }
}

@media (max-width: 500px) {
  .shop {
    grid-template-columns: repeat(1, 223px);
  }

  #searchBar {
    width: 100%;
  }
}

@media (max-width: 1000px) {
  .shop {
    grid-template-columns: repeat(2, 223px);
  }
}

@media (max-width: 500px) {
  .shop {
    grid-template-columns: repeat(1, 223px);
  }
}

.item {
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s, background-color 0.3s;
  background-color: white;
  box-shadow: 0 2px 5px rgba(8, 189, 11, 0.1);
}

.item:hover {
  border-color: #343a40;
  background-color: #f8f9fa;
}

.details {
  padding: 20px;
  text-align: center;
}

.price-quantity {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
  font-size: 16px;
}

.bi-dash-lg {
  color: red;
}

.bi-plus-lg {
  color: green;
}

/**
 * ! style rules for label and some buttons
 **/

.text-center {
  text-align: center;
  margin-bottom: 20px;
}

.HomeBtn,
.checkout,
.removeAll {
  background-color: #212529;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 3px;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.3s;
}

.HomeBtn:hover,
.checkout:hover,
.removeAll:hover {
  background-color: #343a40;
}

.checkout {
  background-color: #28a745;
}

.removeAll {
  background-color: #dc3545;
}

.bi-x-lg {
  color: red;
  font-weight: bold;
}

/**
 * ! style rules for shopping-cart
 **/

.shopping-cart {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

/**
 * ! style rules for cart-item
 **/

.cart-item {
  width: 300px;
  border: 2px solid #212529;
  border-radius: 5px;
  display: flex;
  transition: border-color 0.3s;
}

.cart-item:hover {
  border-color: #343a40;
}

.title-price-x {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
}

.title-price {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-item-price {
  background-color: #212529;
  color: white;
  border-radius: 4px;
  padding: 3px 6px;
}

/* 3D Effect on Cart */
.cart-item:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));
  transform: scaleY(0);
  transition: transform 0.3s;
  z-index: -1;
}

.cart-item:hover:before {
  transform: scaleY(1);
}
