* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  background-color: #f7fdf4;
  color: #2c3e50;
  padding: 1rem;
}

img {
  vertical-align: middle;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* HEADER */
header {
  text-align: center;
  padding: 1.5rem 1rem;
  background-color: #dff0d8;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  font-size: 2rem;
  color: #3c763d;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

header p {
  font-size: 1rem;
  color: #4a4a4a;
  margin-top: 0.5rem;
}

h1 img {
  width: 60px;
  height: 60px;
}

/* SEARCH SECTION */
.search-section {
  text-align: center;
  margin-bottom: 1rem;
  position: sticky;
}
#searchInput {
  width: 80%;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.search-btn {
  background-color: transparent;
  border: none;
  cursor: pointer;
}
.search-btn img {
  width: 30px;
  height: 30px;
}

/* FILTER BUTTONS */
.filter-section {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-btn {
  background-color: #3c763d;
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.3s ease;
}
.filter-btn:hover {
  background-color: #636B2F;
}

/* TABS */
.browse-section {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  gap: 1rem;
}
.tab-btn, .browse-btn {
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  border: 2px solid #3c763d;
  background-color: transparent;
  color: #3c763d;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* TAB CONTENT */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* HEADINGS */
main h2 {
  margin: 1rem 0 0.5rem;
  font-size: 1.4rem;
  color: #388e3c;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* CARD CONTAINER */
.card-container {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 2rem;
  justify-items: center;
}

/* CARD STYLES */
.produce-card,
.cart-card {
  background-color: #ffffff;
  width: 100%;
  max-width: 290px;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s ease;
}
.produce-card:hover {
  transform: scale(1.02);
}

/* CARD CONTENT */
.produce-card img,
.cart-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.card-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: #2e7d32;
  text-align: center;
}
.card-price {
  font-size: 0.9rem;
  color: #777;
  text-align: center;
}

.card-actions {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
.add-to-cart-btn {
  background-color: orange;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Edit/Delete Buttons */
.card-del-edit {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}
.delete-btn {
  background-color: #e53935;
  color: #fff;
  border: none;
  height: 30px;
  width: 120px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.delete-btn:hover {
  background-color: #c62828;
}
.edit-btn {
  background-color: #3c763d;
  color: #fff;
  border: none;
  font-size: 1rem;
  height: 30px;
  width: 120px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.edit-btn:hover {
  background-color: #636B2F;
}

/* Quantity Input */
.quantity-section {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
  gap: 5px;
  justify-content: center;
}
.quantity-section label {
  font-size: 1rem;
  color: #555;
}
.qty-input {
  width: 50px;
  height: 30px;
  padding: 0.4rem;
  font-size: 1rem;
  border: 1px solid grey;
  border-radius: 6px;
}
.bought-btn {
  background-color: #F4BB44;
  color: #fff;
  height: 30px;
  width: 90px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.bought-btn:hover {
  background-color: #f57c00;
}

/* Checkout Button */
#checkoutBtn {
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* FOOTER */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: #757575;
  border-top: 1px solid #e0e0e0;
  padding: 1rem;
  margin-top: 3rem;
}
