
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
  height: 100%;
}

body {
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

.view {
  width: 100%;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.active {
  display: block;
}


#landing {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: #f0f7f4;
  padding: 20px;
}

.landing-content {
  max-width: 600px;
  width: 100%;
}

#landing h1 {
  font-size: 2.5rem;
  color: #2e7d32;
  margin-bottom: 15px;
}

.tagline {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 30px;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}


#farmer-view,
#buyer-view {
  padding: 0;
}

.dashboard-container {
  max-width: 1000px;
  margin: 0 auto;
  background-color: white;
  padding: 0 20px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dashboard-header {
  padding: 15px 0;
  margin: 0;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  border-bottom: 1px solid #eee;
}

.back-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 1rem;
  cursor: pointer;
  padding: 5px 0;
}

.back-btn:hover {
  color: #333;
}


.btn {
  padding: 12px 24px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.farmer-btn {
  background-color: #388e3c;
  color: white;
}

.buyer-btn {
  background-color: #1976d2;
  color: white;
}

.primary-btn {
  background-color: #388e3c;
  color: white;
}

.edit-btn {
  background-color: #ffc107;
  color: #333;
}

.delete-btn {
  background-color: #dc3545;
  color: white;
}

.add-to-cart {
  background-color: #1976d2;
  color: white;
  width: 100%;
}

.payment-btn {
  background-color: #4CAF50;
  color: white;
  width: 100%;
  margin-top: 15px;
}


#add-product-form {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin: 15px 0;
}

#add-product-form h3 {
  margin-bottom: 15px;
}

#add-product-form input,
#add-product-form select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}


.products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.product-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #eee;
}

.product-card h3 {
  margin-bottom: 5px;
  color: #2e7d32;
}

.price {
  color: #388e3c;
  font-weight: bold;
  margin-bottom: 5px;
}

.category {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.product-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}


.search-box {
  margin: 15px 0;
}

#search {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}


.seasonal-calendar {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.calendar-months {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.calendar-months button {
  padding: 8px 15px;
  background: #f0f0f0;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.9rem;
}

.calendar-months button.active {
  background: #388e3c;
  color: white;
}

.seasonal-crops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.seasonal-crop {
  background: #f0f7f4;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  font-size: 0.9rem;
}


.cart {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

#cart-items {
  list-style: none;
  margin: 15px 0;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.cart-item-name {
  flex: 2;
  padding-right: 15px;
}

.cart-item-price {
  flex: 1;
  text-align: right;
  padding: 0 15px;
  font-weight: bold;
  color: #388e3c;
}

.remove-from-cart {
  color: #dc3545;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.remove-from-cart:hover {
  text-decoration: underline;
}

#cart-total {
  font-weight: bold;
  color: #388e3c;
  font-size: 1.2rem;
}


.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  padding: 25px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  position: relative;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  background: none;
  border: none;
}

.close-btn:hover {
  color: #333;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}


.empty-message {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 20px;
  grid-column: 1 / -1;
}


@media (max-width: 768px) {
  .buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .products-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .dashboard-container {
    padding: 0 15px 15px;
  }
}

@media (max-width: 480px) {
  #landing h1 {
    font-size: 2rem;
  }
  
  .product-card {
    padding: 12px;
  }
  
  .btn {
    padding: 10px 20px;
  }
}