:root {
  --sn-primary: #2E7D32;
  --sn-primary-dark: #1B5E20;
  --sn-secondary: #F4A261;
  --sn-bg: #FAFAF7;
  --sn-card: #FFFFFF;
  --sn-text: #222222;
  --sn-accent: #8D6E63;
  --sn-muted: #6b6b6b;
  --sn-radius: 1rem;
  --sn-shadow: 0 8px 24px rgba(34, 34, 34, 0.08);
  --sn-font-heading: "Merriweather", Georgia, serif;
  --sn-font-body: "Nunito Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--sn-font-body);
  color: var(--sn-text);
  background: var(--sn-bg);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, .sn-brand, .sn-card-title {
  font-family: var(--sn-font-heading);
}

a { color: var(--sn-primary); text-decoration: none; }
a:hover { color: var(--sn-primary-dark); }

.sn-navbar {
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(141, 110, 99, 0.15);
}

.sn-brand {
  font-weight: 700;
  color: var(--sn-primary) !important;
  font-size: 1.35rem;
}

.sn-search {
  border-radius: 999px;
  border-color: rgba(46, 125, 50, 0.25);
  min-width: 180px;
}

.btn-sn-primary {
  background: var(--sn-primary);
  border-color: var(--sn-primary);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-weight: 600;
}
.btn-sn-primary:hover {
  background: var(--sn-primary-dark);
  border-color: var(--sn-primary-dark);
  color: #fff;
}

.btn-sn-secondary {
  background: var(--sn-secondary);
  border-color: var(--sn-secondary);
  color: var(--sn-text);
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-weight: 600;
}
.btn-sn-secondary:hover {
  filter: brightness(0.95);
  color: var(--sn-text);
}

.btn-sn-outline {
  border: 1.5px solid var(--sn-primary);
  color: var(--sn-primary);
  background: transparent;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-weight: 600;
}
.btn-sn-outline:hover {
  background: var(--sn-primary);
  color: #fff;
}

/* Hero — image URL injected as --sn-hero-image from header (absolute) */
.sn-hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(27, 94, 32, 0.82), rgba(141, 110, 99, 0.55)),
    var(--sn-hero-image, url("../images/placeholders/hero.svg")) center/cover no-repeat;
  overflow: hidden;
}

.sn-hero-inner { position: relative; z-index: 1; max-width: 640px; }

.sn-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.sn-hero p {
  font-size: 1.15rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
}

.sn-hero-search {
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem;
  display: flex;
  gap: 0.35rem;
  max-width: 480px;
  box-shadow: var(--sn-shadow);
}
.sn-hero-search input {
  border: 0;
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  outline: none;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}
.section-sub {
  color: var(--sn-muted);
  margin-bottom: 1.75rem;
}

.sn-card {
  background: var(--sn-card);
  border-radius: var(--sn-radius);
  box-shadow: var(--sn-shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 0;
}
.sn-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(34, 34, 34, 0.12);
}

.sn-card-img-wrap {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8efe8;
}
.sn-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.sn-card:hover .sn-card-img-wrap img { transform: scale(1.05); }

.sn-card-body { padding: 1rem 1.1rem 1.25rem; }
.sn-card-title {
  font-size: 1.1rem;
  margin: 0.5rem 0 0.65rem;
  line-height: 1.35;
}
.sn-card-title a { color: var(--sn-text); }
.sn-card-title a:hover { color: var(--sn-primary); }

.sn-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--sn-muted);
  margin-bottom: 0.75rem;
}
.sn-card-meta i { color: var(--sn-accent); margin-right: 0.2rem; }

.sn-sidebar-list a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 0.5rem;
  color: var(--sn-muted);
}
.sn-sidebar-list a:hover,
.sn-sidebar-list a.active {
  background: rgba(46, 125, 50, 0.1);
  color: var(--sn-primary);
}

.sn-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.sn-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.sn-chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--sn-primary);
  background: rgba(46, 125, 50, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.sn-save-btn {
  border-radius: 999px;
  border: 1px solid rgba(46, 125, 50, 0.3);
  color: var(--sn-primary);
  background: #fff;
}
.sn-save-btn.saved {
  background: rgba(46, 125, 50, 0.1);
}

.stars { color: var(--sn-secondary); letter-spacing: 0.05em; }
.stars i { font-size: 0.85em; }

.cat-tile {
  display: block;
  text-align: center;
  background: var(--sn-card);
  border-radius: var(--sn-radius);
  padding: 1.25rem 0.75rem;
  box-shadow: var(--sn-shadow);
  color: var(--sn-text);
  transition: transform 0.2s ease;
}
.cat-tile:hover { transform: translateY(-3px); color: var(--sn-primary); }
.cat-tile img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 0.65rem;
  background: #e8efe8;
}

.sn-slider {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
}
.sn-slider > * {
  flex: 0 0 min(280px, 80vw);
  scroll-snap-align: start;
}

.newsletter-box {
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.12), rgba(244, 162, 97, 0.2));
  border-radius: calc(var(--sn-radius) + 0.25rem);
  padding: 2.5rem 1.5rem;
}

.sn-footer {
  background: #f0efe9;
  border-top: 1px solid rgba(141, 110, 99, 0.12);
}
.sn-footer h6 { font-family: var(--sn-font-heading); margin-bottom: 1rem; }
.sn-footer-links a { color: var(--sn-muted); }
.sn-footer-links a:hover { color: var(--sn-primary); }
.sn-social a {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--sn-accent);
  margin-right: 0.4rem;
  box-shadow: var(--sn-shadow);
}
.sn-social a:hover { color: var(--sn-primary); }

.page-hero {
  background: linear-gradient(120deg, rgba(46, 125, 50, 0.1), rgba(244, 162, 97, 0.15));
  padding: 2.5rem 0;
  margin-bottom: 2rem;
}

.recipe-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--sn-radius);
  box-shadow: var(--sn-shadow);
}

.recipe-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
}
.recipe-meta-item {
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.85rem;
  text-align: center;
  box-shadow: var(--sn-shadow);
}
.recipe-meta-item strong { display: block; font-size: 1.05rem; }
.recipe-meta-item span { font-size: 0.8rem; color: var(--sn-muted); }

.recipe-section {
  background: #fff;
  border-radius: var(--sn-radius);
  padding: 1.5rem;
  box-shadow: var(--sn-shadow);
  margin-bottom: 1.25rem;
}

.pricing-card {
  position: relative;
  background: #fff;
  border-radius: var(--sn-radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--sn-shadow);
  border: 1px solid rgba(46, 125, 50, 0.15);
}
.pricing-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--sn-secondary);
  color: #222;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}
.pricing-amount .price {
  font-family: var(--sn-font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--sn-primary);
  line-height: 1;
}
.pricing-amount .interval {
  color: var(--sn-muted);
  font-size: 1.1rem;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pricing-features li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(141, 110, 99, 0.12);
}
.pricing-features li:last-child { border-bottom: 0; }

.recipe-paywall {
  position: relative;
  border-radius: var(--sn-radius);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(250, 250, 247, 0.2), rgba(250, 250, 247, 0.95)),
    repeating-linear-gradient(
      -8deg,
      rgba(46, 125, 50, 0.04),
      rgba(46, 125, 50, 0.04) 12px,
      transparent 12px,
      transparent 24px
    );
  border: 1px solid rgba(46, 125, 50, 0.18);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.recipe-paywall-inner {
  max-width: 520px;
  padding: 2.5rem 1.5rem;
  color: var(--sn-text);
}
.recipe-paywall-inner .fa-lock { color: var(--sn-primary); }

.breadcrumb a { color: var(--sn-accent); }

.admin-sidebar {
  background: #1B5E20;
  min-height: 100vh;
  color: #fff;
}
.admin-sidebar a {
  color: rgba(255,255,255,0.85);
  display: block;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.stat-card {
  background: #fff;
  border-radius: var(--sn-radius);
  padding: 1.25rem;
  box-shadow: var(--sn-shadow);
}
.stat-card .num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sn-primary);
  font-family: var(--sn-font-heading);
}

@media print {
  .sn-navbar, .sn-footer, .no-print, .sn-save-btn { display: none !important; }
  body { background: #fff; }
  .recipe-section { box-shadow: none; border: 1px solid #ddd; }
}

@media (max-width: 576px) {
  .sn-hero { min-height: 70vh; }
  .sn-hero-search { flex-direction: column; border-radius: 1rem; }
  .sn-hero-search .btn { width: 100%; }
}
