/* ============================================================
   Pawganic Website — combined stylesheet
   Order: web fonts → color tokens → type tokens → spacing tokens
          → base reset → component styles → SPA visibility
   ============================================================ */

/* ---------- 1. FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Candal&family=Caveat:wght@400;700&display=swap');

@font-face{font-family:'FC Magic';src:url('../assets/fonts/FCMagic-Italic.ttf') format('truetype');font-weight:400;font-style:italic;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-Thin.ttf') format('truetype');font-weight:100;font-style:normal;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-ThinItalic.ttf') format('truetype');font-weight:100;font-style:italic;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-ExtraLight.ttf') format('truetype');font-weight:200;font-style:normal;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-ExtraLightItalic.ttf') format('truetype');font-weight:200;font-style:italic;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-Light.ttf') format('truetype');font-weight:300;font-style:normal;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-LightItalic.ttf') format('truetype');font-weight:300;font-style:italic;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-Italic.ttf') format('truetype');font-weight:400;font-style:italic;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-Medium.ttf') format('truetype');font-weight:500;font-style:normal;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-MediumItalic.ttf') format('truetype');font-weight:500;font-style:italic;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-SemiBold.ttf') format('truetype');font-weight:600;font-style:normal;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-SemiBoldItalic.ttf') format('truetype');font-weight:600;font-style:italic;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-Bold.ttf') format('truetype');font-weight:700;font-style:normal;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-BoldItalic.ttf') format('truetype');font-weight:700;font-style:italic;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-ExtraBold.ttf') format('truetype');font-weight:800;font-style:normal;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-ExtraBoldItalic.ttf') format('truetype');font-weight:800;font-style:italic;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-Black.ttf') format('truetype');font-weight:900;font-style:normal;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-BlackItalic.ttf') format('truetype');font-weight:900;font-style:italic;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-Heavy.ttf') format('truetype');font-weight:950;font-style:normal;font-display:swap;}
@font-face{font-family:'FC Sound Rounded';src:url('../assets/fonts/FCSoundRounded-HeavyItalic.ttf') format('truetype');font-weight:950;font-style:italic;font-display:swap;}

/* ---------- 2. COLOR TOKENS ---------- */
/* Pawganic Color Tokens — Official Brand Palette
   Source: Color Palette.png (Pantone + HEX values)

   Row 1 (primary):
     #A47F4E  Pantone 6010 C — Golden Tan (brand primary)
     #FCF3D9  Cream/Ivory     (page background)
     #88AA74  Sage Green      (brand green)
     #475D76  Pantone 4137 C  — Steel Blue (brand navy)

   Row 2 (supporting):
     #826443  Dark Brown
     #B0C8BA  Sage Mint
     #E3EAC0  Lime Tint
     #374163  Dark Navy
     #ACC0DF  Periwinkle
*/

:root {
  /* ── Brown / Tan scale — anchored to #A47F4E (500) ── */
  --color-brown-950: #1f1508;
  --color-brown-900: #3a2a10;
  --color-brown-800: #53361c;   /* dark text / wordmark */
  --color-brown-700: #6f5230;
  --color-brown-600: #826443;   /* official dark brown (secondary palette) */
  --color-brown-500: #a47f4e;   /* OFFICIAL brand primary — Pantone 6010 C */
  --color-brown-400: #be9559;
  --color-brown-300: #d4b274;
  --color-brown-200: #e6cfa5;
  --color-brown-100: #f3e8d2;
  --color-brown-50:  #fbf8f1;

  /* ── Cream — page background (official) ── */
  --color-cream:     #fcf3d9;   /* OFFICIAL cream/ivory background */
  --color-cream-dk:  #f5e8bc;   /* slightly deeper cream */

  /* ── Sage Green scale — anchored to #88AA74 (400) ── */
  --color-green-950: #111c0c;
  --color-green-900: #1e2e14;
  --color-green-800: #2e4520;
  --color-green-700: #3f5e2e;
  --color-green-600: #567642;
  --color-green-500: #6e9059;
  --color-green-400: #88aa74;   /* OFFICIAL sage green */
  --color-green-300: #aabf8e;
  --color-green-200: #c8d9a8;   /* also see --color-sage-mint */
  --color-green-100: #e3eac0;   /* OFFICIAL lime tint (secondary palette) */
  --color-green-50:  #f3f7ee;

  /* ── Sage Mint — official secondary teal-green ── */
  --color-sage-mint: #b0c8ba;   /* OFFICIAL sage mint */

  /* ── Blue / Navy scale — anchored to #475D76 (700) + #374163 (800) ── */
  --color-blue-950: #10142a;
  --color-blue-900: #28304d;
  --color-blue-800: #374163;   /* OFFICIAL dark navy */
  --color-blue-700: #475d76;   /* OFFICIAL steel blue — Pantone 4137 C */
  --color-blue-600: #4e74a0;
  --color-blue-500: #6e91bb;
  --color-blue-400: #8eaacf;
  --color-blue-300: #acc0df;   /* OFFICIAL periwinkle */
  --color-blue-200: #c3d5eb;
  --color-blue-100: #dce8f3;
  --color-blue-50:  #f0f4fa;

  /* ── Warm Neutrals (off-white to near-black) ── */
  --color-neutral-950: #0f0a04;
  --color-neutral-900: #1a1208;   /* warm near-black, illustration outlines */
  --color-neutral-800: #2e2416;
  --color-neutral-700: #45361f;
  --color-neutral-600: #6b5740;
  --color-neutral-500: #8c7560;
  --color-neutral-400: #b0997f;
  --color-neutral-300: #cdbfa8;
  --color-neutral-200: #e2d9cc;
  --color-neutral-100: #f0ebe3;
  --color-neutral-50:  #faf8f5;
  --color-white:       #ffffff;

  /* ── Semantic color aliases ── */
  --color-brand-primary:    var(--color-brown-500);   /* #a47f4e — Pantone 6010 C */
  --color-brand-primary-dk: var(--color-brown-600);   /* #826443 — dark brown */
  --color-brand-primary-lt: var(--color-brown-200);   /* light tan tint */
  --color-brand-dark:       var(--color-brown-800);   /* #53361c — deep wordmark brown */
  --color-brand-green:      var(--color-green-400);   /* #88aa74 — official sage green */
  --color-brand-green-dk:   var(--color-green-600);
  --color-brand-green-lt:   var(--color-green-100);   /* #e3eac0 — official lime tint */
  --color-brand-navy:       var(--color-blue-700);    /* #475d76 — Pantone 4137 C */
  --color-brand-navy-dk:    var(--color-blue-800);    /* #374163 — dark navy */
  --color-brand-navy-lt:    var(--color-blue-300);    /* #acc0df — periwinkle */
  --color-brand-mint:       var(--color-sage-mint);   /* #b0c8ba */

  /* ── Text ── */
  --color-text-primary:   var(--color-brown-800);
  --color-text-secondary: var(--color-neutral-600);
  --color-text-tertiary:  var(--color-neutral-400);
  --color-text-inverse:   var(--color-cream);
  --color-text-link:      var(--color-brown-500);
  --color-text-on-brand:  var(--color-white);

  /* ── Surface ── */
  --color-surface-page:   var(--color-cream);         /* official cream background */
  --color-surface-card:   var(--color-white);
  --color-surface-raised: var(--color-white);
  --color-surface-muted:  var(--color-brown-50);
  --color-surface-green:  var(--color-green-50);
  --color-surface-blue:   var(--color-blue-50);
  --color-surface-navy:   var(--color-blue-800);

  /* ── Border ── */
  --color-border-default: var(--color-brown-200);
  --color-border-strong:  var(--color-brown-300);
  --color-border-subtle:  var(--color-brown-100);
  --color-border-focus:   var(--color-brown-500);

  /* ── Feedback ── */
  --color-success:      #567642;
  --color-success-bg:   #eef4e8;
  --color-warning:      #a47f4e;
  --color-warning-bg:   #fdf6e8;
  --color-error:        #9c3b2a;
  --color-error-bg:     #faeceb;
  --color-info:         var(--color-blue-700);
  --color-info-bg:      var(--color-blue-50);
}


/* ---------- 3. TYPOGRAPHY TOKENS ---------- */
/* Pawganic Typography Tokens — updated June 2026
   ─────────────────────────────────────────────
   Font system (3-layer):
   
   EN Headline    → Candal (all-caps feel; assertive, premium)
   EN Sub-head    → Caveat Bold (handwritten warmth; human touch)
   TH Headline    → FC Sound Rounded (all weights; brand Thai voice)
   TH Sub-head    → FC Magic Italic  (⚠ not yet in project — file TBD)
   UI / Body      → FC Sound Rounded (warmth + multilingual support)
*/

:root {
  /* ── Font families ── */
  --font-headline:      'Candal', 'FC Sound Rounded', sans-serif;          /* EN primary headlines */
  --font-subheadline:   'Caveat', 'FC Sound Rounded', cursive;             /* EN accent / sub-headlines */
  --font-headline-th:      'FC Sound Rounded', system-ui, sans-serif;        /* TH headlines */
  --font-subheadline-th:   'FC Magic', 'FC Sound Rounded', cursive;         /* TH accent / sub-headlines */
  --font-body:             'FC Sound Rounded', system-ui, -apple-system, sans-serif; /* UI + body */

  /* Kept for backward compat — equals --font-body */
  --font-primary:   var(--font-body);
  --font-fallback:  system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:      'Courier New', 'Courier', monospace;

  /* ── Font weights ── */
  --font-weight-thin:        100;
  --font-weight-extralight:  200;
  --font-weight-light:       300;
  --font-weight-regular:     400;
  --font-weight-medium:      500;
  --font-weight-semibold:    600;
  --font-weight-bold:        700;
  --font-weight-extrabold:   800;
  --font-weight-black:       900;
  --font-weight-heavy:       950;

  /* ── Type scale — fluid-friendly rem values ── */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-md:   1.125rem;   /* 18px */
  --text-lg:   1.25rem;    /* 20px */
  --text-xl:   1.5rem;     /* 24px */
  --text-2xl:  1.875rem;   /* 30px */
  --text-3xl:  2.25rem;    /* 36px */
  --text-4xl:  3rem;       /* 48px */
  --text-5xl:  3.75rem;    /* 60px */
  --text-6xl:  4.5rem;     /* 72px */

  /* ── Line heights ── */
  --leading-none:    1;
  --leading-tight:   1.15;
  --leading-snug:    1.3;
  --leading-normal:  1.5;
  --leading-relaxed: 1.65;
  --leading-loose:   1.8;

  /* ── Letter spacing ── */
  --tracking-tight:   -0.03em;
  --tracking-snug:    -0.01em;
  --tracking-normal:   0em;
  --tracking-wide:     0.03em;
  --tracking-wider:    0.06em;
  --tracking-widest:   0.12em;

  /* ── Semantic type roles ── */

  /* Display — Candal, very large, assertive */
  --type-display-font:    var(--font-headline);
  --type-display-size:    var(--text-5xl);
  --type-display-weight:  var(--font-weight-regular); /* Candal is single-weight but optically heavy */
  --type-display-leading: var(--leading-tight);
  --type-display-tracking:var(--tracking-snug);

  /* H1 — Candal */
  --type-h1-font:    var(--font-headline);
  --type-h1-size:    var(--text-4xl);
  --type-h1-weight:  var(--font-weight-regular);
  --type-h1-leading: var(--leading-tight);

  /* H2 — Candal */
  --type-h2-font:    var(--font-headline);
  --type-h2-size:    var(--text-3xl);
  --type-h2-weight:  var(--font-weight-regular);
  --type-h2-leading: var(--leading-snug);

  /* H3 — Caveat Bold (accent sub-headline) */
  --type-h3-font:    var(--font-subheadline);
  --type-h3-size:    var(--text-2xl);
  --type-h3-weight:  var(--font-weight-bold);
  --type-h3-leading: var(--leading-snug);

  /* H4 — FC Sound Rounded SemiBold */
  --type-h4-font:    var(--font-body);
  --type-h4-size:    var(--text-xl);
  --type-h4-weight:  var(--font-weight-semibold);
  --type-h4-leading: var(--leading-normal);

  /* Body copy */
  --type-body-font:    var(--font-body);
  --type-body-size:    var(--text-base);
  --type-body-weight:  var(--font-weight-regular);
  --type-body-leading: var(--leading-relaxed);

  --type-body-sm-font:    var(--font-body);
  --type-body-sm-size:    var(--text-sm);
  --type-body-sm-weight:  var(--font-weight-regular);
  --type-body-sm-leading: var(--leading-normal);

  /* Labels & captions */
  --type-label-font:     var(--font-body);
  --type-label-size:     var(--text-sm);
  --type-label-weight:   var(--font-weight-semibold);
  --type-label-leading:  var(--leading-normal);
  --type-label-tracking: var(--tracking-wide);

  --type-caption-font:    var(--font-body);
  --type-caption-size:    var(--text-xs);
  --type-caption-weight:  var(--font-weight-regular);
  --type-caption-leading: var(--leading-normal);

  --type-overline-font:     var(--font-body);
  --type-overline-size:     var(--text-xs);
  --type-overline-weight:   var(--font-weight-bold);
  --type-overline-tracking: var(--tracking-widest);

  /* Product name accent — Caveat Bold, the "human dish" flavour names */
  --type-product-name-font:    var(--font-subheadline);
  --type-product-name-size:    var(--text-2xl);
  --type-product-name-weight:  var(--font-weight-bold);
  --type-product-name-leading: var(--leading-snug);
}


/* ---------- 4. SPACING / RADII TOKENS ---------- */
/* Pawganic Spacing & Layout Tokens */

:root {
  /* ── Base spacing scale (4px unit) ── */
  --space-0:   0;
  --space-px:  1px;
  --space-0-5: 2px;
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-7:   28px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-14:  56px;
  --space-16:  64px;
  --space-20:  80px;
  --space-24:  96px;
  --space-32:  128px;
  --space-40:  160px;
  --space-48:  192px;

  /* ── Corner radii — very rounded to match the FC Sound Rounded typeface ── */
  --radius-none:  0;
  --radius-xs:    4px;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    18px;
  --radius-xl:    24px;
  --radius-2xl:   32px;
  --radius-3xl:   48px;
  --radius-full:  9999px;  /* pill */

  /* ── Border widths ── */
  --border-1:  1px;
  --border-2:  2px;
  --border-3:  3px;

  /* ── Container widths ── */
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:   1024px;
  --container-xl:   1280px;
  --container-2xl:  1440px;

  /* ── Semantic spacing shortcuts ── */
  --gap-xs:   var(--space-2);
  --gap-sm:   var(--space-3);
  --gap-md:   var(--space-4);
  --gap-lg:   var(--space-6);
  --gap-xl:   var(--space-8);
  --gap-2xl:  var(--space-12);

  --padding-btn-sm:   var(--space-2) var(--space-4);
  --padding-btn-md:   var(--space-3) var(--space-6);
  --padding-btn-lg:   var(--space-4) var(--space-8);
  --padding-card:     var(--space-6);
  --padding-section:  var(--space-16) var(--space-6);
}


/* ---------- 5. BASE / RESET ---------- */
/* Pawganic Base / Reset Styles
   Global element defaults using brand tokens.
*/

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
  background-color: var(--color-surface-page);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--color-text-primary);
  text-wrap: balance;
}

h1 { font-size: var(--type-h1-size); font-weight: var(--type-h1-weight); line-height: var(--type-h1-leading); }
h2 { font-size: var(--type-h2-size); font-weight: var(--type-h2-weight); line-height: var(--type-h2-leading); }
h3 { font-size: var(--type-h3-size); font-weight: var(--type-h3-weight); line-height: var(--type-h3-leading); }
h4 { font-size: var(--type-h4-size); font-weight: var(--type-h4-weight); line-height: var(--type-h4-leading); }

p {
  font-size: var(--type-body-size);
  line-height: var(--type-body-leading);
  color: var(--color-text-secondary);
  text-wrap: pretty;
}

a {
  color: var(--color-text-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-brown-600);
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: var(--font-primary);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-primary);
  font-size: var(--text-base);
}

::selection {
  background-color: var(--color-brown-200);
  color: var(--color-brown-800);
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}


/* ---------- 6. COMPONENT STYLES ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body { font-family: var(--font-body); background: var(--color-surface-page); color: var(--color-text-primary); }

    /* Nav */
    .site-nav { position: sticky; top: 0; z-index: 100; background: rgba(252,243,217,0.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-brown-100); }
    .nav-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; height: 164px; }
    .nav-logo { height: 148px; width: auto; cursor: pointer; }
    .nav-links { display: flex; gap: 36px; list-style: none; }
    .nav-links a { font-family: var(--font-body); font-size: var(--text-base); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); text-decoration: none; letter-spacing: 0.03em; cursor: pointer; transition: color 0.15s; }
    .nav-links a:hover, .nav-links a.active { color: var(--color-brand-primary); }
    .nav-cta { font-family: var(--font-body); font-weight: var(--font-weight-semibold); font-size: var(--text-sm); padding: 10px 24px; background: var(--color-brand-primary); color: white; border: none; border-radius: var(--radius-full); cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
    .nav-cta:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(164,127,78,0.35); }

    /* Buttons */
    .btn-primary { font-family: var(--font-body); font-weight: var(--font-weight-semibold); font-size: var(--text-base); padding: 14px 32px; background: var(--color-brand-primary); color: white; border: none; border-radius: var(--radius-full); cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
    .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(164,127,78,0.4); }
    .btn-secondary { font-family: var(--font-body); font-weight: var(--font-weight-semibold); font-size: var(--text-base); padding: 14px 32px; background: transparent; color: var(--color-brown-800); border: 2px solid var(--color-brown-300); border-radius: var(--radius-full); cursor: pointer; transition: all 0.15s; }
    .btn-secondary:hover { border-color: var(--color-brand-primary); color: var(--color-brand-primary); }
    .btn-green { font-family: var(--font-body); font-weight: var(--font-weight-semibold); font-size: var(--text-sm); padding: 12px 28px; background: var(--color-brand-green); color: white; border: none; border-radius: var(--radius-full); cursor: pointer; transition: all 0.15s; }
    .btn-green:hover { background: var(--color-green-600); transform: translateY(-2px); }

    /* Product cards */
    .product-card { background: white; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--color-brown-100); box-shadow: 0 2px 8px rgba(130,100,67,0.08); transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
    .product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(130,100,67,0.15); }
    .product-card-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--color-brown-50); }
    .product-card-body { padding: 16px 20px 20px; }
    .product-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-brand-primary); background: var(--color-brown-50); border-radius: var(--radius-full); padding: 3px 10px; margin-bottom: 8px; }
    .product-name { font-family: var(--font-subheadline); font-size: var(--text-xl); font-weight: 700; color: var(--color-brown-800); line-height: 1.2; margin-bottom: 6px; }
    .product-desc { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.55; margin-bottom: 14px; }
    .product-price { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; color: var(--color-brown-800); }

    /* Category banners */
    .cat-banner { border-radius: var(--radius-xl); overflow: hidden; position: relative; aspect-ratio: 3/4; cursor: pointer; }
    .cat-banner img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
    .cat-banner:hover img { transform: scale(1.04); }
    .cat-banner-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(53,35,18,0.75) 0%, transparent 55%); display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; }
    .cat-banner-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.75); margin-bottom: 6px; }
    .cat-banner-title { font-family: var(--font-headline); font-size: var(--text-2xl); color: white; margin-bottom: 12px; line-height: 1.1; }

    /* Section */
    .section { padding: 80px 32px; }
    .section-inner { max-width: 1280px; margin: 0 auto; }
    .overline { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-brand-primary); margin-bottom: 12px; }
    .section-title { font-family: var(--font-headline); font-size: var(--text-3xl); color: var(--color-brown-800); margin-bottom: 16px; line-height: 1.15; }
    .section-subtitle { font-size: var(--text-lg); color: var(--color-text-secondary); line-height: 1.65; max-width: 560px; }

    /* Stars */
    .stars { color: #d4a74e; letter-spacing: 1px; font-size: 14px; }

    /* Footer */
    .site-footer { background: var(--color-brown-800); color: var(--color-brown-200); padding: 64px 32px 32px; }
    .footer-inner { max-width: 1280px; margin: 0 auto; }
    .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
    .footer-brand-desc { font-size: var(--text-sm); line-height: 1.65; color: var(--color-brown-300); margin-top: 16px; max-width: 280px; }
    .footer-heading { font-family: var(--font-body); font-weight: 700; font-size: var(--text-sm); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-brown-100); margin-bottom: 16px; }
    .footer-link { display: block; font-size: var(--text-sm); color: var(--color-brown-300); text-decoration: none; margin-bottom: 10px; cursor: pointer; transition: color 0.15s; }
    .footer-link:hover { color: var(--color-brown-100); }
    .footer-bottom { border-top: 1px solid var(--color-brown-700); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; }
    .footer-copy { font-size: var(--text-xs); color: var(--color-brown-400); }

    /* Tab */
    .tab-bar { display: flex; gap: 8px; background: var(--color-brown-50); border-radius: var(--radius-full); padding: 6px; width: fit-content; margin-bottom: 40px; }
    .tab-btn { font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm); padding: 10px 24px; border: none; border-radius: var(--radius-full); cursor: pointer; transition: all 0.2s; background: transparent; color: var(--color-text-secondary); }
    .tab-btn.active { background: var(--color-brand-primary); color: white; box-shadow: 0 2px 8px rgba(164,127,78,0.3); }

    /* Contact form */
    .form-field { display: flex; flex-direction: column; gap: 8px; }
    .form-label { font-weight: 600; font-size: var(--text-sm); color: var(--color-brown-700); }
    .form-input { font-family: var(--font-body); font-size: var(--text-base); padding: 12px 16px; border: 1.5px solid var(--color-brown-200); border-radius: var(--radius-md); background: white; color: var(--color-text-primary); outline: none; transition: border-color 0.15s; }
    .form-input:focus { border-color: var(--color-brand-primary); }
    .form-textarea { font-family: var(--font-body); font-size: var(--text-base); padding: 12px 16px; border: 1.5px solid var(--color-brown-200); border-radius: var(--radius-md); background: white; color: var(--color-text-primary); outline: none; resize: vertical; min-height: 120px; transition: border-color 0.15s; }
    .form-textarea:focus { border-color: var(--color-brand-primary); }

    @keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
    .page-enter { animation: fadeIn 0.3s ease both; }

    @keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
    .marquee-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
    .marquee-track:hover { animation-play-state: paused; }
    .marquee-item { display: flex; align-items: center; gap: 24px; padding-right: 24px; }
    .marquee-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.4); flex-shrink: 0; }
    .marquee-word { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; opacity: 0.9; color: white; }

/* ---------- 7. SPA VISIBILITY ---------- */
/* ── Page / tab visibility (static SPA) ── */
.page { display: none; }
.page.is-active { display: block; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.nav-links a, .footer-link { cursor: pointer; }

/* ---------- 8. RESPONSIVE / MOBILE ---------- */
/* Retrofit responsiveness onto the desktop-first layout.
   The page uses many INLINE grid/width styles, so several rules below
   target the inline `style` attribute and use !important to win. */

/* Never allow horizontal scrolling on small screens */
@media (max-width: 900px) {
  html, body { overflow-x: hidden; }

  /* Stack every multi-column CSS grid into one column */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  /* Reduce class-based section padding */
  .section { padding: 56px 20px; }

  /* Footer: 4 cols -> 2 cols */
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 768px) {
  /* NAVIGATION — hamburger left, logo centered (like The Farmer's Dog) */
  .nav-inner { height: auto; min-height: 76px; padding: 8px 14px; position: relative; flex-wrap: nowrap; gap: 8px; justify-content: space-between; align-items: center; }
  .site-nav .nav-toggle { display: flex; }
  .nav-logo-link { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; }
  .nav-logo { height: 66px; }
  .site-nav .nav-cta { display: none; }
  .nav-shop-mobile { display: block; }
  .nav-shop-mobile a { color: var(--color-brand-primary); font-weight: 700; }
  /* Trim the oversized hero top/bottom padding on mobile (removes the big gap) */
  [style*="padding: 72px 0"] { padding-top: 0 !important; padding-bottom: 24px !important; }
  /* Pull the FIRST section of every page up close to the nav (Home, About, Products, Contact) */
  .page-enter > section:first-of-type { padding-top: 14px !important; }
  /* Nav links become a dropdown panel opened by the hamburger */
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; width: auto; flex-direction: column; gap: 0; background: var(--color-cream); padding: 6px 16px 14px; border-top: 1px solid var(--color-brown-100); box-shadow: 0 12px 24px rgba(53,35,18,0.14); display: none; }
  .site-nav.menu-open .nav-links { display: flex; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--color-brown-50); }
  .nav-links a { display: block; padding: 14px 4px; font-size: 16px; }

  /* Trim big inline horizontal padding so content isn't cramped/overflowing */
  section[style*="32px"] { padding-left: 20px !important; padding-right: 20px !important; }

  /* Cap oversized fixed-width decorative blocks (hero circle, side images) */
  [style*="width: 420px"],
  [style*="width: 400px"],
  [style*="width: 380px"] { width: 100% !important; max-width: 100% !important; }

  /* Relax fixed heights/min-heights that crop or overflow on phones */
  [style*="min-height: 560px"],
  [style*="min-height: 520px"],
  [style*="height: 520px"],
  [style*="height: 480px"] { min-height: 0 !important; height: auto !important; }

  /* Hero mascot image: keep it contained */
  [style*="height: 440px"] { height: auto !important; max-height: 300px; }

  /* Any full-height cover images inside now-auto containers */
  section img { height: auto; }

  /* Footer to a single column on phones */
  .footer-grid { grid-template-columns: 1fr !important; }

  /* Stack large FLEX rows (e.g. the brown "founding principle" quote box).
     Only targets big-gap flex containers so small flex rows (buttons,
     price rows, icon+label) are left alone. */
  [style*="display: flex"][style*="gap: 48px"],
  [style*="display: flex"][style*="gap: 64px"],
  [style*="display: flex"][style*="gap: 80px"] { flex-direction: column !important; align-items: flex-start !important; }
}

@media (max-width: 480px) {
  .nav-logo { height: 60px; }
  .section { padding: 44px 18px; }
}

/* Headlines & forced-nowrap text: stop clipping, scale down on phones */
@media (max-width: 640px) {
  /* Undo inline white-space:nowrap that pushes headlines/subtext off-screen */
  [style*="white-space: nowrap"] { white-space: normal !important; }

  /* Scale down oversized fluid headlines set inline via clamp() */
  h1[style*="clamp"] { font-size: 2rem !important; line-height: 1.12 !important; }
  h2[style*="clamp"] { font-size: 1.6rem !important; line-height: 1.15 !important; }
  .section-title { font-size: 1.6rem; }

  /* Header rows that pair a title with a button (e.g. "Top Sellers" + Shop Now):
     let them stack instead of colliding */
  section [style*="justify-content: space-between"] { flex-wrap: wrap; gap: 16px; }

  /* Tab bar (Products page) can scroll rather than overflow */
  .tab-bar { flex-wrap: wrap; }
}

/* Button classes used on <a> links (e.g. Shop Now -> external LINE) render
   identically to their <button> counterparts */
a.btn-primary, a.btn-secondary, a.btn-green, a.nav-cta { display: inline-block; text-decoration: none; }

/* Hamburger button — hidden on desktop, shown on mobile via media query */
.nav-toggle { display: none; align-items: center; justify-content: center; background: none; border: none; color: var(--color-brown-800); cursor: pointer; padding: 4px; }
/* Shop Now inside the mobile dropdown — hidden on desktop */
.nav-shop-mobile { display: none; }

/* ---------- 9. PRODUCT DETAIL PAGE ---------- */
.pd-chip { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-brand-primary); background: var(--color-brown-50); border: 1px solid var(--color-brown-100); border-radius: var(--radius-full); padding: 6px 14px; }
.pd-benefit { background: var(--color-brown-50); border-radius: var(--radius-xl); padding: 28px 24px; text-align: center; border: 1px solid var(--color-brown-100); }
.pd-benefit-icon { font-size: 34px; margin-bottom: 12px; }
.pd-benefit-title { font-family: var(--font-subheadline); font-size: var(--text-xl); font-weight: 700; color: var(--color-brown-800); margin-bottom: 8px; }
.pd-benefit-desc { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.6; }
.pd-ga-table { width: 100%; border-collapse: collapse; }
.pd-ga-table td { padding: 12px 4px; border-bottom: 1px solid var(--color-brown-100); font-size: var(--text-base); color: var(--color-text-secondary); }
.pd-ga-table tr:last-child td { border-bottom: none; }
.pd-ga-val { text-align: right; font-weight: 700; color: var(--color-brown-800); }
.pd-placeholder { font-size: var(--text-sm); color: #9c5c20; background: #fdf6e8; border: 1px dashed #e0b877; border-radius: var(--radius-md); padding: 14px 16px; line-height: 1.6; }

/* ---------- 9b. PRODUCT DETAIL — GALLERY & PREMIUM LAYOUT ---------- */
.pd-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

/* Swipeable gallery */
.pd-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; border-radius: var(--radius-2xl); background: var(--color-green-100); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.pd-gallery::-webkit-scrollbar { display: none; }
.pd-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: 22px; box-sizing: border-box; }
.pd-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--radius-lg); display: block; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pd-thumb { width: 66px; height: 66px; border-radius: var(--radius-md); overflow: hidden; border: 2px solid transparent; cursor: pointer; padding: 0; background: var(--color-green-100); flex: 0 0 auto; transition: border-color .15s ease; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumb.is-active { border-color: var(--color-brand-primary); }

/* Rating + quick trust */
.pd-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.pd-rating .stars { font-size: 16px; }
.pd-rating-txt { font-size: var(--text-sm); color: var(--color-text-tertiary); }
.pd-quicktrust { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--color-brown-100); }
.pd-quicktrust span { display: inline-flex; align-items: center; gap: 7px; font-size: var(--text-sm); color: var(--color-text-secondary); }
.pd-quicktrust svg { color: var(--color-brand-green); flex: 0 0 auto; }

/* Feature band */
.pd-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pd-feature { text-align: center; padding: 4px; }
.pd-feature-ic { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; background: var(--color-brown-50); color: var(--color-brand-primary); }
.pd-feature-t { font-family: var(--font-subheadline); font-weight: 700; color: var(--color-brown-800); font-size: var(--text-base); margin-bottom: 4px; }
.pd-feature-d { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.5; }

/* GA stat cards */
.pd-ga-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pd-ga-card { background: white; border: 1px solid var(--color-brown-100); border-radius: var(--radius-xl); padding: 18px 12px; text-align: center; }
.pd-ga-num { font-family: var(--font-subheadline); font-weight: 800; font-size: var(--text-2xl); color: var(--color-brown-800); line-height: 1; }
.pd-ga-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-tertiary); margin-top: 8px; font-weight: 700; }

/* Ingredient pills */
.pd-ing-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.pd-ing-list li { display: inline-flex; align-items: center; gap: 9px; background: white; border: 1px solid var(--color-brown-100); border-radius: var(--radius-full); padding: 9px 16px 9px 13px; font-size: var(--text-base); color: var(--color-brown-800); }
.pd-ing-list .pd-ing-ic { font-size: 1.15em; line-height: 1; }

/* ---------- 10. HOME HERO PHOTO BENTO (chicken left, two squares right) ---------- */
.hero-photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.hero-photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo-main { border-radius: var(--radius-2xl); overflow: hidden; }
.hero-photo-side { display: flex; flex-direction: column; gap: 16px; }
.hero-photo-sq { aspect-ratio: 1; border-radius: var(--radius-2xl); overflow: hidden; }
@media (max-width: 768px) {
  .hero-photo-grid { grid-template-columns: 1fr; }
  .hero-photo-main { aspect-ratio: 16/10; }
}

/* Related products */
.pd-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

@media (max-width: 900px) {
  .pd-hero-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  .pd-features { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .pd-related-grid { grid-template-columns: 1fr; }
  .pd-thumb { width: 58px; height: 58px; }
}
