/* =====================================================================
   THAIRAYA — Premium Thai Delicacies
   Landing page styling. Layout & motion modelled on thai-coco.com,
   toned to the Thai Raya brand banner (pale ice-blue + teal/indigo
   botanicals + marigold accents, Playfair Display + Poppins,
   Thai textile-diamond motif).
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand colours — sampled from "thai raya color tone.png" */
  --ice:            #F4FBFD;   /* page background (pale ice blue)       */
  --ice-2:          #E6F3F8;   /* alternating cool band                 */
  --indigo:         #221CA8;   /* primary — headings, footer            */
  --indigo-700:     #16117A;   /* deep indigo hover                     */
  --teal:           #0C7F96;   /* accent — CTAs, links, decorative      */
  --teal-bright:    #1CB0CC;   /* vivid turquoise for motifs/graphics   */
  --teal-soft:      #A9DFE9;   /* soft teal                             */
  --teal-tint:      #E0F3F7;   /* pale teal band                        */
  --marigold:       #F5A81F;   /* warm marigold flourishes              */
  --marigold-soft:  #FBD588;
  --ink:            #10141C;   /* body text (cool charcoal)             */
  --ink-soft:       #4E5A68;   /* muted text                            */
  --white:          #ffffff;

  /* Semantic */
  --bg:           var(--ice);
  --text:         var(--ink);
  --heading:      var(--indigo);
  --accent:       var(--teal);

  /* Type */
  /* Fredoka (rounded, playful) set 2026-07-09. To REVERT, restore:
     --font-display: "Playfair Display", "Trirong", Georgia, "Times New Roman", serif;
     --font-body:    "Poppins", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
     and the Google Fonts <link> to Noto+Sans+Thai / Playfair+Display / Poppins / Trirong. */
  --font-display: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Spacing rhythm (8pt) */
  --sp-1: .5rem;  --sp-2: 1rem;  --sp-3: 1.5rem; --sp-4: 2rem;
  --sp-5: 3rem;   --sp-6: 4rem;  --sp-7: 6rem;   --sp-8: 8rem;

  --container: 1200px;
  --radius:    18px;
  --radius-lg: 28px;
  --shadow-sm: 0 6px 18px rgba(16,20,28,.08);
  --shadow-md: 0 18px 40px rgba(16,20,28,.14);
  --shadow-lg: 0 30px 70px rgba(34,28,168,.18);

  /* z-index scale */
  --z-deco: 1; --z-base: 10; --z-sticky: 100; --z-nav: 1000; --z-modal: 2000;

  /* The Thai textile-diamond pattern (turquoise on transparent) */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='36' viewBox='0 0 60 36'%3E%3Cg fill='none' stroke='%231CB0CC' stroke-width='1.5'%3E%3Cpath d='M15 2 L28 18 L15 34 L2 18 Z'/%3E%3Cpath d='M45 2 L58 18 L45 34 L32 18 Z'/%3E%3C/g%3E%3Cg fill='%231CB0CC'%3E%3Cpath d='M15 11 L22 18 L15 25 L8 18 Z'/%3E%3Cpath d='M45 11 L52 18 L45 25 L38 18 Z'/%3E%3Ccircle cx='30' cy='18' r='1.8'/%3E%3Ccircle cx='0' cy='18' r='1.8'/%3E%3Ccircle cx='60' cy='18' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
  /* Same motif in pale ice for use on dark teal/indigo surfaces */
  --pattern-ice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='36' viewBox='0 0 60 36'%3E%3Cg fill='none' stroke='%23DFF2F7' stroke-width='1.5'%3E%3Cpath d='M15 2 L28 18 L15 34 L2 18 Z'/%3E%3Cpath d='M45 2 L58 18 L45 34 L32 18 Z'/%3E%3C/g%3E%3Cg fill='%23DFF2F7'%3E%3Cpath d='M15 11 L22 18 L15 25 L8 18 Z'/%3E%3Cpath d='M45 11 L52 18 L45 25 L38 18 Z'/%3E%3Ccircle cx='30' cy='18' r='1.8'/%3E%3Ccircle cx='0' cy='18' r='1.8'/%3E%3Ccircle cx='60' cy='18' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; border: none; background: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.container { width: min(100% - 2.4rem, var(--container)); margin-inline: auto; }
.section { position: relative; padding: var(--sp-6) 0; overflow: hidden; }
@media (min-width: 768px){ .section { padding: var(--sp-7) 0; } }

/* ---------- Typography ---------- */
.display, h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.16; color: var(--heading); letter-spacing: .3px; }
.eyebrow {
  font-family: var(--font-body); font-weight: 600; font-size: .78rem;
  letter-spacing: .28em; text-transform: uppercase; color: var(--teal);
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: var(--sp-2);
}
.eyebrow::before, .eyebrow::after { content:""; width: 26px; height: 1px; background: var(--marigold); }
.eyebrow--solo::after { display: none; }

.h-xl { font-size: clamp(2.4rem, 6vw, 4.4rem); }
.h-lg { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.h-md { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.lead { font-size: clamp(1rem, 1.4vw, 1.18rem); color: var(--ink-soft); max-width: 60ch; }
/* vertical rhythm: breathing room between a heading and the copy below it */
h1 + .lead, h2 + .lead, h3 + .lead { margin-top: var(--sp-2); }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }

.section-head { max-width: 720px; margin: 0 auto var(--sp-5); text-align: center; }
.section-head .lead { margin-inline: auto; }

/* ---------- Buttons (pill CTAs) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  padding: .92rem 2rem; border-radius: 999px; min-height: 48px;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease;
  will-change: transform;
}
.btn--primary { background: var(--indigo); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--indigo-700); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn--teal { background: var(--teal); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--teal:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); filter: brightness(1.05); }
.btn--ghost { background: transparent; color: var(--indigo); border: 1.5px solid var(--indigo); }
.btn--ghost:hover { background: var(--indigo); color: var(--white); transform: translateY(-3px); }
.btn--light { background: var(--white); color: var(--indigo); box-shadow: var(--shadow-sm); }
.btn--light:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn--lg { padding: 1.05rem 2.4rem; font-size: 1.05rem; }

/* ---------- Floating decorative motifs ---------- */
.float-motif {
  position: absolute; z-index: var(--z-deco); pointer-events: none;
  opacity: .5; width: 160px; aspect-ratio: 1; will-change: transform;
  background-image: var(--pattern); background-repeat: repeat;
  -webkit-mask-image: radial-gradient(circle at center, #000 38%, transparent 70%);
          mask-image: radial-gradient(circle at center, #000 38%, transparent 70%);
}
.float-motif--tr { top: 4%; right: -34px; }
.float-motif--bl { bottom: 6%; left: -34px; }
@media (max-width: 767px){ .float-motif { width: 110px; opacity: .35; } }

/* =====================================================================
   NAVBAR
   ===================================================================== */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(34,28,168,.08);
  transition: box-shadow .3s ease, background-color .3s ease, padding .3s ease;
}
.nav.is-scrolled { box-shadow: 0 8px 30px rgba(16,20,28,.10); background: rgba(255,255,255,.97); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: .85rem 0; }
.nav__links { display: none; align-items: center; gap: var(--sp-4); }
.nav__links a { font-weight: 500; font-size: .95rem; color: var(--ink); position: relative; padding: .25rem 0; }
.nav__links a::after { content:""; position:absolute; left:0; right:100%; bottom:-2px; height:2px; background: var(--teal); transition: right .3s ease; }
.nav__links a:hover::after { right: 0; }
.nav__brand { display: flex; align-items: center; gap: .6rem; }
.nav__right { display: flex; align-items: center; gap: var(--sp-3); }
.nav__lang { font-weight: 600; font-size: .85rem; letter-spacing: .08em; color: var(--indigo); white-space: nowrap; }
.nav__icon { color: var(--indigo); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; transition: background-color .25s ease; }
.nav__icon:hover { background: var(--teal-tint); }
.nav__toggle { display: inline-grid; gap: 5px; width: 44px; height: 44px; place-content: center; }
.nav__toggle span { width: 24px; height: 2px; background: var(--indigo); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.nav.is-open .nav__toggle span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2){ opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* mobile drawer */
.nav__drawer {
  position: fixed; inset: 64px 0 auto 0; background: var(--white);
  box-shadow: var(--shadow-md); padding: var(--sp-3) 1.2rem var(--sp-4);
  transform: translateY(-120%); transition: transform .35s cubic-bezier(.22,1,.36,1);
  z-index: calc(var(--z-nav) - 1); display: grid; gap: .4rem;
}
.nav.is-open .nav__drawer { transform: translateY(0); }
.nav__drawer a { padding: .9rem .4rem; font-weight: 500; border-bottom: 1px solid var(--ice-2); display: flex; justify-content: space-between; }
.nav__drawer .btn { margin-top: var(--sp-2); }

@media (min-width: 1024px){
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
  .nav__drawer { display: none; }
}

/* Brandmark (inline SVG wordmark) */
.brandmark { height: 52px; width: auto; }
.brandmark--sm { height: 40px; }
.brandmark--lg { height: 84px; }
.nav .brandmark { color: var(--indigo); }
.footer .brandmark { color: var(--ice); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero { position: relative; }
.hero .swiper { width: 100%; }
.hero__slide {
  position: relative; min-height: 78vh; min-height: 78dvh;
  display: flex; align-items: center;
  background-size: cover; background-position: center;
}
.hero__slide::after { content:""; position:absolute; inset:0; background: linear-gradient(90deg, rgba(244,251,253,.94) 0%, rgba(244,251,253,.72) 38%, rgba(244,251,253,.12) 70%); }
@media (max-width:767px){ .hero__slide::after { background: linear-gradient(180deg, rgba(244,251,253,.55), rgba(244,251,253,.92)); } }
.hero__inner { position: relative; z-index: var(--z-base); max-width: 600px; padding: var(--sp-6) 0; }
.hero__title { font-size: clamp(2.6rem, 7vw, 5rem); color: var(--indigo); }
.hero__title em { font-style: italic; color: var(--teal); }
.hero__sub { margin: var(--sp-3) 0 var(--sp-4); font-size: clamp(1rem,1.5vw,1.22rem); color: var(--ink); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* decorative "plated" hero visual built from brand pattern */
.hero__slide--a { background:
   linear-gradient(90deg, rgba(233,246,250,.96) 0%, rgba(233,246,250,.88) 38%, rgba(233,246,250,.35) 62%, rgba(233,246,250,0) 100%),
   url("../assets/img/rice-flour-hero.jpg") right center / cover no-repeat, #E9F6FA; }
@media (max-width: 767px){ .hero__slide--a { background:
   linear-gradient(180deg, rgba(233,246,250,.94) 0%, rgba(233,246,250,.86) 70%, rgba(233,246,250,.7) 100%),
   url("../assets/img/rice-flour-hero.jpg") center / cover no-repeat, #E9F6FA; } }
.hero__slide--b { background:
   linear-gradient(90deg, rgba(250,246,235,.96) 0%, rgba(250,246,235,.88) 38%, rgba(250,246,235,.35) 62%, rgba(250,246,235,0) 100%),
   url("../assets/img/mango-hero.jpg") right center / cover no-repeat, #FAF6EB; }
@media (max-width: 767px){ .hero__slide--b { background:
   linear-gradient(180deg, rgba(250,246,235,.94) 0%, rgba(250,246,235,.86) 70%, rgba(250,246,235,.7) 100%),
   url("../assets/img/mango-hero.jpg") center / cover no-repeat, #FAF6EB; } }
.hero__slide--c { background:
   linear-gradient(90deg, rgba(238,246,251,.96) 0%, rgba(238,246,251,.88) 38%, rgba(238,246,251,.35) 62%, rgba(238,246,251,0) 100%),
   url("../assets/img/khao-kua-hero.jpg") right center / cover no-repeat, #EEF6FB; }
@media (max-width: 767px){ .hero__slide--c { background:
   linear-gradient(180deg, rgba(238,246,251,.94) 0%, rgba(238,246,251,.86) 70%, rgba(238,246,251,.7) 100%),
   url("../assets/img/khao-kua-hero.jpg") center / cover no-repeat, #EEF6FB; } }
@media (min-width: 768px) and (max-width: 1099px){
  .hero__slide--a { background:
     linear-gradient(90deg, rgba(233,246,250,.97) 0%, rgba(233,246,250,.92) 52%, rgba(233,246,250,.45) 78%, rgba(233,246,250,.12) 100%),
     url("../assets/img/rice-flour-hero.jpg") right center / cover no-repeat, #E9F6FA; }
  .hero__slide--b { background:
     linear-gradient(90deg, rgba(250,246,235,.97) 0%, rgba(250,246,235,.92) 52%, rgba(250,246,235,.45) 78%, rgba(250,246,235,.12) 100%),
     url("../assets/img/mango-hero.jpg") right center / cover no-repeat, #FAF6EB; }
  .hero__slide--c { background:
     linear-gradient(90deg, rgba(238,246,251,.97) 0%, rgba(238,246,251,.92) 52%, rgba(238,246,251,.45) 78%, rgba(238,246,251,.12) 100%),
     url("../assets/img/khao-kua-hero.jpg") right center / cover no-repeat, #EEF6FB; }
}

.hero__plate {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  width: clamp(220px, 34vw, 460px); aspect-ratio: 1; border-radius: 50%;
  background: var(--pattern), radial-gradient(circle at 50% 45%, #fff8, transparent 62%);
  background-size: 46px, cover; box-shadow: var(--shadow-lg), inset 0 0 0 10px rgba(255,255,255,.5);
  border: 2px solid rgba(255,255,255,.7); display: grid; place-items: center; z-index: var(--z-base);
}
.hero__plate::before { content:""; position:absolute; inset:14%; border-radius:50%; background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 2px var(--marigold-soft); }
.hero__plate span { position: relative; z-index: 2; font-family: var(--font-display); font-style: italic; color: var(--indigo); font-size: clamp(1.1rem,2vw,1.6rem); text-align: center; padding: 1rem; }
@media (max-width: 767px){ .hero__plate { display: none; } }

/* Swiper pagination / nav recolour */
.swiper-pagination-bullet { background: var(--indigo); opacity: .35; width: 9px; height: 9px; transition: opacity .3s, width .3s; }
.swiper-pagination-bullet-active { opacity: 1; width: 26px; border-radius: 6px; background: var(--teal); }
.swiper-button-next, .swiper-button-prev {
  color: var(--white); background: var(--teal); width: 46px; height: 46px; border-radius: 50%;
  box-shadow: var(--shadow-sm); transition: transform .25s ease, background-color .25s ease;
}
.swiper-button-next:hover, .swiper-button-prev:hover { transform: scale(1.08); background: var(--indigo); }
.swiper-button-next::after, .swiper-button-prev::after { font-size: 1.05rem; font-weight: 700; }
/* keep hero pagination clear of the curved divider; hide side arrows on mobile */
.hero .swiper-pagination { bottom: 92px; z-index: var(--z-sticky); }
@media (max-width: 767px){
  .hero .swiper-button-next, .hero .swiper-button-prev { display: none; }
}

/* =====================================================================
   MOBILE HERO FLOCK — cute character crowd along the hero's bottom edge
   (mobile only; from Thairaya/Cute icons/Flock)
   ===================================================================== */
.hero__flock { display: none; }
@media (max-width: 767px){
  .hero { --flock-h: clamp(120px, 34vw, 156px); }
  .hero__flock {
    display: block; position: absolute; left: 0; right: 0; bottom: 0;
    height: var(--flock-h); z-index: var(--z-base); pointer-events: none;
  }
  .flock__c {
    position: absolute; width: var(--w); height: auto; bottom: var(--b, 0);
    transform: translateX(-50%) scaleX(var(--flip, 1)) translateY(0);
    filter: drop-shadow(0 2px 3px rgba(16,20,28,.16));
    animation: flock-bob 4.5s ease-in-out infinite alternate;
  }
  /* stagger the bob so they aren't in lockstep */
  .flock__c:nth-of-type(3n)   { animation-delay: -1.2s; }
  .flock__c:nth-of-type(3n+1) { animation-delay: -2.4s; animation-duration: 5.2s; }
  .flock__c:nth-of-type(4n)   { animation-duration: 5.6s; }
  /* top-align compact content so it never drops into the flock; flock owns the bottom */
  .hero .swiper-pagination { bottom: calc(var(--flock-h) + 16px); }
  .hero__slide { min-height: 90dvh; align-items: flex-start; padding-bottom: 0; }
  /* clean light backdrop for the flock (hide the desktop photo hero on phones) */
  .hero__slide, .hero__slide--a, .hero__slide--b, .hero__slide--c {
    background: linear-gradient(180deg, #F4FBFD 0%, #E3F0F7 100%) !important;
  }
  .hero__slide::after { display: none; }
  .hero__inner { padding: clamp(30px, 7vh, 60px) 0 0; max-width: none; }
  .hero__title { font-size: clamp(2rem, 9vw, 2.7rem); }
  .hero__sub { margin: var(--sp-2) 0 var(--sp-3); font-size: .98rem; }
  /* keep the two CTAs side-by-side & compact (like the mockup) so content stays short */
  .hero__cta { flex-wrap: nowrap; gap: 10px; }
  .hero__cta .btn--lg { padding: .74rem 1rem; font-size: .9rem; min-height: 46px; white-space: nowrap; }
}
@keyframes flock-bob {
  from { transform: translateX(-50%) scaleX(var(--flip, 1)) translateY(0); }
  to   { transform: translateX(-50%) scaleX(var(--flip, 1)) translateY(-5px); }
}

/* =====================================================================
   CURVED SECTION DIVIDERS
   ===================================================================== */
.curve { position: absolute; left: 0; width: 100%; height: 70px; z-index: var(--z-base); pointer-events: none; }
.curve svg { width: 100%; height: 100%; display: block; }
.curve--top { top: -69px; }
.curve--bottom { bottom: -69px; }

/* =====================================================================
   ABOUT BAND (teal → indigo, white text)
   ===================================================================== */
.band { position: relative; color: var(--white); }
.band--teal { background: linear-gradient(160deg, var(--teal) 0%, var(--indigo) 120%); }
.band__pattern { position:absolute; inset:0; background-image: var(--pattern-ice); opacity:.10; background-size: 54px; z-index: 0; }
.band .container { position: relative; z-index: var(--z-base); }
.band .display, .band h2 { color: var(--white); }
.band .eyebrow { color: var(--marigold-soft); }
.band .eyebrow::before, .band .eyebrow::after { background: var(--marigold-soft); }
.band .lead { color: rgba(255,255,255,.9); }
.about { text-align: center; padding: calc(var(--sp-7) + 20px) 0; }
.about .lead { margin: var(--sp-3) auto var(--sp-4); }
.about__stats { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-5); margin-top: var(--sp-5); }
.about__stat { min-width: 140px; }
.about__stat b { font-family: var(--font-display); font-size: clamp(2rem,4vw,2.8rem); display: block; color: var(--white); }
.about__stat span { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--marigold-soft); }

/* =====================================================================
   COLLECTIONS GRID (category cards on the home page)
   ===================================================================== */
/* 2-up on phones (like thai-coco), 4-across from tablet up */
.collections-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--sp-2); }
@media (min-width: 768px){ .collections-grid { grid-template-columns: repeat(4,1fr); gap: var(--sp-3); } }
.collection {
  position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--white);
  box-shadow: var(--shadow-sm); transition: transform .35s ease, box-shadow .35s ease;
}
.collection:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.collection__media { aspect-ratio: 4/5; position: relative; display: grid; place-items: center; overflow: hidden; }
.collection__media::after { content:""; position:absolute; inset:0; background-image: var(--pattern); background-size: 40px; opacity:.16; }
.collection__media span { position: relative; z-index: 2; font-family: var(--font-display); font-style: italic; color: var(--indigo); font-size: 1.1rem; opacity: .55; }
.collection:nth-child(1) .collection__media { background: linear-gradient(150deg,#DFF0F7,#BFE3F0); }
.collection:nth-child(2) .collection__media { background: linear-gradient(150deg,#FDF3DC,#F7DFA9); }
.collection:nth-child(3) .collection__media { background: linear-gradient(150deg,#E2E7F8,#C3CBF0); }
.collection:nth-child(4) .collection__media { background: linear-gradient(150deg,#DDF2F6,#A9DFE9); }
.collection__media img { position:absolute; inset:0; width:100%; height:100%; object-fit: cover; transition: transform .6s ease; }
.collection:hover .collection__media img { transform: scale(1.06); }
.collection__body { padding: var(--sp-2) var(--sp-2) var(--sp-3); text-align: center; }
.collection__body h3 { font-size: 1.18rem; }
.collection__body p { font-size: .85rem; color: var(--ink-soft); margin-top: .2rem; }
@media (max-width: 559px){
  .collection__body { padding: .8rem .6rem 1rem; }
  .collection__body h3 { font-size: 1.02rem; }
  .collection__body p { font-size: .78rem; }
}

/* =====================================================================
   PRODUCT SHOWCASE CAROUSELS
   ===================================================================== */
.showcase { position: relative; }
.showcase + .showcase { padding-top: 0; }
.product {
  background: var(--white); border-radius: var(--radius); padding: var(--sp-2);
  text-align: center; box-shadow: var(--shadow-sm); height: 100%;
  transition: transform .35s ease, box-shadow .35s ease;
}
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.product__media { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; position: relative; overflow: hidden; background: linear-gradient(150deg,#F0F8FB,#DCEEF5); margin-bottom: var(--sp-2); }
.product__media::after { content:""; position:absolute; inset:0; background-image: var(--pattern); background-size: 38px; opacity:.14; }
.product__media span { position: relative; z-index: 2; font-family: var(--font-display); font-style: italic; color: var(--teal); opacity:.6; }
.product__media img { position:absolute; inset:0; width:100%; height:100%; object-fit: cover; }
.product h4 { font-family: var(--font-body); font-weight: 600; font-size: .98rem; color: var(--ink); }
.product .price { color: var(--teal); font-weight: 600; font-size: .9rem; margin-top: .2rem; }
.showcase__foot { text-align: center; margin-top: var(--sp-4); }
/* reserve a strip below the cards so pagination bullets never overlap them */
.swiper.products { padding-bottom: 42px; }
.swiper.products .swiper-pagination { bottom: 6px; }
@media (max-width: 559px){
  .product { padding: .8rem; }
  .product h4 { font-size: .88rem; }
  .product .price { font-size: .78rem; }
}

/* =====================================================================
   HERITAGE / SPLIT FEATURE
   ===================================================================== */
.split { display: grid; gap: var(--sp-4); align-items: center; }
@media (min-width: 900px){ .split { grid-template-columns: 1fr 1fr; gap: var(--sp-6); } }
.split__media { position: relative; border-radius: var(--radius-lg); aspect-ratio: 5/4; overflow:hidden; box-shadow: var(--shadow-md); background: linear-gradient(150deg,#E3F2F8,#B8DCE9); display:grid; place-items:center; }
.split__media::after { content:""; position:absolute; inset:0; background-image: var(--pattern); background-size: 50px; opacity:.18; }
.split__media span { position:relative; z-index:2; font-family: var(--font-display); font-style: italic; color: var(--indigo); opacity:.6; }
.split__media img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.split ul.checks { margin: var(--sp-3) 0; display: grid; gap: .7rem; }
.split ul.checks li { display:flex; gap:.7rem; align-items:flex-start; color: var(--ink); }
.split ul.checks li::before { content:"◆"; color: var(--marigold); font-size: .8rem; margin-top: .35rem; }

/* =====================================================================
   SOCIAL
   ===================================================================== */
.social { text-align: center; }
.social__handle { font-family: var(--font-display); font-style: italic; color: var(--teal); font-size: 1.3rem; margin-top: .2rem; }
.social__icons { display: flex; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.social__icons a { width: 52px; height: 52px; border-radius: 50%; background: var(--teal); color: var(--white); display: grid; place-items: center; transition: transform .25s ease, background-color .25s ease; }
.social__icons a:hover { transform: translateY(-4px); background: var(--indigo); }
.social__strip { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; margin-top: var(--sp-5); }
@media (min-width: 768px){ .social__strip { grid-template-columns: repeat(4,1fr); } }
.social__tile { aspect-ratio: 1; position: relative; overflow: hidden; background: linear-gradient(150deg,#D8EEF4,#8FC9DA); display:grid; place-items:center; }
.social__tile::after { content:""; position:absolute; inset:0; background-image: var(--pattern); background-size: 42px; opacity:.18; transition: opacity .3s; }
.social__tile:hover::after { opacity:.30; }
.social__tile svg { position: relative; z-index: 2; color: #fff; opacity:.85; }
.social__tile img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact-grid { display: grid; gap: var(--sp-5); }
@media (min-width: 900px){ .contact-grid { grid-template-columns: .9fr 1.1fr; } }
.contact__info h2 { margin-bottom: var(--sp-2); }
.contact__info p { color: var(--ink-soft); margin-bottom: var(--sp-3); }
.contact__line { display: flex; gap: .7rem; align-items: center; color: var(--ink); margin-bottom: .8rem; font-weight: 500; }
.contact__line svg { color: var(--teal); flex: none; }
.form { display: grid; gap: var(--sp-3); }
.form__row { display: grid; gap: var(--sp-3); }
@media (min-width: 560px){ .form__row { grid-template-columns: 1fr 1fr; } }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; background: transparent; border: none; border-bottom: 1.5px solid var(--teal-soft);
  padding: .9rem .2rem; font: inherit; color: var(--ink); min-height: 44px;
  transition: border-color .25s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-soft); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--indigo); }
.form__consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; color: var(--ink-soft); }
.form__consent input { margin-top: .25rem; accent-color: var(--teal); width: 18px; height: 18px; }
.form__status { font-size: .9rem; font-weight: 600; min-height: 1.2em; }
.form__status.ok { color: #2f7d4f; }
.form__status.err { color: #b23b3b; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer { background: var(--indigo); color: rgba(255,255,255,.82); position: relative; }
.footer__pattern { position:absolute; inset:0; background-image: var(--pattern-ice); opacity:.06; background-size: 54px; }
.footer .container { position: relative; z-index: var(--z-base); padding: var(--sp-6) 0 var(--sp-3); }
.footer__grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 700px){ .footer__grid { grid-template-columns: 1.4fr 1fr 1.2fr; } }
.footer h5 { color: var(--marigold-soft); font-family: var(--font-body); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: var(--sp-2); }
.footer a { color: rgba(255,255,255,.82); transition: color .2s ease; display: inline-block; padding: .25rem 0; }
.footer a:hover { color: var(--white); }
.footer__brand p { max-width: 34ch; margin-top: var(--sp-2); font-size: .92rem; }
.footer__social { display: flex; gap: .6rem; margin-top: var(--sp-3); }
.footer__social a { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.footer__social a:hover { background: var(--teal); }
.footer__bottom {
  margin-top: var(--sp-5); padding-top: var(--sp-3); border-top: 1px solid rgba(255,255,255,.16);
  display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: space-between; align-items: center;
  font-size: .82rem; color: rgba(255,255,255,.6);
}
.footer__bottom a { font-size: .82rem; }

/* =====================================================================
   COOKIE BANNER
   ===================================================================== */
.cookie {
  position: fixed; right: 1rem; bottom: 1rem; z-index: var(--z-modal);
  max-width: 340px; background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: var(--sp-3); border-top: 4px solid var(--teal);
  transform: translateY(140%); transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.cookie.show { transform: translateY(0); }
.cookie h6 { font-family: var(--font-display); color: var(--indigo); font-size: 1.05rem; margin-bottom: .4rem; }
.cookie p { font-size: .82rem; color: var(--ink-soft); margin-bottom: var(--sp-2); }
.cookie__btns { display: flex; gap: .6rem; }
.cookie__btns .btn { flex: 1; padding: .7rem 1rem; font-size: .85rem; min-height: 42px; }

/* =====================================================================
   AOS reduced-motion + global motion guard
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  [data-aos] { opacity: 1 !important; transform: none !important; }
  .float-motif { display: none; }
}

/* =====================================================================
   REAL BRAND ASSETS (logo images + product photos)
   ===================================================================== */
/* Nav wordmark (real cropped logo PNG) */
.nav .brandmark { height: 54px; width: auto; }
@media (max-width: 1023px){ .nav .brandmark { height: 40px; } }

/* Footer full emblem (white, with mascot) */
.footer__logo { width: 156px; height: auto; margin-bottom: var(--sp-1); }

/* Hero visuals: framed product photo + free-standing emblem */
.hero__figure {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  width: clamp(290px, 40vw, 560px); aspect-ratio: 3/2; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg); border: 6px solid #fff; z-index: var(--z-base);
}
.hero__figure img { width: 100%; height: 100%; object-fit: cover; }
.hero__emblem {
  position: absolute; right: 5%; top: 50%; transform: translateY(-50%);
  width: clamp(240px, 30vw, 420px); z-index: var(--z-base); filter: drop-shadow(0 18px 30px rgba(34,28,168,.18));
}
.hero__emblem img { width: 100%; height: auto; }
@media (max-width: 767px){ .hero__figure, .hero__emblem { display: none; } }

/* Show full product packs (no edge-cropping) inside cards & feature blocks */
.product__media { background: linear-gradient(150deg,#F3FAFC,#E3F1F7); }
.product__media img { object-fit: contain; padding: 12px; }
.split__media { background: linear-gradient(150deg,#EFF8FB,#D9EDF4); }
.split__media img { object-fit: contain; padding: clamp(14px, 3vw, 30px); }
/* Drop the decorative pattern overlay where a real photo is shown */
.product__media:has(img)::after,
.split__media:has(img)::after,
.collection__media:has(img)::after { display: none; }
/* Social tiles keep full-bleed lifestyle crop */
.social__tile:has(img)::after { opacity: .12; }

/* =====================================================================
   LANGUAGE TOGGLE (EN / TH)
   ===================================================================== */
.nav__lang { display: inline-flex; align-items: center; gap: .15rem; }
.nav__lang button {
  font-family: var(--font-body); font-weight: 600; font-size: .85rem; letter-spacing: .06em;
  color: var(--ink-soft); padding: .25rem .3rem; line-height: 1; border-radius: 6px;
  transition: color .2s ease;
}
.nav__lang button:hover { color: var(--indigo); }
.nav__lang button.is-active { color: var(--indigo); }
.nav__lang span { opacity: .4; color: var(--indigo); }

/* =====================================================================
   CUTE ICON DECORATIONS (from Thairaya/Cute icons)
   ===================================================================== */
.deco {
  position: absolute; z-index: var(--z-deco); pointer-events: none; user-select: none;
  height: auto; rotate: var(--deco-rot, 0deg);
  filter: drop-shadow(0 4px 10px rgba(16,20,28,.10));
  animation: deco-bob 5s ease-in-out infinite alternate;
}
@keyframes deco-bob { from { transform: translateY(-4px); } to { transform: translateY(5px); } }
/* phones: clear a strip above the heading so corner icons never sit on text */
@media (max-width: 599px){
  .has-deco-top .section-head { padding-top: 64px; }
  .page-hero { padding-top: calc(var(--sp-6) + 48px); }
  .page-hero .deco { top: 8px !important; }
}

/* =====================================================================
   CATEGORY PAGES (/flour, /fruits, /garnish, /seasoning-sauce)
   ===================================================================== */
.page-hero { background: var(--ice-2); text-align: center; padding: var(--sp-6) 0 var(--sp-5); position: relative; overflow: hidden; }
.page-hero .crumb {
  display: inline-flex; align-items: center; gap: .4rem; margin-bottom: var(--sp-2);
  font-weight: 600; font-size: .85rem; letter-spacing: .06em; color: var(--teal);
}
.page-hero .crumb:hover { color: var(--indigo); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.page-hero .lead { margin: var(--sp-2) auto 0; }
.catalog-grid { display: grid; gap: var(--sp-2); justify-content: center; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 768px){
  .catalog-grid { gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); }
}
/* a lone product centres instead of sitting half-width left */
.catalog-grid > :only-child { grid-column: 1 / -1; width: 100%; max-width: 340px; justify-self: center; }
.catalog__foot { text-align: center; margin-top: var(--sp-5); }
.empty-cat { text-align: center; max-width: 520px; margin-inline: auto; padding: var(--sp-5) 0; }
.empty-cat .h-md { margin-bottom: var(--sp-2); }
.empty-cat p { color: var(--ink-soft); margin-bottom: var(--sp-4); }

/* Thai-script refinements: more line-height for tone marks, tighter tracking */
html[lang="th"] .display,
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { line-height: 1.32; }
html[lang="th"] .hero__title { line-height: 1.24; }
html[lang="th"] .eyebrow { letter-spacing: .1em; }
html[lang="th"] body { line-height: 1.7; }
