/* home-chef styles - generated for site build */

:root {
  --primary: #E2622F;
  --primary-dark: #C44A1C;
  --accent: #2F855A;
  --ink: #1F2933;
  --text: #374151;
  --muted: #6B7280;
  --bg: #FFFDF9;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --footer-bg: #20303C;
  --footer-text: #D1D5DB;
  --footer-link: #A7F3D0;
  --font: 'Outfit', 'Manrope', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}
/* Reserve bottom space only when an ad is shown or in operator preview mode. */
body.show-ads,
body.ad-anchor-active { padding-bottom: 66px; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* header */
/* Sticky wrapper so the mobile drop-down can anchor right below the search
   row without pushing the page content around. */
.site-head {
  position: sticky;
  top: 0;
  z-index: 80;
}
.main-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo svg { width: 34px; height: 34px; flex-shrink: 0; }
.logo span { color: var(--primary); }

.search-bar {
  flex: 1;
  max-width: 560px;
  display: flex;
}
/* Search sits in its own full-width row directly under the header (PC + mobile). */
.header-search {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}
.header-search .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
}
.header-search .search-bar { max-width: 640px; }
.search-bar input {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: 999px 0 0 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}
.search-bar input:focus { border-color: var(--primary); }
.search-bar button {
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 0 999px 999px 0;
  padding: 0 20px;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle {
  display: none;
}
/* morph the three bars into an X while the drop-down is open */
.nav-toggle .bar {
  transform-origin: 12px 12px;
  transition: transform .2s ease, opacity .15s ease;
}
.nav-toggle.is-open .bar-top { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open .bar-mid { opacity: 0; }
.nav-toggle.is-open .bar-bot { transform: translateY(-6px) rotate(-45deg); }

/* Header action cluster: search icon + hamburger grouped on the right. The two
   controls keep a fixed 12px gap (mobile request). */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* ── Unified icon-button family ────────────────────────────────────────────
   search-toggle, nav-toggle and home-nav-more are three different controls but
   ONE visual set: identical 40px squircle, identical 22px stroke glyph, and an
   identical resting → hover → open colour story (white / warm tint / solid
   brand-orange). This makes the header search, the hamburger and the homepage
   nav-expand control read as a single designed family instead of three
   unrelated buttons. */
.search-toggle,
.nav-toggle,
.home-nav-more {
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  line-height: 0;
  transition: background .18s ease, border-color .18s ease, color .18s ease,
              transform .12s ease, box-shadow .18s ease;
}
.search-toggle svg,
.nav-toggle svg,
.home-nav-more svg {
  width: 22px;
  height: 22px;
  display: block;
}
.search-toggle:hover,
.nav-toggle:hover,
.home-nav-more:hover {
  background: #FFF4EC;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(226, 98, 47, .15);
}
.search-toggle:active,
.nav-toggle:active,
.home-nav-more:active {
  transform: translateY(1px);
}
/* Open / toggled state — solid brand-orange fill + white glyph, identical
   across the set so any "pressed" control reads exactly the same. */
.search-toggle[aria-expanded="true"],
.nav-toggle.is-open,
.home-nav-more.is-open {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(226, 98, 47, .28);
}
/* display rules stay per-control; the family above only sets the looks */
.search-toggle { display: none; }

/* ---------- Desktop header nav with dropdowns ---------- */
.pc-nav { display: none; }
.pc-nav-link,
.pc-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.pc-nav-link:hover,
.pc-drop-btn:hover { color: var(--primary); text-decoration: none; }
.pc-nav-link.active,
.pc-drop-btn.active {
  color: var(--primary);
  background: rgba(226, 98, 47, 0.1);
}
.pc-drop { position: relative; }
.pc-caret { transition: transform .18s ease; }
.pc-drop:hover .pc-caret,
.pc-drop:focus-within .pc-caret { transform: rotate(180deg); }
.pc-drop-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
  padding: 8px;
  display: none;
  z-index: 90;
}
.pc-drop-menu-wide {
  min-width: 560px;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.pc-drop:hover .pc-drop-menu,
.pc-drop:focus-within .pc-drop-menu { display: block; }
.pc-drop:hover .pc-drop-menu-wide,
.pc-drop:focus-within .pc-drop-menu-wide { display: grid; }
.pc-drop-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.pc-drop-link {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.pc-drop-link:hover { background: rgba(226, 98, 47, .08); color: var(--primary); text-decoration: none; }
.pc-drop-link.active { color: var(--primary); background: rgba(226, 98, 47, .12); }

.category-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.category-nav .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}
.category-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav ul::-webkit-scrollbar { display: none; }
.category-nav a {
  display: block;
  padding: 14px 10px;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
}
.category-nav a:hover,
.category-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  text-decoration: none;
}
/* active state gets a soft pill background + breathing room so text never hugs the edge */
.category-nav a.active {
  background: rgba(226, 98, 47, 0.1);
  border-radius: 8px;
  border-bottom-color: transparent;
  padding: 10px 12px;
}

/* homepage category strip: lives inside the sticky header, above the search row */
.home-top-cats {
  background: #FFF7F2;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(226, 98, 47, .06);
  padding: 10px 0;
}
.home-top-cats .wrap {
  display: flex;
  align-items: center;
  gap: 0;
}
.home-top-cats-scroll {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  padding-right: 10px;
}
.home-top-cats-scroll::-webkit-scrollbar { display: none; }
.home-nav-more {
  display: inline-flex;
  flex: none;
}
.home-nav-more .more-caret {
  transition: transform .2s ease;
}
.home-nav-more.is-open .more-caret {
  transform: rotate(180deg);
}
.home-cat-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.home-cat-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.home-cat-link.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(226, 98, 47, .25);
}

/* Fixed-position overlay for all category and ingredient options. */
.home-nav-overlay {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: var(--site-head-h, 130px);
  bottom: 0;
  background: #fff;
  z-index: 90;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.home-nav-overlay.open {
  display: block;
  animation: navDropDown .18s ease;
}
.home-nav-overlay-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
}
.home-nav-overlay-group {
  margin-bottom: 28px;
}
.home-nav-overlay-group strong {
  display: block;
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.home-nav-overlay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.home-nav-overlay-grid .home-cat-link {
  justify-content: center;
}

/* pull-down animation for the mobile hamburger menu */
@keyframes navDropDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* layout */

/* On wide screens the homepage uses the header dropdowns instead of the two
   stacked category rows, so hide them there (mobile keeps both). */
@media (min-width: 769px) {
  .pc-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
  }
  body.page-home .category-nav,
  body.page-home .home-top-cats { display: none; }
}
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

.page-section { padding: 26px 0; }
.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 18px;
}

/* hero */
.hero {
  background: linear-gradient(105deg, #fff4ec 0%, #ffffff 55%, #f1faf5 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 34px 16px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.hero-text h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 14px;
  letter-spacing: -0.03em;
}
.hero-text p {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 22px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
}
.hero-cta:hover { background: var(--primary-dark); text-decoration: none; }
.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(31,41,51,0.12);
}
.hero-image img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }

/* card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.recipe-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(31,41,51,0.09);
  text-decoration: none;
}
.recipe-card .media { position: relative; }
.recipe-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.recipe-card .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
}
.recipe-card .body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.recipe-card h3 {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.3;
}
.recipe-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: auto;
}
.recipe-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.recipe-card .rating { color: #F59E0B; font-weight: 700; }

/* ads */
.adbox {
  width: 100%;
  max-width: 728px;
  margin: 24px auto;
  min-height: 250px;
  border: 1.5px dashed #CBD5E1;
  border-radius: 10px;
  background: #F8FAFC;
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.adbox .ad-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
}
.ad-slot {
  width: 100%;
  height: auto;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* real ad reveal: show the box and drop placeholder chrome when an iframe or filled ins appears */
.adbox:has(iframe),
.adbox:has(ins[data-ad-status="filled"]),
.adbox:has(ins.adsbygoogle) {
  display: flex;
  border: none;
  background: transparent;
  min-height: 0;
}
.adbox:has(iframe) .ad-label,
.adbox:has(ins[data-ad-status="filled"]) .ad-label,
.adbox:has(ins.adsbygoogle) .ad-label { display: none; }

/* operator preview: show empty placeholder boxes at ?ads=1 so ad positions are visible */
.show-ads .adbox { display: flex; }

/* anchor ad */
#anchorPad {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: var(--footer-bg);
  z-index: 40;
}
body.show-ads #anchorPad,
body.ad-anchor-active #anchorPad { height: 66px; }
#adAnchor {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 50px;
  max-height: 60px;
  background: var(--footer-bg);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  box-shadow: 0 -4px 18px rgba(0,0,0,0.15);
}
#adAnchor .ad-slot { min-height: 50px; border: none; background: transparent; }

/* interstitial */
#adInterstitial {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.interstitial-inner {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.35);
  position: relative;
}
.inter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.inter-head span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.inter-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.inter-body {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.inter-body .ad-slot { min-height: 250px; width: 100%; border: none; background: transparent; }

/* recipe detail */
.recipe-hero {
  padding-top: 24px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--muted); }
.recipe-hero h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.recipe-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.recipe-meta-bar strong { color: var(--ink); }
.rating-stars { color: #F59E0B; letter-spacing: 1px; }

.recipe-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
.recipe-main { min-width: 0; }
.recipe-sidebar { position: sticky; top: 100px; }

.recipe-lede {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 22px;
}
.recipe-figure {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.recipe-figure img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }

.recipe-main h2 {
  font-size: 1.35rem;
  color: var(--ink);
  margin: 28px 0 14px;
}
.recipe-main h3 {
  font-size: 1.15rem;
  color: var(--ink);
  margin: 24px 0 10px;
}
.recipe-main p { margin: 0 0 14px; }

.ingredient-list {
  background: #F9FAFB;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 18px 0 22px;
}
.ingredient-list ul { margin: 0; padding: 0; list-style: none; }
.ingredient-list li {
  padding: 8px 0;
  border-bottom: 1px solid #E5E7EB;
  font-size: 0.95rem;
}
.ingredient-list li:last-child { border-bottom: none; }

.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.step h4 {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 6px;
}
.step p { margin: 0 0 8px; }
.step-img {
  grid-column: 2;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 4px;
}
.step-img img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }

.tips-box {
  background: #F1FAF5;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 22px 0;
}
.tips-box h3 { margin: 0 0 10px; }
.tips-box ul { margin: 0; padding-left: 18px; }
.tips-box li { margin-bottom: 6px; }

.nutrition-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.92rem;
}
.nutrition-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.nutrition-table td:last-child { text-align: right; font-weight: 700; color: var(--ink); }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.related-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.related-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.related-card h4 {
  font-size: 0.9rem;
  padding: 10px 12px;
  margin: 0;
  color: var(--ink);
}

/* category page */
.category-header {
  padding: 26px 0 10px;
}
.category-header h1 {
  font-size: 2rem;
  color: var(--ink);
  margin: 0 0 8px;
}
.category-header p { color: var(--muted); margin: 0; }

/* footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 38px 16px 18px;
  margin-top: 36px;
}
.footer-top {
  max-width: var(--max-width);
  margin: 0 auto 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.footer-brand .logo { color: #fff; margin-bottom: 12px; font-size: 1.35rem; }
.footer-brand .logo span { color: #fff; }
.footer-brand p { font-size: 0.92rem; line-height: 1.55; margin: 0; max-width: 560px; color: rgba(255,255,255,0.8); }
.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--footer-text); font-size: 0.92rem; }
.footer-col a:hover { color: var(--footer-link); text-decoration: none; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

/* back to top */
#backToTop {
  position: fixed;
  right: 20px;
  bottom: 100px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
#backToTop.visible { display: flex; }
#backToTop:hover { background: var(--primary-dark); }

/* legal pages */
.legal-page { padding: 32px 0 50px; }
.legal-page h1 { font-size: 2rem; color: var(--ink); margin: 0 0 18px; }
.legal-page h2 { font-size: 1.25rem; color: var(--ink); margin: 26px 0 10px; }
.legal-page p { margin: 0 0 14px; }
.legal-page ul { padding-left: 20px; }

/* nav separator between categories and feature menu */
.nav-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 8px;
  align-self: center;
  flex: 0 0 auto;
}

/* mobile-only and desktop-only nav items */
.mob-only { display: none; }
.category-nav.open a.mob-only { display: block; }
.category-nav.open a.dt-only,
.category-nav.open .nav-sep.dt-only { display: none; }

/* recipe detail action bar (like / save / share) */
.recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 4px 0 20px;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.action-btn:hover { border-color: var(--primary); color: var(--primary); }
.action-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.action-btn[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* calories explanation block on detail page */
.calorie-note {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0;
}
.calorie-note .calorie-figure {
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 10px;
}
.calorie-note .calorie-figure strong { color: var(--primary); }
.calorie-note p:last-child { margin: 0; color: var(--muted); }

/* shared lead + empty state */
.lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 20px;
}
.empty-state {
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ingredient index + chips */
.ingredient-index {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.ingredient-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  color: var(--ink);
}
.ingredient-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.ingredient-chip .count {
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 2px 8px;
}

/* ingredient search page */
.ingredient-search-bar {
  position: relative;
  max-width: 520px;
  margin: 20px 0 12px;
}
.ingredient-search-bar svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.ingredient-search-bar input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
}
.ingredient-search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(226, 98, 47, 0.12);
}
.search-meta {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 16px;
}
/* Search page: two result groups (recipes + ingredients) under one box. */
.search-results { margin-top: 26px; }
.search-results-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.search-results + .search-results {
  border-top: 1px solid var(--border);
  padding-top: 22px;
}
.search-empty {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 6px 0 4px;
}
.search-empty[hidden] { display: none; }
/* Recipe cards inside the search results reuse the global .recipe-card grid. */
#recipeSearchResults { margin-bottom: 6px; }

/* calorie calculator */
.calc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 22px;
}
.calc-daily { max-width: 640px; }
.calc-food { max-width: 900px; }
.calc h2 {
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 16px;
}
.calc-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.calc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
  min-width: 160px;
}
.calc-field select,
.calc-field input {
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
}
.calc-field select:focus,
.calc-field input:focus { border-color: var(--primary); }
.calc-btn {
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 11px 20px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}
.calc-btn:hover { background: var(--primary-dark); }
.calc-result {
  margin-top: 18px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}
.calc-note {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}
.calc-list-box {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: #F9FAFB;
}
.calc-list-box h3 {
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 12px;
}
.calc-list { display: flex; flex-direction: column; gap: 10px; }
.calc-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.calc-list-item .name { flex: 1; min-width: 140px; font-weight: 600; color: var(--ink); }
.calc-list-item .unit { color: var(--muted); font-size: 0.85rem; min-width: 60px; }
.calc-list-item input {
  width: 70px;
  padding: 6px 8px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
}
.calc-list-item .item-kcal { min-width: 80px; font-weight: 700; color: var(--primary); text-align: right; }
.calc-remove {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}
.calc-remove:hover { border-color: #EF4444; color: #EF4444; }
.calc-empty {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 10px 0;
}
.calc-total-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 1.1rem;
}
.calc-total-row strong {
  font-size: 1.5rem;
  color: var(--primary);
  margin-right: auto;
}
@media (max-width: 768px) {
  .calc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-list-item .name { width: 100%; }
}

/* toast for share / save feedback */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* responsive */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .recipe-layout { grid-template-columns: 1fr 260px; }
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 18px; padding-bottom: 14px; }
  .hero-image img { aspect-ratio: 16/9; }
  .hero-text h1 { font-size: 2rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  /* search lives in its own row under the header, so it needs no order/width tweaks */
  .header-search { display: none; padding: 10px 20px; }
  .header-search.open { display: block; animation: navDropDown .18s ease; }
  .header-search .search-bar { max-width: none; }
  .header-inner { flex-wrap: nowrap; }
  .header-actions { margin-left: auto; }
  .search-toggle { display: inline-flex; }
  .pc-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .category-nav.open a.active { background: rgba(226,98,47,0.1); border-radius: 8px; }
  .nav-toggle { display: inline-flex; }
  /* Hamburger opens a drop-down panel: it is absolutely positioned just under the
     header + search row, so it overlays the page instead of pushing it down. */
  .category-nav { display: none; }
  .category-nav.open {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 90;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .10);
    animation: navDropDown .18s ease;
    max-height: calc(100vh - 118px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .category-nav.open .wrap { padding: 4px 20px; }
  .category-nav.open ul { flex-direction: column; gap: 0; }
  .category-nav.open a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 14px 0;
  }
  .category-nav.open li:last-child a { border-bottom: none; }
  .recipe-layout { grid-template-columns: 1fr; }
  .recipe-sidebar { position: static; display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  /* comfortable side padding so content never touches the screen edges */
  .wrap { padding-left: 20px; padding-right: 20px; }
  .site-footer { padding: 36px 20px 18px; }
  .hero-inner { padding-left: 20px; padding-right: 20px; }
  .adbox { min-height: 200px; }
  .ad-slot { min-height: 200px; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .recipe-hero h1 { font-size: 1.75rem; }
  .step { grid-template-columns: 1fr; }
  .step::before { margin-bottom: 6px; }
  .step-img { grid-column: 1; }
  .inter-body { min-height: 360px; }
}

/* utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
