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

:root {
  --bg:        #0f1a0f;
  --bg-card:   #172017;
  --bg-nav:    #0a110a;
  --accent:    #5a9e3a;
  --accent2:   #8bc34a;
  --text:      #d4e8c2;
  --text-muted:#7a9e6a;
  --border:    #243824;
  --radius:    10px;
  --max-w:     1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
}

/* ── NAV ── */
nav {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent2);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent2);
  background: rgba(90,158,58,0.12);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

/* ── HERO ── */
.hero {
  background:
    linear-gradient(to bottom, rgba(15,26,15,0.75) 0%, rgba(15,26,15,1) 100%),
    url('https://images.unsplash.com/photo-1585095595205-e2f7a5c02849?w=1400&q=80') center/cover no-repeat;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--accent2);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.hero p {
  max-width: 540px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ── SPECIES HERO (inner pages) ── */
.species-hero {
  position: relative;
  text-align: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.species-hero-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  background: #1a2a1a;
}

.species-hero-text {
  padding: 1.5rem 1.5rem 3rem;
}

.species-hero .badge {
  display: inline-block;
  background: rgba(90,158,58,0.18);
  color: var(--accent2);
  border: 1px solid rgba(90,158,58,0.35);
  padding: 0.2rem 0.75rem;
  border-radius: 50px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.species-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--accent2);
  margin-bottom: 0.4rem;
}

.species-hero .sci {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.species-hero p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-muted);
}

/* ── MAIN LAYOUT ── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── SPECIES CARDS (home) ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #1a2a1a;
}

.card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h2 {
  font-size: 1.15rem;
  color: var(--accent2);
  margin-bottom: 0.25rem;
}

.card-body .sci {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex: 1;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  align-self: flex-start;
}

.btn:hover { background: var(--accent2); color: #0f1a0f; }

/* ── CARE GUIDE SECTIONS ── */
.care-grid {
  display: grid;
  gap: 1.5rem;
}

.care-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.care-section h2 {
  font-size: 1.05rem;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.care-section h2 .icon { font-size: 1rem; }

.care-section p + p { margin-top: 0.75rem; }

/* stat pills */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.stat {
  background: rgba(90,158,58,0.12);
  border: 1px solid rgba(90,158,58,0.25);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
}

.stat span:first-child {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat span:last-child {
  color: var(--accent2);
  font-weight: 600;
}

/* ── QUICK STATS BAR ── */
.quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.quick-stat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 120px;
}

.quick-stat .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.quick-stat .value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent2);
}

/* ── BACK LINK ── */
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back:hover { color: var(--accent2); }

/* ── EXPLORE HERO ── */
.explore-hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, #0d170d, var(--bg));
}

.explore-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--accent2);
  margin-bottom: 0.5rem;
}

.explore-hero > p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* ── SEARCH BAR ── */
.search-wrap {
  display: flex;
  max-width: 620px;
  margin: 0 auto 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color 0.2s;
}

.search-wrap:focus-within {
  border-color: var(--accent);
}

.search-bar {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.search-bar::placeholder { color: var(--text-muted); }

.search-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 0.75rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.search-btn:hover { background: var(--accent2); color: #0f1a0f; }

/* ── CHIPS ── */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto;
}

.chip {
  background: rgba(90,158,58,0.1);
  border: 1px solid rgba(90,158,58,0.25);
  color: var(--text-muted);
  border-radius: 50px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip:hover {
  background: rgba(90,158,58,0.2);
  color: var(--accent2);
  border-color: var(--accent);
}

/* ── Q&A ANSWER CARD ── */
.qa-result {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 0 1px rgba(90,158,58,0.12), 0 4px 24px rgba(0,0,0,0.3);
}

.qa-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.qa-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #1a2a1a;
  flex-shrink: 0;
}

.qa-meta { flex: 1; }

.qa-species {
  font-weight: 700;
  color: var(--accent2);
  font-size: 0.95rem;
}

.qa-topic-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.qa-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.15s;
}

.qa-close:hover { color: var(--text); }

.qa-answer {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 0;
}

/* ── GRID HEADER ── */
.grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.grid-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.clear-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.clear-btn:hover { border-color: var(--accent); color: var(--accent2); }

/* ── EXPLORE GRID ── */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* pill row on explore cards */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.pill {
  background: rgba(90,158,58,0.1);
  border: 1px solid rgba(90,158,58,0.2);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
}

.pill.diff-beginner        { border-color: rgba(90,180,58,0.35); color: #7ec850; }
.pill.diff-beginner--intermediate { border-color: rgba(180,180,58,0.35); color: #c8c850; }
.pill.diff-intermediate    { border-color: rgba(200,150,58,0.35); color: #c8a050; }
.pill.diff-intermediate--advanced { border-color: rgba(200,100,58,0.35); color: #c87050; }
.pill.diff-advanced        { border-color: rgba(200,60,60,0.35);  color: #c86060; }

.no-results {
  color: var(--text-muted);
  text-align: center;
  padding: 3rem 0;
  font-size: 0.95rem;
}

/* ── SHOP ── */
.shop-hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, #0d170d, var(--bg));
}

.shop-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--accent2);
  margin-bottom: 0.5rem;
}

.shop-hero > p {
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 900px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
  .shop-grid { grid-template-columns: 1fr; }
}

.shop-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.shop-img-wrap {
  position: relative;
}

.shop-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  background: #1a2a1a;
}

.stock-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border-radius: 50px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stock-badge.out {
  background: rgba(180, 60, 60, 0.85);
  color: #fff;
}

.stock-badge.in {
  background: rgba(90, 158, 58, 0.9);
  color: #fff;
}

.shop-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.shop-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.shop-meta h2 {
  font-size: 1.15rem;
  color: var(--accent2);
  margin-bottom: 0.2rem;
}

.shop-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent2);
  white-space: nowrap;
}

.shop-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.shop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-notify {
  margin-top: auto;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: not-allowed;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
}

.btn-notify.available {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: pointer;
}

.btn-notify.available:hover {
  background: var(--accent2);
  color: #0f1a0f;
}

.shop-notice {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.shop-notice h2 {
  color: var(--accent2);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.shop-notice p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}

/* ── MOBILE ── */
@media (max-width: 640px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    gap: 0.25rem;
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .care-section { padding: 1.25rem; }
}
