/* ============================================
   Jeff's Nursery — Design System
   Earthy, premium, field-guide aesthetic
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --forest-deep: #1a3a2a;
  --forest: #2d5a3d;
  --forest-light: #3d7a52;
  --oak-brown: #5c3d2e;
  --oak-warm: #8b6914;
  --bark: #6b4226;
  --copper: #b87333;
  --copper-light: #d4944c;
  --gold-muted: #c5a55a;
  --cream: #faf6f0;
  --cream-dark: #f0e8d8;
  --white: #ffffff;
  --text-primary: #2c2c2c;
  --text-secondary: #5a5a5a;
  --text-light: #8a8a8a;
  --border: #e0d8cc;
  --border-light: #ede8df;
  --shadow: rgba(44, 44, 44, 0.08);
  --shadow-md: rgba(44, 44, 44, 0.12);

  /* Typography */
  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --font-mono: 'Source Code Pro', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --border-radius: 6px;
  --border-radius-lg: 12px;

  /* Transitions */
  --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--forest);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--copper);
}

/* Botanical name convention */
i, .botanical {
  font-style: italic;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--forest-deep);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.5rem; margin-bottom: var(--space-lg); }
h2 { font-size: 1.85rem; margin-bottom: var(--space-md); }
h3 { font-size: 1.4rem; margin-bottom: var(--space-sm); }
h4 { font-size: 1.15rem; margin-bottom: var(--space-sm); }

p {
  margin-bottom: var(--space-md);
  max-width: 70ch;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 65ch;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: var(--space-4xl) 0;
}

.section--alt {
  background-color: var(--white);
}

.section--dark {
  background-color: var(--forest-deep);
  color: var(--cream);
}

.section--dark h2,
.section--dark h3 {
  color: var(--cream);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

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

@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* --- Header & Navigation --- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background: var(--forest-deep);
  color: var(--cream);
  font-size: 0.85rem;
  padding: var(--space-xs) 0;
  text-align: center;
}

.header-top a {
  color: var(--gold-muted);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--forest-deep);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--forest);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-size: 1.2rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--forest-deep);
}

.logo-tagline {
  font-size: 0.75rem;
  color: var(--text-light);
  display: block;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Main Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.main-nav a {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--forest);
  border-bottom-color: var(--copper);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 24px var(--shadow-md);
  min-width: 220px;
  padding: var(--space-sm) 0;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.9rem;
  border-bottom: none;
}

.nav-dropdown-menu a:hover {
  background-color: var(--cream);
}

/* Mobile Nav */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--forest-deep);
  cursor: pointer;
  padding: var(--space-xs);
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-lg);
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 24px var(--shadow-md);
    gap: var(--space-sm);
  }

  .main-nav.is-open { display: flex; }

  .main-nav a {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-light);
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: var(--space-lg);
    display: block;
  }
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--forest-deep) 0%, var(--forest) 100%);
  color: var(--cream);
  padding: var(--space-4xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  background: rgba(255,255,255,0.03);
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero h1 {
  color: var(--cream);
  font-size: 3rem;
  max-width: 600px;
}

.hero .lead {
  color: rgba(250, 246, 240, 0.85);
  font-size: 1.2rem;
  margin-bottom: var(--space-xl);
  max-width: 550px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-image-placeholder {
  background: rgba(255,255,255,0.08);
  border-radius: var(--border-radius-lg);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.9rem;
  text-align: center;
  padding: 0;
  overflow: hidden;
}

.hero-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image-placeholder { display: none; }
}

/* Page Hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--forest-deep) 0%, var(--forest) 80%);
  color: var(--cream);
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.page-hero h1 {
  color: var(--cream);
  font-size: 2.4rem;
  margin-bottom: var(--space-sm);
}

.page-hero .lead {
  color: rgba(250, 246, 240, 0.8);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: var(--space-md) 0;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumbs a {
  color: var(--text-light);
}

.breadcrumbs a:hover {
  color: var(--forest);
}

.breadcrumbs span {
  margin: 0 var(--space-xs);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--copper);
  color: var(--white);
  border-color: var(--copper);
}

.btn--primary:hover {
  background: var(--copper-light);
  border-color: var(--copper-light);
  color: var(--white);
}

.btn--secondary {
  background: transparent;
  color: var(--cream);
  border-color: rgba(250, 246, 240, 0.4);
}

.btn--secondary:hover {
  background: rgba(250, 246, 240, 0.1);
  border-color: var(--cream);
  color: var(--cream);
}

.btn--outline {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}

.btn--outline:hover {
  background: var(--forest);
  color: var(--white);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

/* --- Cards --- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow-md);
}

.card-image {
  aspect-ratio: 3/2;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-body {
  padding: var(--space-lg);
}

.card-body h3 {
  margin-bottom: var(--space-xs);
}

.card-body h3 a {
  color: var(--forest-deep);
}

.card-body h3 a:hover {
  color: var(--copper);
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

.card-body p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Product Card specifics */
.product-card .card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product-price {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--oak-brown);
  font-weight: 700;
}

.product-availability {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-availability--available {
  color: var(--forest);
}

.product-availability--seasonal {
  color: var(--oak-warm);
}

.product-availability--soldout {
  color: var(--text-light);
}

.product-availability--coming-soon {
  color: var(--copper);
}

.product-availability::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Shipping badge */
.shipping-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8rem;
  background: var(--cream);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  color: var(--text-secondary);
  font-weight: 500;
}

.shipping-badge--intl {
  background: #e8f0e8;
  color: var(--forest);
}

/* --- Product Detail Page --- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.product-gallery {
  position: sticky;
  top: 100px;
}

.product-gallery-main {
  aspect-ratio: 1;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.product-gallery-thumbs {
  display: flex;
  gap: var(--space-sm);
}

.product-gallery-thumb {
  width: 80px;
  height: 80px;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-light);
}

.product-info h1 {
  font-size: 2rem;
}

.product-info .botanical-name {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
}

.product-specs {
  list-style: none;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

.product-specs li {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
}

.product-specs .spec-label {
  color: var(--text-light);
  font-weight: 500;
}

/* Shopify Buy Button container */
.shopify-buy-button {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--cream);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  text-align: center;
  min-height: 60px;
}

.shopify-buy-button p {
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 0;
}

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
}

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-lg) 0;
}

.faq-question {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--forest-deep);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0;
  font-weight: 600;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--copper);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: var(--space-md);
}

.faq-item.is-open .faq-question::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding-top: var(--space-md);
  color: var(--text-secondary);
  line-height: 1.8;
}

.faq-item.is-open .faq-answer {
  display: block;
}

/* --- Email Signup --- */
.email-signup {
  background: var(--forest-deep);
  color: var(--cream);
  padding: var(--space-3xl) 0;
  text-align: center;
}

.email-signup h2 {
  color: var(--cream);
  margin-bottom: var(--space-sm);
}

.email-signup p {
  color: rgba(250, 246, 240, 0.7);
  margin: 0 auto var(--space-xl);
}

.email-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 480px;
  margin: 0 auto;
}

.email-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(250, 246, 240, 0.2);
  border-radius: var(--border-radius);
  background: rgba(255,255,255,0.1);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.email-form input::placeholder {
  color: rgba(250, 246, 240, 0.5);
}

@media (max-width: 480px) {
  .email-form {
    flex-direction: column;
  }
}

/* --- Contact Form --- */
.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

/* --- Growing Guide Content --- */
.guide-content {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.guide-content h2 {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.guide-content h3 {
  margin-top: var(--space-xl);
}

.guide-content ul,
.guide-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.guide-content li {
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

.guide-callout {
  background: var(--cream-dark);
  border-left: 4px solid var(--copper);
  padding: var(--space-lg);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin: var(--space-xl) 0;
}

.guide-callout p:last-child {
  margin-bottom: 0;
}

.guide-image-placeholder {
  background: var(--cream-dark);
  border: 2px dashed var(--border);
  border-radius: var(--border-radius);
  padding: var(--space-2xl);
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  margin: var(--space-xl) 0;
}

/* --- Species Table --- */
.species-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
}

.species-table th,
.species-table td {
  text-align: left;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.species-table th {
  background: var(--forest-deep);
  color: var(--cream);
  font-family: var(--font-heading);
  font-weight: 600;
}

.species-table tr:hover {
  background: var(--cream);
}

@media (max-width: 600px) {
  .species-table { font-size: 0.85rem; }
  .species-table th, .species-table td { padding: var(--space-sm); }
}

/* --- Footer --- */
.site-footer {
  background: var(--forest-deep);
  color: rgba(250, 246, 240, 0.7);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-col h4 {
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-sm);
}

.footer-col a {
  color: rgba(250, 246, 240, 0.6);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--gold-muted);
}

.footer-bottom {
  border-top: 1px solid rgba(250, 246, 240, 0.1);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-md); text-align: center; }
  h1 { font-size: 2rem; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
