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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Montserrat for headers with Lato fallback */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
}

header {
  border-bottom: 3px solid #2d5016;
  padding-bottom: 20px;
  margin-bottom: 40px;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

.header-content a {
	text-decoration: none;
}

.logo-link {
  flex-shrink: 0;
}

.logo {
  height: 80px;
  width: auto;
  display: block;
}

header h1 {
  color: #2d5016;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .logo {
    height: 60px;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
}

nav a {
  color: #2d5016;
  text-decoration: none;
  font-weight: 600;
}

.search-filter {
  margin-bottom: 30px;
}

.category-header {
  background: #766a60;
  color: white;
  text-align: center;
  padding: 20px;
  margin: 30px 0 20px 0;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#search {
  width: 100%;
  max-width: 400px;
  padding: 10px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 4px;
}

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

.plant-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s;
}

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

.plant-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.plant-card img,
.placeholder-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.plant-card h3 {
  padding: 15px;
  color: #2d5016;
}

.scientific-name {
  padding: 0 15px 15px;
  color: #666;
  /* font-size: 14px; */
}

.plant-category {
  display: inline-block;
  padding: 4px 12px;
  margin: 0 15px 15px;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  background: #766a60;
  color: white;
  text-decoration: none;
}

.plant-tag {
 text-decoration: none;
 color: gray;
}



.plant-detail {
  max-width: 800px;
}

.plant-detail img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

.plant-detail .placeholder-image {
  width: 100%;
  max-width: 600px;
  height: 400px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 120px;
}

.plant-detail section {
  margin: 30px 0;
}

.plant-detail h3 {
  color: #2d5016;
  margin-bottom: 10px;
}

.plant-detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
}

.botanical-info,
.culinary-info {
  min-height: 0; /* Prevents grid items from stretching */
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2d5016;
}

.section-header h2 {
  margin: 0;
  color: #2d5016;
}

/* Mobile responsive - stack columns */
@media (max-width: 768px) {
  .plant-detail-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.back-link {
  display: inline-block;
  margin-top: 30px;
  color: #2d5016;
  text-decoration: none;
  font-weight: 600;
}

footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
  text-align: center;
  color: #666;
}

/* Plant search functionality styles */
.floating-search-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #2d5016;
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: transform 0.2s, box-shadow 0.2s;
}

.floating-search-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.plant-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  z-index: 1001;
}

.search-modal {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.search-header {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

#plant-search {
  flex: 1;
  padding: 12px 16px;
  font-size: 18px;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
}

#plant-search:focus {
  border-color: #2d5016;
}

.close-search {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  margin-left: 12px;
  color: #666;
  border-radius: 4px;
}

.close-search:hover {
  background: #f0f0f0;
}

.search-results {
  max-height: 60vh;
  overflow-y: auto;
  padding: 0;
}

.search-result-item {
  border-bottom: 1px solid #eee;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item a {
  display: block;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s;
}

.search-result-item a:hover {
  background: #f8f8f8;
}

.search-result-item h4 {
  margin: 0 0 8px 0;
  color: #2d5016;
  font-size: 16px;
}

.search-result-item p {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 1.4;
}

.no-results {
  padding: 40px 20px;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .plant-search-overlay {
    padding-top: 5vh;
  }
  
  .search-modal {
    width: 95%;
    max-height: 85vh;
  }
  
  .search-header {
    padding: 15px;
  }
  
  #plant-search {
    font-size: 16px;
    padding: 10px 12px;
  }
  
  .floating-search-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
    bottom: 15px;
    right: 15px;
  }
}
