/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

body {
  background-color: #f9f9f9;
  color: #333;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4a6741;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 1.5rem;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
  padding: 0.5rem 0;
}

nav ul li a:hover,
nav ul li a.active {
  color: #4a6741;
  border-bottom: 2px solid #4a6741;
}

.logout-button {
  background-color: #4a6741;
  color: white !important;
  padding: 0.5rem 1rem !important;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.logout-button:hover {
  background-color: #3a5233;
  border-bottom: none !important;
}

/* Marketplace specific styles */
.marketplace-header {
  text-align: center;
  padding: 3rem 1rem;
  background-color: #f1f8e9;
}

.marketplace-header h1 {
  font-size: 2.5rem;
  color: #4a6741;
  margin-bottom: 1rem;
}

.marketplace-header p {
  font-size: 1.2rem;
  color: #666;
}

.filter-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-container {
  display: flex;
  flex: 2;
  margin-right: 1rem;
}

#search-input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  outline: none;
}

#search-button {
  background-color: #4a6741;
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  border-radius: 0 4px 4px 0;
  transition: background-color 0.3s;
}

#search-button:hover {
  background-color: #3a5233;
}

.category-filter,
.price-filter {
  flex: 1;
  margin: 0 0.5rem;
}

select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  background-color: white;
  cursor: pointer;
}

.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  padding: 0 5% 3rem;
}

.product-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card h3 {
  padding: 1rem 1rem 0.5rem;
  font-size: 1.2rem;
  color: #333;
}

.product-card p {
  padding: 0 1rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.add-to-cart-btn {
  margin: 1rem;
  padding: 0.8rem;
  background-color: #4a6741;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: auto;
}

.add-to-cart-btn:hover {
  background-color: #3a5233;
}

.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: #666;
}

footer {
  background-color: #333;
  color: white;
  padding: 2rem 5%;
  text-align: center;
}

.social-links {
  margin-bottom: 1rem;
}

.social-links a {
  color: white;
  font-size: 1.5rem;
  margin: 0 0.5rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: #4a6741;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container,
  .category-filter,
  .price-filter {
    margin: 0.5rem 0;
    width: 100%;
  }

  nav {
    flex-direction: column;
    padding: 1rem;
  }

  nav ul {
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  nav ul li {
    margin: 0.5rem;
  }

  .products-container {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

