/* General styling */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background-color: #8B614B;
  color: white;
  position: relative;
  z-index: 1;
}

.logo {
  width: 100px;
  height: auto;
}

/* Styling the search box */
.search-container {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.search-box {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.search-button {
  padding: 8px 12px;
  margin-left: 8px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.search-button:hover {
  background-color: #555;
}

/* Product grid container */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Four columns for larger screens */
  gap: 20px;
  margin: 20px;
  padding: 10px;
  text-align: center; /* Alternate to justify-items */
}

/* Individual product styling */
.amazon-link {
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  background-color: #f9f9f9;
  width: auto;
}

.amazon-product-image {
  max-width: 150px; /* Avoid overfitting */
  height: auto;
  object-fit: contain; /* Maintain aspect ratio */
  border: 1px solid #ccc;
  border-radius: 8px;
}


.amazon-link p {
  font-size: 16px;
  margin-top: 5px;
}

.amazon-link a {
  color: #1A73E8;
  text-decoration: none;
}

.amazon-link a:hover {
  text-decoration: underline;
}

/* Footer styling */
footer {
  text-align: center;
  padding: 10px;
  background-color: #8B614B;
  color: white;
}

/* Highlight search term */
.highlight {
  background-color: yellow;
  color: black;
  font-weight: bold;
}

/* Responsive Design for Tablets */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
  }
}

/* Responsive Design for Mobile Devices (2x2 grid) */
@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for phones */
  }

  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .search-box,
  .search-button {
    width: 100%;
    margin: 5px 0;
  }
}
