/* Strain Library Styles */
.strain-library {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.strain-library * {
  box-sizing: border-box;
}

/* Header */
.strain-library-header {
  text-align: center;
  margin-bottom: 40px;
}

.strain-library-header h2 {
  font-size: 36px;
  margin-bottom: 10px;
  color: #1a1a1a;
}

.strain-library-header p {
  font-size: 18px;
  color: #666;
}

/* Filters */
.strain-library-filters {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.search-bar {
  margin-bottom: 24px;
}

.search-input {
  width: 100%;
  padding: 12px 20px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: border-color 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: #4CAF50;
}

.filter-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}

.filter-select {
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-input {
  flex: 1;
  padding: 8px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  width: 80px;
}

.apply-filters-btn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.apply-filters-btn:hover {
  background: #45a049;
}

/* Advanced Filters */
.advanced-filters {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 6px;
}

/* Strains Grid */
.strains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.strain-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.strain-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.strain-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.strain-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strain-type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: white;
}

.strain-type-badge.indica {
  background: #8B4513;
}

.strain-type-badge.sativa {
  background: #228B22;
}

.strain-type-badge.hybrid {
  background: #4B0082;
}

.strain-content {
  padding: 20px;
}

.strain-name {
  font-size: 20px;
  margin: 0 0 10px 0;
  color: #1a1a1a;
}

.strain-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #666;
}

.strain-stats .thc {
  font-weight: 600;
  color: #ff6b6b;
}

.strain-stats .cbd {
  font-weight: 600;
  color: #4ecdc4;
}

.strain-description {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.strain-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.effect-tag {
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
}

.strain-effects .more {
  color: #999;
  font-size: 12px;
  align-self: center;
}

.strain-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.strain-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stars {
  color: #ffc107;
  font-size: 16px;
}

.review-count {
  color: #999;
  font-size: 14px;
}

.view-details-btn {
  background: #2196F3;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

.view-details-btn:hover {
  background: #1976d2;
}

/* Loading & States */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.no-results button {
  margin-top: 20px;
  background: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
}

.error-message {
  text-align: center;
  padding: 40px;
  color: #f44336;
  background: #ffebee;
  border-radius: 8px;
}

/* Pagination */
.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.pagination-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagination-btn {
  background: white;
  border: 2px solid #e0e0e0;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f5f5f5;
  border-color: #4CAF50;
}

.pagination-btn.active {
  background: #4CAF50;
  color: white;
  border-color: #4CAF50;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-dots {
  padding: 0 8px;
  color: #999;
}

.pagination-info {
  color: #666;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .strain-library {
    padding: 16px;
  }
  
  .strain-library-header h2 {
    font-size: 28px;
  }
  
  .filter-controls {
    grid-template-columns: 1fr;
  }
  
  .advanced-filters {
    grid-template-columns: 1fr;
  }
  
  .strains-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .checkbox-group {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}