/**
 * The shared foundation for every coded page: the design tokens, the two
 * webfonts, and the components that appear on more than one page type.
 *
 * Every page wrapper carries `.cs-page` plus its own scope class, so a page
 * stylesheet only has to hold what is genuinely unique to it. Page scopes tune
 * the layout by redefining a token (--wrap-max, --wrap-pad, --band-pad) rather
 * than restating the rule.
 */

@font-face {
  font-family: "Caprasimo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/caprasimo-400.woff2") format("woff2");
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/figtree-variable.woff2") format("woff2");
}

:root {
  --color-bg: #f2e7d5;
  --color-surface: #e7dac6;
  --color-text: #201e1d;
  --color-accent: #c48642;
  --color-accent-2: #848360;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-neutral-100: #f9f4ed;
  --color-neutral-200: #eee7db;
  --color-neutral-300: #dcd3c4;
  --color-neutral-400: #c0b6a5;
  --color-neutral-500: #a19786;
  --color-neutral-600: #82796a;
  --color-neutral-700: #645c50;
  --color-neutral-800: #474238;
  --color-neutral-900: #2e2b25;

  --color-accent-100: #fdf3e4;
  --color-accent-200: #f9e2c5;
  --color-accent-300: #f2ca99;
  --color-accent-400: #dcac6b;
  --color-accent-500: #c48642;
  --color-accent-600: #b65d35;
  --color-accent-700: #97441f;
  --color-accent-800: #6d2f14;
  --color-accent-900: #43200f;

  --color-accent-2-100: #f3f3e5;
  --color-accent-2-200: #e6e5cf;
  --color-accent-2-300: #d0cfb2;
  --color-accent-2-400: #adac8a;
  --color-accent-2-500: #949370;
  --color-accent-2-600: #848360;
  --color-accent-2-700: #64634a;
  --color-accent-2-800: #464534;
  --color-accent-2-900: #2b2a20;

  --font-heading: "Caprasimo", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", Menlo, monospace;

  --space-1: 4.4px;
  --space-2: 8.8px;
  --space-3: 13.2px;
  --space-4: 17.6px;
  --space-5: 22px;
  --space-6: 26.4px;
  --space-8: 35.2px;
  --space-10: 44px;
  --space-12: 68px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --fs-h2: 40px;
  --fs-h2-m: 28px;
  --fs-h3: 26px;
  --fs-h4: 19px;
  --fs-lede: 19px;
  --fs-body: 16px;
  --fs-small: 13.5px;
  --fs-micro: 11px;
  --fs-price: 17px;

  /* The deep blue is the footer ground and the brand mark; it is the one place
     the palette leaves the warm range, so its ramp lives here rather than in a
     page sheet. */
  --color-brand-blue: #0b4986;
  --color-blue-200: #c3d6e9;
  --color-blue-300: #93b4d5;
  --color-blue-600: #2a6aa8;
  --color-blue-700: #16589a;

  --fs-nav: 14.5px;

  --line-hair: 1px solid var(--color-divider);
  --mark-size: 38px;
  --bullet-size: 7px;
  --bar-w: 16px;
  --bar-h: 2px;
  --bar-gap: 3.5px;
  --ph-stripe: repeating-linear-gradient(45deg, var(--color-accent-200) 0 11px, var(--color-accent-100) 11px 22px);

  /* Layout dials each page scope may override. */
  --wrap-max: 1240px;
  --wrap-pad: 20px;
  --band-pad: var(--space-8);
}

/* Elementor's kit stylesheet redeclares these two names on `:root` and loads
   after the theme, so both scopes reclaim them: a closer ancestor wins a
   custom property no matter which sheet came last. */
.cs-page,
.cs-chrome {
  --font-heading: "Caprasimo", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

/* The tokens above are global because the site header and footer live outside
   `.cs-page`; the page scope below owns only the layout. */
.cs-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

.cs-page *,
.cs-page *::before,
.cs-page *::after { box-sizing: border-box; }

.cs-page :where(h1, h2, h3, h4, p, ul, ol, li, figure, blockquote) {
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.cs-page h1,
.cs-page h2,
.cs-page h3,
.cs-page h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--color-text);
}

.cs-page a { color: inherit; text-decoration: none; }
.cs-page :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.cs-page ::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* Astra's content container is padded and capped; the bands run edge to edge. */
body.post-type-archive-product .site-content > .ast-container,
body.tax-product_cat .site-content > .ast-container,
body.page-template-template-faq .site-content > .ast-container,
body.page-template-template-recipes .site-content > .ast-container,
body.single-cs_recipe .site-content > .ast-container {
  display: block;
  max-width: none;
  padding: 0;
}

body.post-type-archive-product #primary,
body.tax-product_cat #primary,
body.page-template-template-faq #primary,
body.page-template-template-recipes #primary,
body.single-cs_recipe #primary {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ── bands and the wrap ─────────────────────────────────── */
.cs-page .band {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: var(--band-pad);
}

.cs-page .band-tight { padding-block: var(--space-8); }
.cs-page .band-alt { background: var(--color-surface); }
.cs-page .band-center { align-items: center; }

.cs-page .wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--wrap-max);
  padding-inline: var(--wrap-pad);
}

/* ── section headings ───────────────────────────────────── */
.cs-page .eyebrow {
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}

.cs-page .sec-title { font-size: var(--fs-h2); }
.cs-page .sec-note { font-size: var(--fs-body); max-width: 52ch; }
.cs-page .lede { font-size: var(--fs-lede); max-width: 46ch; line-height: 1.5; }

.cs-page .sec-head {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  width: 100%;
  margin-bottom: var(--space-8);
}

.cs-page .sec-head-col { display: flex; flex-direction: column; gap: var(--space-2); }

.cs-page .center-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
  max-width: 56ch;
  margin-inline: auto;
}

/* ── filter chips ───────────────────────────────────────── */
.cs-page .filter-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  width: 100%;
  padding-bottom: var(--space-6);
}

.cs-page .chip-row { display: flex; flex-direction: row; flex-wrap: wrap; gap: var(--space-2); }

.cs-page .chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  border: var(--line-hair);
  font-size: var(--fs-small);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.cs-page .chip:hover { background: var(--color-accent-100); }
.cs-page .chip-on { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.cs-page .chip-on:hover { background: var(--color-accent-600); }

.cs-page .sort-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
  font-size: var(--fs-small);
  color: var(--color-neutral-700);
}

/* ── buttons ────────────────────────────────────────────── */
/* Astra styles Woo buttons at (0,2,1) via `.woocommerce-js a.button`, so these
   carry a `body` prefix and an element type to outrank it without !important. */
body .cs-page a.btn,
body .cs-page button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  padding: var(--space-2) var(--space-4);
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background 120ms ease;
}

body .cs-page a.btn-primary,
body .cs-page button.btn-primary { background: var(--color-accent); color: var(--color-bg); }

body .cs-page a.btn-primary:hover,
body .cs-page button.btn-primary:hover { background: var(--color-accent-600); color: var(--color-bg); }

body .cs-page a.btn-primary:active,
body .cs-page button.btn-primary:active { background: var(--color-accent-700); }

body .cs-page a.btn-secondary,
body .cs-page button.btn-secondary { background: transparent; border-color: var(--color-divider); color: var(--color-text); }

body .cs-page a.btn-secondary:hover,
body .cs-page button.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }

body .cs-page a.btn-secondary:active,
body .cs-page button.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }

body .cs-page a.btn-ghost { color: var(--color-accent-700); padding-inline: var(--space-1); align-self: flex-start; }
body .cs-page a.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }

body .cs-page .btn:disabled { opacity: 0.45; cursor: not-allowed; }

.cs-page .cta-row { display: flex; flex-direction: row; align-items: center; gap: var(--space-3); }

/* ── cards, media and marks ─────────────────────────────── */
.cs-page .cards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-6);
  width: 100%;
}

.cs-page .card-media { display: flex; }

.cs-page .card-cat {
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}

.cs-page .card-name {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: var(--fs-h4);
  line-height: 1.15;
}

.cs-page .card-desc { font-size: var(--fs-small); color: var(--color-neutral-800); }

.cs-page .meta-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--fs-micro);
  color: var(--color-neutral-700);
}

.cs-page .washed { filter: saturate(0.6) contrast(0.85) brightness(1.1) opacity(0.94); }

.cs-page .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--ph-stripe);
  border-radius: var(--radius-lg);
}

.cs-page .ph-sq { aspect-ratio: 1 / 1; }
.cs-page .ph-wide { aspect-ratio: 16 / 10; }

.cs-page .ph-label {
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-accent-800);
  background: var(--color-bg);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
}

.cs-page .bullet {
  width: var(--bullet-size);
  height: var(--bullet-size);
  border-radius: 999px;
  background: var(--color-accent-2-500);
  flex: none;
}

.cs-page .bullet-warm { background: var(--color-accent-500); }

.cs-page .empty-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}

/* ── tablet ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cs-page .wrap { padding-inline: var(--space-6); }
}

/* ── mobile ─────────────────────────────────────────────── */
@media (max-width: 560px) {
  .cs-page .wrap { padding-inline: var(--space-4); }
  .cs-page .sec-title { font-size: var(--fs-h2-m); }
  .cs-page .lede { font-size: var(--fs-body); }
  .cs-page .sec-head { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .cs-page .filter-bar { flex-direction: column; align-items: stretch; }
  .cs-page .chip-row { flex-wrap: nowrap; overflow-x: auto; width: 100%; min-width: 0; padding-bottom: var(--space-1); }
  .cs-page .chip { flex: none; }
  .cs-page .sort-note { margin-left: 0; }
  .cs-page .cta-row { flex-direction: column; align-items: stretch; }
  /* The centred column shrink-wraps its children, so the button row has to
     claim the full width before the buttons inside it can fill it. */
  .cs-page .center-col .cta-row { width: 100%; }
  body .cs-page a.btn { width: 100%; }
  body .cs-page a.btn-ghost { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  body .cs-page a.btn,
  body .cs-page button.btn { transition: none; }
}
