/* ─────────────────────────────────────────────────────────────
   U3D Concept — ระบบดีไซน์
   สีน้ำเงิน #1861a7 ดูดจากตัว U ในไฟล์โลโก้จริง ไม่ได้กะเอา
   ตัดกับพื้นขาว 6.35:1 ใช้เป็นตัวหนังสือได้
   ───────────────────────────────────────────────────────────── */

:root {
  --brand: #1861a7;
  --brand-ink: #124e88;
  --brand-soft: #eaf2fa;
  --brand-line: #cfe0f1;

  --navy: #071d35;
  --navy-soft: #0f2b4a;

  --ink: #131b26;
  --muted: #5b6676;      /* 5.82:1 บนพื้นขาว */
  --faint: #8b95a3;      /* ใช้กับข้อความประกอบที่ไม่ใช่เนื้อหาสำคัญเท่านั้น */
  --line: #dbe4ef;
  --paper: #ffffff;
  /* พื้นหลังส่วนสลับสี ย้อมน้ำเงินให้ชัดขึ้นตามที่ลูกค้าขอในรอบแก้ไขที่ 1
     ตรวจแล้วข้อความสีเทา --muted บนพื้นนี้ยังตัดกัน 4.9:1 ผ่านเกณฑ์ */
  --surface: #e6eefa;
  --surface-2: #dbe6f5;

  --ok: #0f7a4d;
  --ok-soft: #e6f4ed;
  --warn: #9a5407;       /* ป้ายข้อมูลตัวอย่าง 4.9:1 บนพื้นส้มอ่อน */
  --warn-soft: #fdf1e3;
  --danger: #b3261e;
  --danger-soft: #fdecea;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(7, 29, 53, .06), 0 1px 3px rgba(7, 29, 53, .04);
  --shadow-2: 0 4px 12px rgba(7, 29, 53, .08), 0 2px 4px rgba(7, 29, 53, .04);
  --shadow-3: 0 12px 32px rgba(7, 29, 53, .12), 0 4px 8px rgba(7, 29, 53, .05);

  --wrap: 1200px;
  --gutter: 16px;
  --header-h: 64px;
}

/* ── พื้นฐาน ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'IBM Plex Sans Thai', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.2; }
h2 { font-size: clamp(24px, 4vw, 36px); }
h3 { font-size: clamp(19px, 2.4vw, 23px); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 760px; }

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

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 18px; border-radius: var(--r-sm);
}
.skip-link:focus { top: 12px; }

/* ── ส่วนของหน้า ──────────────────────────────────────────── */
.section { padding: clamp(44px, 7vw, 84px) 0; }
.section--tint { background: var(--surface); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2 { color: #fff; }
.section--navy p { color: #c5d3e4; }

.section-head { max-width: 640px; margin-bottom: clamp(24px, 4vw, 40px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); margin-bottom: 0; }
.section-head__lead {
  font-size: clamp(17px, 2vw, 20px); font-weight: 600;
  color: var(--ink) !important; margin-bottom: .35em !important;
}
.section--navy .section-head p { color: #b9cade; }

.eyebrow {
  display: inline-block;
  font-size: 15px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px;
}
.section--navy .eyebrow { color: #7db6ee; }

.lead { font-size: clamp(17px, 2vw, 19px); color: var(--muted); }

/* ── ปุ่ม ─────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 11px 22px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--brand-ink); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled {
  background: var(--surface-2); color: var(--faint); border-color: var(--line);
  cursor: not-allowed; pointer-events: none;
}
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--brand-line); }
.btn--ghost:hover { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: #e9eef5; color: var(--navy); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.btn--danger { background: var(--danger); }
.btn--danger:hover { background: #8c1d17; }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn--lg { min-height: 54px; padding: 14px 30px; font-size: 17px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── ไอคอนเส้น ────────────────────────────────────────────── */
/* ความหนาเส้น 1.5 เท่ากันทั้งเว็บ สีเดียวกับข้อความ ไม่ใช้อิโมจิ */
.ico {
  width: 22px; height: 22px; flex: none;
  stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  fill: none;
}
.ico--lg { width: 28px; height: 28px; }
.ico--sm { width: 18px; height: 18px; }
/* svg เป็น display:block จึงไม่ขยับตาม text-align ต้องสั่งกึ่งกลางเอง */
.center .ico, .ico--center { margin-inline: auto; }

/* ── ส่วนหัว ──────────────────────────────────────────────── */
.promo-bar {
  background: var(--navy); color: #dce8f5;
  font-size: 14px; text-align: center; padding: 8px 16px;
}

.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex; align-items: center; gap: 16px;
  min-height: var(--header-h);
}
.header__logo { display: flex; align-items: center; flex: none; }
.header__logo img { height: 34px; width: auto; }

.nav { display: none; margin-inline-start: auto; }
.nav a {
  display: inline-block; padding: 8px 14px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px;
  border-radius: var(--r-sm);
}
.nav a:hover { color: var(--brand); background: var(--brand-soft); }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }

.header__tools { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav + .header__tools { margin-inline-start: 0; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-sm);
  border: 0; background: transparent; color: var(--ink); cursor: pointer;
  text-decoration: none; position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--brand); }

.cart-count {
  position: absolute; top: 4px; inset-inline-end: 4px;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 1;
  border-radius: var(--r-pill);
}
.cart-count[hidden] { display: none; }

@media (min-width: 1000px) {
  .nav { display: flex; align-items: center; gap: 2px; }
  .nav-toggle { display: none; }
}

/* เมนูมือถือ */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 8px var(--gutter) 16px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block; padding: 12px 8px; color: var(--ink);
  text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: 0; }

/* ── แบนเนอร์ ─────────────────────────────────────────────── */
/* ชนขอบทุกด้าน ไม่มี margin ไม่มีมุมโค้ง ตามกฎโซนแบนเนอร์ */
.hero { position: relative; background: #0a2f66; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* ไฟล์แบนเนอร์เป็นไล่สีน้ำเงินเข้มทางซ้าย และมีของจริงอยู่ทางขวา
     ตรึงไว้ทางขวาเพื่อไม่ให้เครื่องพิมพ์กับม้วนฟิลาเมนต์โดนตัด */
  object-position: 100% center;
}
.hero__scrim {
  position: absolute; inset: 0;
  /* ทึบทางซ้ายให้ตัวหนังสือขาวอ่านออก แล้วจางไปทางขวาให้เห็นสินค้า */
  background: linear-gradient(95deg, rgba(6,32,70,.94) 0%, rgba(8,40,86,.86) 34%, rgba(10,47,102,.42) 58%, rgba(10,47,102,0) 78%);
}
.hero__inner {
  position: relative;
  display: flex; align-items: center;
  min-height: min(70vh, 460px);
  padding-block: clamp(40px, 8vw, 72px);
}
.hero__copy { max-width: 560px; }
.hero h1 { color: #fff; margin-bottom: .35em; text-shadow: 0 1px 14px rgba(3,18,42,.35); }
.hero h1 .accent { color: #7cc2f5; }
.hero .eyebrow { color: #8cc9f7; }
.hero__sub {
  font-size: clamp(16px, 2.2vw, 19px); color: #d7e6f7;
  max-width: 34em; margin-bottom: 1.4em;
  text-shadow: 0 1px 12px rgba(3,18,42,.3);
}
/* ปุ่มบนแบนเนอร์ ลูกค้าขอให้ทึบทั้งคู่ ไม่เอาแบบโปร่ง */
.hero .btn--ghost {
  background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.5);
  backdrop-filter: blur(4px);
}
.hero .btn--ghost:hover { background: rgba(255,255,255,.24); color: #fff; border-color: #fff; }

@media (min-width: 760px) {
  .hero__inner { min-height: 440px; }
  .hero__scrim {
    background: linear-gradient(95deg, rgba(6,32,70,.92) 0%, rgba(8,40,86,.8) 30%, rgba(10,47,102,.3) 56%, rgba(10,47,102,0) 74%);
  }
}
@media (max-width: 759px) {
  /* จอแคบ ดันภาพไปทางขวาให้เห็นสินค้า แล้วคลุมด้วยน้ำเงินเข้มให้ตัวหนังสืออ่านออก */
  .hero__media img { object-position: 82% center; }
  .hero__scrim { background: linear-gradient(180deg, rgba(6,32,70,.9) 0%, rgba(7,36,78,.74) 45%, rgba(8,40,86,.9) 100%); }
}

/* ── แถบจุดเด่น ───────────────────────────────────────────── */
.trust { border-bottom: 1px solid var(--line); background: #fff; }
.trust__grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  padding: 20px 0;
}
.trust__item { display: flex; gap: 10px; align-items: flex-start; }
.trust__item .ico { color: var(--brand); margin-top: 3px; }
.trust__item strong { display: block; font-size: 16px; line-height: 1.45; }
.trust__item span { font-size: 14px; color: var(--muted); line-height: 1.55; }
@media (min-width: 768px) {
  .trust__item strong { font-size: 17px; }
  .trust__item span { font-size: 14.5px; }
}

@media (min-width: 480px) { .trust__grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 768px) { .trust__grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* ── การ์ดสินค้า ──────────────────────────────────────────── */
/* 2 / 2 / 3 / 4 คอลัมน์ ตามตารางระบบคอลัมน์ */
.product-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 480px) { .product-grid { gap: 12px; } }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--brand-line); }
}

.card__media {
  /* สัดส่วนตามไฟล์รูปจริง 280x196 ไม่บีบให้เป็นสี่เหลี่ยมจัตุรัส */
  aspect-ratio: 280 / 196;
  background: var(--surface);
  position: relative;
}
.card__media img { width: 100%; height: 100%; object-fit: contain; }
.card__body { padding: 12px 14px 16px; display: flex; flex-direction: column; flex: 1; gap: 4px; }
.card__name { font-weight: 600; font-size: 15px; line-height: 1.45; color: var(--ink); }
.card__meta { font-size: 14px; color: var(--muted); }
.card__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.card__price { font-weight: 700; font-size: 18px; color: var(--navy); }
.card__was { font-size: 13px; color: var(--faint); text-decoration: line-through; }

@media (min-width: 768px) {
  .card__body { padding: 16px 18px 20px; }
  .card__name { font-size: 16px; }
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; line-height: 1.5;
}
.badge--out { background: var(--surface-2); color: var(--muted); }
.badge--low { background: var(--warn-soft); color: var(--warn); }
.badge--new { background: var(--brand-soft); color: var(--brand); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }

.card__flag {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: rgba(255,255,255,.94); box-shadow: var(--shadow-1);
}

/* จุดสีของตัวเลือกสินค้า */
.swatches { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.swatch-dot {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid rgba(7,29,53,.18);
}
.swatch-more { font-size: 13px; color: var(--muted); align-self: center; }

/* ── ตัวกรองสินค้า ────────────────────────────────────────── */
.shop-layout { display: grid; gap: 22px; }
@media (min-width: 900px) { .shop-layout { grid-template-columns: 240px 1fr; gap: 32px; align-items: start; } }

.filters {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #fff; padding: 4px 16px;
}
@media (min-width: 900px) { .filters { position: sticky; top: calc(var(--header-h) + 16px); } }
.filters details { border-bottom: 1px solid var(--line); }
.filters details:last-of-type { border-bottom: 0; }
.filters summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none;
}
.filters summary::-webkit-details-marker { display: none; }
.filters summary .ico { transition: transform .2s ease; color: var(--muted); }
.filters details[open] summary .ico { transform: rotate(180deg); }
.filters__list { padding-bottom: 14px; display: flex; flex-direction: column; gap: 2px; }
.filters__list label {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 0; font-size: 15px; cursor: pointer; color: var(--ink);
}
.filters__list input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.filters__count { margin-inline-start: auto; font-size: 13px; color: var(--faint); }

.shop-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.shop-toolbar__count { font-size: 15px; color: var(--muted); margin-inline-end: auto; }

/* ── ฟอร์ม ────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field > label, .field-label {
  display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px;
}
.field .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.req { color: var(--danger); margin-inline-start: 2px; }

input[type=text], input[type=tel], input[type=email], input[type=number],
input[type=search], input[type=password], input[type=date], input[type=datetime-local],
input[type=url], select, textarea {
  width: 100%;
  /* 16px ขั้นต่ำ ไม่งั้น iOS จะซูมเข้าเองตอนกดช่องกรอก */
  font: inherit; font-size: 16px;
  padding: 11px 13px; min-height: 48px;
  color: var(--ink); background: #fff;
  border: 1px solid #c8d1dd; border-radius: var(--r);
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6676' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
  padding-inline-end: 38px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(24, 97, 167, .16);
}
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--danger);
}
.field-error { display: block; font-size: 14px; color: var(--danger); margin-top: 5px; font-weight: 500; }

.field-row { display: grid; gap: 0 14px; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 620px) { .field-row--3 { grid-template-columns: 1fr 1fr 1fr; } }

.check-row { display: flex; align-items: flex-start; gap: 10px; }
.check-row input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex: none; }

/* ตัวเลือกแบบการ์ด (วิธีชำระเงิน) */
.choice { display: flex; flex-direction: column; gap: 10px; }
.choice__item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r);
  cursor: pointer; background: #fff;
  transition: border-color .15s ease, background-color .15s ease;
}
.choice__item:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.choice__item input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.choice__item:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice__item strong { display: block; font-size: 16px; }
.choice__item span { display: block; font-size: 14px; color: var(--muted); line-height: 1.5; }
.choice__item.is-disabled { opacity: .55; cursor: not-allowed; }

/* ── กล่องข้อความแจ้งเตือน ────────────────────────────────── */
.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 15px; border-radius: var(--r);
  font-size: 15px; line-height: 1.6; margin-bottom: 16px;
  border: 1px solid transparent;
}
.note .ico { flex: none; margin-top: 2px; }
.note--info { background: var(--brand-soft); color: #103f6d; border-color: var(--brand-line); }
.note--warn { background: var(--warn-soft); color: var(--warn); border-color: #f0d5b4; }
.note--error { background: var(--danger-soft); color: var(--danger); border-color: #f3c6c2; }
.note--ok { background: var(--ok-soft); color: var(--ok); border-color: #bfe3d2; }

/* ── ตะกร้าและสรุปยอด ─────────────────────────────────────── */
.cart-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1fr 340px; gap: 32px; } }

.cart-line {
  display: grid; grid-template-columns: 78px 1fr; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-line__media {
  aspect-ratio: 280 / 196; background: var(--surface);
  border-radius: var(--r-sm); overflow: hidden;
}
.cart-line__media img { width: 100%; height: 100%; object-fit: contain; }
.cart-line__name { font-weight: 600; font-size: 15px; line-height: 1.45; }
.cart-line__name a { color: inherit; text-decoration: none; }
.cart-line__name a:hover { color: var(--brand); }
.cart-line__meta { font-size: 13px; color: var(--muted); }
.cart-line__foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.cart-line__price { margin-inline-start: auto; font-weight: 700; white-space: nowrap; }

@media (min-width: 560px) { .cart-line { grid-template-columns: 110px 1fr; gap: 16px; } }

.qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden;
  background: #fff;
}
.qty button {
  width: 38px; height: 40px; border: 0; background: transparent;
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
  font: inherit;
}
.qty button:hover { background: var(--surface-2); color: var(--brand); }
.qty button[disabled] { color: var(--faint); cursor: not-allowed; }
.qty input {
  width: 46px; min-height: 40px; padding: 0; text-align: center;
  border: 0; border-inline: 1px solid var(--line); border-radius: 0;
  font-size: 16px; font-weight: 600;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { box-shadow: none; }

.summary {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: 20px;
}
@media (min-width: 900px) { .summary { position: sticky; top: calc(var(--header-h) + 16px); } }
.summary h3 { font-size: 18px; margin-bottom: 14px; }
.summary__row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; font-size: 15px;
}
.summary__row span:first-child { color: var(--muted); }
.summary__row--discount span:last-child { color: var(--ok); font-weight: 600; }
.summary__total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 17px; font-weight: 700;
}
.summary__total strong { font-size: 24px; color: var(--navy); }

.coupon-form { display: flex; gap: 8px; margin: 14px 0; }
.coupon-form input { text-transform: uppercase; }

/* ── หน้าสินค้า ───────────────────────────────────────────── */
.product-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .product-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; } }
@media (min-width: 900px) { .product-gallery { position: sticky; top: calc(var(--header-h) + 16px); } }

.gallery__main {
  /* ไม่ครอป ปล่อยให้รูปพอดีกรอบด้วย contain */
  aspect-ratio: 4 / 3; background: var(--surface);
  border-radius: var(--r-lg); overflow: hidden;
}
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery__thumb {
  width: 68px; aspect-ratio: 4 / 3;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); padding: 0; cursor: pointer; overflow: hidden;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumb[aria-current="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(24,97,167,.2); }

.price-block { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.price-now { font-size: clamp(28px, 4vw, 34px); font-weight: 700; color: var(--navy); line-height: 1.2; }
.price-was { font-size: 18px; color: var(--faint); text-decoration: line-through; }

.variant-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.variant {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 9px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: #fff; cursor: pointer; font-size: 15px; font-weight: 500;
  transition: border-color .15s ease, background-color .15s ease;
}
.variant:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.variant input { position: absolute; opacity: 0; pointer-events: none; }
.variant:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.variant:has(input:disabled) { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.variant__dot {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  border: 1px solid rgba(7,29,53,.18);
}

.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table th, .spec-table td {
  text-align: start; padding: 11px 14px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.spec-table th { font-weight: 600; color: var(--muted); width: 46%; background: var(--surface); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button {
  padding: 12px 16px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 15px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }

/* ── ตารางสี ──────────────────────────────────────────────── */
.color-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}
@media (min-width: 480px) { .color-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
@media (min-width: 768px) { .color-grid { grid-template-columns: repeat(6, 1fr); gap: 16px; } }
.color-cell { text-align: center; }
.color-cell img { border-radius: var(--r-sm); background: var(--surface); width: 100%; }
.color-cell span { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ── ไทม์ไลน์สถานะ ────────────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ''; position: absolute; inset-block: 12px; inset-inline-start: 7px;
  width: 2px; background: var(--line);
}
.timeline li { position: relative; padding: 0 0 20px 30px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; inset-inline-start: 0; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line);
}
.timeline li.is-done .timeline__dot { background: var(--ok); border-color: var(--ok); }
.timeline li.is-current .timeline__dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(24,97,167,.16); }
.timeline li.is-cancel .timeline__dot { background: var(--danger); border-color: var(--danger); }
.timeline__title { font-weight: 600; }
.timeline__meta { font-size: 13px; color: var(--muted); }

/* ── การชำระเงิน ──────────────────────────────────────────── */
.pay-grid { display: grid; gap: 22px; align-items: start; }
@media (min-width: 820px) { .pay-grid { grid-template-columns: 300px 1fr; gap: 36px; } }

.qr-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
  padding: 18px; text-align: center;
}
.qr-card svg { margin: 0 auto; width: 100%; height: auto; max-width: 260px; }
.qr-amount { font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1.2; margin-top: 12px; }

.copy-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); margin-bottom: 8px;
}
.copy-row__text { flex: 1; min-width: 0; }
.copy-row__text strong { display: block; font-size: 17px; font-variant-numeric: tabular-nums; word-break: break-all; }
.copy-row__text span { display: block; font-size: 13px; color: var(--muted); }

.bank-card {
  border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px;
  background: #fff;
}

/* ── แถบชวนติดต่อด้านล่าง ─────────────────────────────────── */
.cta-band { background: var(--navy); color: #fff; padding: clamp(32px, 5vw, 56px) 0; }
.cta-band__inner {
  display: grid; gap: 22px; align-items: center;
  border-radius: var(--r-lg); overflow: hidden;
}
.cta-band__media { border-radius: var(--r-lg); overflow: hidden; }
.cta-band__media img { width: 100%; height: auto; display: block; }
.cta-band__copy h2 { color: #fff; font-size: clamp(26px, 4vw, 40px); margin-bottom: .4em; }
.cta-band__copy p { color: #c5d8ee; font-size: clamp(16px, 2vw, 19px); margin-bottom: 1.3em; }
@media (min-width: 860px) {
  .cta-band__inner { grid-template-columns: 1.15fr 1fr; gap: 40px; }
}

/* ── แถบโปรโมชั่นในหน้าสินค้า ─────────────────────────────── */
.promo { display: grid; gap: 22px; align-items: center; }
.promo__media { border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); }
.promo__media img { width: 100%; height: auto; display: block; }
.promo__copy h2 { margin-bottom: .4em; }
@media (min-width: 860px) {
  .promo { grid-template-columns: 1.15fr 1fr; gap: 40px; }
}

/* ── กรอบแนบสลิป ──────────────────────────────────────────── */
/* ทำให้ใหญ่และกดได้ทั้งกรอบ เพราะลูกค้าหาช่องแนบสลิปไม่เจอ */
/* ต้องเจาะจงกว่ากฎ `.field > label` ที่ตั้ง display:block ไว้ ไม่งั้นข้อความจะไหลต่อกันเป็นพืด */
.slip-drop,
.field > label.slip-drop {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 4px; padding: 26px 18px;
  border: 2px dashed var(--brand); border-radius: var(--r-lg);
  background: var(--brand-soft); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.slip-drop:hover, .slip-drop:focus-within, .slip-drop.is-over {
  background: #dbe9f8; border-color: var(--brand-ink);
}
.slip-drop input[type=file] {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.slip-drop__icon { color: var(--brand); }
.slip-drop__icon .ico { margin-inline: auto; }
.slip-drop__title { font-weight: 700; font-size: 18px; color: var(--brand-ink); margin-bottom: 2px; }
.slip-drop__hint { font-size: 15px; color: #33506f; }
.slip-drop__types { font-size: 13px; color: var(--muted); margin-top: 4px; }
.slip-drop.has-file { border-style: solid; background: var(--ok-soft); border-color: var(--ok); }
.slip-drop.has-file .slip-drop__icon, .slip-drop.has-file .slip-drop__title { color: var(--ok); }

.slip-preview { margin-bottom: 16px; }
.slip-preview img {
  max-height: 300px; border-radius: var(--r); border: 1px solid var(--line);
  margin-inline: auto;
}
.slip-preview__name {
  display: block; text-align: center; font-size: 14px;
  color: var(--muted); margin-top: 8px;
}

/* ── ฟุตเตอร์ ─────────────────────────────────────────────── */
.footer { background: var(--navy); color: #b9cade; padding: clamp(40px, 6vw, 60px) 0 0; }
.footer__grid { display: grid; gap: 28px; }
@media (min-width: 620px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 36px; } }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: .02em; }
.footer a { color: #b9cade; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.footer ul li { display: flex; }
.footer ul li a, .footer ul li { min-height: 38px; display: flex; align-items: center; gap: 8px; }
.footer__logo img { height: 40px; width: auto; margin-bottom: 14px; }
.footer__about { font-size: 14px; line-height: 1.7; max-width: 32em; }
.footer__social { display: flex; gap: 8px; margin-top: 16px; }
.footer__social a {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #dce8f5;
}
.footer__social a:hover { background: var(--brand); color: #fff; }
.footer__bottom {
  margin-top: 36px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}

/* ── ปุ่มลอยมือถือ ────────────────────────────────────────── */
.floating-contact {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -2px 12px rgba(7,29,53,.08);
  padding-bottom: env(safe-area-inset-bottom);
}
.floating-contact a {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 56px; text-decoration: none; font-weight: 600; font-size: 15px;
  color: var(--ink);
}
.floating-contact a + a { border-inline-start: 1px solid var(--line); }
.floating-contact a.is-line { color: #06c755; }
.floating-contact a.is-call { color: var(--brand); }
@media (min-width: 760px) { .floating-contact { display: none; } }
/* เว้นที่ท้ายหน้าไม่ให้ปุ่มลอยทับเนื้อหา */
@media (max-width: 759px) { body { padding-bottom: 56px; } }

/* ── ตาราง ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
table.data th, table.data td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { background: var(--surface); font-weight: 600; font-size: 14px; color: var(--muted); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.wrap { white-space: normal; min-width: 180px; }

/* ── บทความ ───────────────────────────────────────────────── */
.post-grid { display: grid; gap: 18px; }
@media (min-width: 620px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .post-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.post-card__media { aspect-ratio: 16 / 9; background: var(--surface); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-body { font-size: 17px; line-height: 1.85; }
.post-body h3 { margin-top: 1.6em; }
.post-body ul { padding-inline-start: 1.3em; }
.post-body li { margin-bottom: .4em; }

/* ── คำถามที่พบบ่อย ───────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 18px 0; font-weight: 600; font-size: 17px; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ico { flex: none; margin-top: 4px; color: var(--brand); transition: transform .2s ease; }
.faq-item[open] summary .ico { transform: rotate(45deg); }
.faq-item__body { padding-bottom: 18px; color: var(--muted); max-width: 70ch; }

/* ── การจัดวางย่อย ────────────────────────────────────────── */
.split { display: grid; gap: 26px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.split--reverse > *:first-child { order: 2; }
@media (max-width: 859px) { .split--reverse > *:first-child { order: 0; } }
.split__media img { border-radius: var(--r-lg); width: 100%; }

.value-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 480px) { .value-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .value-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.value-card {
  padding: 20px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
}

/* การ์ดหมวดอุตสาหกรรม มีรูปด้านบน */
.value-card--photo { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.value-card__media {
  /* สัดส่วนตามไฟล์รูปจริงที่ลูกค้าส่งมา 256x186 ไม่บีบไม่ยืด */
  aspect-ratio: 256 / 186; background: var(--surface-2);
}
.value-card__media img { width: 100%; height: 100%; object-fit: cover; }
.value-card__body { padding: 14px 16px 18px; }
@media (min-width: 768px) { .value-card__body { padding: 16px 18px 20px; } }
.value-card .ico { color: var(--brand); margin-bottom: 10px; }
.value-card strong { display: block; font-size: 16px; margin-bottom: 4px; }
.value-card span { font-size: 14.5px; color: var(--muted); line-height: 1.65; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tabular { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 28px 0; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  text-decoration: none; color: var(--ink); font-weight: 500;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination [aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.breadcrumb { font-size: 14px; color: var(--muted); padding: 14px 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; display: inline-block; padding: 6px 0; }

/* รายการช่องทางติดต่อ ลิงก์ต้องกดโดนง่ายด้วยนิ้ว */
.contact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.contact-list li { display: flex; gap: 10px; }
.contact-list li .ico { margin-top: 6px; color: var(--brand); }
.contact-list a { display: inline-block; padding: 5px 0; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { margin-inline: 6px; color: var(--faint); }

.empty-state { text-align: center; padding: 56px 20px; }
.empty-state .ico { width: 44px; height: 44px; color: var(--faint); margin: 0 auto 14px; }

/* ── อนิเมชัน ─────────────────────────────────────────────── */
/* ทำแค่ 3 อย่าง: เนื้อหาปรากฏตอนเลื่อนถึง / การ์ดขยับตอนชี้ / ไม่มีอย่างอื่น */

/* ซ่อนไว้ก่อนเฉพาะตอนที่ JS ทำงานได้จริงเท่านั้น
   ถ้า JS พัง โหลดไม่ทัน หรือผู้ใช้ปิดไว้ เนื้อหาต้องมองเห็นได้ตามปกติ
   ห้ามให้อนิเมชันเป็นเหตุให้ลูกค้ามองไม่เห็นสินค้าเด็ดขาด */
.js .reveal { opacity: 0; transform: translateY(20px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .3, 1);
}
.reveal:nth-child(2) { transition-delay: .06s; }
.reveal:nth-child(3) { transition-delay: .12s; }
.reveal:nth-child(4) { transition-delay: .18s; }

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

/* ── พิมพ์ ────────────────────────────────────────────────── */
@media print {
  .header, .footer, .floating-contact, .promo-bar, .no-print { display: none !important; }
  body { padding-bottom: 0; }
}
