/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #2C2416;
  background: #FFF9F0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === HEADER === */
.site-header {
  background: #FFF9F0;
  border-bottom: 1px solid #E8D5B7;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255, 249, 240, 0.92);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #8B4513;
}
.logo svg { flex-shrink: 0; }
.site-nav ul {
  display: flex;
  gap: 1.5rem;
}
.site-nav a {
  font-weight: 500;
  color: #5C4A32;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.site-nav a:hover,
.site-nav a.active {
  color: #8B4513;
  border-bottom-color: #E07A3D;
}

/* === HERO === */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
  background: linear-gradient(135deg, #FEF3E4 0%, #FFF9F0 100%);
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #5C3A1E;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: #6B5A44;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat {
  background: #FFF;
  border: 1px solid #E8D5B7;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.stat strong {
  display: block;
  font-size: 1.5rem;
  color: #E07A3D;
  font-weight: 700;
}

/* === GENERATOR SECTION === */
.generator {
  padding: 2.5rem 0 3rem;
}
.generator h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #5C3A1E;
  margin-bottom: 0.25rem;
}
.section-desc {
  color: #6B5A44;
  margin-bottom: 1.5rem;
}

/* Ingredient Grid */
.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.ingredient-chip {
  background: #FFF;
  border: 2px solid #E8D5B7;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  text-align: center;
  font-weight: 500;
  color: #5C4A32;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  font-size: 0.95rem;
}
.ingredient-chip:hover {
  border-color: #E07A3D;
  background: #FFF5EC;
}
.ingredient-chip.selected {
  background: #E07A3D;
  border-color: #C96A2F;
  color: #FFF;
  box-shadow: 0 4px 12px rgba(224, 122, 61, 0.3);
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 2rem;
  background: #FEF7EE;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid #E8D5B7;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1 180px;
}
.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #5C4A32;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.filter-group select {
  padding: 0.6rem 0.75rem;
  border: 2px solid #E8D5B7;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #FFF;
  color: #2C2416;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%235C4A32'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}
.btn-primary {
  padding: 0.7rem 1.8rem;
  background: #E07A3D;
  color: #FFF;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
  align-self: flex-end;
}
.btn-primary:hover {
  background: #C96A2F;
}
.btn-primary:active {
  transform: scale(0.97);
}

/* Results */
.results-area {
  margin-top: 1.5rem;
}
.results-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.results-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #5C3A1E;
}
.badge {
  background: #E07A3D;
  color: #FFF;
  border-radius: 20px;
  padding: 0.2rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.recipe-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.recipe-card {
  background: #FFF;
  border: 1px solid #E8D5B7;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.recipe-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #5C3A1E;
  margin-bottom: 0.5rem;
}
.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #FEF3E4;
  color: #8B4513;
}
.tag.time { background: #E8F5E9; color: #2E5A30; }
.recipe-desc {
  color: #5C4A32;
  font-size: 0.95rem;
  line-height: 1.5;
}
.no-results {
  text-align: center;
  padding: 2rem;
  color: #6B5A44;
}
.shopping-list {
  margin-top: 2rem;
  background: #FFFBF5;
  border: 1px solid #E8D5B7;
  border-radius: 12px;
  padding: 1.5rem;
}
.shopping-list h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #5C3A1E;
  margin-bottom: 0.75rem;
}
.shopping-list ul {
  list-style: disc;
  padding-left: 1.5rem;
  color: #5C4A32;
}
.shopping-list li {
  margin-bottom: 0.3rem;
}

/* === HOW IT WORKS === */
.how-it-works {
  padding: 3rem 0;
  background: #FEF7EE;
  border-top: 1px solid #E8D5B7;
  border-bottom: 1px solid #E8D5B7;
}
.how-it-works h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #5C3A1E;
  margin-bottom: 2rem;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.step {
  text-align: center;
}
.step-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #5C3A1E;
  margin-bottom: 0.5rem;
}
.step p {
  color: #6B5A44;
  font-size: 0.95rem;
}

/* === TIPS === */
.tips {
  padding: 3rem 0;
}
.tips h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #5C3A1E;
  margin-bottom: 1.5rem;
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.tip-card {
  background: #FFF;
  border: 1px solid #E8D5B7;
  border-radius: 12px;
  padding: 1.5rem;
}
.tip-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #5C3A1E;
  margin-bottom: 0.5rem;
}
.tip-card p {
  color: #5C4A32;
  font-size: 0.95rem;
}

/* === CTA === */
.cta {
  padding: 3rem 0 4rem;
  text-align: center;
  background: linear-gradient(135deg, #FEF3E4 0%, #FFF9F0 100%);
  border-top: 1px solid #E8D5B7;
}
.cta h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #5C3A1E;
  margin-bottom: 0.5rem;
}
.cta p {
  color: #6B5A44;
  margin-bottom: 1.5rem;
}
.btn-secondary {
  display: inline-block;
  padding: 0.7rem 2rem;
  background: #FFF;
  color: #E07A3D;
  border: 2px solid #E07A3D;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}
.btn-secondary:hover {
  background: #E07A3D;
  color: #FFF;
}

/* === FOOTER === */
.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid #E8D5B7;
  background: #FFF9F0;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: #8B4513;
  font-weight: 500;
  text-decoration: underline;
}
.footer-note {
  color: #8B7A62;
  font-size: 0.85rem;
  max-width: 600px;
  margin: 0 auto;
}

/* === ABOUT PAGE === */
.about-page {
  padding: 3rem 0;
}
.about-page h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #5C3A1E;
  margin-bottom: 1.5rem;
}
.about-content {
  max-width: 700px;
  color: #5C4A32;
  line-height: 1.7;
}

/* === LEGAL PAGES === */
.legal-page {
  padding: 3rem 0;
}
.legal-page h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #5C3A1E;
  margin-bottom: 1.5rem;
}
.legal-content {
  max-width: 700px;
  color: #5C4A32;
  line-height: 1.7;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-stats { gap: 1rem; }
  .stat { padding: 0.5rem 1rem; }
  .stat strong { font-size: 1.2rem; }
  .filters { flex-direction: column; align-items: stretch; }
  .btn-primary { align-self: stretch; text-align: center; }
  .ingredient-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .recipe-cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero h1 { font-size: 1.5rem; }
  .site-nav ul { gap: 1rem; }
  .logo span { font-size: 1rem; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
