:root {
  --ink: #1a365d;
  --ink-soft: #2d4a7a;
  --muted: #6b7c93;
  --line: #e2e8f0;
  --line-strong: #cbd5e0;
  --surface: #ffffff;
  --surface-2: #f7fafc;
  --accent: #2b6cb0;
  --accent-soft: #ebf4ff;
  --maxw: 1080px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: 76px;
  background: var(--surface);
  color: var(--ink);
  font-family: "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI",
    sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.section-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-mark {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.brand-sub {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: none;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-cta {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  transition: opacity 0.18s ease;
}

.nav-cta:hover {
  opacity: 0.85;
}

@media (min-width: 720px) {
  .nav-link {
    display: inline-flex;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 100%);
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero-lead {
  margin: 22px auto 0;
  max-width: 560px;
  font-size: 17px;
  font-weight: 300;
  color: var(--ink-soft);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.primary-cta {
  padding: 14px 30px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.primary-cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.ghost-cta {
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color 0.18s ease;
}

.ghost-cta:hover {
  border-color: var(--accent);
}

/* ---------- Section headings ---------- */
.section-heading {
  max-width: 620px;
  margin: 0 0 36px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 300;
}

/* ---------- Values ---------- */
.values {
  padding: 64px 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.value {
  background: var(--surface);
  padding: 28px 24px;
}

.value-no {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.value h3 {
  margin: 10px 0 6px;
  font-size: 18px;
  font-weight: 600;
}

.value p {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-soft);
}

@media (min-width: 860px) {
  .values-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Products ---------- */
.products {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* Filter bar (search + category chips) */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.prod-search {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  outline: none;
}

.prod-search:focus {
  border-color: var(--accent);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chip:hover {
  border-color: var(--accent);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.no-result {
  padding: 40px 0;
  color: var(--muted);
}

.product-card figure.noimg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card figure.noimg span {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.5;
}

.product-card .contents {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.product-card {
  cursor: zoom-in;
}

.product-card .line-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #06c755;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}

.product-card .line-tag:hover {
  filter: brightness(1.08);
}

/* ---------- Lightbox ---------- */
body.no-scroll {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 32, 0.78);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  max-width: 920px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  background: var(--surface, #fff);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

@media (min-width: 760px) {
  .lightbox-panel {
    flex-direction: row;
  }
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  font-size: 17px;
  line-height: 1;
  color: #fff;
  background: rgba(10, 18, 32, 0.55);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.lightbox-img {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  flex-shrink: 0;
}

.lightbox-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--muted);
}

.lightbox-info {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.lightbox-info h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.lightbox-info .code {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.lightbox-info .contents {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.lightbox-info .cat-tag {
  padding: 3px 12px;
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
}

.lightbox-info .line-cta {
  margin-top: 8px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #06c755;
  border-radius: 999px;
  text-decoration: none;
}

.lightbox-info .line-cta:hover {
  filter: brightness(1.08);
}

.lightbox-info .hint {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.product-card figure {
  margin: 0;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card .body {
  padding: 16px;
}

.product-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.product-card .code {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.product-card .price {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

/* Empty state (0 products) */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 64px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.empty-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 24px;
}

.empty-state h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}

.empty-state p {
  margin: 0;
  max-width: 420px;
  color: var(--muted);
  font-weight: 300;
}

.empty-state .empty-cta {
  margin-top: 6px;
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
}

/* ---------- About ---------- */
.about {
  padding: 80px 0;
}

.about-inner {
  max-width: 720px;
}

.about h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 600;
}

.about p {
  margin: 0;
  font-size: 17px;
  font-weight: 300;
  color: var(--ink-soft);
}

/* ---------- Sticky contact bar ---------- */
.contact-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}

.contact-text {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}

.contact-go {
  color: #fff;
}

@media (max-width: 540px) {
  .contact-text {
    display: none;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0 28px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.footer-brand {
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.footer-meta {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}