* {
  font-family: Arial, Helvetica, sans-serif;


}

.product-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Default: 3 columns */
  gap: 10px;
  /* Spacing between grid items */
  width: 100%;
  /* Full width of its container */
  max-width: 1200px;
  /* Optional: limit max width for better layout */


}

@media (max-width: 900px) {
  .product-container {
    grid-template-columns: repeat(3, 1fr);
    /* 2x3 grid */

  }
}

/* For small screens (e.g., mobile phones) */
@media (max-width: 600px) {
  .product-container {
    grid-template-columns: repeat(2, 1fr);
    /* 1x6 grid */

  }
}

.product {
  padding: 5px;
  width: 100%;
  height: 450px;
  display: flex;
  /* Use flexbox for layout */
  flex-direction: column;
  /* Arrange items in a column */
  /* Center items horizontally */
  background-color: var(--background-color);
  transition: transform 0.3s, box-shadow 0.3s, border 0.3s;
  /* Smooth transition */
  cursor: pointer;
  /* Change cursor to a pointer */
  border-radius: 4%;
}

.product:hover {
  transform: translateY(-10px);
  /* Moves the element up */
  box-shadow: 0 4px 8px rgba(0, 51, 0, 0.3);
  /* Adds a subtle shadow */
  border: 2px solid #ccc;
  /* Adds a border */
}

.product img {
  max-width: 100%;
  width: 80%;
  height: 50%;
  padding-top: 10px;
  padding-bottom: 20px;
  margin: 0 auto 0 auto;
}

.product-name {
  margin: 0 var(--margin-s) 0 var(--margin-s);
  font-size: 18px;
}


.product-description {
  display: flex;
  color: #787676;
  margin: 0 var(--margin-s) 0 var(--margin-s);
  /* Add margin for spacing */
  font-weight: 500;
  font-size: 16px;
  height: 20%;
  text-align: left;
}

.priceNadd {
  display: flex;
  justify-content: space-around;
  width: 80%;
}

.product-price {
  font-weight: 600;
  font-size: 24px;
  margin-top: 14px;
  margin-left: var(--margin-s);
  color: #333;

}

.add-to-cart {
  margin-top: 10px;
  /* Adds space above the button */
  padding: 10px 10px;
  /* Adds padding for the button */
  background-color: var(--primary-color);
  /* Button color */
  color: white;
  /* Button text color */
  font-weight: 600;
  border: none;
  /* Remove border */
  cursor: pointer;
  /* Pointer on hover */
  transition: background-color 0.3s;
  /* Transition effect for hover */
}

.add-to-cart:hover {

  background-color: var(--secondary-color);
  transition: width 0.3s ease, right 0.3s ease;
}



#popup {
  display: none;
  /* Hide popup by default */
  position: fixed;
  /* Position it fixed to the viewport */
  top: 50%;
  /* Center vertically */
  left: 50%;
  /* Center horizontally */
  transform: translate(-50%, -50%);
  /* Offset the center point */
  background-color: white;
  /* Background color of the popup */
  border: 1px solid #ddd;
  /* Border for the popup */
  padding: 20px;
  /* Padding inside the popup */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  /* Shadow effect */
  z-index: 1000;
  /* Ensure it appears above other elements */
}

.popup-content {
  display: flex;
  /* Use flexbox for layout */
  flex-direction: column;
  /* Stack items vertically */
  align-items: center;
  /* Center items horizontally */
}

.popup-content p {
  margin: 10px 0;
  /* Add vertical spacing between buttons */
}

.popup-content button {
  margin: 10px 0;
  /* Add vertical spacing between buttons */
  padding: 10px 20px;
  /* Padding for the buttons */
  background-color: var(--secondary-color);
  /* Button background color */
  color: white;
  /* Button text color */
  border: none;
  /* Remove border */
  cursor: pointer;
  /* Pointer on hover */
  transition: background-color 0.3s;
  /* Transition for hover effect */
}

.popup-content button:hover {
  background-color: #45a049;
  /* Darken button on hover */
}