/*
 * Awesome Cuisine — Shared Stylesheet
 * File: ac-styles.css
 * Enqueued via functions.php on every page.
 *
 * Contains: design tokens, reset, typography, layout primitives,
 * shared components (cards, buttons, header, footer, section headers).
 * Page-specific rules live in each template's inline <style> block
 * or a dedicated stylesheet under css/.
 * ================================================================
 */


/* ================================================================
   1. DESIGN TOKENS
   ================================================================ */
:root {
  /* Brand colours */
  --color-red:          #c8312a;
  --color-red-dark:     #a0251f;
  --color-red-light:    #f5e8e7;
  --color-gold:         #e8a020;
  --color-gold-light:   #fdf3e0;

  /* Neutrals */
  --color-ink:          #1a1612;
  --color-body:         #3d3530;
  --color-muted:        #7a6e68;
  --color-border:       #e8e2dd;
  --color-bg:           #fdfaf7;
  --color-bg-alt:       #f5f0ea;
  --color-white:        #ffffff;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Karla', system-ui, sans-serif;
  --font-ui:      'Karla', system-ui, sans-serif;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  1.875rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;

  /* Line heights */
  --leading-tight:   1.15;
  --leading-snug:    1.3;
  --leading-normal:  1.6;
  --leading-relaxed: 1.75;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container-max:    1240px;
  --container-narrow: 780px;
  --gutter:           clamp(1rem, 4vw, 2rem);

  /* Radii */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(26,22,18,.08), 0 1px 2px rgba(26,22,18,.06);
  --shadow-md:   0 4px 12px rgba(26,22,18,.10), 0 2px 4px rgba(26,22,18,.06);
  --shadow-lg:   0 12px 32px rgba(26,22,18,.12), 0 4px 8px rgba(26,22,18,.06);
  --shadow-card: 0 2px 8px rgba(26,22,18,.08);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Z-index */
  --z-sticky:   200;
  --z-dropdown: 100;
  --z-overlay:  300;
}


/* ================================================================
   2. RESET & BASE
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-body);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea { font-family: inherit; }


/* ================================================================
   3. TYPOGRAPHY
   ================================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: var(--leading-tight);
  font-weight: 700;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}
p:last-child { margin-bottom: 0; }


/* ================================================================
   4. LAYOUT PRIMITIVES
   ================================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid   { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.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;
}

.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ================================================================
   5. SECTION HEADER (used on every page)
   ================================================================ */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-border);
  gap: var(--space-4);
}

.section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-ink);
  position: relative;
}

.section-header__title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--color-red);
  border-radius: 2px;
  margin-right: var(--space-3);
  vertical-align: middle;
  margin-bottom: 2px;
}

.section-header__link {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-red);
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.section-header__link:hover {
  color: var(--color-red-dark);
  text-decoration: underline;
}


/* ================================================================
   6. BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-decoration: none;
}

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

.btn--outline {
  background: transparent;
  color: var(--color-red);
  border-color: var(--color-red);
}
.btn--outline:hover {
  background: var(--color-red);
  color: var(--color-white);
}

.btn--ghost {
  background: transparent;
  color: var(--color-body);
  border-color: var(--color-border);
}
.btn--ghost:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-muted);
}

.btn--lg {
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
}

.btn--sm {
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-4);
}


/* ================================================================
   7. RECIPE CARD
   ================================================================ */
.recipe-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  text-decoration: none;
}

.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.recipe-card__image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-bg-alt);
  flex-shrink: 0;
}

.recipe-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.recipe-card:hover .recipe-card__image-wrap img {
  transform: scale(1.04);
}

/* No-image fallback */
.recipe-card__image-wrap--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-bg-alt) 0%, #ede8e1 100%);
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
}

.recipe-card__body {
  padding: var(--space-4) var(--space-5) var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.recipe-card__category {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-red);
  margin-bottom: var(--space-2);
}

.recipe-card__title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-ink);
  line-height: var(--leading-snug);
  flex: 1;
  transition: color var(--transition-fast);
}

.recipe-card:hover .recipe-card__title {
  color: var(--color-red);
}

/* Horizontal variant (sidebar / compact lists) */
.recipe-card--horizontal {
  flex-direction: row;
  align-items: stretch;
}

.recipe-card--horizontal .recipe-card__image-wrap {
  width: 110px;
  flex-shrink: 0;
  aspect-ratio: unset;
}

.recipe-card--horizontal .recipe-card__body {
  padding: var(--space-3) var(--space-4);
}

.recipe-card--horizontal .recipe-card__title {
  font-size: var(--text-base);
}


/* ================================================================
   8. ARTICLE / GUIDE CARD
   ================================================================ */
.article-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  text-decoration: none;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.article-card__image-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg-alt);
  flex-shrink: 0;
}

.article-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.article-card:hover .article-card__image-wrap img {
  transform: scale(1.04);
}

.article-card__body {
  padding: var(--space-4) var(--space-5) var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card__label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold);
  margin-bottom: var(--space-2);
}

.article-card__title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-ink);
  line-height: var(--leading-snug);
  flex: 1;
  transition: color var(--transition-fast);
}

.article-card:hover .article-card__title {
  color: var(--color-red);
}


/* ================================================================
   9. CATEGORY TILE
   ================================================================ */
.category-tile {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  display: block;
  background: var(--color-bg-alt);
  text-decoration: none;
}

.category-tile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.category-tile:hover .category-tile__img {
  transform: scale(1.06);
}

.category-tile__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(26,22,18,.72) 0%,
    rgba(26,22,18,.10) 55%,
    transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-4);
}

.category-tile__name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-white);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-1);
}

.category-tile__count {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: rgba(255,255,255,.72);
}

.category-tile:hover .category-tile__name {
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ================================================================
   10. HEADER
   ================================================================ */
.ac-header {
  /* Not sticky by design — the original theme scrolled away with the
     page, and a sticky bar was fighting with the recipe Table of
     Contents box and other in-content elements near the top of posts. */
  position: static;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

/* ── Top bar: logo + search + utility links ── */
.ac-header__top {
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-3);
}

.ac-header__top-inner {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: var(--space-6);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ac-header__logo img {
  /* aspect-ratio matches the logo's actual width/height HTML attributes
     (180x52). Without it, `width: auto` means the browser can't work
     out the rendered width until the image itself has loaded, so it
     reserves no space for it — PageSpeed flags this as an "unsized
     image element" and it was the single biggest contributor to a
     0.266 CLS score (poor) on post pages, where a slower-loading
     hero image below it gave the logo more time to visibly jump. */
  aspect-ratio: 180 / 52;
  height: 52px;
  width: auto;
  display: block;
}

/* Search form */
.ac-header__search {
  position: relative;
  max-width: 520px;
  width: 100%;
  margin-inline: auto;
}

.ac-header__search input[type="search"] {
  width: 100%;
  padding: 10px 110px 10px 18px;
  border: 1.5px solid var(--color-border);
  border-radius: 0;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-ink);
  background: var(--color-bg);
  outline: none;
  transition: border-color var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.ac-header__search input[type="search"]:focus {
  border-color: var(--color-red);
}

.ac-header__search button[type="submit"] {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  padding: 0 20px;
  background: var(--color-red);
  color: var(--color-white);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .05em;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.ac-header__search button[type="submit"]:hover {
  background: var(--color-red-dark);
}

/* Utility links (top-right) */
.ac-header__util {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.ac-header__util a {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-body);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.ac-header__util a:hover {
  color: var(--color-red);
  background: var(--color-red-light);
}

.ac-header__util a.is-highlighted {
  color: var(--color-white);
  background: var(--color-red);
  border-radius: var(--radius-full);
  padding-inline: var(--space-4);
}

.ac-header__util a.is-highlighted:hover {
  background: var(--color-red-dark);
}

/* ── Red navigation bar (wp_nav_menu) ── */
.ac-header__nav {
  background: var(--color-red);
}

.ac-header__nav-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: stretch;
  /* overflow-x must NOT be set here — any overflow value other than
     visible on a parent clips absolutely positioned children (the dropdowns).
     Horizontal scroll is handled on the ul instead. */
  overflow: visible;
  scrollbar-width: none;
}

.ac-header__nav-inner::-webkit-scrollbar { display: none; }

/* Reset wp_nav_menu ul */
.ac-header__nav ul {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  /* No overflow here — overflow on any axis clips absolutely
     positioned dropdowns. Nav fits on desktop without scroll. */
}

/* Mobile only: allow horizontal scroll on the nav list */
@media (max-width: 860px) {
  .ac-header__nav > div > ul {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .ac-header__nav > div > ul::-webkit-scrollbar { display: none; }
}

.ac-header__nav ul li {
  position: relative;
}

.ac-header__nav ul li a {
  display: flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-white);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.ac-header__nav ul li a:hover,
.ac-header__nav ul li:hover > a,
.ac-header__nav ul li.current-menu-item > a,
.ac-header__nav ul li.current-menu-ancestor > a {
  background: rgba(0,0,0,.18);
}

/* Dropdown */
.ac-header__nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-red);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  padding-block: var(--space-2);
}

.ac-header__nav ul li:hover > ul {
  display: flex;
}

.ac-header__nav ul li ul li a {
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: none;
  color: var(--color-body);
  padding: var(--space-2) var(--space-5);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.ac-header__nav ul li ul li a:hover {
  background: var(--color-red-light);
  color: var(--color-red);
}

/* Mobile hamburger button */
.ac-header__menu-toggle {
  display: none !important; /* hidden on desktop, shown via media query */
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  color: var(--color-ink);
}

.ac-header__menu-toggle svg {
  display: block;
  width: 24px;
  height: 24px;
}


/* ================================================================
   11. BREADCRUMB
   ================================================================ */
.ac-breadcrumb {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-muted);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.ac-breadcrumb__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.ac-breadcrumb a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.ac-breadcrumb a:hover { color: var(--color-red); }

.ac-breadcrumb__sep {
  color: var(--color-border);
  font-size: var(--text-xs);
}

.ac-breadcrumb__current {
  color: var(--color-ink);
  font-weight: 600;
}


/* ================================================================
   12. FOOTER
   ================================================================ */
.ac-footer {
  background: #111;
  color: rgba(255,255,255,.75);
  margin-top: var(--space-20);
}

.ac-footer__cols {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--space-12) var(--space-10);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.ac-footer__col h4 {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.95);
  margin-bottom: var(--space-5);
}

.ac-footer__col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
}

.ac-footer__col ul a {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color var(--transition-fast);
  line-height: 1.5;
}

.ac-footer__col ul a:hover { color: #fff; }

/* Newsletter col — FluentForm shortcode replaces the raw form */
.ac-footer__col--newsletter p {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: rgba(255,255,255,.5);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

/* Override FluentForm styles inside dark footer */
.ac-footer__col--newsletter .ff-el-group { margin-bottom: var(--space-3); }

.ac-footer__col--newsletter .ff-el-form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: #fff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 0;
  outline: none;
  transition: border-color var(--transition-fast);
}

.ac-footer__col--newsletter .ff-el-form-control::placeholder {
  color: rgba(255,255,255,.35);
}

.ac-footer__col--newsletter .ff-el-form-control:focus {
  border-color: rgba(255,255,255,.4);
}

.ac-footer__col--newsletter .ff_submit_btn_container .ff-btn {
  width: 100%;
  padding: var(--space-3) var(--space-5);
  background: var(--color-red);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-sm);
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.ac-footer__col--newsletter .ff_submit_btn_container .ff-btn:hover {
  background: var(--color-red-dark);
}

/* Bottom bar */
.ac-footer__bottom {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--space-6);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-6);
}

.ac-footer__copy {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: rgba(255,255,255,.35);
}

.ac-footer__copy a {
  color: var(--color-red);
  text-decoration: none;
}

.ac-footer__logo img {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .5;
  display: block;
  margin-inline: auto;
}

.ac-footer__social {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-3);
}

.ac-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.ac-footer__social a:hover {
  background: var(--color-red);
  color: #fff;
}

.ac-footer__social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}


/* ================================================================
   13. PAGINATION
   ================================================================ */
.ac-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
  font-family: var(--font-ui);
  flex-wrap: wrap;
}

.ac-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding-inline: var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-body);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.ac-pagination .page-numbers:hover {
  border-color: var(--color-red);
  color: var(--color-red);
}

.ac-pagination .page-numbers.current {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #fff;
}

.ac-pagination .page-numbers.dots {
  border: none;
  color: var(--color-muted);
}


/* ================================================================
   14. PREV / NEXT POST NAVIGATION
   ================================================================ */
.ac-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.ac-post-nav__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.ac-post-nav__item:hover {
  border-color: var(--color-red);
  box-shadow: var(--shadow-md);
}

.ac-post-nav__item--next {
  text-align: right;
}

.ac-post-nav__label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-muted);
}

.ac-post-nav__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-ink);
  line-height: var(--leading-snug);
  transition: color var(--transition-fast);
}

.ac-post-nav__item:hover .ac-post-nav__title {
  color: var(--color-red);
}


/* ================================================================
   15. RESPONSIVE BREAKPOINTS
   ================================================================ */

/* Tablet ≤ 1024px */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .ac-footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  .ac-footer__bottom {
    grid-template-columns: 1fr 1fr;
  }

  .ac-footer__logo { display: none; }

  .ac-header__util { display: none; }

  .ac-post-nav { grid-template-columns: 1fr; }
  .ac-post-nav__item--next { text-align: left; }
}

/* Mobile ≤ 768px */
@media (max-width: 768px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }

  .ac-header__top-inner {
    grid-template-columns: auto 1fr auto;
  }

  .ac-header__logo img { height: 42px; }

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

  .ac-footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  .ac-footer__bottom {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ac-footer__social { justify-content: center; }
}

/* Small mobile ≤ 480px */
@media (max-width: 480px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

  .ac-header__top-inner {
    grid-template-columns: auto 1fr auto;
    gap: var(--space-3);
  }
}


/* ================================================================
   16. NAV DROPDOWN
   Desktop: pure CSS :hover — no JS needed.
   Mobile: JS adds .is-open class via nav.js.
   The sub-ul visibility is controlled by two independent mechanisms
   so either one works even if the other fails.
================================================================ */

/* ── Top-level nav items ──────────────────────────── */
#ac-primary-nav ul,
.ac-header__nav ul {
  display: flex;
  align-items: stretch;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#ac-primary-nav > div > ul > li,
.ac-header__nav > div > ul > li {
  position: relative;
}

#ac-primary-nav > div > ul > li > a,
.ac-header__nav > div > ul > li > a {
  display: flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff !important;
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
  text-decoration: none !important;
}

#ac-primary-nav > div > ul > li > a:hover,
#ac-primary-nav > div > ul > li.current-menu-item > a,
#ac-primary-nav > div > ul > li.current-menu-ancestor > a,
.ac-header__nav > div > ul > li > a:hover {
  background: rgba(0,0,0,.20) !important;
}

/* ── Dropdown panels ──────────────────────────────── */

/* Hidden by default — second level */
#ac-primary-nav ul ul,
.ac-header__nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8e2dd;
  border-top: 3px solid #c8312a;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 32px rgba(26,22,18,.12);
  z-index: 9999;
  padding: 6px 0;
  list-style: none !important;
  margin: 0 !important;
}

/* Third level menus removed from the WP menu — no CSS needed */

/* DESKTOP: show dropdown on hover — two levels only */
@media (min-width: 861px) {
  #ac-primary-nav > div > ul > li:hover > ul,
  .ac-header__nav > div > ul > li:hover > ul {
    display: flex;
  }

  /* Anti-flicker bridge */
  #ac-primary-nav > div > ul > li.menu-item-has-children::after,
  .ac-header__nav > div > ul > li.menu-item-has-children::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 8px;
    background: transparent;
  }
}

/* Show when JS adds .is-open (mobile) */
#ac-primary-nav ul li.is-open > ul,
.ac-header__nav ul li.is-open > ul {
  display: flex;
}

/* Sub-menu li items */
#ac-primary-nav ul ul li,
.ac-header__nav ul ul li {
  width: 100%;
  position: relative;
}

/* Second level links */
#ac-primary-nav ul ul li a,
.ac-header__nav ul ul li a {
  font-family: 'Karla', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: none;
  color: #3d3530;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}

#ac-primary-nav ul ul li a:hover,
.ac-header__nav ul ul li a:hover {
  background: #f5e8e7;
  color: #c8312a;
}

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 860px) {
  .ac-header__menu-toggle { display: flex !important; }

  #ac-primary-nav,
  .ac-header__nav {
    display: none;
    border-top: 1px solid rgba(255,255,255,.15);
  }

  #ac-primary-nav.is-open,
  .ac-header__nav.is-open {
    display: block;
  }

  #ac-primary-nav ul,
  .ac-header__nav ul {
    flex-direction: column;
    overflow-y: auto;
    max-height: 80vh;
  }

  #ac-primary-nav > div > ul > li > a,
  .ac-header__nav > div > ul > li > a {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 0.875rem;
  }

  /* Mobile sub-menus stack inline */
  #ac-primary-nav ul ul,
  .ac-header__nav ul ul {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    border-top: none;
    background: rgba(0,0,0,.18);
    padding: 4px 0;
  }

  #ac-primary-nav ul ul li a,
  .ac-header__nav ul ul li a {
    padding: 10px 32px;
    color: rgba(255,255,255,.85);
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }

  #ac-primary-nav ul ul li a:hover,
  .ac-header__nav ul ul li a:hover {
    background: rgba(0,0,0,.15);
    color: #fff;
  }

  /* Chevron for items with children */
  #ac-primary-nav ul li.menu-item-has-children > a::after,
  .ac-header__nav ul li.menu-item-has-children > a::after {
    content: '›';
    margin-left: auto;
    padding-left: 12px;
    font-size: 1.1rem;
    display: inline-block;
    transition: transform 150ms ease;
  }

  #ac-primary-nav ul li.menu-item-has-children.is-open > a::after,
  .ac-header__nav ul li.menu-item-has-children.is-open > a::after {
    transform: rotate(90deg);
  }
}

/* Ensure nav container doesn't clip dropdowns */
.ac-header__nav,
.ac-header__nav-inner,
#ac-primary-nav,
.ac-header__nav > div {
  overflow: visible;
}

/* "View all" injected link (mobile only) */
li.ac-nav-view-all {
  display: none; /* hidden on desktop */
}

@media (max-width: 860px) {
  li.ac-nav-view-all {
    display: block;
    border-bottom: 1px solid rgba(255,255,255,.15);
    margin-bottom: 4px;
  }

  li.ac-nav-view-all a {
    font-weight: 700;
    color: rgba(255,255,255,.95);
    padding: 10px 32px;
    font-size: 0.8125rem;
    letter-spacing: .03em;
    background: rgba(0,0,0,.1);
  }

  li.ac-nav-view-all a:hover {
    background: rgba(0,0,0,.25);
    color: #fff;
  }
}


/* ================================================================
   17. NO-IMAGE PLACEHOLDER
   Applied globally to .recipe-card__image-wrap--empty on all pages.
================================================================ */
.recipe-card__image-wrap--empty {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f0ebe4 0%, #e4ddd5 100%);
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.recipe-card__image-wrap--empty span {
  font-family: 'Karla', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #c4b8ae;
  display: block;
}

.recipe-card__image-wrap--empty::before {
  content: '';
  display: block;
  width: 52px;
  height: 52px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none'%3E%3Cellipse cx='32' cy='38' rx='24' ry='10' stroke='%23c4b8ae' stroke-width='2.5'/%3E%3Cpath d='M8 38 C8 28 56 28 56 38' stroke='%23c4b8ae' stroke-width='2.5' fill='none'/%3E%3Cpath d='M24 28 C24 20 32 16 32 16 C32 16 40 20 40 28' stroke='%23c4b8ae' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3Cpath d='M20 44 L44 44' stroke='%23c4b8ae' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.7;
}

.recipe-card__image-wrap--empty::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(200,185,174,.12);
  pointer-events: none;
}

/* Related card empty image — same placeholder as recipe cards */
.ac-related-card__img-wrap--empty {
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f0ebe4 0%, #e4ddd5 100%);
  position: relative;
  overflow: hidden;
}

.ac-related-card__img-wrap--empty::before {
  content: '';
  display: block;
  width: 44px;
  height: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none'%3E%3Cellipse cx='32' cy='38' rx='24' ry='10' stroke='%23c4b8ae' stroke-width='2.5'/%3E%3Cpath d='M8 38 C8 28 56 28 56 38' stroke='%23c4b8ae' stroke-width='2.5' fill='none'/%3E%3Cpath d='M24 28 C24 20 32 16 32 16 C32 16 40 20 40 28' stroke='%23c4b8ae' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3Cpath d='M20 44 L44 44' stroke='%23c4b8ae' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.6;
}


/* ================================================================
   18. CLS PREVENTION
   Explicit dimension reservations prevent layout shift.
   Images without width/height attributes get an aspect-ratio hint.
================================================================ */

/* Post content images — reserve 16:9 space before load */
.post-entry img,
.entry-content img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Featured image reservation */
.ac-single__featured-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

/* Recipe card images
   NOTE: this used to also list .article-card__image-wrap at 4/3, which
   silently overrode Section 8's own `.article-card__image-wrap { aspect-ratio:
   16/9 }` (same specificity, this rule loads later, so it won). That meant
   every food-guide/article card was actually being cropped to 4:3 instead of
   the 16:9 its own component CSS declares, and it's why the image sizes
   registered for those cards (ac-article / ac-article-sm / ac-article-lg,
   all 16:9) matter, they now match what Section 8 actually intends. */
.recipe-card__image-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

/* Header height reservation — prevents content jump when header loads */
.ac-header {
  min-height: 116px; /* top bar ~72px + nav bar ~44px */
}

@media (max-width: 860px) {
  .ac-header { min-height: 78px; }
}


/* ------------------------------------------------------------
   CAPTIONED IMAGES
   A plain <img> already gets `max-width:100%` from the base image
   rule above, so uncaptioned images were always responsive. A
   captioned image is different: WordPress wraps it in its own
   container — the classic `[caption]` shortcode's `.wp-caption`
   div, or a Gutenberg `<figure class="wp-block-image">` — and for
   the classic shortcode WordPress writes a fixed pixel width
   straight onto that wrapper (e.g. style="width: 650px"). Nothing
   in this file constrained that wrapper, so on a narrow screen it
   stayed at its full desktop width and overflowed instead of
   shrinking with the image inside it.
   ------------------------------------------------------------ */
.post-entry .wp-caption,
.entry-content .wp-caption,
.post-entry figure.wp-block-image,
.entry-content figure.wp-block-image,
.post-entry figure,
.entry-content figure {
  max-width: 100% !important;
  width: auto !important;
  margin-inline: 0;
}

.wp-caption img,
figure.wp-block-image img,
.post-entry figure img,
.entry-content figure img {
  width: 100%;
  height: auto;
  display: block;
}

.wp-caption-text,
figure.wp-block-image figcaption,
.post-entry figcaption,
.entry-content figcaption {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-align: center;
  padding-block: var(--space-2);
  margin: 0;
}


/* ── Exclude .prefimg from the post-entry aspect-ratio rule ── */
.post-entry img.prefimg,
.entry-content img.prefimg {
  aspect-ratio: unset !important;
  object-fit: unset !important;
  max-width: 320px !important;
  max-height: 200px !important;
  height: auto !important;
  border: 1px solid #e8e2dd;
  border-radius: 8px;
  padding: 0.5rem;
  background: #f5f0ea;
  display: block;
  margin-block: 0.75rem;
}


/* ------------------------------------------------------------
   BLOCKQUOTE
   Covers all WordPress blockquotes in post content.
   Icon is pure CSS — no image or icon font needed.
   ------------------------------------------------------------ */

.post-entry blockquote,
blockquote {
  position: relative;
  margin-block: var(--space-8);
  padding: var(--space-6) var(--space-6) var(--space-6) var(--space-8);
  background: #f0ecea;
  border-left: 4px solid var(--color-red);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Red square icon in the top-left corner */
.post-entry blockquote::before,
blockquote::before {
  content: '';
  position: absolute;
  top: var(--space-4);
  left: -4px;
  width: 14px;
  height: 14px;
  background: var(--color-red);
  border-radius: 2px;
  transform: translateX(-50%) translateX(2px);
}

.post-entry blockquote p,
blockquote p {
  font-style: italic;
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-body);
  margin-bottom: var(--space-3);
}

.post-entry blockquote p:last-child,
blockquote p:last-child {
  margin-bottom: 0;
}

/* Optional: citation/attribution line */
.post-entry blockquote cite,
blockquote cite {
  display: block;
  margin-top: var(--space-3);
  font-style: normal;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
}

.post-entry blockquote cite::before,
blockquote cite::before {
  content: '\2014\00a0'; /* em dash + non-breaking space */
}

/* ------------------------------------------------------------
   TABLES
   Styles every <table> inside post content — both real Gutenberg
   table blocks (with <thead>) and Classic Editor / pasted tables
   (no <thead>, first row is just plain <td>s acting as the header).

   Depends on tokens already defined in :root — no new variables.
   ------------------------------------------------------------ */

:is(.post-entry, .entry-content) table {
  width: 100% !important;
  max-width: 100% !important;
  margin-block: var(--space-8);
  border-collapse: separate !important;
  border-spacing: 0;
  border: 1px solid var(--color-border) !important;
  border-top: 3px solid var(--color-red) !important;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-body) !important;
  font-size: var(--text-base) !important;
  line-height: var(--leading-normal);
}

/* Reset whatever inline attrs/styles a pasted table left on cells */
:is(.post-entry, .entry-content) table tr,
:is(.post-entry, .entry-content) table td,
:is(.post-entry, .entry-content) table th {
  border: none !important;
  background: transparent !important;
  width: auto !important;
  height: auto !important;
}

/* ---- Header row -----------------------------------------------
   Matches real <thead> rows AND, for tables with no <thead> at
   all, the first row inside the browser's auto-inserted <tbody>.
   ----------------------------------------------------------------*/
:is(.post-entry, .entry-content) table thead tr,
:is(.post-entry, .entry-content) table:not(:has(thead)) tbody tr:first-child {
  background: var(--color-bg-alt) !important;
}

:is(.post-entry, .entry-content) table thead th,
:is(.post-entry, .entry-content) table thead td,
:is(.post-entry, .entry-content) table:not(:has(thead)) tbody tr:first-child th,
:is(.post-entry, .entry-content) table:not(:has(thead)) tbody tr:first-child td {
  font-family: var(--font-ui) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  font-size: var(--text-sm) !important;
  letter-spacing: 0.03em;
  color: var(--color-ink) !important;
  text-align: left;
  padding: var(--space-4) var(--space-5) !important;
  border-bottom: 2px solid var(--color-border) !important;
  border-right: 1px solid var(--color-border) !important;
}

/* ---- Body cells (full grid: horizontal + vertical lines) ------- */
:is(.post-entry, .entry-content) table td,
:is(.post-entry, .entry-content) table th {
  padding: var(--space-4) var(--space-5) !important;
  border-bottom: 1px solid var(--color-border) !important;
  border-right: 1px solid var(--color-border) !important;
  color: var(--color-body) !important;
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}

/* Last column in each row — no right border (avoids doubling
   with the table's own outer border) */
:is(.post-entry, .entry-content) table tr td:last-child,
:is(.post-entry, .entry-content) table tr th:last-child {
  border-right: none !important;
}

/* Zebra striping on body rows (header row excluded automatically
   since it's caught by the rules above first) */
:is(.post-entry, .entry-content) table tbody tr:nth-child(even) {
  background: var(--color-bg) !important;
}

/* Row hover */
:is(.post-entry, .entry-content) table tbody tr:hover {
  background: var(--color-red-light) !important;
}

/* First column reads like a label — slight emphasis */
:is(.post-entry, .entry-content) table tbody tr td:first-child {
  font-weight: 600;
  color: var(--color-ink) !important;
}

/* Table caption, if used */
:is(.post-entry, .entry-content) table caption {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-ink);
  text-align: left;
  margin-bottom: var(--space-3);
}

/* ---- Mobile: horizontal scroll instead of crushed columns ------
   Keeps text wrapping inside each column (no nowrap) but gives
   every cell a sane minimum width so wide tables scroll instead
   of squeezing 4+ columns into 320px. */
@media (max-width: 700px) {
  :is(.post-entry, .entry-content) table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  :is(.post-entry, .entry-content) table td,
  :is(.post-entry, .entry-content) table th {
    min-width: 130px;
  }
}
