/* =========================================================
   SW ไม้และวัสดุก่อสร้าง — วัสดุงานฝ้า ผนัง และตกแต่งภายใน
   โทนสี: กระดาษเทาเย็น (ผิวยิปซัม/เหล็กชุบ) + ลายชั้นไม้อัด + เขียว LINE เฉพาะปุ่มติดต่อ
   ========================================================= */

:root {
  --paper: #F2F3F0;
  --surface: #FBFBF9;
  --tint: #E9EBE6;
  --ink: #14181A;
  --ink-2: #2C3438;
  --muted: #586369;
  --hair: #D5D9D2;
  --hair-2: #E4E7E1;

  --ply-1: #DDB982;
  --ply-2: #B98B55;
  --wood: #8A5F2C;

  --line: #06C755;
  --line-deep: #05A847;

  --dark: #14181A;
  --dark-2: #1E2528;
  --dark-hair: #333C40;
  --on-dark: #E9EDEB;
  --on-dark-muted: #9DA9AE;

  --font-display: 'Bai Jamjuree', 'IBM Plex Sans Thai Looped', 'Leelawadee UI', 'Thonburi', sans-serif;
  --font-body: 'IBM Plex Sans Thai Looped', 'Leelawadee UI', 'Thonburi', 'Noto Sans Thai', sans-serif;
  --font-mono: 'IBM Plex Mono', 'IBM Plex Sans Thai Looped', ui-monospace, 'Cascadia Mono', monospace;

  --wrap: 1200px;
  --gut: clamp(20px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --radius: 3px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.section-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--ply-1); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gut) * 2);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

/* ลายชั้นไม้อัด — เส้นเอกลักษณ์ของแบรนด์ */
.ply-rule {
  height: 5px;
  background: repeating-linear-gradient(90deg,
    var(--ply-1) 0 34px, var(--ply-2) 34px 40px,
    #CFA66D 40px 78px, #A97B48 78px 84px);
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .875rem;
  color: var(--wood);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ''; width: 22px; height: 10px; flex: none;
  background: linear-gradient(180deg,
    var(--ply-1) 0 30%, var(--ply-2) 30% 40%, var(--ply-1) 40% 70%, var(--ply-2) 70% 80%, var(--ply-1) 80%);
}

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 22px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.3;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 20px; height: 20px; flex: none; }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: .9375rem; }
.btn-lg { min-height: 56px; padding: 12px 28px; font-size: 1.0625rem; }

.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); }

.btn-line { background: var(--line); color: #04220F; }
.btn-line:hover { background: var(--line-deep); }

/* ---------- ส่วนหัว ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--hair);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: calc(var(--header-h) - 5px);
}

.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-mark {
  display: grid; gap: 3px; width: 30px; flex: none;
}
.logo-mark i { display: block; height: 6px; background: var(--ply-1); }
.logo-mark i:nth-child(2) { background: var(--ply-2); margin-left: 5px; margin-right: -5px; }
.logo-text { display: grid; line-height: 1.25; }
.logo-text strong { font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; letter-spacing: .01em; }
.logo-text small { font-size: .75rem; color: var(--muted); }
.logo-img { display: block; height: 38px; width: auto; margin-bottom: 5px; }
.footer-logo {
  width: 52px; height: 52px; flex: none; border-radius: 10px; background: #fff;
  display: grid; place-items: center;
}
.footer-logo img { height: 40px; width: auto; display: block; }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.site-nav > a:not(.btn) {
  font-family: var(--font-display); font-weight: 500; font-size: .9375rem;
  padding: 8px 0; position: relative; color: var(--ink-2);
}
.site-nav > a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--ply-2); transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.site-nav > a:not(.btn):hover::after,
.site-nav > a.is-current::after { transform: scaleX(1); }

.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 22px; height: 2px; background: var(--ink); position: relative;
  transition: transform .2s, background-color .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
/* ---------- สไลด์เต็มจอ ---------- */
.slider {
  position: relative; isolation: isolate; overflow: hidden;
  height: min(86vh, 820px); min-height: 540px;
  background: #121011; color: #fff;
}
.slides { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1.1s ease, visibility 0s linear 1.1s;
}
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1.1s ease; }
.slide-bg {
  position: absolute; inset: -3%;
  background: #1A1614 center / cover no-repeat;
  will-change: transform;
}
.slide-bg video { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide.is-active .slide-bg { animation: kenburns 11s ease-out both; }
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.12) translate(var(--tx, 0), var(--ty, 0)); }
}
.slide-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 48%, rgba(12, 10, 9, .5), rgba(12, 10, 9, .15) 75%),
    linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .65));
}
/* รูปถ่ายจริงมักสว่างกว่าภาพวาด จึงเพิ่มความเข้มของฉากหลังข้อความ */
.slide.has-photo .slide-shade {
  background:
    radial-gradient(ellipse 65% 55% at 50% 46%, rgba(12, 10, 9, .62), rgba(12, 10, 9, .3) 80%),
    linear-gradient(180deg, rgba(0, 0, 0, .4), rgba(0, 0, 0, .1) 30%, rgba(0, 0, 0, .1) 55%, rgba(0, 0, 0, .7));
}
.slide-caption {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-bottom: 120px; padding-top: 24px;
}
.slide-kicker {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1rem, 1.6vw, 1.375rem); color: var(--ply-1);
  letter-spacing: .02em;
}
.slide-title {
  margin-top: 6px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.125rem, 5.4vw, 4.5rem); line-height: 1.2;
  max-width: 16em; text-wrap: balance;
  text-shadow: 0 2px 28px rgba(0, 0, 0, .45);
}
.slide-rule {
  display: block; width: min(560px, 72%); height: 2px; margin: 24px auto 20px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9) 12%, rgba(255, 255, 255, .9) 88%, transparent);
}
.slide-sub {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.0625rem, 2vw, 1.75rem); line-height: 1.5;
  max-width: 28em; text-wrap: balance;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .5);
}
.slide-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--ply-1); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .06); backdrop-filter: blur(4px); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .18); }

/* ข้อความค่อย ๆ ลอยขึ้นเมื่อเปลี่ยนสไลด์ */
.slide-caption > * { opacity: 0; }
.slide.is-active .slide-caption > * { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.slide.is-active .slide-caption > :nth-child(2) { animation-delay: .12s; }
.slide.is-active .slide-caption > :nth-child(3) { animation-name: grow; animation-delay: .3s; }
.slide.is-active .slide-caption > :nth-child(4) { animation-delay: .42s; }
.slide.is-active .slide-caption > :nth-child(5) { animation-delay: .56s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }

/* ลูกศร */
.slider-arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(6px);
  transition: background-color .2s, transform .2s;
}
.slider-arrow svg { width: 22px; height: 22px; }
.slider-arrow:hover { background: rgba(255, 255, 255, .24); }
.slider-arrow.is-prev { left: clamp(12px, 2.5vw, 36px); }
.slider-arrow.is-next { right: clamp(12px, 2.5vw, 36px); }

/* แถบล่าง : ปุ่มโซเชียล + จุดสไลด์ */
.slider-bottom {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  pointer-events: none;
}
.slider-bottom > * { pointer-events: auto; }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.social-btn {
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .6);
  transition: transform .2s ease, filter .2s;
}
.social-btn svg { width: 24px; height: 24px; }
.social-btn:hover { transform: translateY(-3px); filter: brightness(1.08); }
.social-btn.is-line { background: #06C755; }
.social-btn.is-wechat { background: #07C160; }
.social-btn.is-phone { background: var(--ply-2); }
.social-btn.is-facebook { background: #1877F2; }
.social-btn.is-tiktok { background: #161616; }
.social-btn.is-youtube { background: #E62117; }
.social-btn.is-instagram { background: radial-gradient(circle at 30% 107%, #FDCB52 0, #FD5949 45%, #D6249F 60%, #285AEB 90%); }

.slider-ui { display: flex; align-items: center; gap: 10px; }
.slider-dots { display: flex; gap: 4px; }
.slider-dot { width: 40px; height: 28px; display: grid; align-items: center; }
.slider-dot i {
  display: block; height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, .35); position: relative; overflow: hidden;
}
.slider-dot i::after {
  content: ''; position: absolute; inset: 0; background: #fff;
  transform: scaleX(0); transform-origin: left;
}
.slider-dot.is-active i { animation: tick 6.5s linear forwards; }
.slider-dot.is-active i::after { animation: inherit; animation-name: fill; }
@keyframes tick { from { opacity: 1; } to { opacity: 1; } }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.slider.is-paused .slider-dot i, .slider.is-paused .slider-dot i::after,
.slider.is-offscreen .slider-dot i, .slider.is-offscreen .slider-dot i::after { animation-play-state: paused; }
.slider.is-paused .slider-dot.is-active i::after { transform: scaleX(1); }

.slider-pause {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  border: 1px solid rgba(255, 255, 255, .45);
  transition: background-color .2s;
}
.slider-pause:hover { background: rgba(255, 255, 255, .15); }
.slider-pause svg { width: 16px; height: 16px; }
.slider-pause .i-play, .slider.is-paused .slider-pause .i-pause { display: none; }
.slider.is-paused .slider-pause .i-play { display: block; }
.slider :focus-visible { outline-color: #fff; }

.hero { padding-block: clamp(56px, 7vw, 104px) clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 4vw, 64px); align-items: center;
}
.hero-title {
  font-size: clamp(2rem, 3.85vw, 3.25rem);
  line-height: 1.28;
  letter-spacing: -.005em;
}
.nw { display: inline-block; white-space: nowrap; }
.lead {
  margin-top: 22px; max-width: 34em;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  color: var(--ink-2);
}
.lead [data-brand-full] { font-family: var(--font-display); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--hair);
}
.facts > div { padding: 18px 16px 0 0; }
.facts > div + div { padding-left: 16px; border-left: 1px solid var(--hair); }
.facts dt {
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.4; white-space: nowrap;
}
.facts > div:last-child dt { font-family: var(--font-display); font-weight: 700; }
.facts dd { font-size: .8125rem; color: var(--muted); line-height: 1.55; margin-top: 4px; }

/* ภาพแผ่นวัสดุแยกชั้น */
.hero-stack {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  align-items: stretch; position: relative;
}
.stack-svg { width: 100%; height: auto; overflow: visible; }
.stack-svg .sheet {
  transform: translateY(calc(var(--dy) * 1px));
  transition: transform 1s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--i) * 70ms);
}
.is-open .stack-svg .sheet { transform: none; }
.stack-svg .leader { opacity: 0; transition: opacity .5s ease .8s; }
.is-open .stack-svg .leader { opacity: 1; }
.stack-svg .sheet.is-hot .sheet-outline { stroke: var(--ink); stroke-width: 1.6; }

.stack-labels { position: relative; }
.stack-labels a {
  position: absolute; left: 0; right: 0;
  transform: translateY(-50%);
  padding: 2px 0 2px 12px;
  border-left: 2px solid transparent;
  display: grid; line-height: 1.35;
  opacity: 0; transition: opacity .5s ease, border-color .18s;
  transition-delay: calc(.75s + var(--i) * 60ms), 0s;
}
.is-open .stack-labels a { opacity: 1; }
.stack-labels a:hover, .stack-labels a:focus-visible { border-left-color: var(--ply-2); }
.stack-labels b { font-family: var(--font-display); font-weight: 600; font-size: clamp(.8125rem, 1.15vw, 1rem); }
.stack-labels span { font-family: var(--font-mono); font-size: clamp(.6875rem, .95vw, .8125rem); color: var(--muted); }
.noscript-note { grid-column: 1 / -1; color: var(--muted); }

/* ---------- SECTION ---------- */
.section { padding-block: var(--section); }
.section-tint { background: var(--tint); }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head h2, .about-copy h2, .contact-copy h2 { font-size: clamp(1.625rem, 2.8vw, 2.375rem); }
.section-desc { margin-top: 14px; color: var(--muted); font-size: 1.0625rem; }

/* ---------- การ์ดสินค้า ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hair); border-left: 1px solid var(--hair);
}
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  scroll-margin-top: calc(var(--header-h) + 16px);
  transition: background-color .2s;
}
.card:hover, .card.is-target { background: #fff; }
.card.is-target { box-shadow: inset 0 0 0 2px var(--ply-2); }
.card-art {
  aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  padding: 10px 16px 0;
  background:
    linear-gradient(var(--hair-2) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, var(--hair-2) 1px, transparent 1px) 0 0 / 12.5% 100%;
  border-bottom: 1px solid var(--hair-2);
}
.card-art svg { width: 100%; height: 100%; }
.card-art.has-photo { padding: 0; background: #fff; overflow: hidden; }
.card-art.has-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.card:hover .card-art.has-photo img { transform: scale(1.05); }

/* ---------- แกลเลอรี ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(150px, 16vw, 220px);
  grid-auto-flow: dense; gap: 10px;
}
.g-item { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--hair); }
.g-item.is-big { grid-column: span 2; grid-row: span 2; }
.g-item.is-wide { grid-column: span 2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.g-item:hover img { transform: scale(1.06); }
.g-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 14px 10px;
  background: linear-gradient(180deg, transparent, rgba(10, 10, 10, .75));
  color: #fff; font-size: .875rem; line-height: 1.5;
}
.card-art .box { transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card-art .box { transform: translateY(calc(var(--lift, 0) * 1px)); }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.25rem; }
.card-alias { font-size: .8125rem; color: var(--muted); margin-top: 2px; }
.card-desc { margin-top: 12px; font-size: .9375rem; color: var(--ink-2); line-height: 1.7; }
.spec { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair-2); display: grid; gap: 10px; }
.spec > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.spec dt { font-size: .8125rem; color: var(--muted); }
.spec dd { font-family: var(--font-mono); font-size: .875rem; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--font-mono); font-size: .8125rem; line-height: 1.5;
  padding: 2px 9px; border: 1px solid var(--hair); border-radius: 2px; background: var(--paper);
  white-space: nowrap;
}
.chip-text { font-family: var(--font-body); }
.chip-unit { font-family: var(--font-body); font-size: .8125rem; color: var(--muted); align-self: center; }
.card-ask {
  margin-top: auto; padding-top: 20px;
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-family: var(--font-display); font-weight: 600; font-size: .9375rem;
}
.card-ask::after { content: '→'; transition: transform .2s; }
.card-ask:hover::after { transform: translateX(4px); }
.card-ask i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }

/* ---------- ระบบโครงคร่าว (พื้นเข้ม) ---------- */
.section-dark { background: var(--dark); color: var(--on-dark); }
.section-dark .eyebrow { color: var(--ply-1); }
.section-dark .section-desc { color: var(--on-dark-muted); }

.sys-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--dark-hair); overflow-x: auto; scrollbar-width: none; }
.sys-tabs::-webkit-scrollbar { display: none; }
.sys-tab {
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 14px 22px; color: var(--on-dark-muted); white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  transition: color .18s, border-color .18s;
}
.sys-tab:hover { color: var(--on-dark); }
.sys-tab[aria-selected="true"] { color: var(--on-dark); border-bottom-color: var(--ply-1); }

.sys-panel {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 64px); align-items: start;
  padding-top: clamp(28px, 4vw, 48px);
}
.sys-panel[hidden] { display: none; }
.sys-figure { background: var(--dark-2); border: 1px solid var(--dark-hair); border-radius: var(--radius); padding: clamp(12px, 2vw, 24px); }
.sys-figure svg { width: 100%; height: auto; }
.sys-figure figcaption { font-size: .8125rem; color: var(--on-dark-muted); margin-top: 12px; }
.sys-info h3 { font-size: 1.375rem; }
.sys-parts { margin-top: 20px; border-top: 1px solid var(--dark-hair); }
.sys-parts li {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px;
  padding: 14px 8px 14px 0; border-bottom: 1px solid var(--dark-hair);
  transition: background-color .18s;
}
.sys-parts li.is-hot { background: var(--dark-2); }
.sys-n {
  width: 26px; height: 26px; border-radius: 50%; margin-top: 2px;
  display: grid; place-items: center;
  background: var(--ply-1); color: var(--ink);
  font-family: var(--font-mono); font-weight: 500; font-size: .8125rem;
}
.sys-parts b { font-family: var(--font-display); font-weight: 600; font-size: 1rem; display: block; line-height: 1.45; }
.sys-parts span.sys-spec { font-size: .875rem; color: var(--on-dark-muted); line-height: 1.6; display: block; margin-top: 2px; }

/* ชิ้นส่วนในภาพตัด */
.dg-line { fill: none; stroke: #B4C0C5; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dg-thin { fill: none; stroke: #7E8C92; stroke-width: 1; }
.dg-steel { fill: #4C5960; stroke: #C8D2D6; stroke-width: 1.4; stroke-linejoin: round; }
.dg-board { fill: #ECE9DF; stroke: #ECE9DF; stroke-width: .5; }
.dg-conc { stroke: #56636A; stroke-width: 1; }
.dg-wool { fill: none; stroke: #C9B24E; stroke-width: 1.4; stroke-linejoin: round; }
.dg-text { fill: #9DA9AE; font-family: var(--font-mono); font-size: 12px; }
.dg-mark circle { fill: var(--ply-1); transition: r .18s; }
.dg-mark text { fill: var(--ink); font-family: var(--font-mono); font-weight: 500; font-size: 13px; text-anchor: middle; dominant-baseline: central; }
.dg-mark line { stroke: var(--ply-1); stroke-width: 1; }
.dg-mark.is-hot circle { r: 14; fill: #fff; }

/* ---------- แค็ตตาล็อกสินค้ารอง ---------- */
.cat { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.cat-nav { position: sticky; top: calc(var(--header-h) + 20px); border-top: 1px solid var(--hair); }
.cat-tab {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left; padding: 12px 12px 12px 14px;
  border-bottom: 1px solid var(--hair); border-left: 3px solid transparent;
  font-family: var(--font-display); font-weight: 500; font-size: .9375rem; line-height: 1.45; color: var(--ink-2);
  transition: background-color .18s, border-color .18s, color .18s;
}
.cat-tab:hover { background: var(--surface); }
.cat-tab[aria-selected="true"] { background: var(--surface); border-left-color: var(--ply-2); color: var(--ink); font-weight: 600; }
.cat-tab small { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); flex: none; }

.cat-panel[hidden] { display: none; }
.cat-panel > h3 { font-size: 1.5rem; }
.cat-panel > p { color: var(--muted); margin-top: 6px; }
.cat-group { margin-top: 28px; }
.cat-group h4 {
  font-size: .9375rem; font-weight: 600; color: var(--wood);
  padding-bottom: 10px; border-bottom: 1px solid var(--ink);
}
.cat-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.cat-items li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--hair);
  font-size: .9375rem; line-height: 1.55;
}
.cat-items b { font-weight: 500; }
.cat-items span { font-size: .8125rem; color: var(--muted); text-align: right; max-width: 55%; }
.cat-ask { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cat-ask p { color: var(--muted); font-size: .9375rem; }

/* ---------- เกี่ยวกับเรา + ขั้นตอน ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.about-copy > p:not(.eyebrow) { margin-top: 18px; color: var(--ink-2); font-size: 1.0625rem; }
.about-copy [data-brand-full] { font-family: var(--font-display); font-weight: 700; }
.points { margin-top: 28px; border-top: 1px solid var(--hair); }
.points li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.points strong { font-family: var(--font-display); font-weight: 600; }
.points span { color: var(--muted); font-size: .9375rem; }

.steps { border-top: 1px solid var(--ink); }
.steps li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--hair); }
.step-n { font-family: var(--font-mono); font-weight: 500; font-size: 2.5rem; line-height: 1; color: var(--ply-2); }
.steps h3 { font-size: 1.1875rem; }
.steps p { color: var(--muted); font-size: .9375rem; margin-top: 4px; }

/* ---------- ติดต่อ LINE ---------- */
.contact { background: var(--line); color: #04220F; padding-block: clamp(56px, 8vw, 104px); }
.contact-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.contact .eyebrow { color: #04220F; }
.contact .eyebrow::before { background: #04220F; height: 2px; }
.contact-copy > p:not(.eyebrow) { margin-top: 14px; max-width: 34em; font-size: 1.0625rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn-ghost { background: transparent; color: #04220F; border-color: #04220F; }
.btn-ghost:hover { background: rgba(4, 34, 15, .1); }

.qr-cards { display: flex; align-items: flex-start; gap: clamp(12px, 1.6vw, 20px); }
.qr-card {
  background: #fff; border-radius: 6px; padding: 14px 18px 18px;
  width: clamp(176px, 18vw, 232px);
  box-shadow: 0 1px 0 rgba(4, 34, 15, .25), 0 18px 40px -18px rgba(4, 34, 15, .55);
}
.qr-name {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: .9375rem; color: var(--ink);
}
.qr-name::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.qr { aspect-ratio: 1; display: grid; place-items: center; }
.qr svg, .qr img { width: 100%; height: 100%; display: block; }
.qr-empty {
  width: 100%; height: 100%; display: grid; place-content: center; gap: 6px; text-align: center;
  border: 2px dashed #B9C3BC; border-radius: 4px; padding: 10px; color: #46524B;
  font-size: .75rem; line-height: 1.6;
}
.qr-empty b { font-family: var(--font-display); font-size: .875rem; line-height: 1.4; color: var(--ink); }
.qr-empty code { font-family: var(--font-mono); font-size: .75rem; word-break: break-all; }
.qr-id { margin-top: 12px; text-align: center; font-family: var(--font-mono); font-weight: 500; color: var(--ink); }

.contact-list { margin-top: 28px; border-top: 1px solid rgba(4, 34, 15, .3); max-width: 34em; }
.contact-list:empty { display: none; }
.contact-list > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(4, 34, 15, .3); }
.contact-list dt { font-family: var(--font-display); font-weight: 600; font-size: .9375rem; }
.contact-list a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- ท้ายหน้า ---------- */
.site-footer { background: var(--dark); color: var(--on-dark); padding-block: 48px 32px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand strong { font-family: var(--font-display); font-size: 1.375rem; }
.footer-brand p { font-size: .8125rem; color: var(--on-dark-muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-family: var(--font-display); font-weight: 500; font-size: .9375rem; }
.footer-nav a { color: var(--on-dark-muted); transition: color .18s; }
.footer-nav a:hover { color: var(--on-dark); }
.footer-note {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--dark-hair);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: .8125rem; color: var(--on-dark-muted);
}

/* แถบ LINE ติดขอบล่าง (มือถือ) */
.line-bar { display: none; }

/* ---------- เลื่อนแล้วค่อย ๆ ปรากฏ ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1040px) {
  .site-nav { gap: 16px; }
  .site-nav > a:not(.btn) { font-size: .875rem; }
  .cat { grid-template-columns: 230px minmax(0, 1fr); }
  .cat-items { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--hair);
    padding: 8px var(--gut) 20px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a:not(.btn) { padding: 14px 0; font-size: 1.0625rem; border-bottom: 1px solid var(--hair-2); }
  .site-nav > a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 16px; min-height: 48px; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-stack { max-width: 520px; }

  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sys-panel { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; justify-items: start; }

  .cat { grid-template-columns: 1fr; gap: 24px; }
  .cat-nav {
    position: static; border-top: 0;
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); padding-bottom: 4px;
  }
  .cat-nav::-webkit-scrollbar { display: none; }
  .cat-tab {
    width: auto; flex: none; white-space: nowrap;
    border: 1px solid var(--hair); border-radius: 999px; padding: 8px 16px; background: var(--surface);
  }
  .cat-tab small { display: none; }
  .cat-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
  .cat-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { padding-bottom: 68px; }

  .hero-title { font-size: clamp(1.75rem, 8.4vw, 2.25rem); }

  .slider { height: min(82svh, 720px); min-height: 560px; }
  .slider-arrow { display: none; }
  .slide-caption { padding-bottom: 150px; }
  .slide-title { font-size: clamp(1.875rem, 9vw, 2.5rem); }
  .slide-rule { margin: 18px auto 14px; }
  .slide-actions { margin-top: 24px; width: 100%; }
  .slide-actions .btn { flex: 1 1 0; min-width: 0; padding-inline: 12px; font-size: 1rem; }
  .social-btn { width: 44px; height: 44px; }
  .social-btn svg { width: 21px; height: 21px; }
  .slider-bottom { bottom: 16px; gap: 12px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:last-child { grid-column: 1 / -1; border-left: 0; padding-left: 0; margin-top: 16px; border-top: 1px solid var(--hair); }

  .product-grid { grid-template-columns: 1fr; }
  .card-art { aspect-ratio: 2 / 1; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; gap: 8px; }
  .g-item figcaption { font-size: .75rem; padding: 22px 10px 8px; }
  .card-body { padding: 18px 20px 20px; }
  .cat-items { grid-template-columns: 1fr; }
  .points li { grid-template-columns: 1fr; gap: 2px; }
  .steps li { grid-template-columns: 48px minmax(0, 1fr); }
  .step-n { font-size: 2rem; }

  .contact-grid { grid-template-columns: 1fr; justify-items: start; }
  .qr-cards { width: 100%; }
  .qr-card { flex: 1 1 0; width: auto; min-width: 0; padding: 12px 12px 14px; }
  .contact-actions .btn { width: 100%; }

  .line-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 56px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    background: var(--line); color: #04220F;
    font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem;
    box-shadow: 0 -1px 0 rgba(4, 34, 15, .2), 0 -10px 24px -12px rgba(0, 0, 0, .35);
    transition: transform .25s ease;
  }
  .line-bar .ico { width: 22px; height: 22px; }
  .line-bar.is-hidden { transform: translateY(110%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .slide-caption > * { opacity: 1; }
}
