/* ===== ComputerNextGen shop — shared styles (index.html + dashboard.html) ===== */

:root {
  --accent: #15803D;      /* สีหลัก (เปลี่ยนที่เดียวได้ทั้งเว็บ) */
  --ink: #14261C;
  --muted: #4A5A50;
  --line: #E3E8E1;
  --bg: #F6F7F4;
  --tint: #EAF3EC;
  --gold: #F2C14E;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}



.brand img {
  height: 70px;
  width: auto;
  object-fit: contain;
}


h1, h2, h3 {
  margin: 0;
  font-family: Prompt, 'Noto Sans Thai', sans-serif;
  line-height: 1.3;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .88; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* icons (SVG sprite) */
.ico { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ===== buttons & chips ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 12px;
  font-weight: 600; font-size: 15px; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: #fff; border-color: #CBD5CD; font-weight: 500; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }

.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; border: 1px solid #CBD5CD; background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 500;
}
button.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== header ===== */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: Prompt, 'Noto Sans Thai', sans-serif; font-weight: 600; font-size: 20px; }
.brand-tag { font-size: 12px; color: var(--muted); }

.search {
  flex: 1 1 280px; max-width: 520px; display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 16px; border: 1px solid #CBD5CD; border-radius: 999px;
  background: var(--bg); color: var(--muted);
}
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 15px; color: var(--ink);
}
.header-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }

.cat-nav { border-top: 1px solid #EEF1EC; }
.cat-nav .container { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 15px; font-weight: 500; }
.cat-nav a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 14px; }
.cat-nav a.is-muted { color: var(--muted); }

/* ===== hero ===== */
.hero { background: var(--tint); }
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 72px; }
.hero-copy { flex: 1 1 480px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px;
  background: #fff; border: 1px solid #CFE0D2; font-size: 14px; font-weight: 500; color: var(--accent);
}
.hero h1 { font-size: 48px; font-weight: 700; }
.hero h1 span { display: block; color: var(--accent); }
.hero-lead { font-size: 18px; color: #3B4B41; max-width: 560px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.tick-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: #3B4B41; }
.tick-list li { display: flex; align-items: center; gap: 6px; }
.tick-list .ico { color: var(--accent); stroke-width: 2.2; }

.finder {
  flex: 1 1 360px; max-width: 480px; background: #fff; border: 1px solid #D5E3D8;
  border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 20px;
  box-shadow: 0 8px 24px rgba(20, 38, 28, .06);
}
.finder h2 { font-size: 22px; font-weight: 600; }
.finder-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.finder-step { display: flex; flex-direction: column; gap: 10px; }
.finder-step strong { font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ===== trust strip ===== */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.icon-box {
  flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.trust-item b { display: block; font-weight: 600; }
.trust-item small { font-size: 14px; color: var(--muted); }

/* ===== sections ===== */
.section { padding-top: 72px; padding-bottom: 72px; }
.section-categories { padding-bottom: 24px; }
.section-products { padding-top: 48px; }
.section-title { font-size: 32px; font-weight: 600; margin-bottom: 8px; }
.section-sub { color: var(--muted); margin-bottom: 32px; }
.band-white { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* category tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tile {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.tile .ico { color: var(--accent); }
.tile-name { font-family: Prompt, 'Noto Sans Thai', sans-serif; font-weight: 600; font-size: 19px; }
.tile-desc { font-size: 14px; color: var(--muted); }
.tile-go { font-size: 14px; font-weight: 600; color: var(--accent); }

/* products */
.products-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: var(--muted); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.card-img {
  height: 180px; background: #EEF2EC; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; color: #55685B; font-size: 12px;
}
.card-img .ico { stroke-width: 1.4; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.card h3 { font-size: 17px; font-weight: 500; line-height: 1.4; }
.card-spec { font-size: 14px; color: var(--muted); flex: 1; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.price { font-family: Prompt, 'Noto Sans Thai', sans-serif; font-weight: 600; font-size: 22px; }
.btn-sm {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--accent); color: var(--accent); font-size: 14px; font-weight: 600;
}
.note { margin-top: 24px; font-size: 13px; color: var(--muted); }

.badge { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.badge-a { background: #DCFCE7; color: #14532D; }
.badge-b { background: #FEF3C7; color: #78350F; }
.badge-c { background: #E5E7EB; color: #1F2937; }

/* grades & process */
.grade-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.grade-card { border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.grade-card .badge { align-self: flex-start; font-size: 16px; padding: 2px 14px; }
.grade-card h3 { font-size: 20px; font-weight: 600; }
.grade-card p { color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.step { display: flex; flex-direction: column; gap: 10px; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: Prompt, 'Noto Sans Thai', sans-serif; font-weight: 600;
}
.step h3 { font-size: 18px; font-weight: 600; }
.step p { font-size: 15px; color: var(--muted); }

/* sell-to-us band */
.sell { background: var(--gold); }
.sell-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 56px; padding-bottom: 56px; }
.sell-copy { flex: 1 1 420px; }
.sell h2 { font-size: 30px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.sell p { font-size: 17px; }

/* footer */
.site-footer { background: var(--ink); color: #C9D6CD; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 56px; padding-bottom: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.footer-col.wide { flex: 2 1 280px; gap: 12px; }
.footer-col.mid { flex: 1 1 160px; }
.footer-col.contact { flex: 1 1 220px; gap: 8px; }
.footer-col h4 { margin: 0 0 4px; color: #fff; font-weight: 600; font-size: 16px; }
.footer-brand { font-family: Prompt, 'Noto Sans Thai', sans-serif; font-weight: 600; font-size: 22px; color: #fff; }
.footer-col a { min-height: 32px; }
.copyright { padding-bottom: 32px; font-size: 13px; color: #A9BAAF; }

/* ===== dashboard ===== */
.dash-bar { background: #fff; border-bottom: 1px solid var(--line); }
.dash-bar .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.dash-brand { display: flex; align-items: center; gap: 10px; font-family: Prompt, 'Noto Sans Thai', sans-serif; font-weight: 600; font-size: 18px; }
.dash-brand .brand-mark { width: 36px; height: 36px; }
.dash-main { display: flex; flex-direction: column; gap: 24px; padding-top: 40px; padding-bottom: 72px; }
.dash-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.dash-title h1 { font-size: 32px; font-weight: 700; }
.dash-title p { margin-top: 4px; color: var(--muted); }
.sample-tag { padding: 4px 14px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 14px; font-weight: 600; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: 14px; color: var(--muted); }
.kpi-value { font-family: Prompt, 'Noto Sans Thai', sans-serif; font-weight: 700; font-size: 36px; line-height: 1.3; }
.kpi-sub { font-size: 14px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.delta .ico { stroke-width: 2.2; }
.delta-up { color: #166534; }
.delta-down { color: #B42318; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-head h2 { font-size: 20px; font-weight: 600; }
.readout { margin-top: 2px; font-size: 15px; font-weight: 500; }
.toggle { display: flex; gap: 8px; }

.chart { display: flex; gap: 12px; }
.y-axis { position: relative; width: 36px; height: 240px; flex: none; }
.y-axis span { position: absolute; right: 0; transform: translateY(50%); font-size: 12px; color: var(--muted); line-height: 1; }
.plot { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.plot-area { position: relative; height: 240px; }
.gridline { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 8px; }
.bar-btn { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; display: flex; align-items: flex-end; }
.bar { display: block; width: 100%; background: var(--accent); opacity: .7; border-radius: 4px 4px 0 0; }
.bar-btn.is-active .bar { opacity: 1; }
.x-labels { display: flex; gap: 8px; }
.x-labels div { flex: 1; min-width: 0; text-align: center; font-size: 12px; line-height: 1.3; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; padding: 10px 12px; border-bottom: 1px solid #CBD5CD; font-weight: 600; }
td { padding: 10px 12px; border-bottom: 1px solid #EEF1EC; }
th.num, td.num { text-align: right; }

.breakdowns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.breakdowns .panel { gap: 16px; }
.breakdowns h2 { font-size: 18px; font-weight: 600; }
.panel-sub { margin-top: 2px; font-size: 14px; color: var(--muted); }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.meter-row b { font-weight: 600; }
.meter-track { height: 10px; background: #EEF2EC; border-radius: 4px; }
.meter-fill { height: 10px; background: var(--accent); border-radius: 4px; }

.insights { display: flex; flex-wrap: wrap; gap: 16px; }
.insight { flex: 3 1 420px; background: var(--tint); border: 1px solid #D5E3D8; border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.insight h2 { font-size: 18px; font-weight: 600; }
.insight ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: #243A2D; }
.howto { flex: 2 1 320px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.howto h2 { font-size: 18px; font-weight: 600; }
.howto p { font-size: 15px; color: #3B4B41; }

@media (max-width: 600px) {
  .hero h1 { font-size: 34px; }
  .hero-inner { padding-top: 48px; padding-bottom: 48px; }
  .section-title { font-size: 26px; }
}
