/* static/marketplace.css */
* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box;
}

body {
  font-family: 'Courier New', Courier, monospace;
  background-color: rgb(234, 255, 221);
  color: black;
  line-height: 1.6;
}

/* Navbar - matching index.html style */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background-color: rgb(220, 255, 198);
  border-color: black;
  border-style: solid;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: black;
}

.nav-links {
  display: flex;
  gap: 15px;
}

.nav-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  border-radius: 4px;
  border: 2px solid black;
  background-color: transparent;
  cursor: pointer;
  transition: 0.3s;
}

.nav-btn:hover {
  background-color: rgb(201, 255, 167);
  color: rgb(0, 0, 0);
}

.logout-btn {
  background-color: rgb(255, 220, 220);
}

.logout-btn:hover {
  background-color: rgb(255, 180, 180);
}

/* Marketplace Container */
.marketplace-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

.marketplace-title {
  text-align: center;
  font-size: 42px;
  margin-bottom: 10px;
  font-weight: bold;
  color: #2c3e50;
}

.marketplace-subtitle {
  text-align: center;
  font-size: 18px;
  color: #555;
  margin-bottom: 30px;
}

/* Filter Section */
.filter-section {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  border: 2px solid black;
  background-color: transparent;
  color: black;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
  transition: all 0.3s;
  font-size: 15px;
  font-family: 'Courier New', Courier, monospace;
}

.filter-btn:hover {
  background-color: rgb(201, 255, 167);
}

.filter-btn.active {
  background-color: rgb(201, 255, 167);
  border-color: black;
}

/* Market Items Grid */
.market-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  justify-content: center;
  margin-top: 30px;
}

.item-card {
  border: 2px solid black;
  border-radius: 10px;
  padding: 0;
  text-align: center;
  transition: all 0.3s;
  background-color: white;
  overflow: hidden;
  position: relative;
}

.item-card:hover {
  transform: translateY(-5px);
  box-shadow: 4px 4px 0px black;
}

.item-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 14px;
  border-radius: 4px;
  border: 2px solid black;
  font-size: 11px;
  font-weight: bold;
  z-index: 10;
  letter-spacing: 0.5px;
  font-family: 'Courier New', Courier, monospace;
}

.seeds-badge {
  background-color: rgb(144, 238, 144);
  color: black;
}

.fertilizer-badge {
  background-color: rgb(255, 218, 185);
  color: black;
}

.pesticide-badge {
  background-color: rgb(255, 182, 193);
  color: black;
}

.item-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 2px solid black;
}

.item-card h4 {
  margin: 15px 15px 8px;
  font-size: 20px;
  color: #2c3e50;
  font-weight: bold;
}

.item-desc {
  font-size: 14px;
  color: #555;
  margin: 0 15px 8px;
  min-height: 40px;
}

.item-weight {
  font-size: 13px;
  color: #777;
  margin: 0 15px 10px;
  font-weight: bold;
}

.item-price {
  font-size: 24px;
  font-weight: bold;
  color: #27ae60;
  margin: 10px 15px 15px;
}

.buy-btn {
  margin: 0 15px 20px;
  padding: 10px 30px;
  border: 2px solid black;
  background: transparent;
  color: black;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
  transition: all 0.3s;
  font-size: 15px;
  width: calc(100% - 30px);
  font-family: 'Courier New', Courier, monospace;
}

.buy-btn:hover {
  background-color: rgb(201, 255, 167);
}

/* Responsive Design */
@media (max-width: 768px) {
  .marketplace-title {
    font-size: 32px;
  }
  
  .marketplace-subtitle {
    font-size: 16px;
  }
  
  .market-items {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .filter-section {
    gap: 10px;
  }
  
  .filter-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .navbar {
    padding: 10px 20px;
  }
  
  .logo {
    font-size: 20px;
  }
  
  .nav-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .market-items {
    grid-template-columns: 1fr;
  }
  
  .marketplace-title {
    font-size: 28px;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 8px;
  }
}