/* ==========================================================================
   SOG Thai Giant - site stylesheet
   Brand colours: BLUE + WHITE (do not change)
   ========================================================================== */

:root {
  --blue-950: #061a3d;
  --blue-900: #0a2554;
  --blue-800: #0f3478;
  --blue-700: #1546a8;
  --blue-600: #1f5fd6;   /* main brand blue */
  --blue-500: #3a7bea;
  --blue-400: #64a0ff;
  --blue-300: #9cc2ff;
  --blue-100: #e6efff;
  --blue-50:  #f3f7ff;
  --white:    #ffffff;
  --ink:      #0f1b2d;
  --ink-2:    #33435c;
  --muted:    #5f6f88;
  --line:     #d9e3f3;
  --ok:       #12a150;

  --font: "IBM Plex Sans Thai", "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(10, 37, 84, .06), 0 2px 8px rgba(10, 37, 84, .06);
  --shadow:    0 6px 24px rgba(10, 37, 84, .10);
  --shadow-lg: 0 18px 50px rgba(10, 37, 84, .18);
  --header-h: 72px;
  --wrap: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
html[lang="th"] body { font-size: 16.5px; line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--blue-950); font-weight: 700; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .75em 1.4em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.2; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--blue-600); color: var(--white); box-shadow: 0 6px 18px rgba(31, 95, 214, .35); }
.btn-primary:hover { background: var(--blue-700); color: var(--white); }
.btn-white { background: var(--white); color: var(--blue-700); }
.btn-white:hover { color: var(--blue-900); box-shadow: var(--shadow); }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.btn-outline { border-color: var(--blue-600); color: var(--blue-600); background: var(--white); }
.btn-outline:hover { background: var(--blue-600); color: var(--white); }
.btn-sm { padding: .5em 1em; font-size: .85rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  transition: background .3s, box-shadow .3s, color .3s;
  color: var(--white);
}
.site-header.is-solid, body.page-sub .site-header {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(10, 37, 84, .06);
  color: var(--ink);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; flex: none; }
.brand img { width: 46px; height: 44px; border-radius: 8px; background: var(--white); padding: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.05rem; letter-spacing: .04em; }
.brand-text small { font-size: .72rem; opacity: .75; letter-spacing: .05em; }
.site-header .brand:hover { color: inherit; }

.main-nav { margin-left: auto; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav > ul > li { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 999px;
  color: inherit; font-weight: 500; font-size: .95rem; background: none; border: 0;
}
.nav-link:hover, .nav-link.is-active { color: inherit; background: rgba(127, 160, 220, .16); }
.site-header.is-solid .nav-link.is-active, body.page-sub .nav-link.is-active { color: var(--blue-600); }
.nav-link .chev { width: 14px; height: 14px; transition: transform .2s; }
.has-menu:hover .chev, .has-menu.is-open .chev { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, 8px);
  min-width: 260px; background: var(--white); color: var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 10px; opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .2s var(--ease), visibility .2s;
}
.dropdown::before { content: ""; position: absolute; inset: -12px 0 auto 0; height: 12px; }
.has-menu:hover > .dropdown, .has-menu.is-open > .dropdown, .has-menu:focus-within > .dropdown {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.dropdown a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: .93rem; }
.dropdown a:hover { background: var(--blue-50); color: var(--blue-700); }
.dropdown.mega { width: min(760px, 92vw); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 14px; }
.mega a { display: flex; align-items: center; gap: 10px; }
.mega img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: var(--blue-50); flex: none; }
.mega .mega-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.mega .mega-foot a { display: inline-flex; background: var(--blue-50); color: var(--blue-700); font-weight: 500; }

.header-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 0; background: transparent; color: inherit;
}
.icon-btn:hover { background: rgba(127, 160, 220, .18); color: inherit; }
.icon-btn svg { width: 21px; height: 21px; }
.badge {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--blue-600); color: var(--white); font-size: 11px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--white); line-height: 1;
}
.badge[data-count="0"] { display: none; }
.lang-switch {
  display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1.5px solid currentColor; color: inherit; font-size: .85rem; font-weight: 600; opacity: .9;
}
.lang-switch:hover { color: inherit; opacity: 1; background: rgba(127, 160, 220, .16); }
.menu-toggle { display: none; }

/* ---------- Mobile nav ---------- */
@media (max-width: 1020px) {
  .menu-toggle { display: grid; }
  .header-tools { margin-left: auto; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--white); color: var(--ink);
    overflow-y: auto; padding: 16px 20px 40px; transform: translateX(100%); transition: transform .3s var(--ease);
    margin: 0;
  }
  body.nav-open .main-nav { transform: none; }
  body.nav-open { overflow: hidden; }
  /* backdrop-filter would make the fixed menu position itself inside the header, so drop it while open */
  body.nav-open .site-header { background: var(--white); color: var(--ink); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--line); }
  .nav-link { width: 100%; justify-content: space-between; padding: 14px 4px; font-size: 1.05rem; border-radius: 0; }
  .nav-link:hover { background: none; }
  .dropdown, .dropdown.mega {
    position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; width: auto;
    display: none; padding: 0 0 12px; min-width: 0;
  }
  .dropdown.mega { grid-template-columns: 1fr 1fr; }
  .has-menu:hover > .dropdown, .has-menu.is-open > .dropdown, .has-menu:focus-within > .dropdown { transform: none; }
  .dropdown::before { display: none; }
  .has-menu.is-open > .dropdown { display: block; }
  .has-menu.is-open > .dropdown.mega { display: grid; }
  .brand-text small { display: none; }
}
@media (max-width: 520px) {
  .dropdown.mega { grid-template-columns: 1fr; }
  .header-inner { gap: 8px; }
  .header-tools { gap: 2px; margin-left: auto; }
  .header-tools .icon-btn { width: 38px; height: 38px; }
  .header-tools .lang-switch { padding: 0 9px; height: 30px; }
  .brand img { width: 40px; height: 38px; }
  .brand-text strong { font-size: .85rem; letter-spacing: .02em; }
}
@media (max-width: 400px) {
  .brand-text { display: none; }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  color: var(--white); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1200px 600px at 75% 40%, rgba(58, 123, 234, .45), transparent 60%),
    radial-gradient(800px 500px at 10% 90%, rgba(31, 95, 214, .35), transparent 60%),
    linear-gradient(160deg, var(--blue-950) 0%, var(--blue-900) 45%, var(--blue-800) 100%);
}
.hero::before { /* engineering grid */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image:
    linear-gradient(rgba(156, 194, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(156, 194, 255, .12) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 60% 50%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 50%, #000 30%, transparent 75%);
}
.hero-canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.hero-fallback {
  position: absolute; right: 6%; top: 50%; width: min(42vw, 520px); aspect-ratio: 1; transform: translateY(-50%);
  z-index: -1; opacity: .9;
}
.hero-canvas.is-ready + .hero-fallback { display: none; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-content { padding: calc(var(--header-h) + 40px) 0 80px; max-width: 620px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-400); box-shadow: 0 0 0 4px rgba(100, 160, 255, .25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(100, 160, 255, 0); } }
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 5.2vw, 3.9rem); margin: 18px 0 16px; letter-spacing: -.01em; }
html[lang="th"] .hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.3; }
.hero h1 .accent { background: linear-gradient(90deg, var(--blue-300), var(--white)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: 1.12rem; color: rgba(255, 255, 255, .85); max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 36px; font-size: .88rem; color: rgba(255, 255, 255, .78); }
.hero-badges span { display: inline-flex; align-items: center; gap: 8px; }
.hero-badges svg { width: 18px; height: 18px; color: var(--blue-300); }
.hero-hint {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: rgba(255, 255, 255, .6);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-hint i { width: 22px; height: 36px; border: 2px solid rgba(255, 255, 255, .5); border-radius: 12px; position: relative; }
.hero-hint i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--white); animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(12px); } }
.drag-hint {
  position: absolute; right: 20px; bottom: 24px; font-size: .78rem; color: rgba(255, 255, 255, .65);
  display: flex; align-items: center; gap: 6px;
}
.drag-hint svg { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .hero { align-items: flex-end; }
  .hero-content { padding-top: 46vh; padding-bottom: 70px; }
  .hero-fallback { top: 30%; right: 50%; transform: translate(50%, -50%); width: 70vw; }
  .hero-hint, .drag-hint { display: none; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; position: relative; }
.section-tint { background: var(--blue-50); }
.section-dark { background: linear-gradient(160deg, var(--blue-950), var(--blue-800)); color: var(--white); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-600); margin-bottom: 10px; }
.section-dark .kicker { color: var(--blue-300); }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-dark .section-head p { color: rgba(255, 255, 255, .75); }
@media (max-width: 700px) { .section { padding: 64px 0; } .section-head { margin-bottom: 32px; } }

/* ---------- Stats ---------- */
.stats { margin-top: -64px; position: relative; z-index: 2; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white);
  border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.stat { padding: 30px 26px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-num { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 700; color: var(--blue-600); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .92rem; margin-top: 6px; }
@media (max-width: 800px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1020px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.cat-card {
  position: relative; display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
  transform-style: preserve-3d; will-change: transform;
}
.cat-card:hover { box-shadow: var(--shadow-lg); border-color: var(--blue-300); color: var(--ink); }
/* contain (not cover) so text and products in the photo are never cut off */
.cat-card .thumb { aspect-ratio: 4 / 3; background: var(--white); overflow: hidden; padding: 10px; border-bottom: 1px solid var(--line); }
.cat-card .thumb img { width: 100%; height: 100%; object-fit: contain; transform: scale(.94); transition: transform .6s var(--ease); }
.cat-card:hover .thumb img { transform: scale(1); }
.cat-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.cat-card .num { font-family: var(--mono); font-size: .75rem; color: var(--blue-500); }
.cat-card h3 { font-size: 1.02rem; margin: 0; color: var(--blue-950); }
.cat-card .sub { font-size: .85rem; color: var(--muted); }
.cat-card .go {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--white); color: var(--blue-600); box-shadow: var(--shadow-sm);
  transform: scale(.6); opacity: 0; transition: .3s var(--ease);
}
.cat-card:hover .go { transform: scale(1); opacity: 1; }
.cat-card .go svg { width: 16px; height: 16px; }
.cat-extra { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 36px; } }
.media-frame { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.media-frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.play-btn {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--white);
  background: linear-gradient(0deg, rgba(6, 26, 61, .55), rgba(6, 26, 61, .05));
}
.play-btn span {
  width: 76px; height: 76px; border-radius: 50%; background: var(--blue-600); display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, .2); transition: transform .3s var(--ease);
}
.play-btn:hover span { transform: scale(1.1); }
.play-btn svg { width: 30px; height: 30px; margin-left: 4px; }
.play-btn em { position: absolute; left: 20px; bottom: 16px; font-style: normal; font-weight: 600; font-size: .92rem; }
.media-tag {
  position: absolute; right: -14px; bottom: -14px; background: var(--white); border-radius: 16px; padding: 14px 18px;
  box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center;
}
.check-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list svg { width: 22px; height: 22px; color: var(--blue-600); flex: none; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  background: var(--blue-50); border: 1px solid var(--line); color: var(--ink-2); font-size: .86rem; font-weight: 500;
}
button.chip { cursor: pointer; transition: .2s; }
button.chip:hover { border-color: var(--blue-400); color: var(--blue-700); }
button.chip.is-active { background: var(--blue-600); border-color: var(--blue-600); color: var(--white); }
.chip .count { font-family: var(--mono); font-size: .75rem; opacity: .7; }

/* ---------- Core values ---------- */
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .values-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .values-grid { grid-template-columns: 1fr; } }
.value-card {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius);
  padding: 26px 22px; transition: transform .3s var(--ease), background .3s;
}
.value-card:hover { transform: translateY(-6px); background: rgba(255, 255, 255, .1); }
.value-card .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--blue-600); display: grid; place-items: center; margin-bottom: 16px; }
.value-card .ico svg { width: 26px; height: 26px; color: var(--white); }
.value-card h3 { font-size: 1.05rem; letter-spacing: .03em; margin-bottom: 4px; }
.value-card p { margin: 0; color: rgba(255, 255, 255, .72); font-size: .95rem; }

/* ---------- Info cards / company facts ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr; } }
.fact {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.fact .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-100); color: var(--blue-700); margin-bottom: 14px; }
.fact .ico svg { width: 22px; height: 22px; }
.fact h3 { font-size: 1rem; margin-bottom: 6px; }
.fact p { color: var(--ink-2); margin: 0; font-size: .95rem; }
.fact .big { font-size: 1.6rem; font-weight: 700; color: var(--blue-600); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: 24px; padding: 48px;
  background: linear-gradient(120deg, var(--blue-700), var(--blue-500)); color: var(--white);
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.cta-band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  border: 40px solid rgba(255, 255, 255, .08);
}
.cta-band h2 { color: var(--white); font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-band p { color: rgba(255, 255, 255, .85); margin: 0; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }
.cta-qr { background: var(--white); padding: 10px; border-radius: 16px; width: 140px; position: relative; z-index: 1; }
.cta-qr img { width: 120px; height: 120px; }
.cta-qr small { display: block; text-align: center; color: var(--blue-700); font-weight: 600; margin-top: 4px; font-size: .78rem; }
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; padding: 32px 24px; } .cta-qr { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-950); color: rgba(255, 255, 255, .72); padding: 64px 0 24px; font-size: .93rem; }
.site-footer a { color: rgba(255, 255, 255, .78); }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--white); }
.footer-brand img { width: 44px; height: 42px; border-radius: 8px; background: var(--white); padding: 3px; }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.social a:hover { background: var(--blue-600); }
.social svg { width: 18px; height: 18px; }
.contact-lines li { display: flex; gap: 10px; }
.contact-lines svg { width: 17px; height: 17px; flex: none; margin-top: 4px; color: var(--blue-300); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 44px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: .83rem; color: rgba(255, 255, 255, .5); }

/* ---------- Floating LINE button ---------- */
.fab-line {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 58px; height: 58px; border-radius: 50%;
  background: #06c755; color: var(--white); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(6, 199, 85, .45);
  transition: transform .25s var(--ease);
}
.fab-line:hover { transform: scale(1.08); color: var(--white); }
.fab-line svg { width: 30px; height: 30px; }
.fab-top {
  position: fixed; right: 27px; bottom: 90px; z-index: 40; width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); color: var(--blue-700); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; place-items: center; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .3s;
}
.fab-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.fab-top svg { width: 18px; height: 18px; }

/* ---------- Sub page hero + breadcrumb ---------- */
.page-hero {
  position: relative; overflow: hidden; color: var(--white); padding: calc(var(--header-h) + 56px) 0 64px;
  background:
    radial-gradient(700px 400px at 85% 30%, rgba(58, 123, 234, .5), transparent 60%),
    linear-gradient(150deg, var(--blue-950), var(--blue-800));
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; opacity: .3;
  background-image: linear-gradient(rgba(156, 194, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(156, 194, 255, .12) 1px, transparent 1px);
  background-size: 40px 40px;
}
.page-hero .wrap { position: relative; }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4.5vw, 3.2rem); margin: 10px 0 12px; }
.page-hero p { color: rgba(255, 255, 255, .82); max-width: 640px; font-size: 1.06rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: rgba(255, 255, 255, .7); list-style: none; padding: 0; margin: 0; }
.crumbs a { color: rgba(255, 255, 255, .85); }
.crumbs a:hover { color: var(--white); text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.page-hero.has-3d { padding-bottom: 0; }
.page-hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: center; }
@media (max-width: 900px) { .page-hero-grid { grid-template-columns: 1fr; } }

/* ---------- Hydraulic cylinder explorer (3D) ---------- */
.explorer { position: relative; min-height: 420px; }
.explorer-canvas { position: absolute; inset: 0; cursor: grab; touch-action: pan-y; }
.explorer-canvas:active { cursor: grabbing; }
.explorer-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.explorer-fallback { padding: 20px 0 40px; }
.explorer-fallback img { border-radius: var(--radius); background: var(--white); }
.explorer-canvas.is-ready ~ .explorer-fallback { display: none; }
.explorer-label {
  position: absolute; pointer-events: none; transform: translate(-50%, -130%); white-space: nowrap;
  background: var(--white); color: var(--blue-900); font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  box-shadow: var(--shadow); opacity: 0; transition: opacity .2s;
}
.explorer-label.is-visible { opacity: 1; }
.explorer-legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 28px; position: relative; z-index: 2; }
.explorer-legend button {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 500;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); color: var(--white); transition: .2s;
}
.explorer-legend button:hover, .explorer-legend button.is-active { background: var(--white); color: var(--blue-800); }
.explorer-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.explorer-help { font-size: .8rem; color: rgba(255, 255, 255, .6); display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.explorer-help svg { width: 15px; height: 15px; }
.position-panel {
  position: absolute; left: 0; bottom: 70px; z-index: 3; max-width: 340px; background: rgba(255, 255, 255, .97); color: var(--ink);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-lg); transform: translateY(10px); opacity: 0; pointer-events: none; transition: .3s var(--ease);
}
.position-panel.is-visible { transform: none; opacity: 1; pointer-events: auto; }
.position-panel h3 { font-size: 1rem; margin-bottom: 4px; }
.position-panel p { font-size: .88rem; color: var(--ink-2); margin-bottom: 8px; }
.position-panel .codes { font-family: var(--mono); font-size: .82rem; color: var(--blue-700); }
@media (max-width: 900px) { .explorer { min-height: 330px; } .position-panel { position: relative; bottom: auto; margin: 0 0 18px; max-width: none; } }

/* ---------- Series grid (category page) ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.search-inline { position: relative; flex: 0 1 300px; }
.search-inline input {
  width: 100%; padding: 11px 14px 11px 40px; border-radius: 999px; border: 1.5px solid var(--line); font: inherit; font-size: .93rem; background: var(--white);
}
.search-inline input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(58, 123, 234, .15); }
.search-inline svg { position: absolute; left: 14px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); }
.series-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1100px) { .series-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .series-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.series-card {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s, opacity .3s;
}
.series-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-300); }
.series-card.is-hidden { display: none; }
.series-card.is-dim { opacity: .35; }
.series-card .thumb { aspect-ratio: 10 / 9; background: var(--white); overflow: hidden; display: block; border-bottom: 1px solid var(--line); }
.series-card .thumb img { width: 100%; height: 100%; object-fit: contain; transform: scale(.96); transition: transform .5s var(--ease); }
.series-card:hover .thumb img { transform: scale(1); }
.series-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.series-card .type { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-600); }
html[lang="th"] .series-card .type { text-transform: none; letter-spacing: 0; font-size: .82rem; }
.series-card h3 { font-size: 1.05rem; margin: 0; font-family: var(--mono); color: var(--blue-950); }
.series-card .row { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.series-card .row .btn { flex: 1; justify-content: center; padding: .55em .6em; font-size: .82rem; min-width: 0; }
@media (max-width: 520px) { .series-card .row { flex-wrap: wrap; gap: 6px; } .series-card .row .btn { flex: 1 1 100%; } }
.empty-note { text-align: center; color: var(--muted); padding: 40px 0; display: none; }
.empty-note.is-visible { display: block; }

.apps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .apps-grid { grid-template-columns: 1fr; } }
.app-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.app-card img { margin: 0 auto 10px; border-radius: 8px; }
.app-card h3 { font-size: 1.05rem; }

/* ---------- Series detail page ---------- */
.detail-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; gap: 28px; } }
.gallery-main {
  position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--white);
  cursor: zoom-in; box-shadow: var(--shadow);
}
.gallery-main img { width: 100%; transition: transform .3s; transform-origin: var(--zx, 50%) var(--zy, 50%); }
.gallery-main.is-zoom img { transform: scale(1.9); }
.gallery-main .zoom-hint { position: absolute; right: 12px; bottom: 12px; background: rgba(6, 26, 61, .75); color: var(--white); font-size: .75rem; padding: 4px 10px; border-radius: 999px; }
.detail-info .type { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-600); }
.detail-info h1 { font-family: var(--mono); font-size: clamp(2rem, 4vw, 2.8rem); margin: 6px 0 8px; }
.detail-info .tagline { font-size: 1.15rem; font-weight: 600; color: var(--blue-800); }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; }
.spec { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--blue-50); }
.spec small { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
html[lang="th"] .spec small { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.spec strong { font-size: 1.15rem; color: var(--blue-900); }
.spec .bar { height: 6px; border-radius: 3px; background: var(--blue-100); margin-top: 8px; overflow: hidden; }
.spec .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue-500), var(--blue-700)); border-radius: 3px; transition: width 1.4s var(--ease); }
.spec.is-in .bar i { width: var(--w); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.note-box { margin-top: 20px; padding: 14px 16px; border-left: 4px solid var(--blue-600); background: var(--blue-50); border-radius: 0 10px 10px 0; font-size: .93rem; color: var(--ink-2); }

.position-diagram { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.position-diagram svg { width: 100%; height: auto; }
.pd-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: .88rem; color: var(--ink-2); }
.pd-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
@keyframes seal-glow { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.seal-hl { animation: seal-glow 1.6s ease-in-out infinite; }
@keyframes rod-move { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-60px); } }
.rod-move { animation: rod-move 4s ease-in-out infinite; }

.related { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .related { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Product pages built from the old site (phase 2) ---------- */
.cat3d { position: relative; height: 320px; cursor: grab; touch-action: pan-y; }
.cat3d canvas { display: block; width: 100% !important; height: 100% !important; }
@media (max-width: 900px) { .cat3d { height: 230px; margin-top: 8px; } }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-meta .chip { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: var(--white); }

.sub-heading { font-size: 1.35rem; margin: 44px 0 18px; padding-left: 14px; border-left: 4px solid var(--blue-600); }
.sub-heading:first-child { margin-top: 0; }
.prose { max-width: 820px; color: var(--ink-2); }
.prose p { white-space: pre-line; }
.prose ul { padding-left: 0; list-style: none; display: grid; gap: 6px; }
.prose li { padding-left: 4px; }
.link-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }

.p-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; margin-bottom: 12px; }
@media (max-width: 420px) { .p-list { grid-template-columns: 1fr; } }
.p-item {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .3s, border-color .3s, transform .3s var(--ease);
}
.p-item:hover { box-shadow: var(--shadow); border-color: var(--blue-300); transform: translateY(-3px); }
.p-item.is-hidden, .series-card.is-hidden, .data-table tr.is-hidden { display: none; }
.p-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.p-media a { display: block; background: var(--white); aspect-ratio: 4 / 3; overflow: hidden; cursor: zoom-in; }
.p-media img { width: 100%; height: 100%; object-fit: contain; padding: 6px; transform: scale(.97); transition: transform .4s var(--ease); }
.p-media a:hover img { transform: scale(1.02); }
.p-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.p-body h3 { font-family: var(--mono); font-size: 1.1rem; margin: 0; color: var(--blue-950); word-break: break-word; }
.p-body .caption { font-size: .9rem; color: var(--ink-2); margin: 0; white-space: pre-line; }
.p-body .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.p-body .row .btn { padding: .5em .95em; font-size: .82rem; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.spec-table th, .spec-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { color: var(--muted); font-weight: 600; font-size: .78rem; letter-spacing: .03em; white-space: nowrap; width: 1%; }
.spec-table td { color: var(--ink); font-weight: 500; word-break: break-word; }
@media (max-width: 520px) { .spec-table th { white-space: normal; width: 40%; } }
.spec-table.multi thead th { background: var(--blue-50); color: var(--blue-800); width: auto; }

.data-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); margin-bottom: 24px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
.data-table th { position: sticky; top: 0; background: var(--blue-900); color: var(--white); text-align: left; padding: 10px 12px; font-weight: 600; font-size: .82rem; letter-spacing: .03em; }
.data-table td { padding: 9px 12px; border-top: 1px solid var(--line); }
.data-table tbody tr:nth-child(even) td { background: var(--blue-50); }
.data-table tbody tr:hover td { background: var(--blue-100); }
.data-table td.code { font-family: var(--mono); font-weight: 600; color: var(--blue-800); white-space: nowrap; }
.data-table .add-mini { border: 1px solid var(--line); background: var(--white); color: var(--blue-600); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.data-table .add-mini:hover { background: var(--blue-600); color: var(--white); }
.data-table .add-mini svg { width: 15px; height: 15px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.gallery-grid a { display: block; background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.gallery-grid img { width: 100%; height: auto; transition: transform .4s var(--ease); }
.gallery-grid a:hover img { transform: scale(1.02); }
.gallery-grid.single { grid-template-columns: minmax(0, 480px); justify-content: center; }

.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs button { width: 76px; height: 68px; padding: 4px; border-radius: 10px; border: 2px solid var(--line); background: var(--white); }
.thumbs button.is-active { border-color: var(--blue-600); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main img { object-fit: contain; background: var(--white); }
.count-note { font-size: .88rem; color: var(--muted); }

/* ---------- About pages (phase 3) ---------- */
.feature-rows { display: grid; gap: 28px; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.feature-row:nth-child(even) .feature-media { order: 2; }
.feature-media { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: var(--white); }
.feature-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; }
.feature-text h3 { font-size: 1.25rem; }
.feature-text p { color: var(--ink-2); white-space: pre-line; margin: 0; }
.feature-text .num { font-family: var(--mono); color: var(--blue-500); font-size: .8rem; letter-spacing: .1em; }
@media (max-width: 800px) { .feature-row { grid-template-columns: 1fr; gap: 14px; } .feature-row:nth-child(even) .feature-media { order: 0; } }

.motto { text-align: center; font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 700; color: var(--blue-800); margin-bottom: 30px; }
.motto small { display: block; font-size: .95rem; font-weight: 500; color: var(--muted); margin-top: 6px; }
.leaders { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .leaders { grid-template-columns: 1fr 1fr; } }
.person { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: center; transition: transform .3s var(--ease), box-shadow .3s; }
.person:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.person img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; background: var(--blue-50); }
.person .body { padding: 12px 14px 16px; }
.person h3 { font-size: 1.05rem; margin: 0; }
.person .role { color: var(--blue-600); font-size: .85rem; font-weight: 600; }
.person q { display: block; color: var(--ink-2); font-size: .88rem; margin-top: 6px; quotes: "“" "”"; }
.person.leader img { aspect-ratio: 4 / 5; }
.dept { margin-top: 44px; }
.dept-head { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
@media (max-width: 800px) { .dept-head { grid-template-columns: 1fr; } }
.dept-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--white); }
.dept-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; cursor: zoom-in; }
.boss { display: flex; justify-content: center; margin-bottom: 26px; position: relative; }
.boss .person { width: min(280px, 70%); border-color: var(--blue-300); box-shadow: var(--shadow); }
.boss .person .role { font-size: .95rem; }
.boss::after { content: ""; position: absolute; left: 50%; bottom: -26px; width: 2px; height: 26px; background: var(--blue-300); }
.person q.zh { font-weight: 600; color: var(--blue-800); quotes: "「" "」"; }
.dept h2 { font-size: 1.3rem; margin-bottom: 4px; }
.dept .count { color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.team-grid .person img { aspect-ratio: 1; }

.material-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 800px) { .material-grid { grid-template-columns: 1fr; } }
.material-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.material-card header { padding: 18px 22px; background: linear-gradient(120deg, var(--blue-800), var(--blue-600)); color: var(--white); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.material-card header h3 { color: var(--white); margin: 0; font-size: 1.1rem; }
.material-card header .btn { flex: none; }
@media (max-width: 520px) {
  .material-card header { flex-wrap: wrap; }
  .btn { white-space: normal; text-align: center; max-width: 100%; }
}
.material-card .cols { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .material-card .cols { grid-template-columns: 1fr; } }
.material-card .col { padding: 16px 22px 20px; }
.material-card .col + .col { border-left: 1px solid var(--line); }
.material-card h4 { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.material-card .pro h4 { color: var(--ok); }
.material-card .con h4 { color: #b4542a; }
.material-card ul { margin: 0; padding-left: 18px; font-size: .9rem; color: var(--ink-2); display: grid; gap: 4px; }

.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 30px; }
.type-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; color: var(--ink); transition: .25s var(--ease); }
.type-card:hover { border-color: var(--blue-400); box-shadow: var(--shadow); transform: translateY(-3px); color: var(--ink); }
.type-card img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.type-card b { font-family: var(--mono); color: var(--blue-800); display: block; margin-top: 4px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.photo-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.photo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.photo-card a { display: block; cursor: zoom-in; }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-card .cap { padding: 10px 14px 12px; font-weight: 600; font-size: .95rem; }
.photo-card .tag { display: inline-block; font-family: var(--mono); font-size: .78rem; background: var(--blue-100); color: var(--blue-800); padding: 2px 8px; border-radius: 6px; margin-bottom: 4px; }
.masonry { columns: 3 280px; column-gap: 16px; }
.masonry a { display: block; margin-bottom: 16px; break-inside: avoid; border-radius: 12px; overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow-sm); }
.masonry img { width: 100%; transition: transform .5s var(--ease); }
.masonry a:hover img { transform: scale(1.03); }

.download-list { display: grid; gap: 14px; max-width: 820px; }
.download-card { display: flex; gap: 16px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; color: var(--ink); transition: .25s var(--ease); }
.download-card:hover { border-color: var(--blue-400); box-shadow: var(--shadow); transform: translateX(4px); color: var(--ink); }
.download-card .ico { width: 50px; height: 50px; border-radius: 12px; background: #1d7a45; color: var(--white); display: grid; place-items: center; font-weight: 700; font-size: .78rem; flex: none; }
.download-card .ico.pdf { background: #b4362a; }
.download-card h3 { font-size: 1.02rem; margin: 0; }
.download-card small { color: var(--muted); }
.download-card .go { margin-left: auto; color: var(--blue-600); }
.download-card .go svg { width: 22px; height: 22px; }

/* ---------- Staff portal + login ---------- */
.login-card { max-width: 420px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); }
.login-card .lock { width: 56px; height: 56px; border-radius: 16px; background: var(--blue-600); color: var(--white); display: grid; place-items: center; margin-bottom: 16px; }
.login-card .lock svg { width: 26px; height: 26px; }
.login-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 16px; }
.login-error { background: #fdecea; color: #a12a1d; border-radius: 10px; padding: 10px 14px; font-size: .9rem; margin-top: 14px; }
.portal-section { margin-bottom: 40px; }
.portal-section h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
.portal-section h2 small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.portal-card { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); transition: .25s var(--ease); }
.portal-card:hover { border-color: var(--blue-400); box-shadow: var(--shadow); transform: translateY(-3px); color: var(--ink); }
.portal-card .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-100); color: var(--blue-700); display: grid; place-items: center; flex: none; }
.portal-card .ico svg { width: 20px; height: 20px; }
.portal-card .en { font-size: .78rem; color: var(--muted); display: block; }
.portal-card .th { font-size: 1.08rem; font-weight: 600; display: block; line-height: 1.4; }
.portal-card .zh { font-size: .82rem; color: var(--muted); display: block; }
.portal-card .note { display: inline-block; margin-top: 6px; font-size: .75rem; background: #fff4e0; color: #8a5300; padding: 2px 8px; border-radius: 6px; }
.portal-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 30px; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  display: flex; gap: 16px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; color: var(--ink); transition: .3s var(--ease);
}
a.contact-card:hover { border-color: var(--blue-400); box-shadow: var(--shadow); transform: translateY(-3px); color: var(--ink); }
.contact-card .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-600); color: var(--white); flex: none; }
.contact-card .ico.line { background: #06c755; }
.contact-card .ico svg { width: 24px; height: 24px; }
.contact-card h3 { font-size: .98rem; margin-bottom: 2px; }
.contact-card p { margin: 0; color: var(--ink-2); font-size: .95rem; word-break: break-word; }
.contact-card small { color: var(--muted); }
.map-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; margin-top: 22px; }
@media (max-width: 900px) { .map-grid { grid-template-columns: 1fr; } }
.map-frame { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); min-height: 420px; background: var(--blue-50); }
.map-frame iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }
.qr-cards { display: grid; gap: 18px; }
.qr-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; gap: 16px; align-items: center; }
.qr-card img { width: 130px; border-radius: 10px; flex: none; cursor: zoom-in; }
.qr-card h3 { font-size: 1rem; }
.qr-card p { font-size: .9rem; color: var(--ink-2); margin: 0; }

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-card { padding: 22px; } }
.field label { display: block; font-size: .87rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: .95rem; background: var(--white); color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(58, 123, 234, .15); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.form-note { font-size: .83rem; color: var(--muted); margin-top: 12px; }

/* ---------- Drawer (inquiry list) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(6, 26, 61, .45); z-index: 80; opacity: 0; visibility: hidden; transition: .3s; }
.overlay.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--white); z-index: 90;
  transform: translateX(100%); transition: transform .35s var(--ease); display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.15rem; margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px; display: grid; gap: 10px; }
.drawer-foot .btn { justify-content: center; }
.inq-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.inq-item img { width: 56px; height: 50px; object-fit: cover; border-radius: 8px; background: var(--blue-50); }
.inq-item strong { font-family: var(--mono); display: block; }
.inq-item small { color: var(--muted); }
.inq-item input { width: 100%; margin-top: 4px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: .83rem; }
.inq-remove { border: 0; background: none; color: var(--muted); width: 32px; height: 32px; border-radius: 50%; }
.inq-remove:hover { background: var(--blue-50); color: var(--blue-700); }
.inq-empty { text-align: center; color: var(--muted); padding: 36px 0; }
.inq-empty svg { width: 48px; height: 48px; color: var(--blue-300); margin: 0 auto 10px; }
.drawer .field { margin-top: 12px; }
.btn-line { background: #06c755; color: var(--white); }
.btn-line:hover { background: #05a647; color: var(--white); }

/* ---------- Search overlay ---------- */
.search-modal {
  position: fixed; left: 50%; top: 12vh; transform: translate(-50%, -10px); width: min(640px, 94vw); z-index: 90;
  background: var(--white); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; opacity: 0; visibility: hidden; transition: .25s var(--ease);
}
.search-modal.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.search-modal .bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search-modal .bar svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search-modal input { flex: 1; border: 0; font: inherit; font-size: 1.05rem; outline: none; padding: 6px 0; min-width: 0; }
.search-modal kbd { font-family: var(--mono); font-size: .72rem; border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; color: var(--muted); }
.search-results { max-height: 56vh; overflow-y: auto; padding: 8px; list-style: none; margin: 0; }
.search-results li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.search-results li a:hover, .search-results li a.is-active { background: var(--blue-50); }
.search-results img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--blue-50); flex: none; }
.search-results strong { display: block; font-size: .95rem; }
.search-results small { color: var(--muted); }
.search-results mark { background: var(--blue-100); color: var(--blue-800); border-radius: 3px; padding: 0 2px; }
.search-empty, .search-tip { padding: 18px; color: var(--muted); font-size: .9rem; text-align: center; }

/* ---------- Lightbox + toast ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6, 26, 61, .9); display: grid; place-items: center; padding: 24px; opacity: 0; visibility: hidden; transition: .25s; cursor: zoom-out; }
.lightbox.is-open { opacity: 1; visibility: visible; }
/* every enlarged photo opens in the same frame (photo fitted inside), so sizes stay consistent */
.lightbox img {
  width: min(92vw, 1000px); height: min(82vh, 700px); object-fit: contain;
  background: var(--white); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-lg);
}
.lightbox[data-size="portrait"] img { width: min(90vw, 500px); height: min(84vh, 640px); }
.lightbox[data-size="group"] img { width: min(92vw, 960px); height: min(80vh, 640px); }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 110; background: var(--blue-900); color: var(--white);
  padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow-lg); font-size: .92rem; opacity: 0; transition: .3s var(--ease); pointer-events: none;
  display: flex; align-items: center; gap: 8px; max-width: 92vw;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; color: var(--blue-300); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal-stagger.is-in > * { opacity: 1; transform: none; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: .06s; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: .12s; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: .18s; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: .24s; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: .30s; }
.reveal-stagger.is-in > *:nth-child(7) { transition-delay: .36s; }
.reveal-stagger.is-in > *:nth-child(8) { transition-delay: .42s; }
.reveal-stagger.is-in > *:nth-child(n+9) { transition-delay: .48s; }
.no-js .reveal, .no-js .reveal-stagger > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}

@media print {
  .site-header, .fab-line, .fab-top, .drawer, .overlay, .search-modal, .hero-canvas { display: none !important; }
}
