header {
  background-color: #ff7919;
  color: #fff;
  padding: 10px;
  text-align: center;
}

#products {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 5px;
  user-select: none;
}

.product {
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  background-color: #fff;
  text-align: center;
  cursor: pointer;
  width: 150px;
  height: auto;
  margin: 0 20px 20px 0;
}

.product:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.product img {
  margin-top: 5%;
  max-width: 100%;
  height: auto;
  border-bottom: 1px solid #ddd;
  max-height: 120px;
}

.product-details {
  padding: 5px;
  display: flex;
  flex-direction: column;
  align-items: left;
}

.product-name-and-id {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.product-name {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 5px;
}

.product-id {
  color: #777;
  margin-bottom: 3px;
}

.product-price {
  font-size: 16px;
  color: #4CAF50;
}

#searchInput {
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  outline: none;
  width: 300px;
  transition: all 0.3s ease;
}

#searchInput:focus {
  border-color: #ff7b00;
  box-shadow: 0 0 5px rgba(255, 123, 0, 0.5);
}

/* Add this CSS to style the product details layout */
.product-details-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.product-images {
  overflow-x: auto; /* Enable horizontal scrolling */
  white-space: nowrap; /* Prevent images from wrapping to the next line */
}

.product-images img {
  max-width: 20%;
  height: auto;
  margin-right: 10px; /* Adjust spacing between images */
}

.product-info {
  width: 100%;
  padding: 10px; /* Adjust the width of the product information container */
}

.line {
  display: flex;
  align-items: center;
}

.line h2 {
  margin-right: 5px; /* Add right margin */
}

.buy-now-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #FE6902; /* Change the background color as needed */
  color: #fff; /* Text color */
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.buy-now-btn:hover {
  background-color: #b66831; /* Change the hover background color as needed */
}

/* Modal styles */
.shareModal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
  overflow: auto;
}

/* Modal content styles */
.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  margin-top: 25%;
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Set the width of the modal */
  max-width: 500px; /* Maximum width of the modal */
  border-radius: 8px;
  position: relative;
}

/* Close button styles */
.close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  cursor: pointer;
  color: #aaa;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

/* Share icons styles */
.modal-content p {
  font-size: 18px;
  margin-bottom: 20px;
}

.modal-content i {
  font-size: 24px;
  margin-right: 10px;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  /* Adjust styles for smaller screens */
  .product-details-content {
    flex-direction: column; /* Change flex direction to column for smaller screens */
  }

  .product-images {
    overflow-x: auto; /* Hide horizontal scrollbar on smaller screens */
    white-space: nowrap; /* Allow images to wrap to the next line */
  }

  .product-images img {
    max-width: 100%; /* Make images take full width on smaller screens */
    margin-right: 10px; /* Remove right margin on smaller screens */
    margin-bottom: 10px; /* Add bottom margin for spacing */
  }

  .modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    margin-top: 50%;
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Set the width of the modal */
    max-width: 500px; /* Maximum width of the modal */
    border-radius: 8px;
    position: relative;
  }
}