/* VayoOEM — โรงงานผลิตครีมและเครื่องสำอาง | main.css v2 */
:root {
  --green: #0f7a45;
  --green-bright: #16a05c;
  --green-dark: #0a3d26;
  --green-deep: #072a1a;
  --green-soft: #e9f5ee;
  --gold: #c9a24b;
  --gold-soft: #f7efdd;
  --ink: #17251d;
  --muted: #5b6b62;
  --border: #dfe9e2;
  --bg: #ffffff;
  --bg-soft: #f5faf6;
  --line: #06c755;
  --amber: #b45309;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(10, 61, 38, .06);
  --shadow-lg: 0 12px 34px rgba(10, 61, 38, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Sarabun", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--green); transition: color .18s ease; }
h1, h2, h3, h4 {
  font-family: "Prompt", "Sarabun", "Leelawadee UI", system-ui, sans-serif;
  line-height: 1.35; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em;
}
h1 { font-size: clamp(1.75rem, 4.2vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 2.05rem); margin-top: 0; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; min-width: 0; }
section { padding: 64px 0; }
section.alt { background: linear-gradient(180deg, var(--bg-soft), #eef7f1); }
.section-head { max-width: 820px; margin: 0 auto 36px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.02rem; }

.eyebrow {
  display: inline-block; font-family: "Prompt", sans-serif; font-weight: 600;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green); background: var(--green-soft);
  border-radius: 999px; padding: 4px 14px; margin-bottom: 12px;
}

/* ---------- Header ---------- */
.topbar {
  background: linear-gradient(90deg, var(--green-deep), var(--green-dark)); color: #cfe8da;
  font-size: .84rem; padding: 7px 0;
}
.topbar .container { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.topbar a { color: #8fe6b6; text-decoration: none; font-weight: 700; }
.topbar a:hover { color: #fff; }

header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 12px rgba(10,61,38,.05);
}
.nav-wrap { display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.logo {
  font-family: "Prompt", sans-serif; font-weight: 800; font-size: 1.3rem;
  color: var(--green-dark); text-decoration: none; letter-spacing: .04em; line-height: 1.1;
  white-space: nowrap; flex-shrink: 0; display: inline-flex; align-items: center;
}
.logo img { height: 48px; width: auto; }
.logo span { color: var(--green-bright); }
.logo small { display: block; font-size: .6rem; font-weight: 500; color: var(--muted); letter-spacing: .08em; }

nav.main { margin-left: auto; }
nav.main ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; flex-wrap: wrap; }
nav.main a {
  text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 500;
  padding: 9px 12px; border-radius: 999px; display: block; transition: background .18s ease, color .18s ease;
}
nav.main a:hover, nav.main a[aria-current="page"] { background: var(--green-soft); color: var(--green-dark); }

.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  font-family: "Prompt", sans-serif;
  border-radius: 999px; padding: 13px 26px; font-size: .95rem;
  border: 2px solid transparent; text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, filter .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(120deg, var(--green), var(--green-bright)); color: #fff; box-shadow: 0 6px 18px rgba(15,122,69,.3); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(15,122,69,.4); }
.btn-ghost { border-color: var(--green); color: var(--green-dark); background: transparent; }
.btn-ghost:hover { background: var(--green-soft); }
.btn-line { background: var(--line); color: #fff; box-shadow: 0 6px 18px rgba(6,199,85,.32); }
.btn-line:hover { filter: brightness(.94); box-shadow: 0 10px 24px rgba(6,199,85,.42); }
.btn-line::before { content: "💬 "; }
.header-cta { white-space: nowrap; padding: 10px 20px; }

#menu-toggle { display: none; }
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--green-deep); padding: 0; }
.hero video, .hero .hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 15% 110%, rgba(201,162,75,.22), transparent 55%),
    linear-gradient(100deg, rgba(5, 32, 19, .93) 15%, rgba(5, 32, 19, .62) 58%, rgba(5, 32, 19, .3));
}
.hero .container { position: relative; z-index: 2; padding-top: 104px; padding-bottom: 104px; }
.hero h1 { color: #fff; max-width: 730px; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero .sub { max-width: 640px; font-size: 1.07rem; color: #dff0e6; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero .halal-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,162,75,.16); color: #f2dfae;
  border: 1px solid rgba(201,162,75,.55); border-radius: 999px; padding: 6px 16px;
  font-size: .84rem; font-weight: 600; margin-bottom: 18px; backdrop-filter: blur(4px);
}

/* Page hero (inner pages) */
.page-hero {
  background:
    radial-gradient(ellipse at 90% -20%, rgba(22,160,92,.35), transparent 55%),
    linear-gradient(120deg, var(--green-deep), var(--green-dark) 60%, #0f5433);
  color: #fff; padding: 56px 0;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: #d5ecdf; max-width: 740px; font-size: 1.03rem; }
.breadcrumb { font-size: .82rem; margin-bottom: 14px; color: #9ecdb2; }
.breadcrumb a { color: #cfe8da; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; color: #fff; }

/* ---------- Trust bar ---------- */
.trust-bar {
  background: linear-gradient(90deg, var(--green-deep), var(--green-dark));
  color: #fff; padding: 30px 0; border-bottom: 3px solid var(--gold);
}
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.trust-item { text-align: center; min-width: 0; }
.trust-item b {
  display: block; font-family: "Prompt", sans-serif; font-size: 1.55rem; font-weight: 800;
  background: linear-gradient(90deg, #8fe6b6, #e8cf8f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.trust-item span { font-size: .84rem; color: #b9d8c7; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid > * { min-width: 0; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--green-bright), var(--gold));
  opacity: 0; transition: opacity .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c8ddcf; }
.card:hover::before { opacity: 1; }
.card h3 { color: var(--green-dark); }
.card .more { font-size: .9rem; font-weight: 700; text-decoration: none; }
.card .more:hover { text-decoration: underline; }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 22px; min-width: 0; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-bright));
  color: #fff; font-family: "Prompt", sans-serif; font-weight: 800; font-size: 1.05rem;
  margin-bottom: 12px; box-shadow: 0 4px 12px rgba(15,122,69,.3);
}
.step h3 { font-size: 1.02rem; }
.step p { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---------- Media rows ---------- */
.split { display: grid; gap: 36px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: center; }
.split > * { min-width: 0; }
.split .media {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); position: relative;
}
.split .media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: var(--radius); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.gallery img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px;
  box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.gallery.wide img { aspect-ratio: 4 / 3; }
.gallery img:hover { transform: scale(1.025); box-shadow: var(--shadow-lg); }

/* ---------- Lists & tables ---------- */
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { padding-left: 34px; position: relative; margin-bottom: 12px; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-soft); color: var(--green); font-weight: 800; font-size: .8rem;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table.data { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .95rem; background: #fff; }
table.data th {
  background: linear-gradient(90deg, var(--green-deep), var(--green-dark));
  color: #fff; text-align: left; padding: 14px 18px; font-weight: 700;
  font-family: "Prompt", sans-serif; font-size: .9rem; letter-spacing: .02em;
}
table.data td { padding: 13px 18px; border-top: 1px solid var(--border); vertical-align: top; }
table.data tr:nth-child(even) td { background: var(--bg-soft); }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--border); border-radius: 14px; background: #fff;
  padding: 0 22px; margin-bottom: 12px; box-shadow: var(--shadow);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq details:hover { border-color: var(--green-bright); }
.faq details[open] { border-color: var(--green-bright); box-shadow: var(--shadow-lg); }
.faq summary {
  cursor: pointer; font-weight: 700; font-family: "Prompt", sans-serif; font-size: .98rem;
  padding: 17px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-soft); color: var(--green); font-size: 1.2rem; font-weight: 600;
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; transform: rotate(180deg); }
.faq details > div { padding: 0 0 18px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 85% 20%, rgba(201,162,75,.28), transparent 50%),
    radial-gradient(ellipse at 10% 110%, rgba(22,160,92,.4), transparent 55%),
    linear-gradient(120deg, var(--green-deep), var(--green-dark));
  color: #fff; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #d5ecdf; max-width: 640px; margin: 0 auto 24px; }
.cta-band .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.qr-box {
  background: #fff; border-radius: var(--radius); padding: 16px; width: 200px;
  margin: 24px auto 0; box-shadow: var(--shadow-lg); border: 3px solid var(--gold);
}
.qr-box img { border-radius: 8px; }
.qr-box small { color: var(--ink); display: block; text-align: center; margin-top: 10px; font-weight: 700; font-family: "Prompt", sans-serif; }

/* ---------- Notice ---------- */
.notice {
  border-left: 4px solid var(--amber); background: #fff8ef;
  border-radius: 0 12px 12px 0; padding: 15px 20px; font-size: .92rem; color: #6b4a12;
  box-shadow: var(--shadow);
}

/* ---------- Footer ---------- */
footer.site {
  background: linear-gradient(180deg, var(--green-dark), var(--green-deep));
  color: #b9d8c7; font-size: .92rem; padding: 56px 0 100px;
}
footer.site h4 {
  color: #fff; font-size: 1rem; letter-spacing: .02em;
  padding-bottom: 8px; position: relative;
}
footer.site h4::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 34px; height: 2px; background: var(--gold); border-radius: 2px;
}
footer.site a { color: #cfe8da; text-decoration: none; transition: color .18s ease; }
footer.site a:hover { color: #8fe6b6; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: .8rem; color: #86a996; }

/* ---------- Mobile ---------- */
@media (max-width: 1100px) {
  .menu-btn {
    display: block; margin-left: auto; cursor: pointer;
    padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 1rem;
    font-family: "Prompt", sans-serif; font-weight: 600; color: var(--green-dark);
  }
  nav.main { display: none; width: 100%; margin: 0; }
  #menu-toggle:checked ~ nav.main { display: block; }
  nav.main ul { flex-direction: column; gap: 0; padding: 8px 0; }
  nav.main a { padding: 13px 10px; border-bottom: 1px solid var(--bg-soft); border-radius: 8px; }
  .nav-wrap { flex-wrap: wrap; }
  .header-cta { display: none; }
  .hero .container { padding-top: 64px; padding-bottom: 72px; }
  section { padding: 46px 0; }
  footer.site { padding-bottom: 112px; }
}

/* ============================================================
   v3 — ลูกเล่นหน้าแรก (ทุกอย่างเห็นได้แม้ปิด JS เพื่อไม่กระทบ SEO)
   ============================================================ */

/* scroll reveal: ทำงานเฉพาะเมื่อ JS พร้อม — ไม่มี JS เนื้อหาแสดงปกติ */
html.js .reveal { opacity: 0; transform: translateY(22px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity .7s cubic-bezier(.22,.9,.3,1), transform .7s cubic-bezier(.22,.9,.3,1); }
html.js .reveal.d1.in { transition-delay: .08s; }
html.js .reveal.d2.in { transition-delay: .16s; }
html.js .reveal.d3.in { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal, html.js .reveal.in { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* พื้นหลังมีมิติ */
.mesh { position: relative; overflow: hidden; }
.mesh::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 520px; height: 520px; border-radius: 50%; filter: blur(90px);
  background: radial-gradient(circle, rgba(22,160,92,.16), transparent 70%);
  top: -180px; right: -140px;
}
.mesh::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 460px; height: 460px; border-radius: 50%; filter: blur(90px);
  background: radial-gradient(circle, rgba(201,162,75,.14), transparent 70%);
  bottom: -200px; left: -160px;
}
.mesh > .container { position: relative; z-index: 1; }

/* Hero — การ์ดตัวเลขลอย */
.hero-float {
  position: absolute; right: 40px; bottom: 46px; z-index: 3;
  background: rgba(255,255,255,.97); border-radius: 18px; padding: 18px 22px;
  box-shadow: 0 18px 44px rgba(0,0,0,.3); max-width: 260px;
  border-left: 4px solid var(--gold);
}
.hero-float b { display: block; font-family: "Prompt", sans-serif; font-size: 1.5rem; color: var(--green-dark); line-height: 1.2; }
.hero-float span { font-size: .84rem; color: var(--muted); }
@media (max-width: 1040px) { .hero-float { display: none; } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 18px; z-index: 3; transform: translateX(-50%);
  color: rgba(255,255,255,.75); font-size: 1.4rem; animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(7px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint { animation: none; } }


/* การ์ดสินค้าแบบมีไอคอน */
.icon-card { position: relative; padding-top: 30px; }
.icon-card .ico {
  width: 52px; height: 52px; border-radius: 15px; margin-bottom: 14px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem;
  background: linear-gradient(135deg, var(--green-soft), #d8eee2);
  box-shadow: inset 0 0 0 1px rgba(15,122,69,.12);
}

/* แถบตัวเลขแบบนับขึ้น */
.trust-item b .num { font-variant-numeric: tabular-nums; }


/* แถบสรุปจุดต่างแบบ 2 คอลัมน์ */
.compare { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.compare > div { min-width: 0; border-radius: var(--radius); padding: 24px; }
.compare .bad { background: #fdf3f0; border: 1px solid #f2d7ce; }
.compare .good { background: linear-gradient(150deg, var(--green-soft), #ffffff); border: 1px solid #bfe0cc; }
.compare h3 { margin-bottom: 14px; }
.compare .bad h3 { color: #9a4b2c; }
.compare .good h3 { color: var(--green-dark); }
.compare ul { list-style: none; padding: 0; margin: 0; }
.compare li { padding-left: 26px; position: relative; margin-bottom: 9px; font-size: .95rem; }
.compare .bad li::before { content: "✕"; position: absolute; left: 0; color: #c2603b; font-weight: 800; }
.compare .good li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

/* บทความ */
.article-body { max-width: 780px; }
.article-body h2 { margin-top: 1.8em; padding-top: .2em; }
.article-body h3 { margin-top: 1.4em; }
.article-body figure { margin: 28px 0; }
.article-body figure img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.article-body figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; text-align: center; }
.article-body .lead { font-size: 1.1rem; color: #2c3f34; border-left: 4px solid var(--green-bright); padding-left: 18px; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body .check-list { padding-left: 0; }
.article-meta { font-size: .86rem; color: var(--muted); margin-bottom: 6px; }
.toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 30px; }
.toc h2 { font-size: 1rem; margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: .94rem; }
.toc li { margin-bottom: 6px; }
.post-card { display: block; text-decoration: none; color: inherit; }
.post-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; margin-bottom: 14px; }
.post-card h3 { color: var(--green-dark); font-size: 1.05rem; }
.post-card p { font-size: .92rem; color: var(--muted); }

/* ---- v4: ตราฮาลาลในแถบตัวเลข + การ์ดสินค้าไม่มีไอคอน ---- */
.trust-item b.mark { background: none; -webkit-text-fill-color: initial; margin-bottom: 6px; }
.trust-item b.mark img {
  width: auto; height: 52px; margin: 0 auto;
  background: #fff; border-radius: 10px; padding: 7px 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,.22);
}
.card.prod { padding-top: 26px; }
.card.prod h3 { position: relative; padding-top: 14px; }
.card.prod h3::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 34px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--green-bright), var(--gold));
}
.card.prod .thumb { margin: -26px -24px 18px; border-radius: 16px 16px 0 0; overflow: hidden; }
.card.prod .thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .5s cubic-bezier(.22,.9,.3,1); }
.card.prod:hover .thumb img { transform: scale(1.05); }
.card.prod:has(.thumb) h3 { padding-top: 0; }
.card.prod:has(.thumb) h3::before { display: none; }

/* ---- v5: แถบรับรอง (ตราฮาลาลอยู่บนพื้นสว่าง สีตราจึงไม่ตีกับพื้นหลัง) ---- */
.cert-strip {
  background: linear-gradient(120deg, #ffffff 0%, var(--green-soft) 100%);
  border-bottom: 1px solid var(--border);
  padding: 26px 0;
}
.cert-strip .container {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.cert-mark {
  height: 76px; width: auto; flex-shrink: 0;
  background: #fff; border-radius: 12px; padding: 10px 16px;
  border: 1px solid var(--border);
  box-shadow: 0 3px 12px rgba(10, 61, 38, .08);
}
.cert-text { flex: 1 1 320px; min-width: 0; }
.cert-text h2 {
  font-size: 1.12rem; margin: 0 0 5px; color: var(--green-dark);
}
.cert-text p { font-size: .92rem; color: var(--muted); margin: 0; }
.cert-text strong { color: var(--green-dark); }
.cert-cta { flex-shrink: 0; padding: 10px 22px; font-size: .9rem; }
@media (max-width: 700px) {
  .cert-strip .container { gap: 18px; }
  .cert-mark { height: 62px; }
  .cert-cta { width: 100%; }
}

/* ---- v6: bento ทัวร์โรงงาน (ปูเต็ม 3x3 ไม่มีช่องโหว่) ---- */
.bento { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.bento figure {
  margin: 0; position: relative; border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); min-width: 0; aspect-ratio: 4 / 3;
}
.bento .b-lead { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.bento img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22,.9,.3,1); }
.bento figure:hover img { transform: scale(1.06); }
.bento figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 30px 16px 13px; color: #fff; font-size: .85rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(5,32,19,.88));
}
@media (max-width: 820px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .b-lead { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 10; }
}
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
  .bento .b-lead { grid-column: auto; aspect-ratio: 4 / 3; }
}

/* ---- สไลด์เครื่องจักร (ปิด JS ก็ยังปัดดูได้ ทุกรูปอยู่ใน HTML) ---- */
.slider { position: relative; }
.slider .slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
}
.slider .slides::-webkit-scrollbar { display: none; }
.slider figure { margin: 0; flex: 0 0 100%; scroll-snap-align: center; position: relative; }
.slider figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.slider figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 40px 18px 30px; color: #fff; font-size: .9rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(5,32,19,.9));
}
.slider .dots {
  position: absolute; left: 0; right: 0; bottom: 11px; z-index: 3;
  display: flex; justify-content: center; gap: 7px;
}
.slider .dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.5); transition: width .25s ease, background .25s ease;
}
.slider .dots button[aria-current="true"] { background: #fff; width: 24px; border-radius: 99px; }
.slider .dots button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---- บล็อกอ่านต่อ ---- */
.related-block .post-card { display: flex; flex-direction: column; }
.related-block .post-card h3 { margin-bottom: .5em; }
.related-block .post-card p { flex: 1; }
.related-block .post-card .more {
  display: inline-block; margin-top: 14px; font-weight: 700;
  font-family: "Prompt", sans-serif; font-size: .9rem; color: var(--green);
}
.related-block .post-card:hover .more { text-decoration: underline; }

/* ---- แหล่งอ้างอิงท้ายบทความ ---- */
.ref-list { list-style: none; padding: 0; margin: 0 0 1em; }
.ref-list li { padding-left: 26px; position: relative; margin-bottom: 9px; font-size: .95rem; }
.ref-list li::before { content: "↗"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.page-hero .article-meta { color: #b9d8c7; margin-top: -4px; }
.page-hero .article-meta a { color: #dff0e6; }

/* ---- แถบงบเริ่มต้น (หน้าราคา) ---- */
.budget-strip {
  background: linear-gradient(120deg, var(--green-soft), #ffffff 60%);
  border-bottom: 1px solid var(--border);
  padding: 30px 0;
}
.budget-strip .container { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.budget-num {
  flex-shrink: 0; text-align: center; padding: 18px 30px; border-radius: var(--radius);
  background: linear-gradient(140deg, var(--green-deep), var(--green)); color: #fff;
  box-shadow: 0 10px 26px rgba(15,122,69,.28); border-bottom: 4px solid var(--gold);
}
.budget-num span { display: block; font-size: .8rem; letter-spacing: .1em; color: #a9dcc2; }
.budget-num b {
  display: block; font-family: "Prompt", sans-serif; font-size: 1.9rem; font-weight: 800;
  line-height: 1.2; margin-top: 2px;
}
.budget-text { flex: 1 1 320px; min-width: 0; }
.budget-text p { font-size: .96rem; margin-bottom: .7em; }
.budget-text .btn { display: block; width: fit-content; margin: 12px auto 0; }
@media (max-width: 640px) {
  .budget-strip .container { gap: 20px; }
  .budget-num { width: 100%; }
  .budget-text .btn { width: 100%; margin-top: 12px; }
}

/* ---- v7: ไทม์ไลน์ขั้นตอน — เส้นเชื่อมทีละใบ ไม่ค้างเมื่อขึ้นบรรทัดใหม่ ---- */
.flow { grid-template-columns: repeat(3, 1fr); row-gap: 26px; }
.flow .step { position: relative; overflow: visible; }
/* เส้นเชื่อมวาดไว้ทางซ้ายของแต่ละใบ แล้วซ่อนใบที่ขึ้นต้นแถว จึงไม่มีเส้นลอยค้าง */
.flow .step::after {
  content: ""; position: absolute; z-index: 0;
  left: -22px; width: 22px; top: 40px; height: 2px;
  background: linear-gradient(90deg, rgba(22,160,92,.15), rgba(22,160,92,.55));
}
.flow .step:nth-child(3n + 1)::after { display: none; }
@media (max-width: 900px) {
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow .step:nth-child(3n + 1)::after { display: block; }
  .flow .step:nth-child(2n + 1)::after { display: none; }
}
@media (max-width: 560px) {
  .flow { grid-template-columns: 1fr; }
  .flow .step::after { display: none !important; }
}

/* หัวข้อ section จัดกึ่งกลางแล้ว แต่บล็อกที่อยู่ในคอลัมน์คู่กับรูปยังชิดซ้ายเหมือนเดิม */
.split .section-head { margin-left: 0; text-align: left; }
.section-head .btn { margin-top: 6px; }

/* ================= v9: skip link + ปุ่มลอยด้านขวา + แถบคุกกี้ ================= */

/* ---------- ลิงก์ข้ามไปเนื้อหาหลัก (เห็นเฉพาะตอนกด Tab) ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--green-dark); color: #fff; text-decoration: none;
  font-family: "Prompt", sans-serif; font-weight: 600; font-size: .95rem;
  padding: 11px 18px; border-radius: 0 0 10px 10px;
  box-shadow: 0 6px 20px rgba(10, 61, 38, .35);
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

/* ---------- ปุ่มลอยมุมขวา (โทร + LINE) ---------- */
/* ขยับหนีแถบคุกกี้ด้วย transform ที่อิงตัวแปร --cookiebar-h
   ทรานซิชันต้องมาทีหลัง (คลาส .anim) เพราะถ้ามีตั้งแต่เฟรมแรก
   ค่าตัวแปรที่ JS ตั้งให้ตอนโหลดจะถูกทรานซิชันคาไว้ที่ค่าเริ่มต้นแล้วไม่ขยับเลย */
.fab-stack {
  position: fixed; right: 16px; z-index: 60;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateY(calc(-1 * var(--cookiebar-h, 0px)));
  display: flex; flex-direction: column; gap: 12px;
}
.fab-stack.anim { transition: transform .25s ease; }
.fab {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  color: #fff; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.fab svg { width: 27px; height: 27px; fill: currentColor; display: block; }
.fab-call { background: var(--green); box-shadow: 0 8px 22px rgba(10, 61, 38, .38); }
.fab-line { background: var(--line); box-shadow: 0 8px 22px rgba(6, 199, 85, .48); }
.fab:hover { transform: translateY(-3px); }
.fab-call:hover { box-shadow: 0 13px 30px rgba(10, 61, 38, .46); }
.fab-line:hover { box-shadow: 0 13px 30px rgba(6, 199, 85, .58); }
.fab:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ป้ายชื่อโผล่ตอนชี้เมาส์ — จอเล็กไม่ต้องมี */
.fab-tip {
  position: absolute; right: 68px; top: 50%; transform: translateY(-50%);
  background: var(--green-deep); color: #fff;
  font-family: "Sarabun", sans-serif; font-size: .84rem; font-weight: 500;
  padding: 7px 13px; border-radius: 9px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
  box-shadow: 0 6px 18px rgba(7, 42, 26, .3);
}
.fab:hover .fab-tip, .fab:focus-visible .fab-tip { opacity: 1; }

@media (max-width: 640px) {
  .fab { width: 54px; height: 54px; }
  .fab svg { width: 25px; height: 25px; }
  .fab-tip { display: none; }
}

/* ---------- แถบขอความยินยอมคุกกี้ ---------- */
.cookie-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: #fff; border-top: 3px solid var(--green);
  box-shadow: 0 -8px 34px rgba(10, 61, 38, .18);
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  max-height: 82vh; overflow-y: auto;
}
.cookie-bar.show { display: block; }
.cookie-inner {
  display: flex; align-items: center; gap: 20px 26px; flex-wrap: wrap;
}
.cookie-text { flex: 1 1 340px; min-width: 0; }
.cookie-text strong {
  display: block; font-family: "Prompt", sans-serif; font-size: 1.02rem;
  color: var(--green-dark); margin-bottom: 4px;
}
.cookie-text p { margin: 0; font-size: .88rem; line-height: 1.65; color: var(--muted); }
.cookie-text a { color: var(--green); font-weight: 600; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.cookie-actions .btn { padding: 11px 20px; font-size: .9rem; }
.btn-quiet {
  background: #fff; color: var(--green-dark);
  border: 1.5px solid var(--border);
}
.btn-quiet:hover { background: var(--bg-soft); border-color: var(--green); }

/* แผงตั้งค่ารายหมวด */
.cookie-settings { display: none; margin-top: 18px; }
.cookie-bar.open-settings .cookie-settings { display: block; }
.cookie-settings > .container { padding: 0; }
.cookie-opt {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.cookie-opt div { flex: 1; }
.cookie-opt strong {
  display: block; font-family: "Prompt", sans-serif; font-size: .95rem;
  color: var(--green-dark); margin-bottom: 3px;
}
.cookie-opt span { font-size: .85rem; line-height: 1.6; color: var(--muted); }
.switch { position: relative; flex-shrink: 0; width: 48px; height: 27px; margin-top: 3px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px;
  background: #c9d3cd; transition: background .2s ease; pointer-events: none;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .28); transition: transform .2s ease;
}
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(21px); }
.switch input:disabled + i { background: var(--green); opacity: .5; cursor: not-allowed; }
.switch input:focus-visible + i { outline: 3px solid var(--gold); outline-offset: 2px; }
.cookie-save { padding-top: 16px; border-top: 1px solid var(--border); }

/* จอเล็ก: บีบให้แถบสูงไม่เกินราว 2 บรรทัดข้อความ + ปุ่มอีกแถว
   ไม่งั้นแถบกินพื้นที่จอเกินหนึ่งในสี่ ดันปุ่มลอยขึ้นไปเกือบกลางจอ */
@media (max-width: 700px) {
  .cookie-bar {
    border-top-width: 2px;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .cookie-inner { gap: 11px; }
  .cookie-text strong { font-size: .92rem; margin-bottom: 1px; }
  .cookie-text p { font-size: .8rem; line-height: 1.5; }
  .cookie-actions { width: 100%; gap: 8px; }
  .cookie-actions .btn { flex: 1 1 auto; text-align: center; padding: 9px 6px; font-size: .82rem; }
  .cookie-opt { padding: 12px 0; }
  .cookie-opt strong { font-size: .9rem; }
  .cookie-opt span { font-size: .8rem; }
}

/* ปุ่มเปิดแถบตั้งค่าใหม่ใน footer */
.cookie-reopen {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; font-size: inherit; color: #cfe8da;
  text-decoration: underline; text-underline-offset: 3px;
}
.cookie-reopen:hover { color: #8fe6b6; }

/* หน้านโยบาย — อ่านง่าย ไม่ต้องกว้างเต็มจอ */
.legal { max-width: 820px; }
.legal h2 { margin-top: 2em; }
.legal h3 { margin-top: 1.5em; }
.legal .table-wrap { margin: 18px 0 24px; }
.legal table.data { font-size: .9rem; }
.legal .updated {
  display: inline-block; background: var(--green-soft); color: var(--green-dark);
  font-size: .85rem; font-weight: 600; padding: 7px 15px; border-radius: 999px;
}
