/* ================================================================
   HERBARIUM — herbarium.css
   ================================================================ */

.hero-herbarium { min-height: 240px; }
.hero-herbarium .hero-bg {
  background: linear-gradient(160deg, #0a1509 0%, #0d1e0d 40%, #122018 70%, #0d1510 100%);
}

/* Breadcrumb */
.herb-breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  padding: .75rem 2rem; border-bottom: 1px solid rgba(181,139,74,.1);
  flex-wrap: wrap;
}
.herb-crumb {
  font-family: var(--font-display); font-size: .5rem; letter-spacing: .18em;
  color: var(--ivory-dark); opacity: .45; cursor: pointer; transition: opacity .15s;
}
.herb-crumb:hover { opacity: .8; }
.herb-crumb.active { color: var(--brass-light); opacity: 1; cursor: default; }
.herb-crumb-sep { color: var(--brass-light); opacity: .3; font-size: .6rem; }

/* Section */
.herb-level { padding: 1.5rem 2rem; }
.herb-level.hidden { display: none; }
.herb-section-head { margin-bottom: 1.25rem; }
.herb-kicker {
  font-family: var(--font-display); font-size: .5rem; letter-spacing: .28em;
  color: var(--brass-light); margin-bottom: .3rem;
}
.herb-title {
  font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .12em;
  color: var(--cream); margin-bottom: .3rem;
}
.herb-sub {
  font-family: var(--font-ink); font-style: italic; font-size: .9rem;
  color: var(--ivory-dark); opacity: .6;
}

/* Sort bar */
.herb-sort-bar {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  margin-bottom: 1rem; padding-bottom: .75rem;
  border-bottom: 1px solid rgba(181,139,74,.1);
}
.herb-sort-label {
  font-family: var(--font-display); font-size: .46rem; letter-spacing: .2em;
  color: var(--ivory-dark); opacity: .4;
}
.herb-sort-btn {
  font-family: var(--font-display); font-size: .46rem; letter-spacing: .16em;
  color: var(--ivory-dark); opacity: .5; background: none;
  border: 1px solid rgba(181,139,74,.15); padding: .3rem .65rem; cursor: pointer;
  transition: opacity .15s, border-color .15s;
}
.herb-sort-btn.active, .herb-sort-btn:hover { opacity: 1; border-color: var(--brass); color: var(--brass-light); }

/* ── Level 1: Category Grid ── */
.herb-category-grid { display: flex; flex-direction: column; gap: .65rem; }

.herb-category-card {
  display: grid; grid-template-columns: 72px 1fr 24px;
  align-items: center; gap: 1rem;
  background: linear-gradient(148deg, var(--greenhouse-2), var(--greenhouse-3));
  border: 1px solid rgba(95,118,84,.18); padding: 1rem 1.15rem;
  cursor: pointer; transition: border-color .15s, transform .15s;
}
.herb-category-card:hover { border-color: rgba(181,139,74,.45); transform: translateX(3px); }

.herb-cat-img {
  width: 72px; height: 72px;
  background: rgba(255,255,255,.04); border: 1px dashed rgba(95,118,84,.2);
  display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0;
}
.herb-cat-name {
  font-family: var(--font-display); font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; color: var(--cream); margin-bottom: .2rem;
}
.herb-cat-desc {
  font-family: var(--font-ink); font-style: italic; font-size: .88rem;
  color: var(--ivory-dark); opacity: .6; margin-bottom: .3rem;
}
.herb-cat-count {
  font-family: var(--font-display); font-size: .46rem; letter-spacing: .16em;
  color: var(--brass-light); opacity: .8;
}
.herb-cat-arrow {
  font-family: var(--font-display); font-size: .8rem; color: var(--brass-light); opacity: .5;
}

/* ── Level 2: Species List ── */
.herb-species-list { display: flex; flex-direction: column; gap: .65rem; }

.herb-species-row {
  display: grid; grid-template-columns: 56px 1fr auto;
  align-items: center; gap: .85rem;
  background: linear-gradient(148deg, #ede4ce, #ddd0b0);
  border: 1px solid rgba(181,139,74,.2); padding: .85rem 1rem;
  cursor: pointer; transition: border-color .15s;
}
.herb-species-row:hover { border-color: rgba(181,139,74,.55); }

.herb-species-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  background: rgba(61,51,38,.07); border: 1px dashed rgba(61,51,38,.18);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.herb-species-name {
  font-family: var(--font-display); font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; color: var(--ink); margin-bottom: .15rem;
}
.herb-species-latin {
  font-family: var(--font-ink); font-style: italic; font-size: .82rem;
  color: var(--ink-light); margin-bottom: .25rem;
}
.herb-species-meta {
  display: flex; gap: .65rem; flex-wrap: wrap;
}
.herb-species-meta span {
  font-family: var(--font-display); font-size: .44rem; letter-spacing: .14em;
  color: var(--ink-light); opacity: .6;
}
.herb-species-best {
  font-family: var(--font-display); font-size: .5rem; letter-spacing: .1em;
  color: var(--brass); text-align: right; white-space: nowrap;
}
.herb-species-count {
  font-family: var(--font-display); font-size: .44rem; letter-spacing: .12em;
  color: var(--ink-light); opacity: .55; text-align: right; margin-top: .2rem;
}

/* ── Level 3: Specimen Records ── */
.herb-specimens-list { display: flex; flex-direction: column; gap: .5rem; }

.herb-specimen-row {
  display: grid; grid-template-columns: 48px 1fr auto;
  align-items: center; gap: .75rem;
  background: linear-gradient(148deg, #ede4ce, #ddd0b0);
  border: 1px solid rgba(181,139,74,.18); padding: .75rem .9rem;
  cursor: pointer; transition: border-color .15s;
}
.herb-specimen-row:hover { border-color: rgba(181,139,74,.5); }

.herb-specimen-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(61,51,38,.07); border: 1px dashed rgba(61,51,38,.18);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.herb-specimen-accession {
  font-family: var(--font-display); font-size: .44rem; letter-spacing: .16em;
  color: var(--ink-light); opacity: .5; margin-bottom: .15rem;
}
.herb-specimen-name {
  font-family: var(--font-display); font-size: .64rem; font-weight: 600;
  letter-spacing: .1em; color: var(--ink); margin-bottom: .15rem;
}
.herb-specimen-stars { display: flex; gap: .15rem; margin-bottom: .15rem; }
.herb-star { font-size: .75rem; color: rgba(61,51,38,.2); }
.herb-star.filled { color: var(--brass); }
.herb-specimen-date {
  font-family: var(--font-display); font-size: .42rem; letter-spacing: .12em;
  color: var(--ink-light); opacity: .5;
}
.herb-specimen-reward {
  font-family: var(--font-display); font-size: .5rem; letter-spacing: .08em;
  color: var(--brass); text-align: right; white-space: nowrap;
}

/* Drawer quality stars */
.drawer-quality {
  display: flex; align-items: center; gap: .2rem;
  margin: .4rem 0 .75rem;
}
.drawer-quality .herb-star { font-size: 1rem; }
.drawer-quality-label {
  font-family: var(--font-display); font-size: .46rem; letter-spacing: .16em;
  color: var(--ink-light); opacity: .6; margin-left: .4rem;
}
.drawer-accession {
  font-family: var(--font-display); font-size: .46rem; letter-spacing: .2em;
  color: var(--ink-light); opacity: .5; margin-bottom: .2rem; display: block;
}

/* Mobile */
@media (max-width: 700px) {
  .herb-level { padding: .85rem 1rem; }
  .herb-breadcrumb { padding: .6rem 1rem; gap: .35rem; }
  .herb-crumb { font-size: .44rem; letter-spacing: .14em; }

  /* Category cards — full width, tighter */
  .herb-category-card { grid-template-columns: 52px 1fr 18px; gap: .55rem; padding: .7rem .85rem; }
  .herb-cat-img { width: 52px; height: 52px; font-size: 1.4rem; }
  .herb-cat-name { font-size: .62rem; }
  .herb-cat-desc { font-size: .8rem; }

  /* Species rows — hide right column */
  .herb-species-row { grid-template-columns: 44px 1fr; gap: .65rem; padding: .7rem .85rem; }
  .herb-species-icon { width: 44px; height: 44px; font-size: 1.3rem; }
  .herb-species-best, .herb-species-count { display: none; }
  .herb-species-name { font-size: .64rem; }

  /* Specimen rows — hide reward, show inline */
  .herb-specimen-row { grid-template-columns: 40px 1fr; gap: .6rem; padding: .65rem .85rem; }
  .herb-specimen-icon { width: 40px; height: 40px; font-size: 1.2rem; }
  .herb-specimen-reward { display: none; }
  .herb-specimen-name { font-size: .58rem; }

  /* Sort bar wraps cleanly */
  .herb-sort-bar { gap: .35rem; }
  .herb-sort-btn { padding: .28rem .5rem; font-size: .42rem; }

  /* Drawer goes full width on mobile */
  .specimen-modal { justify-content: center; align-items: stretch; }
  .specimen-drawer { width: 100%; border-left: 0; padding: .65rem; }
  .drawer-paper-stack { max-width: 430px; margin: 0 auto; }
  .drawer-row { grid-template-columns: 1fr; gap: .1rem; }
  .drawer-row strong { text-align: left; }
}

@media (max-width: 400px) {
  .herb-category-card { grid-template-columns: 44px 1fr; }
  .herb-cat-arrow { display: none; }
  .herb-cat-img { width: 44px; height: 44px; font-size: 1.2rem; }
}
