/* =========================================================
   Nutrition House Co., Ltd. — main stylesheet
   Palette: natural green + warm amber, cream background
   ========================================================= */

:root {
  --green-900: #0f3d22;
  --green-800: #14532d;
  --green-700: #1b6b3a;
  --green-600: #1f7a3d;
  --green-500: #2e9e52;
  --green-100: #e3f3e8;
  --green-050: #f1f9f3;
  --amber-600: #e4920f;
  --amber-500: #f4a62a;
  --amber-100: #fdeecb;
  --cream: #faf7f0;
  --ink: #1d241f;
  --ink-soft: #4b5750;
  --line: #e7e3d8;
  --white: #ffffff;
  --danger: #c0392b;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(20, 60, 34, .06);
  --shadow: 0 10px 30px rgba(20, 60, 34, .10);
  --shadow-lg: 0 24px 60px rgba(20, 60, 34, .16);
  --maxw: 1180px;
  --font-head: 'Prompt', 'Noto Sans Thai', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans Thai', 'Noto Sans Thai', system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
}

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

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-600); }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; color: var(--green-900); font-weight: 600; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.4rem); }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

.section { padding: clamp(48px, 7vw, 92px) 0; }
.section--tint { background: var(--green-050); }
.section--green { background: linear-gradient(160deg, var(--green-800), var(--green-900)); color: #eaf5ec; }
.section--green h2, .section--green h3 { color: #fff; }

.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; font-size: .78rem;
  color: var(--green-600); background: var(--green-100);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.section--green .eyebrow { color: var(--amber-500); background: rgba(255,255,255,.08); }

.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.12rem; color: var(--ink-soft); }
.section--green .lead { color: #cfe6d5; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  min-height: 48px; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-700); color: #fff; box-shadow: var(--shadow); }
.btn-accent { background: var(--amber-500); color: #3a2a06; }
.btn-accent:hover { background: var(--amber-600); color: #2a1f04; }
.btn-ghost { background: transparent; border-color: var(--green-600); color: var(--green-700); }
.btn-ghost:hover { background: var(--green-600); color: #fff; }
.btn-light { background: #fff; color: var(--green-800); }
.btn-light:hover { background: var(--green-050); color: var(--green-900); }
.btn-line { background: #06c755; color: #fff; }
.btn-line:hover { background: #05b14c; color:#fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; min-height: 40px; font-size: .92rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 247, 240, .92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar { background: var(--green-800); color: #dff0e4; font-size: .85rem; }
.topbar .container { display: flex; gap: 18px; justify-content: space-between; align-items: center; padding-block: 7px; flex-wrap: wrap; }
.topbar a { color: #eaf5ec; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar .tb-group { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }

.navbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 46px; height: 46px; }
.brand-text strong { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; color: var(--green-900); display: block; line-height: 1.1; }
.brand-text span { font-size: .72rem; color: var(--ink-soft); letter-spacing: .04em; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-head); font-weight: 500; color: var(--ink);
  padding: 9px 14px; border-radius: 999px; font-size: .98rem;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--green-100); color: var(--green-800); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none; background: var(--green-600); border: none; color: #fff;
  width: 46px; height: 46px; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(165deg, #f4fbf4 0%, #e7f4ea 55%, #dcefe0 100%); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 85% 15%, rgba(244,166,42,.18), transparent 40%),
                    radial-gradient(circle at 10% 90%, rgba(31,122,61,.12), transparent 45%);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-block: clamp(44px, 6vw, 86px); }
.hero h1 { color: var(--green-900); }
.hero h1 .hl { color: var(--green-600); }
.hero p.lead { max-width: 540px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 28px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; font-size: .86rem; font-weight: 500; color: var(--green-800); box-shadow: var(--shadow-sm);
}
.pill svg { width: 16px; height: 16px; color: var(--green-600); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; }
.hero-art img { width: 100%; filter: drop-shadow(0 24px 40px rgba(20,60,34,.18)); border-radius: var(--radius-lg); }

.trust-strip { background: var(--green-900); color: #dff0e4; }
.trust-strip .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-block: 26px; text-align: center; }
.trust-strip .num { font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; color: var(--amber-500); line-height: 1.1; }
.trust-strip .lbl { font-size: .85rem; color: #bfe0c8; }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .ico {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-700); margin-bottom: 16px;
}
.card .ico svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--ink-soft); margin: 0; font-size: .98rem; }

/* ---------- Product cards ---------- */
.product-grid { grid-template-columns: repeat(3, 1fr); }
.product {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease;
}
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product .thumb { position: relative; aspect-ratio: 4 / 3; background: var(--green-050); }
.product .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product .tag {
  position: absolute; top: 12px; left: 12px; background: var(--amber-500); color: #3a2a06;
  font-family: var(--font-head); font-weight: 600; font-size: .76rem; padding: 5px 12px; border-radius: 999px;
}
.product .body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.product h3 { font-size: 1.16rem; margin-bottom: 6px; }
.product .desc { color: var(--ink-soft); font-size: .92rem; margin-bottom: 14px; flex: 1; }
.product .meta { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; gap:8px; flex-wrap: wrap; }
.product .price { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--green-700); }
.product .price small { font-size: .82rem; font-weight: 500; color: var(--ink-soft); }
.product .unit { font-size: .84rem; color: var(--ink-soft); }
.product .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Split / about ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.check-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .ck { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; margin-top: 2px; }
.check-list .ck svg { width: 16px; height: 16px; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.step { position: relative; padding-top: 10px; }
.step .n { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; width: 46px; height: 46px; border-radius: 50%; background: var(--green-600); color:#fff; display: grid; place-items: center; margin-bottom: 14px; }
.step h3 { font-size: 1.1rem; }
.step p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* ---------- Testimonials (placeholder) ---------- */
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.quote p { font-style: italic; color: var(--ink); }
.quote .who { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.quote .av { width: 44px; height: 44px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; }
.quote .who b { display: block; font-family: var(--font-head); }
.quote .who span { font-size: .85rem; color: var(--ink-soft); }

.logos { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; }
.logos .logo-ph { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 18px 26px; color: var(--ink-soft); font-size: .9rem; min-width: 150px; text-align: center; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--green-700), var(--green-900)); color: #fff; border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px); text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d6ebdb; max-width: 560px; margin-inline: auto; }
.cta-band .hero-cta { justify-content: center; margin-top: 22px; }

/* ---------- FAQ ---------- */
.accordion { max-width: 820px; margin-inline: auto; }
.acc-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.acc-q { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 18px 22px; font-family: var(--font-head); font-weight: 600; font-size: 1.04rem; color: var(--green-900); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.acc-q .chev { flex: none; transition: transform .2s ease; color: var(--green-600); }
.acc-item[open] .acc-q .chev { transform: rotate(180deg); }
.acc-a { padding: 0 22px 20px; color: var(--ink-soft); }
details.acc-item summary { list-style: none; }
details.acc-item summary::-webkit-details-marker { display: none; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .ico { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; }
.info-list .ico svg { width: 22px; height: 22px; }
.info-list b { font-family: var(--font-head); display: block; color: var(--green-900); }
.info-list a, .info-list span { color: var(--ink-soft); }

.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.map-embed iframe { display: block; width: 100%; height: 340px; border: 0; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-head); font-weight: 500; font-size: .92rem; margin-bottom: 6px; color: var(--green-900); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100); }
.field textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: .84rem; color: var(--ink-soft); }
.form-msg { display: none; margin-top: 14px; padding: 12px 16px; border-radius: 12px; font-size: .95rem; }
.form-msg.ok { display: block; background: var(--green-100); color: var(--green-800); }

/* ---------- Modal (order) ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal__overlay { position: absolute; inset: 0; background: rgba(15, 40, 24, .55); backdrop-filter: blur(2px); }
.modal__card { position: relative; background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 540px; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal__head { padding: 22px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 0; background: #fff; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal__head h3 { margin: 0; }
.modal__close { background: var(--green-050); border: none; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; color: var(--green-800); font-size: 1.2rem; }
.modal__body { padding: 24px; }
.modal__item { display: flex; gap: 14px; align-items: center; background: var(--green-050); border-radius: 12px; padding: 12px; margin-bottom: 18px; }
.modal__item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.modal__item .pr { margin-left: auto; font-family: var(--font-head); font-weight: 700; color: var(--green-700); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: flex; flex-direction: column; gap: 2px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--green-900); }
.seg label small { font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--ink-soft); }
.seg input:checked + label { border-color: var(--green-500); background: var(--green-050); box-shadow: 0 0 0 3px var(--green-100); }

.pay-panel { display: none; }
.pay-panel.active { display: block; }
.secure-note { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-100); border: 1px solid #f0d79a; border-radius: 12px; padding: 12px 14px; font-size: .86rem; color: #6b4e11; margin-top: 4px; }
.secure-note svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.qr-box { text-align: center; padding: 10px; }
.qr-box img { width: 180px; margin: 0 auto 10px; border: 1px solid var(--line); border-radius: 12px; }
.bank-row { display:flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--green-050); border-bottom: 1px solid var(--line); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 0; font-size: .88rem; color: var(--ink-soft); }
.breadcrumb li::after { content: "/"; margin-left: 8px; color: var(--line); }
.breadcrumb li:last-child::after { content: ""; }

.page-hero { background: linear-gradient(160deg, var(--green-800), var(--green-900)); color: #eaf5ec; padding: clamp(40px, 6vw, 70px) 0; }
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: #cfe6d5; max-width: 620px; margin: 0; }

/* ---------- Article (legal) ---------- */
.prose { max-width: 820px; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #c7ddcd; padding: 56px 0 26px; font-size: .94rem; }
.site-footer a { color: #d8ecdd; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 36px; }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-brand img { width: 48px; margin-bottom: 12px; }
.footer-brand p { color: #a9c7b1; font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: #9ec0a7; }

/* ---------- Floating contact ---------- */
.float-contact { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: flex; flex-direction: column; gap: 10px; }
.float-contact a { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow); color: #fff; transition: transform .15s ease; }
.float-contact a:hover { transform: scale(1.06); }
.float-contact .fc-line { background: #06c755; }
.float-contact .fc-call { background: var(--green-600); }
.float-contact svg { width: 26px; height: 26px; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.notice { background: var(--amber-100); border: 1px solid #f0d79a; color: #6b4e11; border-radius: var(--radius-sm); padding: 14px 18px; font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 460px; margin-inline: auto; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav { position: fixed; inset: 0 0 0 auto; width: min(82vw, 320px); background: #fff; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .25s ease; padding: 80px 22px 24px; z-index: 65; display: block; }
  .site-nav.open { transform: translateX(0); }
  .site-nav .nav-links { flex-direction: column; align-items: stretch; gap: 4px; }
  .site-nav .nav-links a { padding: 12px 14px; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(15,40,24,.45); z-index: 64; display: none; }
  .nav-backdrop.open { display: block; }
  .product-grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .trust-strip .container { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .field-row { grid-template-columns: 1fr; }
  .topbar .tb-group.tb-hide { display: none; }
}

@media (max-width: 420px) {
  .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}

/* motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
