/* ============================================================
   StoreRecipe.com — Master Stylesheet
   Mobile-First | All Breakpoints | Animations | Dark-Ready
   ============================================================ */

/* ---------- CSS Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; border: none; outline: none; background: none; }
button { cursor: pointer; }

/* ---------- CSS Variables ---------- */
:root {
  /* Brand Palette */
  --primary: #FF6B35;
  --primary-dark: #E55A2B;
  --primary-light: #FF8F65;
  --primary-glow: rgba(255, 107, 53, 0.25);
  --secondary: #2EC4B6;
  --secondary-dark: #25A99D;
  --secondary-light: #5ED4C9;
  --accent: #FFBA08;
  --accent-dark: #E0A300;

  /* Neutrals */
  --bg: #FAFAF8;
  --bg-alt: #F0EFEB;
  --bg-card: #FFFFFF;
  --bg-dark: #1A1A2E;
  --text: #2D2D2D;
  --text-light: #6B6B6B;
  --text-muted: #9B9B9B;
  --text-inverse: #FFFFFF;
  --border: #E8E8E8;
  --border-light: #F0F0F0;

  /* Semantic */
  --success: #2ECC71;
  --warning: #F39C12;
  --danger: #E74C3C;
  --info: #3498DB;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.16), 0 8px 20px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 40px var(--primary-glow);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 300ms var(--ease-out);
  --transition-slow: 500ms var(--ease-out);

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 900px;
  --nav-height: 72px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1rem, 2.5vw, 1.25rem); }
p { margin-bottom: 1em; color: var(--text-light); }
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.container--narrow {
  max-width: var(--container-narrow);
}
section {
  padding: var(--space-2xl) 0;
}
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.section-header p {
  max-width: 600px;
  margin: var(--space-sm) auto 0;
}
.grid {
  display: grid;
  gap: var(--space-lg);
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: var(--transition-base);
}
.nav.scrolled {
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  z-index: 1001;
}
.nav__logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}
.nav__links {
  display: none;
  gap: var(--space-lg);
  align-items: center;
}
.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition-fast);
  position: relative;
}
.nav__links a:hover,
.nav__links a.active {
  color: var(--primary);
}
.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.nav__lang {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  padding: 3px;
}
.nav__lang a {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: var(--transition-fast);
  text-transform: uppercase;
}
.nav__lang a:hover { color: var(--text); }
.nav__lang a.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Mobile menu toggle */
.nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}
.nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition-base);
}
.nav__toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu overlay */
.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(250, 250, 248, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-lg) var(--space-xl);
  flex-direction: column;
  gap: var(--space-lg);
}
.nav__mobile.open {
  display: flex;
}
.nav__mobile a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-fast);
}
.nav__mobile a:hover { color: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  transition: var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 53, 0.4);
}
.btn--secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 2px solid var(--border);
}
.btn--secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn--accent {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: white;
  box-shadow: 0 4px 16px rgba(46, 196, 182, 0.3);
}
.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(46, 196, 182, 0.4);
}
.btn--ghost {
  background: transparent;
  color: var(--text-light);
  padding: 10px 20px;
}
.btn--ghost:hover { color: var(--primary); }
.btn--large {
  padding: 16px 36px;
  font-size: 1.1rem;
}
.btn--small {
  padding: 8px 18px;
  font-size: 0.85rem;
}
.btn--icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-md) var(--space-xl);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(250, 250, 248, 0.92) 0%,
    rgba(250, 250, 248, 0.85) 40%,
    rgba(250, 250, 248, 0.95) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  width: 100%;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}
.hero__badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s ease infinite;
}
.hero h1 {
  margin-bottom: var(--space-md);
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

/* ---------- Cart Input (Centerpiece) ---------- */
.cart-input {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg);
  margin: 0 auto;
  max-width: 700px;
  width: 100%;
  transition: var(--transition-base);
}
.cart-input:focus-within {
  box-shadow: var(--shadow-xl), 0 0 0 3px var(--primary-glow);
}
.cart-input__label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cart-input__field {
  width: 100%;
  min-height: 80px;
  padding: var(--space-md);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
  transition: var(--transition-fast);
  background: var(--bg);
}
.cart-input__field:focus {
  border-color: var(--primary);
  background: white;
}
.cart-input__field::placeholder {
  color: var(--text-muted);
}
.cart-input__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  align-items: center;
}
.cart-input__actions .btn {
  flex: 1;
  min-width: 140px;
}
.cart-input__or {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0 var(--space-xs);
}
.cart-input__hint {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.cart-input__hint svg { flex-shrink: 0; }

/* Cart tags (parsed items) */
.cart-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.cart-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(255,107,53,0.08), rgba(255,107,53,0.04));
  border: 1px solid rgba(255,107,53,0.15);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary-dark);
  animation: fadeInUp 0.3s var(--ease-out) forwards;
}
.cart-tag__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
  cursor: pointer;
}
.cart-tag__remove:hover {
  background: var(--danger);
  color: white;
}

/* ---------- Recipe Results ---------- */
.results {
  margin-top: var(--space-xl);
}
.results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-md);
}
.results__count {
  font-size: 1.1rem;
  font-weight: 700;
}
.results__count span {
  color: var(--primary);
}
.results__filters {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.filter-btn {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-alt);
  color: var(--text-light);
  transition: var(--transition-fast);
  border: 1px solid transparent;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: white;
}
.results__grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

/* ---------- Recipe Card ---------- */
.recipe-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s var(--ease-out) forwards;
}
.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.recipe-card__image {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.recipe-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.recipe-card:hover .recipe-card__image img {
  transform: scale(1.05);
}
.recipe-card__match {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  backdrop-filter: blur(8px);
}
.recipe-card__match--high { background: rgba(46, 204, 113, 0.9); }
.recipe-card__match--medium { background: rgba(243, 156, 18, 0.9); }
.recipe-card__match--low { background: rgba(231, 76, 60, 0.9); }
.recipe-card__cuisine {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0,0,0,0.5);
  color: white;
  backdrop-filter: blur(8px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.recipe-card__body {
  padding: var(--space-md);
}
.recipe-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recipe-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recipe-card__meta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.recipe-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.recipe-card__meta-item svg { width: 14px; height: 14px; }
.recipe-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--space-sm);
}
.recipe-card__tag {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--bg-alt);
  color: var(--text-muted);
}
.recipe-card__ingredients {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-light);
}
.recipe-card__ingredients-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.recipe-card__ingredient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.recipe-card__ingredient {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--text-light);
}
.recipe-card__ingredient--matched {
  background: rgba(46, 204, 113, 0.12);
  color: var(--success);
  font-weight: 600;
}
.recipe-card__ingredient--missing {
  background: rgba(231, 76, 60, 0.08);
  color: var(--danger);
  font-style: italic;
}

/* ---------- Example Carts Section ---------- */
.example-carts {
  background: var(--bg-alt);
}
.cart-template {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
}
.cart-template:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-glow);
}
.cart-template__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto var(--space-md);
}
.cart-template__icon--student { background: linear-gradient(135deg, #667eea, #764ba2); }
.cart-template__icon--family { background: linear-gradient(135deg, #f093fb, #f5576c); }
.cart-template__icon--gym { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.cart-template__icon--budget { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.cart-template__icon--veggie { background: linear-gradient(135deg, #fa709a, #fee140); }
.cart-template__icon--quick { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.cart-template h4 {
  margin-bottom: var(--space-xs);
}
.cart-template p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.cart-template__items {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ---------- Tonight's Fastest Meals ---------- */
.fastest-meals {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #16213E 100%);
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}
.fastest-meals::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,53,0.08) 0%, transparent 70%);
}
.fastest-meals .section-header h2 { color: var(--text-inverse); }
.fastest-meals .section-header p { color: rgba(255,255,255,0.6); }
.fast-meal-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
}
.fast-meal-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-4px);
}
.fast-meal-card__image {
  height: 180px;
  overflow: hidden;
}
.fast-meal-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fast-meal-card__body {
  padding: var(--space-md);
}
.fast-meal-card__time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}
.fast-meal-card__title {
  font-size: 1rem;
  color: var(--text-inverse);
  margin-bottom: var(--space-xs);
}
.fast-meal-card__ingredients {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-xl) 0;
}
.stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  text-align: center;
}
.stat__number {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: var(--space-xs);
}
.stat__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- Features Section ---------- */
.features {
  background: var(--bg);
}
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: var(--transition-base);
  border: 1px solid var(--border-light);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.feature-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(46,196,182,0.1));
}
.feature-card h4 {
  margin-bottom: var(--space-sm);
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}
.feature-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition-fast);
}
.feature-card__link:hover { gap: var(--space-sm); }

/* ---------- How It Works ---------- */
.how-it-works {
  background: var(--bg-alt);
}
.steps {
  display: grid;
  gap: var(--space-xl);
  counter-reset: step;
}
.step {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  counter-increment: step;
}
.step__number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}
.step__content h4 {
  margin-bottom: var(--space-xs);
}
.step__content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ---------- CTA Section ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.cta-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.cta-section h2 { color: white; }
.cta-section p { color: rgba(255,255,255,0.85); max-width: 500px; margin: 0 auto var(--space-lg); }
.cta-section .btn--secondary {
  background: white;
  color: var(--primary);
  border: none;
}
.cta-section .btn--secondary:hover {
  background: rgba(255,255,255,0.9);
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: var(--space-md);
  overflow: hidden;
  transition: var(--transition-base);
}
.faq-item:hover { border-color: var(--border); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  font-weight: 600;
  gap: var(--space-md);
  transition: var(--transition-fast);
}
.faq-question:hover { color: var(--primary); }
.faq-question svg {
  flex-shrink: 0;
  transition: transform var(--transition-base);
}
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}
.faq-answer__inner {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: var(--space-3xl) 0 var(--space-xl);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}
.footer__brand h3 {
  color: white;
  margin-bottom: var(--space-sm);
}
.footer__brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  max-width: 300px;
}
.footer__col h4 {
  color: white;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}
.footer__col a {
  display: block;
  padding: 4px 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  transition: var(--transition-fast);
}
.footer__col a:hover { color: var(--primary); }
.footer__bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}
.footer__bottom a { color: rgba(255,255,255,0.5); }
.footer__bottom a:hover { color: var(--primary); }

/* ---------- Page Headers ---------- */
.page-header {
  padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-2xl);
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
  text-align: center;
  position: relative;
}
.page-header__breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.page-header__breadcrumb a:hover { color: var(--primary); }
.page-header p {
  max-width: 600px;
  margin: var(--space-sm) auto 0;
}

/* ---------- Ingredient Cards ---------- */
.ingredient-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}
.ingredient-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.ingredient-card__image {
  height: 160px;
  overflow: hidden;
}
.ingredient-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ingredient-card__body {
  padding: var(--space-md);
}
.ingredient-card__category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}
.ingredient-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.ingredient-card__combos {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Combo Cards ---------- */
.combo-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border-light);
  transition: var(--transition-base);
  text-align: center;
}
.combo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-glow);
}
.combo-card__items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}
.combo-card__item {
  padding: 6px 14px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
}
.combo-card__plus {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
}
.combo-card__count {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

/* ---------- Scan Feature Promo ---------- */
.scan-promo {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.scan-promo::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.scan-promo h3 { color: white; }
.scan-promo p { color: rgba(255,255,255,0.8); }
.scan-promo .badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

/* ---------- Leftover Section ---------- */
.leftover-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}
.leftover-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.leftover-card__day {
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}
.leftover-card__body {
  padding: var(--space-md);
  flex: 1;
}
.leftover-card__title {
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.leftover-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Pantry Section ---------- */
.pantry-category {
  margin-bottom: var(--space-xl);
}
.pantry-category h3 {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border);
}
.pantry-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  transition: var(--transition-fast);
  border: 1px solid var(--border-light);
}
.pantry-item:hover { border-color: var(--primary-glow); }
.pantry-item__icon { font-size: 1.5rem; flex-shrink: 0; }
.pantry-item__name { font-weight: 600; }
.pantry-item__meals {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Search Box ---------- */
.search-box {
  position: relative;
  max-width: 500px;
  margin: 0 auto var(--space-xl);
}
.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 1rem;
  background: var(--bg-card);
  transition: var(--transition-fast);
}
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.search-box__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: fadeInUp 0.3s var(--ease-out);
}
.modal__header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal__header h3 { margin-bottom: 0; }
.modal__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}
.modal__close:hover { background: var(--bg-alt); color: var(--text); }
.modal__body { padding: var(--space-lg); }

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes slideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-delay-1 { transition-delay: 100ms; }
.animate-delay-2 { transition-delay: 200ms; }
.animate-delay-3 { transition-delay: 300ms; }
.animate-delay-4 { transition-delay: 400ms; }

/* ---------- Skeleton Loading ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border-light) 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.toast {
  background: var(--bg-dark);
  color: white;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  animation: fadeInUp 0.3s var(--ease-out);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ---------- Scroll to Top ---------- */
.scroll-top {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-base);
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ============================================================
   Responsive Breakpoints — Mobile First
   ============================================================ */

/* Small phones (320px+) — base styles above */

/* Large phones (480px+) */
@media (min-width: 480px) {
  .cart-input__field { min-height: 100px; }
  .results__grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
  :root { --nav-height: 80px; }

  .nav__links { display: flex; }
  .nav__toggle { display: none; }

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

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

  .hero { min-height: 90vh; }
  .hero h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }

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

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

  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; }

  .step { gap: var(--space-xl); }
}

/* Small desktop (1024px+) */
@media (min-width: 1024px) {
  .container { padding: 0 var(--space-xl); }

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

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

  .hero__content { max-width: 900px; }

  .cart-input { padding: var(--space-xl); }
  .cart-input__field { min-height: 100px; font-size: 1.05rem; }
}

/* Large desktop (1280px+) */
@media (min-width: 1280px) {
  .results__grid { grid-template-columns: repeat(3, 1fr); }
}

/* Ultra-wide (1536px+) */
@media (min-width: 1536px) {
  :root { --container-max: 1440px; }
  .results__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Print Styles ---------- */
@media print {
  .nav, .footer, .scroll-top, .toast-container { display: none; }
  body { color: #000; background: #fff; }
  .hero { min-height: auto; padding: 2rem 0; }
  .recipe-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- High Contrast ---------- */
@media (prefers-contrast: high) {
  :root {
    --border: #999;
    --text-light: #444;
    --text-muted: #555;
  }
}

/* ---------- Dark Mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --bg-alt: #1A1A2E;
    --bg-card: #1E1E32;
    --text: #E8E8E8;
    --text-light: #B0B0B0;
    --text-muted: #787878;
    --border: #333;
    --border-light: #262626;
  }
  .nav { background: rgba(18, 18, 18, 0.92); }
  .nav__mobile { background: rgba(18, 18, 18, 0.98); }
  .hero__bg::after {
    background: linear-gradient(180deg, rgba(18,18,18,0.92) 0%, rgba(18,18,18,0.85) 40%, rgba(18,18,18,0.95) 100%);
  }
  .cart-input__field { background: var(--bg-alt); }
  .cart-input__field:focus { background: var(--bg-card); }
  img { opacity: 0.9; }
}

/* ============================================================
   LONG-TAIL SEO PAGES — Recipe, Ingredient, Combination
   ============================================================ */

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .5rem;
  align-items: center;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs__sep { color: var(--text-muted); }

/* ---------- Recipe Detail Hero ---------- */
.detail-hero {
  position: relative;
  min-height: 420px;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  background: var(--bg-dark);
}
@media (min-width: 768px) {
  .detail-hero { grid-template-columns: 1fr 1fr; min-height: 520px; }
}
@media (min-width: 1024px) {
  .detail-hero { grid-template-columns: 1.1fr 0.9fr; min-height: 580px; }
}
.detail-hero__img {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  order: -1;
}
@media (min-width: 768px) { .detail-hero__img { order: 0; min-height: auto; } }
.detail-hero__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: var(--bg-dark);
  color: #fff;
}
@media (min-width: 768px) { .detail-hero__content { padding: 3rem 2.5rem; } }
@media (min-width: 1024px) { .detail-hero__content { padding: 4rem 3rem; } }
.detail-hero__content h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: .75rem;
  color: #fff;
}
.detail-hero__content p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.8);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 48ch;
}

/* ---------- Meta Badges ---------- */
.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}
.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
}
.meta-badge--cuisine {
  background: var(--primary);
  border-color: var(--primary);
}
.meta-badge--difficulty-easy { background: #22c55e; border-color: #22c55e; }
.meta-badge--difficulty-medium { background: #f59e0b; border-color: #f59e0b; }
.meta-badge--difficulty-hard { background: #ef4444; border-color: #ef4444; }

/* Tags row */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.25rem;
}
.tag-pill {
  display: inline-block;
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(var(--primary-rgb, 255,90,30),.15);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb, 255,90,30),.3);
}

/* ---------- Recipe Content Layout ---------- */
.recipe-content {
  padding: 3rem 0;
}
.recipe-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 768px) {
  .recipe-layout { grid-template-columns: 320px 1fr; gap: 3rem; }
}
@media (min-width: 1024px) {
  .recipe-layout { grid-template-columns: 360px 1fr; }
}

/* Ingredients panel */
.ingredients-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  align-self: start;
  position: sticky;
  top: 5rem;
}
.ingredients-panel h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--primary);
}
.ingredients-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.ingredients-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .6rem;
  border-radius: var(--radius);
  font-size: .93rem;
  color: var(--text);
  transition: background .15s;
}
.ingredients-list li:hover { background: var(--bg-alt); }
.ingredients-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* Nutrition quick panel */
.nutrition-panel {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.nutrition-panel h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .85rem;
}
.nutrition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.nutrition-item {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: .65rem .75rem;
  text-align: center;
}
.nutrition-item strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}
.nutrition-item span {
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Instructions panel */
.instructions-panel h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.instructions-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  counter-reset: steps;
}
.instructions-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  font-size: .97rem;
  line-height: 1.65;
  color: var(--text);
  transition: box-shadow .2s, transform .2s;
}
.instructions-list li:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-1px);
}
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
  counter-increment: steps;
}

/* Tips box */
.tips-box {
  background: linear-gradient(135deg, rgba(var(--primary-rgb,255,90,30),.08), rgba(var(--primary-rgb,255,90,30),.04));
  border: 1px solid rgba(var(--primary-rgb,255,90,30),.2);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}
.tips-box h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem;
}
.tips-box p { font-size: .93rem; line-height: 1.65; color: var(--text-light); margin: 0; }

/* ---------- Related Recipes Grid ---------- */
.related-section {
  padding: 3rem 0;
  background: var(--bg-alt);
}
.related-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 480px) { .related-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .related-grid { grid-template-columns: repeat(4, 1fr); } }

.related-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .25s, transform .25s;
  display: block;
}
.related-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  transform: translateY(-3px);
}
.related-card__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.related-card__body {
  padding: 1rem;
}
.related-card__title {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .35rem;
}
.related-card__meta {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ---------- Ingredient Profile Page ---------- */
.ingredient-hero {
  background: var(--bg-dark);
  color: #fff;
  padding: 5rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ingredient-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 0%, rgba(var(--primary-rgb,255,90,30),.25) 0%, transparent 70%);
  pointer-events: none;
}
.ingredient-hero__img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  border: 4px solid rgba(255,255,255,.2);
  display: block;
}
@media (min-width: 768px) {
  .ingredient-hero__img { width: 260px; height: 260px; }
}
.ingredient-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: .75rem;
}
.ingredient-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 52ch;
  margin: 0 auto 1.5rem;
}
.ingredient-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}
.ingredient-badge {
  padding: .4rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
}

/* Ingredient content sections */
.ingredient-content {
  padding: 3rem 0;
}
.ingredient-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .ingredient-layout { grid-template-columns: 1fr 340px; gap: 3rem; }
}

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.info-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--primary);
}
.info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .6rem; }
.info-card p { font-size: .93rem; line-height: 1.7; color: var(--text-light); }

/* Pairings grid */
.pairings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .75rem;
}
.pairing-chip {
  display: block;
  padding: .6rem .9rem;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  text-align: center;
  font-size: .83rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all .2s;
}
.pairing-chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* Nutrition table */
.nutrition-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.nutrition-table tr { border-bottom: 1px solid var(--border); }
.nutrition-table tr:last-child { border-bottom: none; }
.nutrition-table td { padding: .6rem .4rem; }
.nutrition-table td:last-child { text-align: right; font-weight: 700; color: var(--primary); }

/* Leftover ideas */
.leftover-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.leftover-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .92rem;
  color: var(--text);
  padding: .4rem 0;
}
.leftover-list li::before {
  content: '→';
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* Substitutes chips */
.substitute-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.substitute-chip {
  padding: .4rem .9rem;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: .83rem;
  color: var(--text-light);
  text-decoration: none;
  transition: all .2s;
}
.substitute-chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- Combination Page ---------- */
.combo-hero {
  position: relative;
  background: var(--bg-dark);
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
}
.combo-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.combo-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.combo-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 5rem 0 3rem;
  color: #fff;
  text-align: center;
}
.combo-hero__content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: .75rem;
}
.combo-hero__content p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  max-width: 56ch;
  margin: 0 auto 1.5rem;
  line-height: 1.65;
}
.why-it-works {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin: 1rem auto 0;
  font-size: .93rem;
  line-height: 1.6;
  color: rgba(255,255,255,.9);
  max-width: 56ch;
  text-align: left;
}

/* Combo ingredient pills (big) */
.combo-ingredients-display {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin: 1.25rem 0;
}
.combo-ing-pill {
  background: var(--primary);
  color: #fff;
  padding: .6rem 1.5rem;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}
.combo-plus {
  font-size: 1.8rem;
  font-weight: 900;
  color: rgba(255,255,255,.6);
}

/* ---------- Cuisine & Tag Pages ---------- */
.cuisine-hero {
  background: var(--bg-dark);
  color: #fff;
  padding: 6rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cuisine-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--primary-rgb,255,90,30),.3) 0%, transparent 70%);
}
.cuisine-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  position: relative;
  z-index: 1;
  margin-bottom: .75rem;
}
.cuisine-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 54ch;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  line-height: 1.65;
}
.cuisine-hero__count {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: .4rem 1.25rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  margin-top: 1rem;
  position: relative;
  z-index: 1;
}

/* Recipe index grid (cuisine/tag pages) */
.recipe-index {
  padding: 3rem 0 4rem;
}
.recipe-index h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
}
.recipe-index-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 480px) { .recipe-index-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .recipe-index-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .recipe-index-grid { grid-template-columns: repeat(4, 1fr); } }

.recipe-index-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .25s;
}
.recipe-index-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  transform: translateY(-3px);
}
.recipe-index-card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.recipe-index-card__body {
  padding: 1rem 1.1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.recipe-index-card__title {
  font-size: .97rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .5rem;
  color: var(--text);
}
.recipe-index-card__meta {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: .5rem;
}
.recipe-index-card__meta span {
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* ---------- CTA Section (detail pages) ---------- */
.detail-cta {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark, #d94210) 100%);
  color: #fff;
}
.detail-cta h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: .75rem;
  color: #fff;
}
.detail-cta p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.88);
  max-width: 48ch;
  margin: 0 auto 1.75rem;
}
.detail-cta .btn--white {
  background: #fff;
  color: var(--primary);
  border: none;
  font-weight: 700;
  padding: .9rem 2rem;
  border-radius: 999px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  transition: transform .2s, box-shadow .2s;
}
.detail-cta .btn--white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

/* ---------- Dark Mode Overrides — Detail Pages ---------- */
@media (prefers-color-scheme: dark) {
  .ingredients-panel,
  .info-card,
  .related-card,
  .recipe-index-card { background: #1E1E32; border-color: #333; }
  .instructions-list li { background: #1E1E32; border-color: #333; }
  .nutrition-item { background: #2a2a40; }
  .pairing-chip,
  .substitute-chip { background: #2a2a40; border-color: #444; }
  .tips-box { background: rgba(255,90,30,.08); }
}

/* ---------- Responsive Overrides — Detail Pages ---------- */
@media (max-width: 767px) {
  .ingredients-panel { position: static; }
  .detail-hero__content { padding: 2rem 1.25rem; }
  .recipe-content { padding: 2rem 0; }
  .related-section { padding: 2rem 0; }
}

@media (min-width: 1280px) {
  .recipe-index-grid { grid-template-columns: repeat(5, 1fr); }
  .related-grid { grid-template-columns: repeat(4, 1fr); }
}
