nav a:hover {
  text-decoration: underline;
}

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

body {
  font-family: Arial, sans-serif;
  background-color: #f7f7f2;
  color: #2f3a2f;
  padding: 20px;
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

/* NAVBAR */
.navbar {
  width: 100%;
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  border: 2px solid #444;
  padding: 10px 15px;
  background-color: white;
  min-height: 60px;
}

.logo {
  border: 2px solid #666;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navLinks {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.navLinks a {
  text-decoration: none;
  color: black;
  font-size: 1.1rem;
}

.nav-icons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.nav-icons a {
  text-decoration: none;
  font-size: 1.2rem;
  color: black;
}

/* HERO */
.hero {
  display: grid;
  gap: 20px;
  border: 2px solid #444;
  padding: 40px 20px;
  background-color: white;
}

.hero-text {
  display: grid;
  gap: 15px;
  justify-items: center;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  text-transform: uppercase;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
}

.search {
  display: grid;
  grid-template-columns: 1fr 90px;
  width: 80%;
  max-width: 500px;
  border: 2px solid #444;
  border-radius: 25px;
  overflow: hidden;
}

.search input {
  border: none;
  padding: 12px;
  font-size: 1rem;
  outline: none;
}

.search button {
  border: none;
  background-color: #dce8d4;
  cursor: pointer;
}

.plantImg {
  min-height: 250px;
  border: 2px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #eef5ea;
}

/* BEST SELLERS */
.best-sellers {
  border: 2px solid #444;
  padding: 20px;
  background-color: white;
  display: grid;
  gap: 20px;
}

.best-sellers h2 {
  text-align: center;
  font-size: 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Updated for dynamically injected product cards from Search.js */
.product-cards {
  border: 2px solid #444;
  min-height: 220px;
  padding: 15px;
  display: flex; /* changed from grid for cleaner image/text/button stacking */
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background-color: #fafafa;
}

/* Added image styling for JSON-driven best seller cards */
.product-cards img {
  width: 100%;
  max-width: 180px;
  height: 180px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}

/* Added text styling to match new <p> tag in Search.js */
.product-cards p {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1rem;
}

.product-cards button {
  padding: 10px 16px;
  border: none;
  background-color: #7aa874;
  color: white;
  cursor: pointer;
}

/* Added hover state for new best seller buttons */
.product-cards button:hover {
  background-color: #678f62;
}

/* BOTTOM */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.info-box {
  border: 2px solid #444;
  min-height: 300px;
  padding: 20px;
  background-color: white;
}

.info-box h2 {
  text-align: center;
  font-size: 2rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .navbar {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 10px;
  }

  .navLinks {
    justify-content: center;
  }

  .nav-icons {
    justify-content: center;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .navLinks {
    flex-direction: column;
    gap: 10px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .search {
    width: 100%;
  }
}