/* ============================================================
   Fern & Fable ¡ª stylesheet
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------- Tokens ---------- */
:root {
  --cream: #faf7f2;
  --cream-deep: #f3eee4;
  --paper: #ffffff;
  --ink: #1f2a24;
  --ink-soft: #4d584f;
  --muted: #8b8579;
  --line: #e7e0d3;
  --green: #2f5d3f;
  --green-bright: #5d8f4e;
  --terracotta: #c66b3d;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(31, 42, 36, 0.04);
  --shadow: 0 6px 24px rgba(31, 42, 36, 0.07);

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 72rem;
  --measure: 40rem;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 0.9rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background-color 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, transform 0.18s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--green);
  color: #f4efe6;
}

.btn-primary:hover {
  background: #234a30;
}

.btn-primary.is-added {
  background: var(--green-bright);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--ink);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.logo-mark {
  color: var(--green);
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.92rem;
}

.nav a {
  color: var(--ink-soft);
  transition: color 0.15s ease;
  position: relative;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--green);
  color: #f4efe6;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 4.5rem 0 5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 4rem;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 1.4rem;
  letter-spacing: -0.025em;
}

.hero-text p {
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 30rem;
  margin: 0 0 2rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  width: 100%;
  max-width: 26rem;
  aspect-ratio: 1 / 1;
  background: linear-gradient(140deg, #e8f0e4 0%, #d3e2cc 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.hero-image svg {
  width: 100%;
  height: auto;
  max-width: 18rem;
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: 4.5rem 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0;
}

.section-head p {
  color: var(--muted);
  margin: 0.4rem 0 0;
  font-size: 0.98rem;
}

.section-head a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  white-space: nowrap;
}

.section-head a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* ============================================================
   Plant grid & cards
   ============================================================ */
.plant-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.plant-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plant-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.plant-card-link {
  display: block;
}

.plant-card-image {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.plant-card-image svg {
  width: 60%;
  height: auto;
  max-width: 9rem;
}

.plant-card-body {
  padding: 1.25rem 1.35rem 1.5rem;
}

.plant-card-tag {
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.plant-card-name {
  font-size: 1.15rem;
  margin: 0 0 0.15rem;
  letter-spacing: -0.01em;
}

.plant-card-latin {
  font-style: italic;
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0 0 0.9rem;
}

.plant-card-price {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--green);
  margin: 0;
}

/* image background variants */
.img-monstera  { background: linear-gradient(140deg, #e8f0e4, #d3e2cc); }
.img-snake     { background: linear-gradient(140deg, #eef1e6, #dde5d0); }
.img-pothos    { background: linear-gradient(140deg, #edf3e2, #d8e6c5); }
.img-fern      { background: linear-gradient(140deg, #e4efdf, #c9ddc1); }
.img-cactus    { background: linear-gradient(140deg, #e6efec, #cbdfd7); }
.img-fiddle    { background: linear-gradient(140deg, #eaeee1, #d4deca); }

/* ============================================================
   Category cards
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.category-card {
  background: var(--cream-deep);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  border: 1px solid var(--line);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  display: block;
}

.category-card:hover {
  background: #ede6d8;
  border-color: #d9cfbb;
}

.category-card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.category-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 1.1rem;
}

.category-count {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ============================================================
   Story band
   ============================================================ */
.story-band {
  background: var(--green);
  color: #efe9dd;
  border-radius: 20px;
  padding: 3.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.story-band h2 {
  color: #faf7f2;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 1rem;
}

.story-band p {
  color: rgba(250, 247, 242, 0.82);
  margin: 0 0 1rem;
  font-size: 1rem;
}

.story-band .eyebrow {
  color: rgba(250, 247, 242, 0.6);
}

.story-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.story-visual svg {
  width: 100%;
  max-width: 15rem;
}

/* ============================================================
   Shop page
   ============================================================ */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  max-width: var(--measure);
}

.page-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 1rem;
}

.page-hero .lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0 0 2.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: transparent;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}

.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

/* ============================================================
   Plant detail page
   ============================================================ */
.breadcrumb {
  padding: 2rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.breadcrumb a:hover {
  color: var(--green);
}

.plant-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  padding: 2.5rem 0 5rem;
  align-items: start;
}

.plant-detail-image {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: sticky;
  top: 6rem;
}

.plant-detail-image svg {
  width: 70%;
  height: auto;
}

.plant-detail-info h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0 0 0.3rem;
}

.plant-detail-info .latin {
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 1.5rem;
}

.plant-detail-info .price {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--green);
  margin: 0 0 1.5rem;
  font-weight: 500;
}

.plant-detail-info .description {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0 0 2rem;
}

.care-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 0 0 2.25rem;
  padding: 1.5rem;
  background: var(--cream-deep);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.care-item h3 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.3rem;
  font-weight: 600;
}

.care-item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink);
}

.detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================================
   About page
   ============================================================ */
.about-body {
  max-width: var(--measure);
  padding-bottom: 4rem;
}

.about-body h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
}

.about-body p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0 0 1.3rem;
}

.about-body blockquote {
  border-left: 3px solid var(--green);
  padding: 0.25rem 0 0.25rem 1.4rem;
  margin: 2rem 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--ink);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.team-member {
  text-align: center;
}

.team-photo {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  width: 9rem;
  height: 9rem;
  margin: 0 auto 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.team-member h3 {
  font-size: 1.1rem;
  margin: 0 0 0.2rem;
}

.team-member p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--cream-deep);
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
  max-width: 22rem;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.55rem;
}

.footer-col a {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--green);
}

.footer-col p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

.newsletter {
  display: flex;
  gap: 0.5rem;
}

.newsletter input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  background: var(--cream);
  color: var(--ink);
}

.newsletter input:focus {
  outline: none;
  border-color: var(--green);
}

.newsletter button {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--green);
  color: #f4efe6;
  font-size: 0.85rem;
  font-weight: 500;
}

.newsletter button:hover {
  background: #234a30;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-image { max-width: 20rem; margin: 0 auto; }
  .plant-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: 1fr; }
  .story-band { grid-template-columns: 1fr; padding: 2.5rem 2rem; }
  .story-visual { order: -1; }
  .plant-detail { grid-template-columns: 1fr; gap: 2.5rem; }
  .plant-detail-image { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .team-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 1.15rem; }
  .hero { padding: 3rem 0 3.5rem; }
  .section { padding: 3rem 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .plant-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .nav { gap: 1rem; font-size: 0.88rem; }
  .logo-text { display: none; }
  .care-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; }
  .breadcrumb { font-size: 0.8rem; }
}