/* =========================================================
   Seven Tanwa — "Midnight Ember" theme
   ดำพรีเมียม + แดงไล่เฉดจากโลโก้ + ส้มเรืองแสง
   แก้สีทั้งเว็บได้ที่ :root
   ========================================================= */
:root {
  --night:      #0b0b0f;
  --night-2:    #15151c;
  --night-3:    #1e1e27;
  --stroke-d:   rgba(255, 255, 255, .08);
  --red:        #ff3b2f;
  --red-deep:   #b3120f;
  --ember:      #ff8a3d;
  --grad:       linear-gradient(120deg, #ff5a36 0%, #ff3b2f 40%, #b3120f 100%);
  --grad-glow:  radial-gradient(circle, rgba(255, 59, 47, .55), transparent 65%);
  --paper:      #f6f4f1;
  --white:      #ffffff;
  --ink:        #121216;
  --muted:      #6b6b74;
  --muted-d:    #a4a4b0;
  --eco:        #2fbf71;
  --line:       #06c755;
  --r-lg:       28px;
  --r:          18px;
  --shadow:     0 20px 50px -20px rgba(18, 18, 22, .25);
  --max:        1200px;
  --ease:       cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Prompt", system-ui, sans-serif;
  color: var(--ink); background: var(--paper);
  line-height: 1.7; font-weight: 300; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 999; background: var(--night);
  display: grid; place-items: center; transition: opacity .6s var(--ease), visibility .6s;
}
.preloader img { width: 110px; animation: pulse 1.1s var(--ease) infinite; }
.preloader .bar { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--grad); animation: load 1s var(--ease) forwards; }
body.loaded .preloader { opacity: 0; visibility: hidden; }
@keyframes pulse { 50% { transform: scale(1.08); filter: drop-shadow(0 0 24px rgba(255, 59, 47, .7)); } }
@keyframes load { from { width: 0; } to { width: 100%; } }

/* ---------- Scroll progress + cursor glow ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad); z-index: 200; }
.cursor-glow {
  position: fixed; width: 420px; height: 420px; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(255, 70, 50, .12), transparent 60%);
  transform: translate(-50%, -50%); left: -500px; top: -500px; transition: opacity .3s;
}

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s, box-shadow .4s, transform .4s var(--ease);
}
.header.scrolled { background: rgba(11, 11, 15, .78); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--stroke-d); }
.header.hide { transform: translateY(-100%); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo img { height: 44px; width: auto; }
.menu { display: flex; gap: 6px; align-items: center; }
.menu a:not(.btn) {
  position: relative; color: #d8d8e0; font-weight: 400; padding: 8px 14px; border-radius: 999px; transition: color .3s, background .3s;
}
.menu a:not(.btn):hover, .menu a.active { color: #fff; background: rgba(255, 255, 255, .07); }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; width: 42px; height: 42px; position: relative; }
.menu-toggle span { position: absolute; left: 9px; right: 9px; height: 2px; background: #fff; border-radius: 2px; transition: .35s var(--ease); }
.menu-toggle span:nth-child(1) { top: 14px; } .menu-toggle span:nth-child(2) { top: 20px; } .menu-toggle span:nth-child(3) { top: 26px; }
.menu-toggle.open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; overflow: hidden;
  padding: 14px 28px; border-radius: 999px; font-weight: 500; font-family: inherit; font-size: 1rem;
  border: 0; cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s;
  will-change: transform;
}
.btn::after { /* แสงวิ่งผ่านปุ่ม */
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); transition: left .7s var(--ease);
}
.btn:hover::after { left: 140%; }
.btn-line { background: var(--line); color: #fff; box-shadow: 0 10px 30px -8px rgba(6, 199, 85, .6); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -8px rgba(255, 59, 47, .6); }
.btn-ghost { background: rgba(255, 255, 255, .06); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-sm { padding: 9px 20px; font-size: .95rem; }
.line-icon { width: 22px; height: 22px; flex: none; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; background: var(--night); color: #fff;
  display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; isolation: isolate;
}
.hero .grid-bg {
  position: absolute; inset: 0; z-index: -2; opacity: .5;
  background-image: linear-gradient(var(--stroke-d) 1px, transparent 1px), linear-gradient(90deg, var(--stroke-d) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  animation: gridmove 20s linear infinite;
}
@keyframes gridmove { to { background-position: 64px 64px; } }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); z-index: -1; opacity: .75; }
.blob.b1 { width: 520px; height: 520px; background: #ff3b2f; top: -160px; right: -120px; animation: float1 14s ease-in-out infinite; }
.blob.b2 { width: 420px; height: 420px; background: #ff8a3d; bottom: -180px; left: -120px; opacity: .35; animation: float2 18s ease-in-out infinite; }
.blob.b3 { width: 300px; height: 300px; background: #7a0c0a; top: 40%; left: 45%; opacity: .6; animation: float1 16s ease-in-out infinite reverse; }
@keyframes float1 { 50% { transform: translate(-60px, 80px) scale(1.1); } }
@keyframes float2 { 50% { transform: translate(80px, -60px) scale(.9); } }

.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px 7px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--stroke-d); font-size: .9rem; color: #e8e8ee;
}
.hero-badge b { background: var(--grad); color: #fff; padding: 2px 10px; border-radius: 999px; font-weight: 500; font-size: .8rem; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); line-height: 1.12; font-weight: 600; margin: 22px 0 18px; letter-spacing: -.01em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero h1 .line > span { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease); }
body.loaded .hero h1 .line > span { transform: none; }
body.loaded .hero h1 .line:nth-child(2) > span { transition-delay: .12s; }
body.loaded .hero h1 .line:nth-child(3) > span { transition-delay: .24s; }

.rotator { display: inline-grid; vertical-align: bottom; }
.rotator span { grid-area: 1 / 1; opacity: 0; transform: translateY(40%) rotateX(-60deg); transition: .7s var(--ease); }
.rotator span.on { opacity: 1; transform: none; }
.rotator span.off { opacity: 0; transform: translateY(-40%) rotateX(60deg); }

.hero p.lead { color: var(--muted-d); font-size: 1.12rem; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.stats { display: flex; gap: 14px; margin-top: 44px; flex-wrap: wrap; }
.stat {
  padding: 14px 20px; border-radius: var(--r); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--stroke-d); min-width: 130px; backdrop-filter: blur(6px);
}
.stat strong { display: block; font-size: 1.9rem; font-weight: 600; line-height: 1.2; }
.stat small { color: var(--muted-d); font-size: .85rem; }

/* hero 3D stage */
.stage { position: relative; perspective: 1200px; height: 560px; }
.stage .ring {
  position: absolute; inset: 8% 6%; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .15);
  animation: spin 40s linear infinite;
}
.stage .ring.r2 { inset: 18% 16%; border-style: solid; border-color: rgba(255, 59, 47, .25); animation-duration: 28s; animation-direction: reverse; }
.stage .ring::before {
  content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 20px var(--red);
}
@keyframes spin { to { transform: rotate(360deg); } }
.stage .glow { position: absolute; inset: 15%; background: var(--grad-glow); filter: blur(30px); animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .7; } }
.tilt-card {
  position: absolute; border-radius: 24px; overflow: hidden; background: #fff;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08);
  transform-style: preserve-3d; transition: transform .25s ease-out;
}
.tilt-card img { width: 100%; height: 100%; object-fit: cover; }
.tc-main { width: 62%; aspect-ratio: 1; left: 19%; top: 14%; z-index: 3; animation: bob 6s ease-in-out infinite; }
.tc-a { width: 34%; aspect-ratio: 1; left: 0; top: 4%; z-index: 2; animation: bob 7s ease-in-out infinite .8s; opacity: .95; }
.tc-b { width: 36%; aspect-ratio: 1; right: 0; bottom: 4%; z-index: 4; animation: bob 8s ease-in-out infinite 1.6s; }
@keyframes bob { 50% { translate: 0 -14px; } }
.chip {
  position: absolute; z-index: 5; padding: 10px 16px; border-radius: 14px; font-size: .9rem; font-weight: 500;
  background: rgba(20, 20, 26, .75); border: 1px solid var(--stroke-d); backdrop-filter: blur(10px); color: #fff;
  display: flex; align-items: center; gap: 8px; animation: bob 5s ease-in-out infinite;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--eco); box-shadow: 0 0 10px var(--eco); font-style: normal; }
.chip.c1 { left: 2%; bottom: 18%; animation-delay: .4s; }
.chip.c2 { right: 2%; top: 10%; animation-delay: 1.2s; }
.chip.c2 i { background: var(--red); box-shadow: 0 0 10px var(--red); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); color: var(--muted-d); font-size: .8rem;
  display: flex; flex-direction: column; align-items: center; gap: 8px; letter-spacing: .2em;
}
.scroll-hint span { width: 22px; height: 36px; border: 2px solid rgba(255, 255, 255, .3); border-radius: 12px; position: relative; }
.scroll-hint span::after {
  content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: #fff; animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Marquee ---------- */
.marquee { background: var(--night); padding: 26px 0 60px; overflow: hidden; position: relative; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 140px; z-index: 2;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--night), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--night), transparent); }
.track { display: flex; gap: 18px; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.track a {
  width: 200px; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: #fff; flex: none;
  transition: transform .4s var(--ease); border: 1px solid var(--stroke-d);
}
.track a:hover { transform: translateY(-8px) scale(1.04); }
.track img { width: 100%; height: 100%; object-fit: cover; }
@keyframes marquee { to { transform: translateX(-50%); } }

.ticker { background: var(--grad); color: #fff; overflow: hidden; padding: 14px 0; transform: rotate(-1.5deg) scale(1.03); margin: -10px 0 0; position: relative; z-index: 3; }
.ticker .track { animation-duration: 30s; gap: 40px; font-weight: 500; font-size: 1.05rem; white-space: nowrap; }
.ticker .track span::after { content: "✦"; margin-left: 40px; opacity: .7; }

/* ---------- Sections ---------- */
section { position: relative; }
.sec { padding: 110px 0; }
.head { max-width: 680px; margin-bottom: 54px; }
.head.center { text-align: center; margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 500; letter-spacing: .18em;
  color: var(--red); text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--grad); }
.head h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.2; font-weight: 600; margin: 12px 0; letter-spacing: -.01em; }
.head p { color: var(--muted); font-size: 1.05rem; }
.dark { background: var(--night); color: #fff; }
.dark .head p { color: var(--muted-d); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 250px; gap: 20px; }
.tile {
  position: relative; border-radius: var(--r-lg); overflow: hidden; background: #fff; isolation: isolate;
  box-shadow: var(--shadow); transform-style: preserve-3d; transition: transform .3s ease-out, box-shadow .4s;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1s var(--ease); z-index: -2; }
.tile:hover img { transform: scale(1.07); }
.tile::before { /* เงาไล่ล่าง */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent 35%, rgba(11, 11, 15, .88));
}
.tile .spot { /* แสงตามเมาส์ */
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .25), transparent 45%);
}
.tile:hover .spot { opacity: 1; }
.tile .info { position: absolute; left: 24px; right: 24px; bottom: 22px; color: #fff; }
.tile .num { font-size: .8rem; letter-spacing: .2em; color: #ffb3a8; }
.tile h3 { font-size: 1.35rem; font-weight: 600; line-height: 1.3; margin: 4px 0; }
.tile p { color: #d6d6de; font-size: .93rem; max-width: 420px; }
.tile .arrow {
  position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); color: var(--ink); display: grid; place-items: center; font-size: 1.2rem;
  transform: rotate(-45deg) scale(.8); opacity: 0; transition: .45s var(--ease);
}
.tile:hover .arrow { transform: rotate(0) scale(1); opacity: 1; }
.t-1 { grid-column: span 7; grid-row: span 2; }
.t-2 { grid-column: span 5; }
.t-3 { grid-column: span 5; }
.t-4 { grid-column: span 4; }
.t-5 { grid-column: span 4; }
.t-6 { grid-column: span 4; background: var(--grad); }
.t-6::before { display: none; }
.t-6 .info { top: 26px; bottom: auto; }
.t-6 .big { position: absolute; right: 20px; bottom: 10px; font-size: 5.5rem; font-weight: 600; line-height: 1; opacity: .25; color: #fff; }

/* ---------- Eco ---------- */
.eco { background: #0f1a14; color: #fff; overflow: hidden; }
.eco .blob { background: var(--eco); opacity: .25; width: 500px; height: 500px; right: -150px; top: -100px; }
.eco .eyebrow { color: var(--eco); }
.eco .eyebrow::before { background: var(--eco); }
.eco-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.eco-img { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #fff; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); }
.eco-img img { width: 100%; transform: scale(1.12); will-change: transform; }
.eco h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 600; line-height: 1.2; margin: 12px 0 16px; }
.eco p { color: #b9cfc2; }
.checks { list-style: none; margin: 24px 0 32px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
  content: "✓"; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(47, 191, 113, .15); color: var(--eco); font-weight: 600; font-size: .85rem; margin-top: 2px;
}
.btn-eco { background: var(--eco); color: #fff; box-shadow: 0 10px 30px -8px rgba(47, 191, 113, .6); }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  position: relative; padding: 32px 26px; border-radius: var(--r-lg); background: #fff; overflow: hidden;
  border: 1px solid rgba(18, 18, 22, .06); transition: transform .5s var(--ease), box-shadow .5s;
}
.feature::after {
  content: ""; position: absolute; inset: auto -40% -60% auto; width: 200px; height: 200px; border-radius: 50%;
  background: var(--grad-glow); opacity: 0; transition: opacity .5s;
}
.feature:hover { transform: translateY(-10px); box-shadow: var(--shadow); }
.feature:hover::after { opacity: .5; }
.feature .ic {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem;
  background: var(--paper); margin-bottom: 18px; transition: transform .6s var(--ease);
}
.feature:hover .ic { transform: rotate(-10deg) scale(1.1); }
.feature h4 { font-size: 1.15rem; font-weight: 600; }
.feature p { color: var(--muted); font-size: .95rem; }

/* ---------- Steps (timeline) ---------- */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.timeline .rail { position: absolute; top: 28px; left: 6%; right: 6%; height: 2px; background: var(--stroke-d); }
.timeline .rail i { display: block; height: 100%; width: 0; background: var(--grad); transition: width 1.8s var(--ease); box-shadow: 0 0 12px var(--red); }
.timeline.in .rail i { width: 100%; }
.step { position: relative; text-align: center; padding: 0 8px; }
.step .dot {
  width: 58px; height: 58px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--night-2); border: 1px solid var(--stroke-d); font-weight: 600; font-size: 1.15rem; position: relative; z-index: 1;
  transition: background .5s, box-shadow .5s;
}
.timeline.in .step .dot { background: var(--grad); box-shadow: 0 0 0 8px rgba(255, 59, 47, .12); }
.timeline.in .step:nth-child(3) .dot { transition-delay: .4s; }
.timeline.in .step:nth-child(4) .dot { transition-delay: .8s; }
.timeline.in .step:nth-child(5) .dot { transition-delay: 1.2s; }
.step h4 { font-size: 1.1rem; font-weight: 600; }
.step p { color: var(--muted-d); font-size: .95rem; }

/* ---------- CTA ---------- */
.cta-wrap { padding: 110px 0; }
.cta {
  position: relative; border-radius: 36px; padding: 70px 40px; text-align: center; color: #fff; overflow: hidden;
  background: var(--night); isolation: isolate;
}
.cta::before { /* ขอบไล่สีหมุน */
  content: ""; position: absolute; inset: -2px; z-index: -2; border-radius: inherit;
  background: conic-gradient(from var(--ang, 0deg), #ff3b2f, #ff8a3d, #b3120f, #0b0b0f 60%, #ff3b2f);
  animation: rotateAng 6s linear infinite;
}
.cta::after { content: ""; position: absolute; inset: 2px; border-radius: 34px; background: var(--night); z-index: -1; }
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes rotateAng { to { --ang: 360deg; } }
.cta .blob { width: 380px; height: 380px; background: var(--red); opacity: .35; top: -160px; left: 50%; margin-left: -190px; }
.cta h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 600; line-height: 1.2; }
.cta p { color: var(--muted-d); margin: 12px auto 30px; max-width: 520px; }
.cta-row { display: flex; gap: 30px; align-items: center; justify-content: center; flex-wrap: wrap; }
.cta .qr { width: 130px; border-radius: 16px; background: #fff; padding: 8px; transition: transform .5s var(--ease); }
.cta .qr:hover { transform: scale(1.08) rotate(-2deg); }
.btn-xl { padding: 18px 38px; font-size: 1.15rem; }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: var(--muted-d); padding: 60px 0 28px; border-top: 1px solid var(--stroke-d); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; }
.footer .f-logo { height: 42px; margin-bottom: 14px; }
.footer h5 { color: #fff; font-weight: 500; font-size: 1.02rem; margin-bottom: 12px; }
.footer ul { list-style: none; display: grid; gap: 6px; }
.footer a:hover { color: #fff; }
.copy { border-top: 1px solid var(--stroke-d); margin-top: 40px; padding-top: 22px; font-size: .88rem; text-align: center; }

/* ---------- Floating LINE ---------- */
.line-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 62px; height: 62px; border-radius: 50%;
  background: var(--line); color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 30px -6px rgba(6, 199, 85, .7); transition: transform .4s var(--ease);
}
.line-float .line-icon { width: 30px; height: 30px; }
.line-float::before, .line-float::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--line); animation: ping 2.4s ease-out infinite;
}
.line-float::after { animation-delay: 1.2s; }
@keyframes ping { from { transform: scale(1); opacity: .8; } to { transform: scale(1.8); opacity: 0; } }
.line-float:hover { transform: scale(1.1) rotate(-8deg); }
.line-float .tip {
  position: absolute; right: 74px; white-space: nowrap; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 12px;
  font-size: .9rem; opacity: 0; transform: translateX(10px); transition: .35s var(--ease); pointer-events: none;
}
.line-float:hover .tip { opacity: 1; transform: none; }

/* ---------- Reveal animations ---------- */
[data-reveal] { opacity: 0; transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal="up"] { transform: translateY(50px); }
[data-reveal="left"] { transform: translateX(-60px); }
[data-reveal="right"] { transform: translateX(60px); }
[data-reveal="zoom"] { transform: scale(.88); filter: blur(8px); }
[data-reveal].in { opacity: 1; transform: none; filter: none; }

/* ---------- Catalog page ---------- */
.page-hero { background: var(--night); color: #fff; padding: 150px 0 80px; position: relative; overflow: hidden; isolation: isolate; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 600; line-height: 1.15; }
.page-hero p { color: var(--muted-d); margin-top: 10px; }
.filters {
  display: flex; gap: 8px; flex-wrap: wrap; padding: 6px; border-radius: 999px; background: #fff;
  box-shadow: var(--shadow); width: fit-content; margin: -32px auto 50px; position: relative; z-index: 5; max-width: 100%;
}
.filter-btn {
  position: relative; z-index: 1; padding: 10px 20px; border-radius: 999px; border: 0; background: transparent;
  font-family: inherit; font-size: .95rem; color: var(--muted); cursor: pointer; transition: color .4s;
}
.filter-btn.active { color: #fff; }
.filter-pill { position: absolute; top: 6px; height: calc(100% - 12px); border-radius: 999px; background: var(--grad); transition: .5s var(--ease); z-index: 0; }
.count { text-align: center; color: var(--muted); margin: -30px 0 30px; font-size: .95rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.g-item {
  position: relative; border-radius: 22px; overflow: hidden; background: #fff; cursor: zoom-in; aspect-ratio: 1;
  box-shadow: var(--shadow); transform-style: preserve-3d; transition: transform .3s ease-out;
  animation: popIn .7s var(--ease) both; animation-delay: var(--d, 0s);
}
@keyframes popIn { from { opacity: 0; transform: translateY(30px) scale(.94); } }
.g-item img { width: 100%; height: 100%; object-fit: contain; transition: transform .8s var(--ease); }
.g-item:hover img { transform: scale(1.06); }
.g-item .cap {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; color: #fff;
  background: linear-gradient(transparent, rgba(11, 11, 15, .92)); transform: translateY(101%); transition: transform .5s var(--ease);
}
.g-item:hover .cap { transform: none; }
.g-item .cap small { display: block; color: #ffb3a8; }
.g-item .tag { position: absolute; top: 12px; left: 12px; background: rgba(11, 11, 15, .8); color: #fff; font-size: .78rem; padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(6px); }
.g-item .tag.eco { background: var(--eco); }
.g-item .spot { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 59, 47, .12), transparent 50%); }
.g-item:hover .spot { opacity: 1; }
.center { text-align: center; margin-top: 44px; }
.load-more[hidden] { display: none; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(8, 8, 12, .9); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: .4s var(--ease);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-height: 80vh; max-width: 90vw; border-radius: 18px; background: #fff; transform: scale(.9); transition: transform .5s var(--ease), opacity .3s; }
.lightbox.open img { transform: none; }
.lightbox img.swap { opacity: 0; transform: scale(.96); }
.lb-cap { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #fff; padding: 0 70px; }
.lb-cap small { display: block; color: var(--muted-d); }
.lb-btn {
  position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.4rem; cursor: pointer; transition: .3s;
}
.lb-btn:hover { background: var(--red); border-color: var(--red); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; translate: 0 -50%; }
.lb-next { right: 22px; top: 50%; translate: 0 -50%; }
.lb-ask { position: absolute; top: 22px; left: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid, .eco-grid { grid-template-columns: 1fr; }
  .stage { height: 440px; max-width: 520px; margin: 10px auto 0; width: 100%; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-auto-rows: 220px; }
  .t-1 { grid-column: span 12; }
  .t-2, .t-3 { grid-column: span 6; }
  .t-4, .t-5, .t-6 { grid-column: span 4; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .menu {
    position: fixed; inset: 0; background: rgba(11, 11, 15, .97); flex-direction: column; justify-content: center; gap: 10px;
    opacity: 0; visibility: hidden; transition: .4s var(--ease);
  }
  .menu.open { opacity: 1; visibility: visible; }
  .menu a:not(.btn) { font-size: 1.4rem; }
  .menu-toggle { display: block; z-index: 101; }
  .sec, .cta-wrap { padding: 80px 0; }
  .hero { padding-top: 110px; }
  .stage { height: 360px; }
  .stats { gap: 10px; }
  .stat { min-width: 0; flex: 1; padding: 12px 14px; }
  .stats:has(> .stat:nth-child(4)) .stat { flex: 1 1 calc(50% - 5px); } /* 4 ช่องขึ้นไป = เรียง 2 คอลัมน์ */
  .stat strong { font-size: 1.4rem; }
  .bento { grid-auto-rows: 200px; gap: 14px; }
  .t-1 { grid-row: span 1; }
  .t-1, .t-2, .t-3, .t-4, .t-5, .t-6 { grid-column: span 12; }
  .features { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .timeline .rail { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .track a { width: 150px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .g-item .cap { transform: none; padding: 30px 10px 10px; font-size: .85rem; }
  .filters { border-radius: 22px; justify-content: center; }
  .filter-pill { display: none; }
  .filter-btn.active { background: var(--grad); }
  .cursor-glow, .scroll-hint { display: none; }
  .lb-prev, .lb-next { top: auto; bottom: 80px; translate: none; }
}

/* ผู้ใช้ที่ตั้งค่าลดการเคลื่อนไหว */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
  .hero h1 .line > span { transform: none; }
}

/* หลัง reveal เสร็จ ให้ hover/tilt ตอบสนองไว */
[data-reveal].done { transition: transform .3s ease-out, box-shadow .4s, opacity .3s; transition-delay: 0s; }
.hero h1 .line > .rotator { display: inline-grid; perspective: 600px; }
.rotator > span { display: block; white-space: nowrap; }
.rotator > span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .05em; }
.tile::before { background: linear-gradient(180deg, transparent 25%, rgba(11, 11, 15, .6) 55%, rgba(11, 11, 15, .95)); }
.tile .info { text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
@media (max-width: 760px) { .tile::before { background: linear-gradient(180deg, transparent 10%, rgba(11, 11, 15, .75) 50%, rgba(11, 11, 15, .97)); } }
@media (max-width: 760px) { .btn-xl { padding: 15px 24px; font-size: 1.02rem; white-space: nowrap; } }

/* ---------- ผลงาน (Works) ---------- */
.mock {
  position: absolute; top: 12px; right: 12px; z-index: 2; font-size: .75rem; font-weight: 500;
  background: rgba(255, 255, 255, .92); color: var(--red-deep); padding: 3px 10px; border-radius: 999px; letter-spacing: .02em;
}
.g-item.work img { object-fit: cover; }
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.work-card {
  display: block; border-radius: var(--r-lg); overflow: hidden; background: var(--night-2);
  border: 1px solid var(--stroke-d); transform-style: preserve-3d;
}
.work-card .ph { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.work-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.work-card:hover .ph img { transform: scale(1.08); }
.work-card .body { padding: 18px 22px 22px; }
.work-card .cat { font-size: .78rem; letter-spacing: .15em; color: #ff8a7a; text-transform: uppercase; }
.work-card h4 { color: #fff; font-size: 1.12rem; font-weight: 600; margin: 4px 0 2px; }
.work-card p { color: var(--muted-d); font-size: .92rem; }
.works-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 44px; }
.works-head .head { margin-bottom: 0; }
.notice {
  display: flex; gap: 12px; align-items: center; max-width: 760px; margin: 0 auto 34px; padding: 14px 18px;
  border-radius: 16px; background: #fff4f2; border: 1px dashed #f5a59c; color: #7a2a22; font-size: .95rem;
}
@media (max-width: 1024px) { .works-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .works-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Footer (ออกแบบใหม่)
   ========================================================= */
.footer { position: relative; overflow: hidden; padding: 72px 0 0; isolation: isolate; }
.footer::before { /* เส้นไล่สีด้านบน */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 59, 47, .7), transparent);
}
.f-glow {
  position: absolute; z-index: -1; width: 520px; height: 320px; border-radius: 50%;
  background: rgba(255, 59, 47, .14); filter: blur(90px); top: -160px; left: 50%; transform: translateX(-50%);
}
.footer .footer-grid { display: none; }
.f-grid { display: grid; grid-template-columns: 1.5fr .9fr 1.1fr 1.5fr; gap: 40px; }
.f-logo { height: 44px; width: auto; margin-bottom: 16px; }
.f-brand p { color: var(--muted-d); max-width: 320px; }
.f-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.f-badges span {
  font-size: .8rem; padding: 5px 12px; border-radius: 999px; color: #d8d8e0;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--stroke-d);
}
.footer h5 {
  color: #fff; font-size: .95rem; font-weight: 500; letter-spacing: .06em; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.footer h5::before { content: ""; width: 16px; height: 2px; background: var(--grad); border-radius: 2px; }
.f-col ul { list-style: none; display: grid; gap: 10px; }
.f-col a { color: var(--muted-d); display: inline-flex; align-items: center; gap: 6px; transition: color .3s, transform .3s var(--ease); }
.f-col a::before { content: "→"; opacity: 0; width: 0; overflow: hidden; color: var(--red); transition: .3s var(--ease); }
.f-col a:hover { color: #fff; transform: translateX(2px); }
.f-col a:hover::before { opacity: 1; width: 14px; }
.f-line {
  display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 20px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke-d);
}
.f-qr { flex: none; display: block; width: 96px; border-radius: 12px; background: #fff; padding: 6px; transition: transform .4s var(--ease); }
.f-qr:hover { transform: scale(1.06) rotate(-2deg); }
.f-line p { color: var(--muted-d); font-size: .9rem; line-height: 1.5; margin-bottom: 10px; }
.f-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 56px; padding: 22px 0 26px; border-top: 1px solid var(--stroke-d); font-size: .88rem;
}
.to-top {
  background: none; border: 1px solid var(--stroke-d); color: var(--muted-d); font-family: inherit; font-size: .85rem;
  padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: .3s;
}
.to-top:hover { color: #fff; border-color: var(--red); background: rgba(255, 59, 47, .12); }

@media (max-width: 1024px) {
  .f-grid { grid-template-columns: 1fr 1fr; gap: 36px 30px; }
  .f-brand, .f-contact { grid-column: 1 / -1; }
  .f-brand { display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; align-items: center; }
  .f-brand .f-logo { grid-row: span 2; margin: 0; }
  .f-badges { margin-top: 8px; }
  .f-line { max-width: 460px; }
}
@media (max-width: 600px) {
  .footer { padding-top: 56px; text-align: center; }
  .f-brand { display: block; }
  .f-brand .f-logo { margin: 0 auto 14px; }
  .f-brand p { margin: 0 auto; }
  .f-badges, .footer h5 { justify-content: center; }
  .footer h5::before { display: none; }
  .f-col a::before { display: none; }
  .f-line { flex-direction: column; text-align: center; margin: 0 auto; }
  .f-bottom { justify-content: center; text-align: center; flex-direction: column; margin-top: 40px; padding-bottom: 96px; }
}
@media (min-width: 601px) { .f-bottom { padding-right: 84px; } }

/* =========================================================
   Header แบบ A — Floating Pill
   ========================================================= */
.header {
  top: 16px; left: 0; right: 0; background: none !important; box-shadow: none !important; backdrop-filter: none !important;
  display: flex; justify-content: center; padding: 0 16px; pointer-events: none;
  transition: top .45s var(--ease), transform .45s var(--ease);
}
.header.hide { transform: translateY(calc(-100% - 24px)); }
.pill {
  pointer-events: auto; position: relative;
  width: min(1040px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 7px 7px 7px 22px; border-radius: 999px;
  background: rgba(21, 21, 28, .55); border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 20px 44px -22px rgba(0, 0, 0, .7);
  transition: width .5s var(--ease), padding .5s var(--ease), background .4s;
}
.header.scrolled { top: 10px; }
.header.scrolled .pill { width: min(900px, 100%); background: rgba(14, 14, 19, .82); padding-left: 18px; }
.pill .logo img { height: 40px; transition: height .4s var(--ease); }
.header.scrolled .pill .logo img { height: 34px; }

.pill-links { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
.pill-links a {
  position: relative; z-index: 1; color: #d8d8e0; padding: 8px 18px; border-radius: 999px;
  font-size: .95rem; font-weight: 400; white-space: nowrap; transition: color .3s;
}
.pill-links a:hover, .pill-links a.on { color: #fff; }
.pill-ind {
  position: absolute; top: 4px; left: 4px; width: 0; height: calc(100% - 8px); border-radius: 999px;
  background: var(--grad); box-shadow: 0 6px 20px -6px rgba(255, 59, 47, .85);
  transition: left .45s var(--ease), width .45s var(--ease), opacity .3s;
}
.pill-cta { padding: 10px 20px; }
.pill .menu-toggle { display: none; }

/* แท็บเล็ต: ลด padding เมนู */
@media (max-width: 1024px) {
  .pill-links a { padding: 8px 12px; font-size: .9rem; }
}

/* มือถือ: แคปซูล = โลโก้ + ปุ่ม LINE (ไอคอน) + ☰ แล้วเมนูกางลงด้านล่าง */
@media (max-width: 860px) {
  .header { top: 10px; padding: 0 12px; }
  .pill { padding: 6px 6px 6px 16px; gap: 8px; }
  .pill .logo { margin-right: auto; }
  .pill .logo img { height: 34px; }
  .pill-cta { padding: 0; width: 44px; height: 44px; justify-content: center; }
  .pill-cta span { display: none; }
  .pill .menu-toggle {
    display: block; width: 44px; height: 44px; border-radius: 50%; position: relative;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
  }
  .pill .menu-toggle span { left: 12px; right: 12px; }
  .pill .menu-toggle span:nth-child(1) { top: 15px; } .pill .menu-toggle span:nth-child(2) { top: 21px; } .pill .menu-toggle span:nth-child(3) { top: 27px; }
  .pill .menu-toggle.open span:nth-child(1), .pill .menu-toggle.open span:nth-child(3) { top: 21px; }
  .pill-links {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; gap: 4px;
    padding: 10px; border-radius: 24px; background: rgba(14, 14, 19, .96); border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.98); transform-origin: top center;
    transition: .4s var(--ease); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
  }
  .pill-links.open { opacity: 1; visibility: visible; transform: none; }
  .pill-links a { padding: 14px 18px; font-size: 1.05rem; border-radius: 16px; }
  .pill-links a.on { background: var(--grad); }
  .pill-links .pill-ind { display: none; }
  .header.scrolled .pill { width: 100%; }
}

/* =========================================================
   HERO+ ลูกเล่นเพิ่มเติม
   ========================================================= */
/* ประกายไฟลอยขึ้น (canvas) */
.embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
/* ไฟฉายตามเมาส์ ทำให้เส้นกริดสว่างขึ้นเฉพาะจุด */
.spotlight {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s;
  background-image: linear-gradient(rgba(255, 90, 60, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 90, 60, .35) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(260px circle at var(--sx, 50%) var(--sy, 50%), #000, transparent 70%);
  mask-image: radial-gradient(260px circle at var(--sx, 50%) var(--sy, 50%), #000, transparent 70%);
  animation: gridmove 20s linear infinite;
}
.hero:hover .spotlight { opacity: 1; }
/* เกรนฟิล์มบาง ๆ */
.grain {
  position: absolute; inset: -50%; z-index: -1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); } }

/* คำหมุน: ไล่สีวิ่ง (shimmer) */
.rotator > span {
  background: linear-gradient(100deg, #ff5a36 0%, #ff3b2f 30%, #ffd2c4 45%, #ff3b2f 60%, #b3120f 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text;
  animation: shimmer 3.2s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.hero h1 { text-shadow: 0 10px 40px rgba(0, 0, 0, .35); }

/* NEW pill มีจุดกะพริบ */
.hero-badge b { position: relative; }
.hero-badge b::after {
  content: ""; position: absolute; inset: -3px; border-radius: 999px; border: 2px solid #ff3b2f; animation: ping 2s ease-out infinite;
}

/* stat card ขอบเรืองแสงวิ่ง */
.stat { position: relative; overflow: hidden; transition: transform .4s var(--ease), border-color .4s; }
.stat::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), transparent 70%, #ff3b2f 85%, #ffb199 92%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rotateAng 4s linear infinite; opacity: .9;
}
.stat:nth-child(2)::before { animation-delay: -1.3s; }
.stat:nth-child(3)::before { animation-delay: -2.6s; }
.stat:nth-child(4)::before { animation-delay: -3.9s; }
.stat:hover { transform: translateY(-6px); }

/* การ์ดหลักพลิกเปลี่ยนสินค้า */
.tc-main { overflow: visible !important; background: transparent; box-shadow: none; }
.tc-main .flip {
  position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1s var(--ease);
  border-radius: 24px;
}
.tc-main .flip.turn { transform: rotateY(180deg); }
.tc-main .face {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 24px; background: #fff;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08);
}
.tc-main .face.back { transform: rotateY(180deg); }
.tc-label {
  position: absolute; left: 14px; right: 14px; bottom: -22px; z-index: 2; padding: 10px 14px 12px; border-radius: 14px;
  background: rgba(14, 14, 19, .85); backdrop-filter: blur(10px); border: 1px solid var(--stroke-d);
  color: #fff; font-size: .9rem; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tc-label span { display: block; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s; }
.tc-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--grad); }
.tc-progress.run { animation: prog var(--cycle, 3.6s) linear forwards; }
@keyframes prog { to { width: 100%; } }

/* ไอคอนโคจร */
.orbit { position: absolute; inset: 8% 6%; border-radius: 50%; animation: spin 24s linear infinite; z-index: 1; pointer-events: none; }
.orbit span {
  position: absolute; width: 44px; height: 44px; margin: -22px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem;
  background: rgba(20, 20, 26, .8); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(8px);
  box-shadow: 0 0 24px -4px rgba(255, 59, 47, .6); animation: spin 24s linear infinite reverse;
}
.orbit .o1 { top: 0; left: 50%; } .orbit .o2 { top: 50%; left: 100%; } .orbit .o3 { top: 100%; left: 50%; } .orbit .o4 { top: 50%; left: 0; }

/* วิดเจ็ตแบตชาร์จ */
.chip.battery { right: 30%; bottom: -2%; gap: 10px; font-variant-numeric: tabular-nums; animation-delay: 2s; }
.bat { position: relative; width: 34px; height: 16px; border: 2px solid #fff; border-radius: 4px; padding: 2px; }
.bat::after { content: ""; position: absolute; right: -5px; top: 4px; width: 3px; height: 6px; background: #fff; border-radius: 0 2px 2px 0; }
.bat b { display: block; height: 100%; width: 0; border-radius: 1px; background: linear-gradient(90deg, #ff3b2f, #ff8a3d 50%, #2fbf71); transition: width .25s linear; }

/* ripple ตอนคลิกปุ่ม */
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .5); transform: scale(0); animation: ripple .7s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* เลื่อนออกจาก hero: ข้อความลอยขึ้น/จาง การ์ดหดหมุน */
.hero-copy, .stage { will-change: translate, scale, opacity; }

@media (max-width: 760px) {
  .orbit span { width: 36px; height: 36px; margin: -18px; font-size: .95rem; }
  .chip.battery { right: 4%; bottom: 0; }
  .chip.c2 { display: none; }
  .tc-label { font-size: .8rem; bottom: -18px; }
}
@media (prefers-reduced-motion: reduce) { .embers, .grain, .spotlight { display: none; } }

/* =========================================================
   SECTION FX — ลูกเล่นแบบเดียวกับ hero ในทุกส่วน
   ========================================================= */
.fx-host { position: relative; isolation: isolate; overflow: hidden; }
.fx-host > :not(.fx):not(.blob):not(.f-glow):not(.grid-bg) { position: relative; z-index: 1; }
.fx-host > .fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.fx-embers { width: 100%; height: 100%; }
.fx-host > .grain { inset: -50%; }
.fx-host:hover > .spotlight { opacity: 1; }
.cta.fx-host > .fx { border-radius: inherit; }
.cta.fx-host > .grain { inset: 0; }
.eco .spotlight {
  background-image: linear-gradient(rgba(60, 220, 130, .3) 1px, transparent 1px), linear-gradient(90deg, rgba(60, 220, 130, .3) 1px, transparent 1px);
}

/* ไล่สีวิ่งบนตัวอักษรไล่สีทุกที่ */
.grad-text {
  background: linear-gradient(100deg, #ff5a36 0%, #ff3b2f 30%, #ffd2c4 45%, #ff3b2f 60%, #b3120f 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 4s linear infinite;
}

/* หัวข้อเลื่อนขึ้นทีละบรรทัด */
.split .sline { display: block; overflow: hidden; padding-bottom: .06em; }
.split .sline > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * .12s + .1s); }
.split.in .sline > span { transform: none; }

/* ---------- Bento ---------- */
.tile img { animation: kenburns 16s ease-in-out infinite alternate; }
.tile:nth-child(2n) img { animation-delay: -6s; animation-direction: alternate-reverse; }
@keyframes kenburns { from { scale: 1; translate: 0 0; } to { scale: 1.08; translate: -2% -2%; } }
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
  transform: translateX(-110%); transition: transform .9s var(--ease);
}
.tile:hover::after { transform: translateX(110%); }
.tile .info h3 { transition: transform .5s var(--ease); }
.tile:hover .info h3 { transform: translateX(6px); }
.t-6 { background-size: 200% 200% !important; background-image: linear-gradient(120deg, #ff5a36, #ff3b2f 30%, #b3120f 60%, #ff5a36) !important; animation: gradmove 6s ease infinite; }
@keyframes gradmove { 50% { background-position: 100% 100%; } }
.t-6 .big { animation: bob 5s ease-in-out infinite; }

/* ---------- การ์ดขอบเรืองแสง (ผลงาน, ฟีเจอร์) ---------- */
.work-card, .feature { position: relative; isolation: isolate; }
.work-card::before, .feature::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 3;
  background: conic-gradient(from var(--ang, 0deg), transparent 65%, #ff3b2f 82%, #ffb199 90%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s; animation: rotateAng 3s linear infinite;
}
.work-card:hover::before, .feature:hover::before { opacity: 1; }
.work-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .3s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 90, 60, .18), transparent 50%);
}
.work-card:hover::after { opacity: 1; }
.work-card .ph::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .3) 50%, transparent 65%);
  transform: translateX(-110%); transition: transform .9s var(--ease);
}
.work-card:hover .ph::after { transform: translateX(110%); }
.feature::after {
  inset: 0; width: auto; height: auto; border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 59, 47, .12), transparent 55%);
}
.features.in .feature .ic { animation: popIc .9s var(--ease) both; }
.features.in .feature:nth-child(2) .ic { animation-delay: .1s; }
.features.in .feature:nth-child(3) .ic { animation-delay: .2s; }
.features.in .feature:nth-child(4) .ic { animation-delay: .3s; }
@keyframes popIc { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.2) rotate(8deg); } 100% { transform: none; } }
.feature .ic { background: linear-gradient(135deg, #fff1ee, #fff); box-shadow: 0 8px 20px -10px rgba(255, 59, 47, .5); }

/* ---------- Eco: ใบไม้ลอย ---------- */
.leaves span {
  position: absolute; top: -40px; left: var(--x); font-size: calc(1.3rem * var(--s)); opacity: .55;
  animation: leaf var(--t) linear infinite; animation-delay: calc(var(--d) * -1);
  filter: drop-shadow(0 0 8px rgba(47, 191, 113, .6));
}
@keyframes leaf {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  10% { opacity: .55; }
  50% { transform: translate(60px, 50vh) rotate(180deg); }
  90% { opacity: .5; }
  100% { transform: translate(-20px, 110vh) rotate(360deg); opacity: 0; }
}
.eco-img::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; transition: box-shadow .5s;
}
.eco-img:hover::after { box-shadow: inset 0 0 0 3px rgba(47, 191, 113, .8), 0 0 40px rgba(47, 191, 113, .4); }
.checks li { opacity: 0; transform: translateX(20px); transition: .7s var(--ease); }
[data-reveal].in .checks li { opacity: 1; transform: none; }
[data-reveal].in .checks li:nth-child(2) { transition-delay: .15s; }
[data-reveal].in .checks li:nth-child(3) { transition-delay: .3s; }

/* ---------- Timeline: ประกายวิ่งบนราง + จุดกระเพื่อม ---------- */
.timeline .rail::after {
  content: ""; position: absolute; top: 50%; left: 0; width: 70px; height: 6px; margin-top: -3px; border-radius: 6px; opacity: 0;
  background: radial-gradient(closest-side, #fff, #ff8a3d 50%, transparent); filter: blur(1px);
}
.timeline.in .rail::after { animation: spark 2.8s ease-in-out 1.8s infinite; }
@keyframes spark { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: calc(100% - 70px); opacity: 0; } }
.step .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--red); opacity: 0; }
.timeline.in .step .dot::after { animation: ping 2.8s ease-out infinite; }
.timeline.in .step:nth-child(3) .dot::after { animation-delay: .7s; }
.timeline.in .step:nth-child(4) .dot::after { animation-delay: 1.4s; }
.timeline.in .step:nth-child(5) .dot::after { animation-delay: 2.1s; }
.step { transition: transform .5s var(--ease); }
.step:hover { transform: translateY(-8px); }
.step:hover .dot { box-shadow: 0 0 0 10px rgba(255, 59, 47, .2), 0 0 30px rgba(255, 59, 47, .7); }

/* ---------- CTA: เส้นสแกน QR + ปุ่มเต้น ---------- */
.cta-row a:has(> .qr) { position: relative; display: block; border-radius: 16px; overflow: hidden; }
.cta-row a:has(> .qr)::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 3px; top: 8px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, #ff3b2f, transparent); box-shadow: 0 0 12px #ff3b2f;
  animation: scan 2.4s ease-in-out infinite;
}
@keyframes scan { 50% { top: calc(100% - 11px); } }
.cta .btn-line { animation: heartbeat 2.6s ease-in-out infinite; }
@keyframes heartbeat { 0%, 60%, 100% { scale: 1; } 70% { scale: 1.06; } 80% { scale: .98; } 90% { scale: 1.04; } }
.cta .btn-line:hover { animation: none; }

/* ---------- Marquee ---------- */
.marquee { will-change: transform; }
.track a { position: relative; }
.track a::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; transition: box-shadow .4s;
}
.track a:hover::after { box-shadow: inset 0 0 0 2px rgba(255, 59, 47, .9), 0 0 30px rgba(255, 59, 47, .5); }

/* ---------- แคตตาล็อก/ผลงาน ---------- */
.g-item::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .4) 50%, transparent 65%);
  transform: translateX(-110%); transition: transform .9s var(--ease);
}
.g-item:hover::after { transform: translateX(110%); }
.filters { transition: box-shadow .4s; }
.filters:hover { box-shadow: 0 20px 50px -20px rgba(255, 59, 47, .35); }

@media (prefers-reduced-motion: reduce) {
  .split .sline > span, .checks li { transform: none !important; opacity: 1 !important; }
  .fx, .leaves { display: none; }
}

/* =========================================================
   CATALOG+ — หน้าแคตตาล็อก
   ========================================================= */
/* hero 2 คอลัมน์ */
.cat-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.page-hero { padding-bottom: 110px; }

/* การ์ดทางลัดหมวด */
.quick-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 30px; max-width: 620px; }
.quick-cats button {
  position: relative; overflow: hidden; text-align: left; cursor: pointer; font-family: inherit; color: #fff;
  padding: 14px 14px 12px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid var(--stroke-d);
  backdrop-filter: blur(6px); transition: transform .4s var(--ease), background .4s, border-color .4s;
}
.quick-cats button::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), transparent 70%, #ff3b2f 85%, #ffb199 92%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rotateAng 4s linear infinite; opacity: 0; transition: opacity .4s;
}
.quick-cats button:hover { transform: translateY(-6px); background: rgba(255, 59, 47, .12); }
.quick-cats button:hover::before { opacity: 1; }
.quick-cats span { font-size: 1.3rem; display: block; transition: transform .5s var(--ease); }
.quick-cats button:hover span { transform: scale(1.25) rotate(-10deg); }
.quick-cats b { display: block; font-size: 1.6rem; font-weight: 600; line-height: 1.2; margin-top: 4px; }
.quick-cats small { color: var(--muted-d); font-size: .78rem; }

/* สำรับการ์ด */
.deck { position: relative; height: 420px; perspective: 1400px; }
.deck-card {
  position: absolute; left: 50%; top: 50%; width: 270px; aspect-ratio: 1; margin: -150px 0 0 -135px;
  border-radius: 24px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08);
  transform: translate(calc(var(--pos) * 18px), calc(var(--pos) * -14px)) rotate(calc(var(--pos) * 5deg - 4deg)) scale(calc(1 - var(--pos) * .05));
  transition: transform .7s var(--ease), opacity .5s;
}
.deck-card img { width: 100%; height: 100%; object-fit: cover; }
.deck-card span {
  position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 8px 12px; border-radius: 12px; font-size: .82rem; font-weight: 500;
  background: rgba(14, 14, 19, .85); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(8px); transition: .4s var(--ease);
}
.deck-card[style*="--pos: 0"] span, .deck.fan .deck-card span { opacity: 1; transform: none; }
.deck-card.throw { transform: translate(140px, -40px) rotate(25deg) scale(.9) !important; opacity: 0; }
.deck.fan .deck-card { transform: translateX(calc((var(--pos) - 2) * 92px)) translateY(calc(var(--pos) * 6px)) rotate(calc((var(--pos) - 2) * 9deg)) scale(.82); }
.deck.fan .deck-card:hover { transform: translateX(calc((var(--pos) - 2) * 92px)) translateY(-30px) rotate(0) scale(.95); z-index: 20 !important; }

/* แถบเครื่องมือ: ค้นหา + ตัวกรอง (ติดด้านบนตอนเลื่อน) */
.toolbar {
  position: sticky; top: 84px; z-index: 40; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
  margin: -40px auto 46px; padding: 8px; width: fit-content; max-width: 100%; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow); transition: background .4s, box-shadow .4s, border-radius .4s;
}
.toolbar.stuck { background: rgba(255, 255, 255, .95); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 16px 40px -18px rgba(18, 18, 22, .35); }
.toolbar .filters { margin: 0; box-shadow: none; padding: 0; background: transparent; }
.toolbar .filters:hover { box-shadow: none; }
.filter-pill { top: 0; height: 100%; }
.filter-btn em { font-style: normal; font-size: .75rem; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: rgba(18, 18, 22, .07); transition: background .3s; }
.filter-btn.active em { background: rgba(255, 255, 255, .25); }
.search {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 44px; border-radius: 999px; background: var(--paper);
  color: var(--muted); border: 1px solid transparent; transition: border-color .3s, box-shadow .3s, width .4s var(--ease); cursor: text;
}
.search:focus-within { border-color: #ff8a7a; box-shadow: 0 0 0 4px rgba(255, 59, 47, .12); color: var(--red); }
.search svg { width: 18px; height: 18px; flex: none; }
.search input { border: 0; outline: 0; background: transparent; font-family: inherit; font-size: .95rem; width: 230px; color: var(--ink); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search kbd { font-family: inherit; font-size: .75rem; padding: 1px 7px; border-radius: 6px; border: 1px solid #ddd; color: #999; }
.search:focus-within kbd { opacity: 0; }
.count b { color: var(--red); font-weight: 600; }
mark { background: linear-gradient(transparent 55%, rgba(255, 59, 47, .35) 55%); color: inherit; padding: 0 1px; }

/* ตอนเปลี่ยนหมวด: รูปเดิมหดหายก่อน */
.gallery.leaving .g-item { animation: none; opacity: 0; transform: scale(.92) translateY(10px); transition: .22s ease-in; }

/* ไม่พบผลลัพธ์ */
.empty { text-align: center; padding: 50px 20px; border-radius: 28px; background: #fff; box-shadow: var(--shadow); max-width: 520px; margin: 0 auto; }
.empty[hidden] { display: none; }
/* กล่อง "ยังมีรุ่นอื่นอีก" ท้ายรายการสินค้า */
.more-note { display: flex; align-items: center; gap: 20px; max-width: 860px; margin: 36px auto 0; padding: 22px 26px;
  border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); border: 1px solid rgba(255, 59, 47, .18); position: relative; overflow: hidden; }
.more-note::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.more-note:has(.mn-text h3:empty) { display: none; }
.empty:not([hidden]) ~ .more-note { display: none; } /* ค้นหาไม่เจอ = กล่อง empty ชวนทัก LINE อยู่แล้ว */
.mn-ic { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 10px 24px -10px rgba(255, 59, 47, .7); }
.mn-ic svg { width: 26px; height: 26px; }
.mn-text { flex: 1; min-width: 0; }
.mn-text h3 { font-weight: 600; font-size: 1.12rem; margin: 0 0 4px; color: var(--ink); }
.mn-text p { margin: 0; color: var(--muted); line-height: 1.6; }
.more-note .btn { flex: none; }
@media (max-width: 760px) {
  .more-note { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; }
  .more-note .btn { align-self: stretch; justify-content: center; }
}
.empty-ic { font-size: 2.6rem; animation: bob 3s ease-in-out infinite; }
.empty h3 { font-weight: 600; margin: 6px 0; }
.empty p { color: var(--muted); margin-bottom: 18px; }

/* การ์ดพลิก (เฉพาะคอม) */
.g-item.flip-card { perspective: 1200px; overflow: visible; background: transparent; box-shadow: none; }
.g-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.flip-card:hover .g-inner { transform: rotateY(180deg); }
.g-front, .g-back {
  position: absolute; inset: 0; border-radius: 22px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: var(--shadow); background: #fff;
}
.g-front img { width: 100%; height: 100%; object-fit: contain; }
.g-front .cap { transform: none; }
.g-back {
  transform: rotateY(180deg); display: flex; flex-direction: column; padding: 22px; color: #fff; isolation: isolate; cursor: default;
  background: var(--night);
}
.g-bg { position: absolute; inset: -20px; z-index: -2; background-position: center; background-size: cover; filter: blur(18px) saturate(1.3); opacity: .35; }
.g-back::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(160deg, rgba(11, 11, 15, .6), rgba(11, 11, 15, .95)); }
.g-cat { font-size: .75rem; letter-spacing: .14em; color: #ff8a7a; text-transform: uppercase; }
.g-back h4 { font-size: 1.15rem; font-weight: 600; line-height: 1.35; margin: 6px 0; }
.g-back p { color: var(--muted-d); font-size: .9rem; }
.g-feats { list-style: none; margin: 12px 0 auto; display: grid; gap: 6px; font-size: .85rem; color: #e5e5ea; }
.g-feats li::before { content: "✓ "; color: var(--line); font-weight: 600; }
.g-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.g-actions .btn { padding: 8px 14px; font-size: .85rem; }
.flip-card .g-front::after { /* แสงวาบ */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .4) 50%, transparent 65%); transform: translateX(-110%);
}
.flip-card::after { display: none; }

/* Lightbox: ซูม + รูปย่อ */
.lightbox img { cursor: zoom-in; transition: transform .45s var(--ease), opacity .3s; }
.lightbox img.zoomed { transform: scale(2.2); cursor: zoom-out; }
.lightbox { overflow: hidden; }
.lb-thumbs {
  position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); display: flex; gap: 8px; max-width: min(760px, 92vw);
  overflow-x: auto; padding: 6px; border-radius: 16px; background: rgba(255, 255, 255, .06); scrollbar-width: none;
}
.lb-thumbs::-webkit-scrollbar { display: none; }
.lb-thumbs button { flex: none; width: 54px; height: 54px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #fff; padding: 0; cursor: pointer; opacity: .55; transition: .3s; }
.lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; transform: none !important; cursor: pointer; border-radius: 0; max-height: none; }
.lb-thumbs button:hover { opacity: .9; }
.lb-thumbs button.on { opacity: 1; border-color: var(--red); transform: translateY(-3px); }
.lb-hint { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); color: var(--muted-d); font-size: .82rem; white-space: nowrap; }
#lightbox:has(.lb-thumbs) img:not(.lb-thumbs img) { max-height: 66vh; margin-bottom: 90px; }
#lightbox:has(.lb-thumbs) .lb-cap { bottom: 14px; }

@media (max-width: 1024px) {
  .cat-hero { grid-template-columns: 1fr; }
  .deck { height: 340px; }
  .deck-card { width: 220px; margin: -120px 0 0 -110px; }
}
@media (max-width: 760px) {
  .quick-cats { grid-template-columns: repeat(2, 1fr); }
  .deck { display: none; }
  .page-hero { padding-bottom: 80px; }
  .toolbar { top: 74px; border-radius: 24px; width: 100%; padding: 8px; }
  .search { width: 100%; }
  .search input { width: 100%; }
  .search kbd, .lb-hint { display: none; }
  .toolbar .filters { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; width: 100%; scrollbar-width: none; }
  .toolbar .filters::-webkit-scrollbar { display: none; }
  .filter-btn { white-space: nowrap; }
  .lb-thumbs { bottom: 64px; }
  .lb-thumbs button { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .flip-card:hover .g-inner { transform: none; } }

/* ด้านหลังการ์ดผลงาน: ข้อมูลลูกค้า/สินค้า/จำนวน */
.g-meta { list-style: none; margin: 12px 0 auto; display: grid; gap: 8px; }
.g-meta li { display: grid; grid-template-columns: 58px 1fr; gap: 8px; font-size: .88rem; color: #f0f0f4; padding-bottom: 8px; border-bottom: 1px dashed rgba(255, 255, 255, .12); }
.g-meta small { color: #ff8a7a; font-size: .78rem; }
.page-hero + section .notice { margin-top: -20px; }

/* จำนวนผลงานเปลี่ยนได้: ให้การ์ดจัดเต็มแถวเอง / ปุ่มทางลัดยืดตามจำนวนที่มี */
.works-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.quick-cats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.quick-cats [hidden], .filter-btn[hidden] { display: none; }

/* =========================================================
   หน้าผลงาน: กำแพงรูป (masonry) ไม่มีคำอธิบาย
   ========================================================= */
.works-stat { display: inline-flex; align-items: center; gap: 16px; margin-top: 28px; padding: 14px 22px 14px 18px; border-radius: 20px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--stroke-d); backdrop-filter: blur(6px); }
.works-stat b { font-size: 2.8rem; font-weight: 600; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.works-stat span { color: #fff; font-weight: 500; line-height: 1.4; }
.works-stat small { color: var(--muted-d); font-weight: 300; }

.wall-sec { padding: 70px 0 40px; }
.wall { columns: 3 300px; column-gap: 20px; }
.wall-item {
  position: relative; display: block; width: 100%; margin: 0 0 20px; padding: 0; border: 0; cursor: zoom-in;
  border-radius: 22px; overflow: hidden; background: #fff; break-inside: avoid; isolation: isolate;
  box-shadow: var(--shadow); transform-style: preserve-3d;
  opacity: 0; translate: 0 40px; scale: .96;
  transition: opacity .9s var(--ease), translate .9s var(--ease), scale .9s var(--ease), transform .3s ease-out, box-shadow .4s;
  transition-delay: var(--d, 0s), var(--d, 0s), var(--d, 0s), 0s, 0s;
}
.wall-item.in { opacity: 1; translate: 0 0; scale: 1; }
.wall-item img { width: 100%; height: auto; display: block; transition: transform 1s var(--ease), filter .5s; }
.wall-item:hover img { transform: scale(1.06); }
.wall-item:hover { box-shadow: 0 30px 60px -25px rgba(255, 59, 47, .55); }
.wall-item::before { /* ขอบเรืองแสงวิ่ง */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; z-index: 3; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), transparent 65%, #ff3b2f 82%, #ffb199 90%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s; animation: rotateAng 3s linear infinite;
}
.wall-item:hover::before { opacity: 1; }
.wall-item::after { /* แสงวาบ */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%);
  transform: translateX(-110%); transition: transform .9s var(--ease);
}
.wall-item:hover::after { transform: translateX(110%); }
.wall-glow { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 90, 60, .22), transparent 55%); }
.wall-item:hover .wall-glow { opacity: 1; }
.zoom-ic {
  position: absolute; right: 14px; bottom: 14px; z-index: 4; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.1rem; color: #fff; background: rgba(11, 11, 15, .75); backdrop-filter: blur(6px);
  opacity: 0; transform: scale(.6) rotate(-45deg); transition: .45s var(--ease);
}
.wall-item:hover .zoom-ic, .work-card.shot:hover .zoom-ic { opacity: 1; transform: none; }

/* หน้าแรก: การ์ดผลงานแบบรูปล้วน */
.work-card.shot { border-radius: 22px; }
.work-card.shot .ph { aspect-ratio: 1; }
#works .works-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

@media (max-width: 760px) {
  .wall { columns: 2 140px; column-gap: 12px; }
  .wall-item { margin-bottom: 12px; border-radius: 16px; }
  .zoom-ic { opacity: 1; transform: none; width: 34px; height: 34px; right: 8px; bottom: 8px; font-size: .9rem; }
  .works-stat b { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) { .wall-item { opacity: 1; translate: none; scale: none; } }

/* ข้อความ SCROLL ใต้ hero */
.scroll-hint em { font-style: normal; }

/* =========================================================
   หน้าแรก: กำแพงรูปผลงาน 3D
   ========================================================= */
#works { padding-bottom: 0; }
#works .works-head { align-items: flex-end; margin-bottom: 10px; }
.works-side { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.works-count { display: flex; align-items: center; gap: 12px; }
.works-count b {
  font-size: 3.4rem; font-weight: 600; line-height: 1; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(255, 59, 47, .45));
}
.works-count b::after { content: "+"; }
.works-count span { color: var(--muted-d); font-size: .95rem; line-height: 1.3; max-width: 90px; }

.works-3d {
  position: relative; height: 660px; margin-top: 10px; overflow: hidden; perspective: 1500px; cursor: pointer;
  -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 82%, transparent);
  mask-image: linear-gradient(transparent, #000 14%, #000 82%, transparent);
}
.w3d-plane {
  --rx: 26deg; --rz: -12deg;
  position: absolute; left: -12%; right: -12%; top: -30%; bottom: -30%;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; align-items: start;
  transform: rotateX(var(--rx)) rotateZ(var(--rz)); transform-style: preserve-3d;
}
.w3d-col { overflow: visible; }
.w3d-track { display: flex; flex-direction: column; animation: w3dUp var(--dur, 40s) linear infinite; will-change: transform; }
.w3d-col:nth-child(even) .w3d-track { animation-direction: reverse; }
.w3d-col:nth-child(odd) { margin-top: -60px; }
@keyframes w3dUp { to { transform: translateY(-50%); } }
.works-3d:hover .w3d-track, .works-3d.paused .w3d-track { animation-play-state: paused; }

.w3d-item {
  position: relative; display: block; margin-bottom: 20px; border-radius: 18px; overflow: hidden; background: #fff;
  box-shadow: 0 24px 40px -22px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06);
  transition: transform .5s var(--ease), box-shadow .5s, filter .5s;
}
.w3d-item img { width: 100%; height: auto; display: block; }
.works-3d:hover .w3d-item { filter: brightness(.55) saturate(.7); }
.works-3d:hover .w3d-item:hover {
  filter: none; transform: translateZ(60px) scale(1.08); z-index: 5;
  box-shadow: 0 40px 70px -20px rgba(0, 0, 0, .9), 0 0 0 2px #ff3b2f, 0 0 40px rgba(255, 59, 47, .55);
}
.w3d-shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%);
  transform: translateX(-110%); transition: transform .9s var(--ease);
}
.w3d-item:hover .w3d-shine { transform: translateX(110%); }

.w3d-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3; white-space: nowrap;
  padding: 8px 16px; border-radius: 999px; font-size: .82rem; color: #e8e8ee;
  background: rgba(14, 14, 19, .75); border: 1px solid var(--stroke-d); backdrop-filter: blur(8px);
  transition: opacity .4s;
}
.works-3d:hover .w3d-hint { opacity: 0; }

@media (max-width: 1024px) {
  .works-3d { height: 560px; }
  .w3d-plane { grid-template-columns: repeat(4, 1fr); left: -20%; right: -20%; }
  .w3d-col:nth-child(5) { display: none; }
}
@media (max-width: 760px) {
  .works-3d { height: 460px; }
  .w3d-plane { grid-template-columns: repeat(3, 1fr); gap: 12px; left: -30%; right: -30%; }
  .w3d-col:nth-child(n+4) { display: none; }
  .w3d-item { margin-bottom: 12px; border-radius: 12px; }
  .works-count b { font-size: 2.6rem; }
  .w3d-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .w3d-track { animation: none; } }

/* =========================================================
   หน้าแรก: ลูกเล่น 3D ส่วนอื่น ๆ
   ========================================================= */

/* ---------- 1) แถบรูปสินค้า 2 แถว บนระนาบเอียง ---------- */
.marquee { padding: 30px 0 70px; perspective: 1200px; }
.mq-stage { display: grid; gap: 18px; transform: rotateX(16deg) rotateZ(-2.5deg) scale(1.08); transform-style: preserve-3d; }
.mq-stage .track.rev { animation-direction: reverse; animation-duration: 58s; }
.mq-stage .track a { transition: transform .5s var(--ease), filter .4s, box-shadow .4s; }
.marquee:hover .mq-stage .track a { filter: brightness(.5) saturate(.6); }
.marquee:hover .mq-stage .track a:hover {
  filter: none; transform: translateY(-14px) scale(1.12) rotate(-2deg); z-index: 3;
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .9), 0 0 0 2px #ff3b2f, 0 0 34px rgba(255, 59, 47, .55);
}
.marquee:hover .mq-stage .track { animation-play-state: paused; }

/* ---------- 2) การ์ดหมวดสินค้า: บินเข้ามาแบบ 3D + ชั้นข้อมูลลอย ---------- */
.bento { perspective: 1400px; }
.bento .tile[data-reveal] { transform: rotateX(32deg) translateY(90px) scale(.9); transform-origin: 50% 100%; }
.bento .tile[data-reveal].in { transform: none; }
.tile img { translate: calc(var(--px, 0) * -18px) calc(var(--py, 0) * -18px); transition: translate .4s ease-out, transform 1s var(--ease); }
.tile .info { transition: transform .4s ease-out; }
.tile:hover .info { transform: translate(calc(var(--px, 0) * 22px), calc(var(--py, 0) * 16px)); }
.tile .arrow { translate: calc(var(--px, 0) * 26px) calc(var(--py, 0) * 26px); }
.tile .num { display: inline-block; transition: letter-spacing .5s var(--ease); }
.tile:hover .num { letter-spacing: .32em; }

/* ---------- 3) จุดขาย: พลิกเข้ามา + เลขใหญ่จาง ๆ + ไอคอนลอย ---------- */
.features { perspective: 1200px; }
.features .feature[data-reveal] { transform: rotateY(-55deg) translateX(-40px); transform-origin: 0 50%; }
.features .feature[data-reveal].in { transform: none; }
.f-num {
  position: absolute; right: 14px; top: -6px; z-index: 0; pointer-events: none;
  font-size: 5.6rem; font-weight: 600; line-height: 1; letter-spacing: -.04em;
  background: linear-gradient(180deg, rgba(255, 59, 47, .16), rgba(255, 59, 47, 0));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: transform .5s var(--ease), background .5s;
}
.feature:hover .f-num {
  transform: translate(calc(var(--px, 0) * -16px), calc(var(--py, 0) * -12px)) scale(1.1);
  background: linear-gradient(180deg, rgba(255, 59, 47, .4), rgba(255, 59, 47, 0)); -webkit-background-clip: text; background-clip: text;
}
.feature .ic, .feature h4, .feature p { position: relative; z-index: 1; }
.feature:hover .ic {
  transform: translate(calc(var(--px, 0) * 14px), calc(var(--py, 0) * 14px)) scale(1.15) rotate(-8deg);
  box-shadow: 0 18px 30px -12px rgba(255, 59, 47, .55);
}
.feature h4 { transition: transform .4s ease-out; }
.feature:hover h4 { transform: translate(calc(var(--px, 0) * 8px), 0); }

/* ---------- 4) ขั้นตอน: เส้นวิ่งตามการเลื่อนจอ ไฟติดทีละขั้น ---------- */
.timeline .rail i { width: calc(var(--p, 0) * 100%) !important; transition: width .2s linear !important; }
.timeline.in .step:not(.on) .dot { background: var(--night-2); box-shadow: none; }
.timeline.in .step:not(.on) .dot::after { animation: none; }
.step { opacity: .45; transform: translateY(14px); transition: opacity .5s, transform .6s var(--ease); }
.step.on { opacity: 1; transform: none; }
.step .dot { transition: background .5s, box-shadow .5s, transform .9s var(--ease); }
.step.on .dot { background: var(--grad); box-shadow: 0 0 0 8px rgba(255, 59, 47, .14), 0 0 30px rgba(255, 59, 47, .6); transform: rotateY(360deg); }
.step h4 { transition: color .4s; }
.step.on h4 { color: #fff; }

/* ---------- 5) CTA: เอียง 3D + ชั้นลอย + ไอคอนลอยรอบ ---------- */
.cta { transition: transform .4s ease-out; transform-style: preserve-3d; }
.cta h2, .cta > p, .cta .eyebrow { transition: transform .4s ease-out; }
.cta h2 { transform: translate(calc(var(--px, 0) * 14px), calc(var(--py, 0) * 10px)); }
.cta-row { transform: translate(calc(var(--px, 0) * 24px), calc(var(--py, 0) * 18px)); transition: transform .4s ease-out; }
.cta-orbs span {
  position: absolute; font-size: 1.7rem; opacity: .85; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .6));
  left: calc(8% + var(--i) * 16%); top: calc(16% + mod(var(--i), 2) * 58%);
  translate: calc(var(--px, 0) * (20px + var(--i) * 8px)) calc(var(--py, 0) * (16px + var(--i) * 6px));
  animation: orbFloat calc(5s + var(--i) * .7s) ease-in-out infinite; animation-delay: calc(var(--i) * -.9s);
}
.cta-orbs span:nth-child(odd) { top: 18%; }
.cta-orbs span:nth-child(even) { top: 72%; }
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) rotate(-8deg) scale(1); }
  50% { transform: translateY(-18px) rotate(10deg) scale(1.12); }
}

@media (max-width: 760px) {
  .mq-stage { transform: rotateX(12deg) rotateZ(-2deg) scale(1.1); gap: 12px; }
  .cta-orbs span { font-size: 1.2rem; opacity: .5; }
  .f-num { font-size: 4.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bento .tile[data-reveal], .features .feature[data-reveal] { transform: none; }
  .step { opacity: 1; transform: none; }
  .cta-orbs { display: none; }
}

/* =========================================================
   หน้าแคตตาล็อก: ลูกเล่น 3D
   ========================================================= */

/* ---------- วงแหวนสินค้า 3D ใน hero ---------- */
.ring-stage { position: relative; height: 440px; perspective: 1300px; cursor: grab; touch-action: pan-y; user-select: none; }
.ring-stage.dragging { cursor: grabbing; }
.ring {
  --r: 290px;
  position: absolute; left: 50%; top: 46%; width: 190px; height: 190px; margin: -95px 0 0 -95px;
  transform-style: preserve-3d; transform: rotateX(-10deg) rotateY(var(--a, 0deg));
}
.ring-card {
  position: absolute; inset: 0; padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: #fff; cursor: pointer;
  transform: rotateY(calc(var(--i) * 360deg / var(--n))) translateZ(var(--r));
  opacity: calc(.25 + var(--f, 1) * .75); filter: brightness(calc(.45 + var(--f, 1) * .55));
  box-shadow: 0 30px 50px -25px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .08);
  transition: box-shadow .4s, filter .3s;
}
.ring-card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ring-card span {
  position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 6px 10px; border-radius: 10px; font: 500 .74rem/1.3 "Prompt", sans-serif;
  color: #fff; background: rgba(14, 14, 19, .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(6px); transition: .35s var(--ease);
}
.ring-card.front { box-shadow: 0 40px 60px -25px rgba(0, 0, 0, .9), 0 0 0 2px #ff3b2f, 0 0 40px rgba(255, 59, 47, .5); }
.ring-card.front span, .ring-card:hover span { opacity: 1; transform: none; }
.ring-floor {
  position: absolute; left: 10%; right: 10%; bottom: 8%; height: 70px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 59, 47, .45), transparent); filter: blur(14px);
  animation: breathe 5s ease-in-out infinite;
}

/* ---------- การ์ดทางลัด: พลิกเข้ามาทีละใบ ---------- */
.quick-cats { perspective: 900px; }
.quick-cats button { animation: qcIn .9s var(--ease) both; transform-style: preserve-3d; }
.quick-cats button:nth-child(2) { animation-delay: .1s; } .quick-cats button:nth-child(3) { animation-delay: .2s; } .quick-cats button:nth-child(4) { animation-delay: .3s; }
@keyframes qcIn { from { opacity: 0; transform: rotateX(-80deg) translateY(30px); } }
.quick-cats span { transform: translateZ(0); }

/* ---------- รายการสินค้า: บินเข้ามาแบบ 3D / เปลี่ยนหมวดแบบหมุนออก ---------- */
.gallery { perspective: 1800px; transition: transform .25s ease-out; transform-origin: 50% 0; }
.g-item.flip-card, .g-item { animation-name: card3dIn; animation-duration: .9s; }
@keyframes card3dIn { from { opacity: 0; transform: translateY(70px) rotateX(-55deg) translateZ(-140px); } }
.gallery.leaving .g-item { animation: none; opacity: 0; transform: rotateY(70deg) translateZ(-160px) scale(.9); transition: .22s ease-in; }
.g-front img { translate: calc(var(--mx-n, 0) * 1px) 0; }

/* ---------- Lightbox: เปิดแบบ 3D ---------- */
.lightbox { perspective: 1400px; }
.lightbox img { transform: rotateX(28deg) translateY(40px) scale(.82); }
.lightbox.open img { transform: none; }
.lightbox.open img.swap { transform: rotateY(-25deg) scale(.92); opacity: 0; }
.lightbox.open img.zoomed { transform: scale(2.2); }

@media (max-width: 1024px) {
  .ring-stage { height: 380px; }
  .ring { --r: 270px; width: 160px; height: 160px; margin: -80px 0 0 -80px; }
}
@media (max-width: 760px) {
  .ring-stage { display: block; height: 300px; margin-top: 20px; }
  .ring { --r: 190px; width: 120px; height: 120px; margin: -60px 0 0 -60px; }
  .ring-card span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .quick-cats button, .g-item { animation: none; }
}

/* =========================================================
   หน้าผลงาน: กำแพงรูปแบบ 3D
   ========================================================= */
.wall { perspective: 1800px; transition: transform .25s ease-out; transform-origin: 50% 0; }
.wall-item { rotate: x -60deg; transform-origin: 50% 100%;
  transition: opacity .9s var(--ease), translate .9s var(--ease), scale .9s var(--ease), rotate 1s var(--ease), transform .3s ease-out, box-shadow .4s;
  transition-delay: var(--d, 0s), var(--d, 0s), var(--d, 0s), var(--d, 0s), 0s, 0s; }
.wall-item.in { rotate: none; }
.wall-item:nth-child(3n+2) { rotate: y 50deg; transform-origin: 0 50%; }
.wall-item:nth-child(3n) { rotate: y -50deg; transform-origin: 100% 50%; }
.wall-item:nth-child(3n+2).in, .wall-item:nth-child(3n).in { rotate: none; }
@media (prefers-reduced-motion: reduce) { .wall-item { rotate: none !important; } }

/* =========================================================
   หน้าแคตตาล็อก: ไอคอนเส้น + กระดานพลิก 3D
   ========================================================= */
.qc-ic {
  width: 40px; height: 40px; border-radius: 12px; display: grid !important; place-items: center; color: #ff8a7a;
  background: linear-gradient(145deg, rgba(255, 59, 47, .22), rgba(255, 59, 47, .04));
  box-shadow: inset 0 0 0 1px rgba(255, 90, 60, .28); margin-bottom: 6px;
  transition: transform .5s var(--ease), color .3s, box-shadow .3s;
}
.qc-ic svg { width: 22px; height: 22px; }
.quick-cats button:hover .qc-ic { color: #fff; background: var(--grad); box-shadow: 0 10px 22px -8px rgba(255, 59, 47, .8); transform: translateY(-3px) rotate(-6deg); }

.fb-stage { position: relative; height: 440px; display: grid; place-items: center; perspective: 1400px; }
.flipboard {
  --rx: 12deg; --ry: -14deg;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 400px;
  transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s ease-out;
}
.fb-tile {
  position: relative; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer;
  transform-style: preserve-3d; transition: transform .45s var(--ease);
  animation: fbIn .9s var(--ease) both; animation-delay: calc((var(--r) + var(--c)) * .09s + .2s);
}
@keyframes fbIn { from { opacity: 0; transform: translateZ(-260px) rotateX(70deg); } }
.fb-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .85s cubic-bezier(.6, .05, .25, 1.15); }
.fb-tile.flip .fb-inner { transform: rotateY(180deg); }
.fb-face {
  position: absolute; inset: 0; border-radius: 14px; overflow: hidden; background: #fff;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .08);
}
.fb-face img { width: 100%; height: 100%; object-fit: cover; }
.fb-back { transform: rotateY(180deg); }
.fb-tile:hover { transform: translateZ(46px) scale(1.06); z-index: 3; }
.fb-tile:hover .fb-face { box-shadow: 0 30px 44px -18px rgba(0, 0, 0, .95), 0 0 0 2px #ff3b2f, 0 0 32px rgba(255, 59, 47, .6); }
.fb-glow {
  position: absolute; width: 70%; height: 70%; left: 15%; top: 15%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 59, 47, .45), transparent); filter: blur(30px);
  animation: breathe 5s ease-in-out infinite;
}

@media (max-width: 1024px) { .fb-stage { height: 400px; } .flipboard { width: 340px; } }
@media (max-width: 760px) {
  .fb-stage { height: 320px; margin-top: 16px; }
  .flipboard { width: 270px; gap: 8px; }
  .fb-face { border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) { .fb-tile { animation: none; } }

/* =========================================================
   หน้าแรก hero: สินค้า 3D + เลเซอร์สกรีนโลโก้
   ========================================================= */
.stage.cfg { height: 560px; perspective: 1300px; cursor: grab; touch-action: pan-y; user-select: none; }
.stage.cfg.dragging { cursor: grabbing; }
.cfg-glow { position: absolute; inset: 12% 14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 59, 47, .45), transparent); filter: blur(30px); animation: breathe 5s ease-in-out infinite; }
.cfg-floor {
  position: absolute; left: 22%; right: 22%; bottom: 17%; height: 50px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .75), transparent); filter: blur(6px);
}
.cfg-scene { position: absolute; left: 50%; top: 46%; width: 0; height: 0; transform-style: preserve-3d; }

/* ---------- กล่อง 3D ---------- */
.p3d { position: absolute; transform-style: preserve-3d; animation: p3dIn .9s var(--ease) both; }
@keyframes p3dIn { from { opacity: 0; transform: translateY(40px) scale(.7) rotateY(-90deg); } }
.cub { position: absolute; transform-style: preserve-3d; }
.cub .f { position: absolute; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.body { left: calc(var(--w) / -2); top: calc(var(--h) / -2); width: var(--w); height: var(--h); }
.body .fr, .body .bk { width: var(--w); height: var(--h); border-radius: var(--rad); background: var(--body); }
.body .fr { transform: translateZ(calc(var(--d) / 2)); overflow: hidden;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .22), transparent 38%, transparent 70%, rgba(0, 0, 0, .18)); background-color: var(--body); }
.body .bk { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); filter: brightness(.82); }
.body .lf, .body .rt { width: var(--d); height: calc(var(--h) - var(--rad)); top: calc(var(--rad) / 2); left: calc((var(--w) - var(--d)) / 2); background: var(--body); filter: brightness(.68); }
.body .lf { transform: rotateY(-90deg) translateZ(calc(var(--w) / 2 - 1px)); }
.body .rt { transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 1px)); }
.body .tp, .body .bt { width: calc(var(--w) - var(--rad)); height: var(--d); left: calc(var(--rad) / 2); top: calc((var(--h) - var(--d)) / 2); background: var(--body); filter: brightness(.9); }
.body .tp { transform: rotateX(90deg) translateZ(calc(var(--h) / 2 - 1px)); }
.body .bt { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2 - 1px)); filter: brightness(.55); }
/* ลายไม้ */
.p3d.wood .f { background-image: repeating-linear-gradient(92deg, rgba(110, 66, 30, .0) 0 9px, rgba(110, 66, 30, .22) 10px 11px, rgba(110, 66, 30, .0) 12px 22px),
  linear-gradient(135deg, rgba(255, 255, 255, .18), transparent 45%); }

/* หัว USB ของแฟลชไดร์ฟ */
.usb { position: absolute; left: 0; top: calc(var(--h) / -2 - 44px); transform-style: preserve-3d; }
.plug { --pw: 58px; --ph: 48px; --pd: 14px; left: calc(var(--pw) / -2); top: 0; width: var(--pw); height: var(--ph); }
.plug .f { background: linear-gradient(180deg, #e9ecef, #9aa3a9); }
.plug .fr, .plug .bk { width: var(--pw); height: var(--ph); border-radius: 4px 4px 0 0; }
.plug .fr { transform: translateZ(calc(var(--pd) / 2)); }
.plug .fr::before, .plug .fr::after { content: ""; position: absolute; top: 12px; width: 12px; height: 9px; background: #5d666c; }
.plug .fr::before { left: 12px; } .plug .fr::after { right: 12px; }
.plug .bk { transform: rotateY(180deg) translateZ(calc(var(--pd) / 2)); }
.plug .lf, .plug .rt { width: var(--pd); height: var(--ph); left: calc((var(--pw) - var(--pd)) / 2); }
.plug .lf { transform: rotateY(-90deg) translateZ(calc(var(--pw) / 2)); }
.plug .rt { transform: rotateY(90deg) translateZ(calc(var(--pw) / 2)); }
.plug .tp, .plug .bt { width: var(--pw); height: var(--pd); top: calc((var(--ph) - var(--pd)) / 2); }
.plug .tp { transform: rotateX(90deg) translateZ(calc(var(--ph) / 2)); }
.plug .bt { transform: rotateX(-90deg) translateZ(calc(var(--ph) / 2)); }

/* วงแม่เหล็ก + ไฟแสดงแบต */
.p-ring { position: absolute; left: 50%; top: 40%; width: 58%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .14), 0 0 0 1px rgba(0, 0, 0, .15); }
.p-led { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 6px; }
.p-led i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.p3d.printed .p-led i { background: #2fe07a; box-shadow: 0 0 8px #2fe07a; animation: ledOn .3s both; }
.p3d.printed .p-led i:nth-child(2) { animation-delay: .1s; } .p3d.printed .p-led i:nth-child(3) { animation-delay: .2s; } .p3d.printed .p-led i:nth-child(4) { animation-delay: .3s; }
@keyframes ledOn { from { opacity: 0; } }
.usb ~ * .p-led, .p3d:has(.usb) .p-led { display: none; }

/* ---------- โลโก้ + เลเซอร์ ---------- */
.p-logo { position: absolute; left: 50%; top: 52%; width: 72%; transform: translate(-50%, -50%); clip-path: inset(0 0 100% 0); opacity: .95; }
.p3d:has(.usb) .p-logo { width: 84%; transform: translate(-50%, -50%) rotate(-90deg); width: calc(var(--h) * .7); }
.p3d.printing .p-logo { animation: printLogo 1.6s linear forwards; }
.p3d.printed .p-logo { clip-path: inset(0); }
@keyframes printLogo { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.laser { position: absolute; left: -10%; right: -10%; height: 3px; top: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, #ff3b2f 20%, #fff 50%, #ff3b2f 80%, transparent);
  box-shadow: 0 0 14px 4px rgba(255, 59, 47, .8), 0 0 40px rgba(255, 59, 47, .6); }
.p3d.printing .laser { animation: laserScan 1.6s linear forwards; }
@keyframes laserScan { 0% { top: 22%; opacity: 1; } 95% { opacity: 1; } 100% { top: 80%; opacity: 0; } }
.sparks { position: absolute; inset: 0; pointer-events: none; }
.p3d.printing .sparks { background: radial-gradient(2px 2px at 30% 40%, #fff, transparent), radial-gradient(2px 2px at 60% 55%, #ffb199, transparent), radial-gradient(2px 2px at 45% 65%, #fff, transparent);
  animation: sparkle .25s steps(2) infinite; }
@keyframes sparkle { 50% { opacity: .2; transform: translateY(-3px); } }

/* ---------- สถานะ + ปุ่มเลือก ---------- */
.cfg-status { position: absolute; left: 50%; top: 4%; transform: translateX(-50%); z-index: 5; white-space: nowrap;
  display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: .85rem; color: #fff;
  background: rgba(14, 14, 19, .75); border: 1px solid var(--stroke-d); backdrop-filter: blur(8px); }
.cfg-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: pulse 1s infinite; }
.cfg-status.done i { background: var(--eco); box-shadow: 0 0 10px var(--eco); animation: none; }
.cfg-ui { position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); z-index: 5; display: flex; gap: 12px; align-items: center;
  padding: 8px; border-radius: 999px; background: rgba(14, 14, 19, .7); border: 1px solid var(--stroke-d); backdrop-filter: blur(10px); }
.cfg-models { display: flex; gap: 4px; }
.cfg-models button { font: 400 .85rem "Prompt", sans-serif; color: #d8d8e0; background: none; border: 0; padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: .3s; white-space: nowrap; }
.cfg-models button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.cfg-models button.on { color: #fff; background: var(--grad); box-shadow: 0 6px 16px -6px rgba(255, 59, 47, .8); }
.cfg-colors { display: flex; gap: 8px; padding: 0 6px 0 10px; border-left: 1px solid var(--stroke-d); }
.cfg-colors button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); background: var(--sw); cursor: pointer; transition: .3s; padding: 0; }
.cfg-colors button:hover { transform: scale(1.15); }
.cfg-colors button.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 59, 47, .7); }
.cfg-hint { position: absolute; right: 2%; top: 46%; z-index: 4; writing-mode: vertical-rl; font-size: .75rem; letter-spacing: .15em; color: var(--muted-d); opacity: .7; }

@media (max-width: 1024px) { .stage.cfg { height: 520px; } }
@media (max-width: 760px) {
  .stage.cfg { height: 470px; }
  .cfg-scene { top: 44%; transform-origin: 0 0; scale: .78; }
  .cfg-ui { flex-direction: column; gap: 8px; border-radius: 22px; }
  .cfg-colors { border-left: 0; padding: 0; }
  .cfg-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .p3d, .laser { animation: none !important; } .p-logo { clip-path: inset(0) !important; } }

/* hero 3D: ขอบสะท้อนแสง ให้สินค้าสีเข้มเด่นจากพื้นหลัง */
.body .fr { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22), inset 0 3px 0 rgba(255,255,255,.28), inset 0 -40px 60px -30px rgba(255,90,60,.35); }
.body .lf, .body .rt, .body .tp, .body .bt { background-image: linear-gradient(rgba(255,255,255,.1), rgba(255,255,255,.1)); }
.body .rt { box-shadow: inset 0 0 18px rgba(255,59,47,.55); }
.cfg-glow { inset: 6% 8%; background: radial-gradient(closest-side, rgba(255,59,47,.7), rgba(255,59,47,.15) 60%, transparent); }

/* =========================================================
   หน้าแรก: คำถามที่พบบ่อย (FAQ)
   ========================================================= */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; align-items: start; }
.faq-wrap .head { position: sticky; top: 110px; margin-bottom: 0; }
.faq-ask { margin-top: 18px; }
.faq-list { display: grid; gap: 12px; perspective: 1200px; }
.faq-item {
  border-radius: 18px; background: #fff; border: 1px solid rgba(18, 18, 22, .07); box-shadow: 0 10px 30px -22px rgba(18, 18, 22, .35);
  transition: box-shadow .4s, border-color .4s, transform .4s var(--ease);
}
.faq-item:hover { transform: translateY(-2px); }
.faq-item[open] { border-color: rgba(255, 59, 47, .35); box-shadow: 0 24px 40px -26px rgba(255, 59, 47, .55); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; font-weight: 500; font-size: 1.02rem; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i {
  flex: none; width: 30px; height: 30px; border-radius: 50%; position: relative; background: var(--paper); transition: background .4s, transform .5s var(--ease);
}
.faq-item summary i::before, .faq-item summary i::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--ink); transition: .4s var(--ease);
}
.faq-item summary i::after { transform: rotate(90deg); }
.faq-item[open] summary i { background: var(--grad); transform: rotate(180deg); }
.faq-item[open] summary i::before, .faq-item[open] summary i::after { background: #fff; }
.faq-item[open] summary i::after { transform: rotate(0); }
.faq-a { padding: 0 22px 20px; color: var(--muted); line-height: 1.75; }
.faq-item[open] .faq-a { animation: faqOpen .5s var(--ease); }
@keyframes faqOpen { from { opacity: 0; transform: rotateX(-20deg) translateY(-8px); transform-origin: top; } }
@media (max-width: 900px) {
  .faq-wrap { grid-template-columns: 1fr; gap: 26px; }
  .faq-wrap .head { position: static; }
}
