:root {
  --bg-color: #f2f3ee;
  --primary-dark: #1b3832;
  --accent-brown: #a6512e;
  --accent-ochre: #c29b38;
  --text-main: #2c2d2b;
  --text-muted: #6b6d65;
  --card-bg: #e6e8e1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  border-bottom: 1px solid rgba(27, 56, 50, 0.1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  height: 40px;
}

nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 400;
  transition: color 0.2s;
}

nav a:hover, nav a.active {
  color: var(--primary-dark);
  font-weight: 500;
}

nav a.office-link {
  font-weight: 600;
  color: var(--primary-dark);
}

.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
  flex: 1;
  width: 100%;
}

/* Barra de Pesquisa */
.search-bar-container {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 720px;
}

.search-wrapper input {
  width: 100%;
  padding: 16px 20px;
  padding-right: 120px;
  border-radius: 6px;
  border: 1px solid rgba(27, 56, 50, 0.2);
  background-color: #ffffff;
  font-size: 16px;
  color: var(--text-main);
}

.search-wrapper button {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  padding: 0 24px;
  background-color: var(--primary-dark);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

/* Filtros */
.filters-section {
  margin-bottom: 48px;
  text-align: center;
}

.filter-group {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  align-items: center;
}

.filter-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-right: 12px;
  min-width: 100px;
  text-align: right;
}

.filter-pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--primary-dark);
  background: transparent;
  color: var(--primary-dark);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill:hover, .filter-pill.active {
  background-color: var(--primary-dark);
  color: #fff;
}

/* Grid de Resultados (Home) */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.plant-card {
  background-color: var(--card-bg);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: transform 0.2s;
}

.plant-card:hover {
  transform: translateY(-4px);
}

.plant-card-img {
  height: 280px;
  background-color: #d1d5cb;
}

.plant-card-content {
  padding: 20px;
  background-color: var(--primary-dark);
  color: #fff;
}

.plant-card-content h3 {
  font-size: 18px;
  margin-bottom: 4px;
  font-weight: 600;
}

.plant-card-content p.scientific {
  font-style: italic;
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 4px;
}

.plant-card-content p.family {
  font-size: 12px;
  opacity: 0.6;
}

/* Layout de Duas Colunas (Página de Item) */
.item-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}

.item-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.item-main-img {
  width: 100%;
  height: 480px;
  background-color: #d1d5cb;
  border-radius: 4px;
}

.item-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.item-thumb {
  height: 100px;
  background-color: #d1d5cb;
  border-radius: 4px;
}

.item-details h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.item-details h2.scientific {
  font-size: 20px;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.item-details p.family {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.item-details p.description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 32px;
}

.attributes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
  background: rgba(0,0,0,0.02);
  padding: 20px;
  border-radius: 6px;
}

.attr-item span.label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.attr-item span.value {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
}

.badges-row {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.badge-tag {
  padding: 6px 14px;
  background-color: var(--primary-dark);
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.section-block {
  margin-bottom: 32px;
}

.section-block h3 {
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(27, 56, 50, 0.1);
  padding-bottom: 6px;
}

.section-block p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}

.cad-models {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.cad-card {
  background: #fff;
  border: 1px solid rgba(27, 56, 50, 0.15);
  border-radius: 6px;
  padding: 20px;
  text-align: center;
}

.cad-preview {
  height: 120px;
  background: #f8f9f6;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cad-card a {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--primary-dark);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

/* Layout Biblioteca Paisagística */
.library-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

.library-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.library-item {
  background: #ffffff;
  border: 1px solid rgba(27, 56, 50, 0.1);
  padding: 24px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.library-info h4 {
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.library-info p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 12px;
}

.library-tags {
  display: flex;
  gap: 8px;
}

.lib-tag {
  font-size: 11px;
  background: var(--accent-brown);
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
}

.library-action a {
  padding: 10px 20px;
  background-color: var(--primary-dark);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.categories-sidebar {
  background: #fff;
  border: 1px solid rgba(27, 56, 50, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.categories-sidebar h3 {
  background-color: var(--primary-dark);
  color: #fff;
  padding: 16px 20px;
  font-size: 16px;
}

.categories-sidebar ul {
  list-style: none;
}

.categories-sidebar li a {
  display: block;
  padding: 12px 20px;
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid rgba(27, 56, 50, 0.05);
  font-size: 14px;
  transition: background 0.2s;
}

.categories-sidebar li a:hover {
  background-color: rgba(27, 56, 50, 0.04);
  color: var(--primary-dark);
  font-weight: 500;
}

/* Rodapé */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid rgba(27, 56, 50, 0.1);
  font-size: 12px;
  color: var(--text-muted);
}