/* โปรเน็ตเสริม.com — design system ตาม Ref-img (design-spec.md) */

:root {
  --lime: #8ABF06;
  --lime-dark: #6FA004;
  --green-700: #254B04;
  --green-800: #1C3A03;
  --green-ink: #1A2B12;
  --hero-bg1: #F6F9F3;
  --hero-bg2: #EDF5E3;
  --icon-tile: #E9F1E0;
  --icon-green: #4D7518;

  /* สีประจำค่าย (brand colors) — ใช้กับป้าย/ปุ่ม/accent ของการ์ดโปรตามค่ายจริงเสมอ */
  --brand-ais: #78be20;      /* เขียว AIS */
  --brand-ais-dark: #4d8c14; /* เขียวเข้มสำหรับตัวหนังสือ/พื้นที่ต้อง contrast สูง */
  --brand-ais-deep: #3f7009; /* ปลาย gradient ป้าย ให้ตัวขาวคมขึ้น */
  --brand-true: #e60000;     /* แดง True/Dtac (ทรูควบรวมดีแทคแล้ว ใช้โทนแดงทรู) */
  --brand-true-dark: #b30000;

  /* หมวดสีเดิมของ design-spec (ยังใช้กับส่วนที่ไม่ใช่การ์ดโปร เช่น .win ในตารางเทียบ) */
  --cat-green: #3D6B04;
  --cat-green-price: #3F7009;
  --cat-green-g1: #4E820B;
  --cat-green-g2: #396302;
  --cat-blue: #0355E2;
  --cat-blue-price: #0452DC;
  --cat-blue-g1: #0E5EEC;
  --cat-blue-g2: #0451D8;
  --cat-purple: #8532DF;
  --cat-purple-price: #9040E0;
  --cat-purple-g1: #9A48E1;
  --cat-purple-g2: #7A2EDD;
  --cat-orange: #F5820A;
  --cat-orange-price: #F87800;
  --cat-orange-g1: #F8A63C;
  --cat-orange-g2: #EF8206;

  --bg: #F7F8FA;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --ink: #111111;
  --muted: #6B7280;
  --thead-bg: #F8F8F8;
  --pill-bg: #F3F4F6;
  --pill-ink: #374151;
  --footer-bg: #0C1013;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06);
  --maxw: 1200px;
  --page-padding: 20px; /* ระยะขอบซ้าย-ขวามาตรฐานของทุก section — คุมจุดเดียว */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style-position: inside; }
.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--page-padding); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== Header ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 38px; height: 38px; flex: none; }
.brand-text { line-height: 1.1; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.2px; }
.brand-name .b1 { color: #222123; }
.brand-name .b2 { color: var(--lime); }
.brand-sub { font-size: 11px; font-weight: 700; color: #4b5563; letter-spacing: .12em; }

.main-nav { display: none; }
.nav-cta { display: none; }
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: none; border: 0; cursor: pointer;
}
.menu-btn svg { display: block; }

@media (min-width: 1024px) {
  .header-inner { height: 72px; }
  .menu-btn { display: none; }
  .main-nav { display: flex; align-items: center; gap: 4px; }
  .main-nav > ul { display: flex; list-style: none; gap: 2px; }
  .main-nav a.nav-link {
    display: block; padding: 10px 13px; font-size: 15px; font-weight: 600; color: #374151;
    border-radius: 8px;
  }
  .main-nav a.nav-link:hover { color: var(--green-700); background: var(--hero-bg1); }
  .main-nav a.nav-link[aria-current="page"] { color: var(--green-700); background: var(--hero-bg1); }
  .has-drop { position: relative; }
  .has-drop > a.nav-link::after { content: " ▾"; font-size: 10px; color: var(--lime-dark); }
  .drop {
    position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0,0,0,.09);
    padding: 8px; list-style: none; display: none; z-index: 60;
  }
  .has-drop:hover .drop, .has-drop:focus-within .drop { display: block; }
  .drop a { display: block; padding: 8px 12px; font-size: 14px; font-weight: 500; border-radius: 8px; color: #374151; }
  .drop a:hover { background: var(--hero-bg1); color: var(--green-700); }
  .nav-cta {
    display: inline-block; background: linear-gradient(135deg, #92BE07, #8AB903);
    color: #fff; font-weight: 700; font-size: 15px; padding: 10px 22px; border-radius: 999px;
  }
  .nav-cta:hover { background: var(--lime-dark); }
}

/* mobile menu: แผง slide จากขวา + backdrop (ซ่อนด้วย transform/visibility ไม่ใช่ display:none — ลิงก์ยังอยู่ใน DOM) */
.menu-backdrop {
  position: fixed; inset: 0; z-index: 98; background: rgba(17, 24, 39, .42);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.menu-backdrop.open { opacity: 1; pointer-events: auto; }
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 99;
  width: min(320px, 86vw); background: #fff; overflow-y: auto;
  box-shadow: -10px 0 32px rgba(0, 0, 0, .14);
  transform: translateX(100%); visibility: hidden;
  transition: transform .22s ease, visibility 0s linear .22s;
}
.mobile-menu.open { transform: none; visibility: visible; transition: transform .22s ease; }
body.menu-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .mobile-menu, .menu-backdrop { transition: none; }
}
.mm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 8px 10px 20px; border-bottom: 1px solid var(--border);
}
.mm-title { font-weight: 800; font-size: 16px; color: var(--green-ink); }
.menu-close {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; color: #374151; border-radius: 10px;
}
.menu-close:hover { background: var(--hero-bg1); }
.mobile-menu ul { list-style: none; }
.mobile-menu a {
  display: flex; align-items: center; min-height: 44px; padding: 10px 20px;
  font-weight: 600; color: #1f2937; border-bottom: 1px solid #F3F4F6;
}
.mobile-menu a[aria-current="page"] {
  color: var(--green-700); background: var(--hero-bg1);
  box-shadow: inset 3px 0 0 var(--green-700); font-weight: 800;
}
.mobile-menu .group-label {
  display: flex; align-items: center; padding: 14px 20px 6px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  letter-spacing: .04em;
}
.mobile-menu .sub a { padding-left: 36px; font-weight: 500; font-size: 15px; }
.mobile-menu .sub-ais { border-left: 3px solid var(--brand-ais); }
.mobile-menu .sub-tmh { border-left: 3px solid var(--brand-true); }
@media (min-width: 1024px) { .mobile-menu, .menu-backdrop { display: none !important; } }

/* ===== แบนเนอร์กราฟิกประจำหน้า (SVG generate ตามข้อมูลหน้า) ===== */
.page-art { margin-top: 4px; }
.page-art svg, .article-art svg { display: block; width: 100%; height: auto; }
.article-art { margin-bottom: 18px; }

/* ===== Breadcrumb ===== */
.breadcrumb { padding-top: 14px; font-size: 14px; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.breadcrumb li + li::before { content: "›"; margin: 0 6px; color: #9CA3AF; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green-700); }
.breadcrumb [aria-current] { color: #374151; font-weight: 600; }

/* ===== Hero (หน้าแรก) ===== */
.hero { background: linear-gradient(120deg, var(--hero-bg1) 0%, #F7FBF3 55%, var(--hero-bg2) 100%); border-radius: 0 0 28px 28px; overflow: hidden; }
/* ใช้ padding-top/bottom แยก — ห้ามใช้ shorthand เพราะจะทับ padding-inline ของ .container (ตัวเดียวกัน) */
.hero-inner { display: grid; gap: 28px; padding-top: 40px; padding-bottom: 44px; align-items: center; }
.hero h1 { font-size: clamp(30px, 6vw, 48px); font-weight: 800; color: var(--green-ink); line-height: 1.25; letter-spacing: -.5px; }
.hero h1 .line2 { display: block; color: var(--green-700); }
.hero-sub { margin-top: 14px; color: #4B5563; font-size: 16px; }
.hero-sub strong { color: #374151; }
.btn-hero {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
  background: var(--green-700); color: #fff; font-weight: 700; font-size: 16px;
  padding: 13px 26px; border-radius: 999px; transition: background .15s;
}
.btn-hero:hover { background: var(--green-800); }
.hero-art { position: relative; min-height: 240px; display: flex; align-items: center; justify-content: center; }
.hero-ring {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(138,191,6,.28), rgba(138,191,6,.08) 62%, transparent 72%);
}
.hero-phone { position: relative; z-index: 1; width: 150px; height: 290px; background: linear-gradient(160deg, #1F2937, #111827); border-radius: 26px; border: 5px solid #374151; display: flex; align-items: center; justify-content: center; }
.hero-phone .screen { width: 100%; height: 100%; border-radius: 20px; background: linear-gradient(160deg, var(--hero-bg1), #DCEDC8 60%, #C5E1A5); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-weight: 800; color: var(--green-700); font-size: 15px; text-align: center; }
.hero-phone .screen .sig { font-size: 30px; }
.float-chip {
  position: absolute; z-index: 2; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 800;
  color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.18); animation: floaty 4s ease-in-out infinite;
}
.float-chip.c1 { background: var(--brand-ais-dark); top: 8%; right: 12%; animation-delay: 0s; }
.float-chip.c2 { background: var(--brand-true); top: 38%; right: 2%; animation-delay: 1.2s; }
.float-chip.c3 { background: var(--brand-true-dark); bottom: 12%; right: 16%; animation-delay: 2.2s; }
.float-chip.c4 { background: var(--green-700); top: 16%; left: 6%; animation-delay: .6s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; padding-top: 56px; padding-bottom: 60px; }
  .hero-art { min-height: 340px; }
  .hero-ring { width: 400px; height: 400px; }
}

/* ===== Quick links strip ===== */
.quicklinks { margin-top: -22px; position: relative; z-index: 2; }
.quicklinks ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quicklinks a {
  min-width: 0;
  display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow); padding: 14px 12px; text-align: center; height: 100%;
  transition: transform .15s, box-shadow .15s;
}
.quicklinks a:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.ql-icon {
  width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 14px; background: var(--icon-tile);
  display: flex; align-items: center; justify-content: center; color: var(--icon-green);
}
.ql-icon svg { width: 24px; height: 24px; }
.ql-title { display: block; overflow-wrap: anywhere; font-weight: 700; font-size: 14px; color: var(--ink); }
.ql-desc { display: block; overflow-wrap: anywhere; font-size: 12px; color: var(--muted); margin-top: 2px; }
@media (min-width: 700px) { .quicklinks ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .quicklinks ul { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ===== Sections ===== */
.section { padding: 40px 0 8px; }
.section-head-center { text-align: center; margin-bottom: 26px; }
.section-head-center h2 { font-size: clamp(22px, 4vw, 28px); font-weight: 800; color: var(--ink); }
.section-head-center p { color: var(--muted); margin-top: 6px; }

/* ===== Package table card ===== */
.pkg-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 14px 20px; }
.pkg-card-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 0 4px; }
.pkg-card-head h2, .pkg-card-head h1 { font-size: clamp(22px, 5vw, 28px); font-weight: 800; }
.pkg-updated { color: var(--muted); font-size: 14px; margin-top: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chip {
  display: inline-block; padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: #fff; color: #374151; border: 1px solid #D1D5DB; cursor: pointer;
}
.chip.active { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.chip:hover:not(.active) { border-color: var(--green-700); color: var(--green-700); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }
table.pkg-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.pkg-table thead th {
  background: var(--thead-bg); color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 10px 8px; text-align: center; white-space: nowrap;
}
.pkg-table thead th:first-child { border-radius: 10px 0 0 10px; text-align: left; padding-left: 12px; }
.pkg-table thead th:last-child { border-radius: 0 10px 10px 0; }
.pkg-table tbody tr { border-bottom: 1px solid #F0F1F3; }
.pkg-table tbody tr:last-child { border-bottom: 0; }
.pkg-table td { padding: 14px 8px; text-align: center; vertical-align: middle; }
.pkg-table td.td-pkg-cell, .pkg-table td.td-specs { text-align: left; }
.pkg-table thead th:nth-child(2) { text-align: left; }

.td-pkg { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.badge-tile {
  flex: none; width: 58px; min-height: 84px; border-radius: 12px; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-align: center; padding: 8px 4px; line-height: 1.2;
}
.badge-tile svg { width: 20px; height: 20px; }
.badge-tile .tag { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.5); padding: 2px 6px; border-radius: 999px; white-space: nowrap; }
/* ป้ายค่าย: AIS เขียว (ใช้โทน -dark เป็นพื้น ให้ตัวขาวผ่าน AA), ทรู/ดีแทค แดง */
.cat-ais .badge-tile { background: linear-gradient(160deg, var(--brand-ais-dark), var(--brand-ais-deep)); }
.cat-tmh .badge-tile { background: linear-gradient(160deg, var(--brand-true), var(--brand-true-dark)); }

.pkg-name { font-weight: 700; font-size: 16px; }
.cat-ais .price-val { color: var(--brand-ais-dark); }
.cat-tmh .price-val { color: var(--brand-true); }
.price-val { font-size: 25px; font-weight: 800; }

/* ป้าย "ขายดี/แนะนำ" — โทนทอง-ส้ม (ไม่ใช้แดงเพื่อไม่ชนสีค่ายทรู) */
.badge-hot {
  display: inline-block; margin-left: 8px; vertical-align: 2px;
  padding: 2px 10px 3px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .2px;
  color: #7C2D12; background: linear-gradient(135deg, #FFD54D, #F59E0B);
}

/* ===== icon spec list — รายละเอียดโปรในทุกการ์ด ===== */
.td-specs { min-width: 220px; }
.pkg-specs { list-style: none; display: grid; gap: 8px; }
.pkg-specs li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; line-height: 1.5; color: #1F2937; font-weight: 700; }
.pkg-specs li svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--icon-green); }
.pkg-specs li span { min-width: 0; }
.price-val .baht { font-size: 14px; color: #4B5563; font-weight: 600; margin-left: 3px; }
.price-tax { display: block; font-size: 11.5px; color: #9CA3AF; }

/* USSD pill + copy */
.ussd-pill {
  display: inline-flex; align-items: center; gap: 7px; background: var(--pill-bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px;
  font-size: 14px; font-weight: 700; color: var(--pill-ink); white-space: nowrap;
}
.ussd-pill .copy-btn { background: none; border: 0; cursor: pointer; color: var(--muted); display: inline-flex; padding: 2px; }
.ussd-pill .copy-btn:hover { color: var(--green-700); }
.ussd-pill .copy-btn svg { width: 15px; height: 15px; }
.ussd-pill.copied { border-color: var(--lime); color: var(--green-700); }

/* CTA */
.td-cta { min-width: 150px; }
.btn-apply {
  display: block; width: 100%; text-align: center; color: #fff; font-weight: 700; font-size: 15px;
  padding: 9px 14px; border-radius: 9px; margin-top: 7px; transition: filter .15s;
}
.btn-apply:hover { filter: brightness(1.12); }
.cat-ais .btn-apply { background: var(--brand-ais-dark); }
.cat-tmh .btn-apply { background: var(--brand-true); }

/* Desktop CTA = outline 2 บรรทัด ตามรูป */
@media (min-width: 1024px) {
  .btn-apply { background: none !important; border: 1.5px solid; padding: 8px 14px; line-height: 1.35; }
  .btn-apply .cta-code { display: block; font-size: 12.5px; font-weight: 600; opacity: .85; }
  .cat-ais .btn-apply { color: var(--brand-ais-dark); border-color: var(--brand-ais-dark); background: #F6FBEF !important; }
  .cat-tmh .btn-apply { color: var(--brand-true); border-color: var(--brand-true); background: #FEF6F5 !important; }
  .btn-apply:hover { filter: none; }
  .cat-ais .btn-apply:hover { background: #EBF6DC !important; }
  .cat-tmh .btn-apply:hover { background: #FDEBE9 !important; }
}

/* เส้น accent สีค่ายบนการ์ด/แถวโปร */
.pkg-table tbody tr.cat-ais { border-left: 3px solid var(--brand-ais); }
.pkg-table tbody tr.cat-tmh { border-left: 3px solid var(--brand-true); }
@media (max-width: 1023.9px) {
  .btn-apply .cta-code { display: none; }
}

.table-foot { text-align: center; margin-top: 18px; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 26px; border-radius: var(--radius-md);
  border: 1.5px solid #CBD5C0; color: var(--green-700); font-weight: 700; font-size: 15px; background: #fff;
}
.btn-outline:hover { border-color: var(--green-700); background: var(--hero-bg1); }
.btn-outline.wide { display: flex; justify-content: center; width: 100%; }

/* ===== Trust box (mobile ref) ===== */
.trust-box {
  display: grid; gap: 10px; background: #fff; border: 1px solid #DDEACB; border-radius: var(--radius-md);
  padding: 14px 16px; margin-top: 16px; font-size: 14px;
}
.trust-box .t-main { font-weight: 800; color: var(--cat-green); }
.trust-box .t-main small { display: block; font-weight: 400; color: #4B5563; font-size: 13px; }
.trust-box ul { list-style: none; color: #374151; display: grid; gap: 5px; font-size: 13.5px; }
.trust-box li::before { content: "✓ "; color: var(--cat-green); font-weight: 800; }
@media (min-width: 768px) { .trust-box { grid-template-columns: 1.2fr .8fr; align-items: center; } }

/* ===== Why cards ===== */
.why-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.why-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow); padding: 20px 18px; }
.why-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--icon-tile); color: var(--icon-green); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.why-icon svg { width: 22px; height: 22px; }
.why-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.why-card p { font-size: 14px; color: var(--muted); }
@media (min-width: 640px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .why-grid { grid-template-columns: repeat(4, 1fr); } }

/* ===== Promo cards ===== */
.promo-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.promo-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; color: #fff;
  padding: 26px 22px 22px; min-height: 168px; display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.promo-card .p-kicker { font-size: 14px; font-weight: 600; opacity: .92; }
.promo-card .p-title { font-size: 24px; font-weight: 800; letter-spacing: .2px; }
.promo-card .p-sub { font-size: 14px; opacity: .92; }
.promo-card .p-price { font-size: 15px; margin-top: 2px; }
.promo-card .p-price strong { color: #CDE84A; font-size: 22px; font-weight: 800; }
.btn-promo {
  align-self: flex-start; margin-top: 12px; background: var(--lime); color: #12300B;
  font-weight: 800; font-size: 13.5px; padding: 8px 18px; border-radius: 999px;
}
.btn-promo:hover { background: #9BD40B; }
.promo-1 { background: linear-gradient(135deg, #1C3A03 0%, #2E5A08 55%, #244725 100%); }
.promo-2 { background: linear-gradient(140deg, #0B0F0A 0%, #16220D 70%, #223311 100%); }
.promo-3 { background: linear-gradient(135deg, #7F1D1D 0%, var(--brand-true-dark) 55%, var(--brand-true) 100%); }

/* จุดสีบอกค่าย (ใช้ในเมนู/หัวตารางเทียบ/ชิปเลือกค่าย) */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.dot-ais { background: var(--brand-ais); }
.dot-tmh { background: var(--brand-true); }
.promo-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(138,191,6,.35), transparent);
}
.promo-3::after { background: radial-gradient(closest-side, rgba(255,255,255,.22), transparent); }
@media (min-width: 900px) { .promo-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== Article cards ===== */
.article-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.article-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.09); }
/* ภาพ thumbnail: สูงตาม ratio จริงของภาพ (จาก width/height attr) — เห็นเต็มใบเสมอ ไม่ crop */
.article-card img { width: 100%; height: auto; }
.article-card .a-body { padding: 13px 14px 15px; }
.article-card h3 { font-size: 15.5px; font-weight: 700; line-height: 1.45; }
.article-card .a-sub { color: var(--muted); font-size: 13px; margin-top: 5px; }
.section-head-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-head-row h2 { font-size: clamp(22px, 4vw, 28px); font-weight: 800; }
.section-head-row .see-all { color: var(--green-700); font-weight: 700; font-size: 14.5px; }
@media (min-width: 640px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .article-grid { grid-template-columns: repeat(4, 1fr); } }

/* ===== FAQ ===== */
.faq-wrap { max-width: 860px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 10px; overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 15px 44px 15px 18px; font-weight: 700; font-size: 15.5px;
  position: relative; color: #1F2937;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; background: var(--icon-tile); color: var(--green-700);
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { color: var(--green-700); }
.faq-a { padding: 0 18px 15px; color: #374151; font-size: 15px; }
.faq-a a { color: var(--cat-blue); font-weight: 600; text-decoration: underline; }

/* ===== Compare table ===== */
.cmp-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 14.5px; }
.cmp-table th, .cmp-table td { border: 1px solid var(--border); padding: 10px 12px; text-align: center; }
.cmp-table thead th { background: var(--green-700); color: #fff; font-weight: 700; }
.cmp-table tbody th { background: var(--thead-bg); font-weight: 700; text-align: left; }
.cmp-table .win { color: var(--cat-green-price); font-weight: 800; }

/* ===== Article page ===== */
.article-page { max-width: 800px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 26px 20px 34px; }
.article-page h1 { font-size: clamp(24px, 5vw, 32px); font-weight: 800; line-height: 1.35; margin-bottom: 8px; }
.article-page .a-meta { color: var(--muted); font-size: 14px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.article-body h2 { font-size: 21px; font-weight: 800; margin: 26px 0 10px; color: var(--green-800); }
.article-body h3 { font-size: 17px; font-weight: 700; margin: 18px 0 8px; }
.article-body p { margin: 10px 0; color: #374151; }
.article-body ul, .article-body ol { margin: 10px 0 10px 6px; color: #374151; }
.article-body li { margin: 5px 0; }
.article-body a { color: var(--cat-blue); font-weight: 600; text-decoration: underline; }
.article-body img.article-img { border-radius: var(--radius-md); margin: 16px auto; }
.article-body .table-wrap { margin: 14px 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 480px; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.article-body thead th { background: var(--thead-bg); }
.dial-code {
  display: inline-block; background: var(--pill-bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 1px 8px; font-weight: 700; color: var(--pill-ink); white-space: nowrap;
}
@media (min-width: 768px) { .article-page { padding: 36px 40px 44px; } }

/* tools (เบอร์มงคล) */
.tool-box { background: var(--hero-bg1); border: 1px solid #DDEACB; border-radius: var(--radius-md); padding: 18px; margin: 18px 0; }
.tool-box label { font-weight: 700; display: block; margin-bottom: 6px; }
.tool-box select, .tool-box input {
  font: inherit; padding: 9px 12px; border: 1px solid #CBD5C0; border-radius: var(--radius-sm);
  width: 100%; max-width: 340px; background: #fff;
}
.tool-box button {
  font: inherit; font-weight: 700; color: #fff; background: var(--green-700); border: 0; cursor: pointer;
  padding: 10px 22px; border-radius: 999px; margin-top: 10px;
}
.tool-box button:hover { background: var(--green-800); }
.tool-result { margin-top: 12px; font-size: 15px; background: #fff; border-radius: var(--radius-sm); padding: 12px 14px; border: 1px solid var(--border); }

/* ===== Page hero (หน้ารอง) ===== */
.page-head { padding-top: 6px; padding-bottom: 18px; }
.page-head h1 { font-size: clamp(26px, 5.5vw, 34px); font-weight: 800; }
.page-head .pkg-updated { margin-top: 4px; }

/* sticky sub menu (hub pages) */
.subnav { position: sticky; top: 64px; z-index: 40; background: rgba(247,248,250,.96); backdrop-filter: blur(4px); padding: 10px 0; margin-bottom: 6px; }
.subnav ul { display: flex; gap: 8px; list-style: none; overflow-x: auto; padding-bottom: 2px; }
@media (max-width: 767.9px) {
  /* แถบชิปเลื่อนแนวนอน: ขยาย full-bleed ให้เนื้อหาตัดที่ขอบจอจริง (สื่อว่าเลื่อนได้) แต่ชิปแรกยังเริ่มที่ระยะมาตรฐาน */
  .subnav ul { margin-inline: calc(-1 * var(--page-padding)); padding-inline: var(--page-padding); }
}
@media (min-width: 1024px) { .subnav { top: 72px; } }

/* ===== Footer ===== */
.site-footer { background: var(--footer-bg); color: #B7BCC3; margin-top: 48px; font-size: 14px; }
.footer-grid { display: grid; gap: 26px; padding-top: 38px; padding-bottom: 26px; grid-template-columns: 1fr; }
.footer-brand .brand-name { font-size: 19px; }
.footer-brand .brand-name .b1 { color: #fff; }
.footer-brand p { margin-top: 10px; line-height: 1.7; color: #9CA3AF; max-width: 300px; }
.site-footer h3 { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a:hover { color: var(--lime); }
.footer-bottom { border-top: 1px solid #1F2937; padding-top: 16px; padding-bottom: 16px; text-align: center; color: #6B7280; font-size: 13px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }

/* ===== responsive table columns ===== */
/* mobile: ซ่อนคอลัมน์ราคาแยก + หัว "สมัคร" ใช้คอลัมน์เดียวซ้อน ราคา→pill→ปุ่ม ตามรูปมือถือ */
.desktop-only { display: none; }
@media (max-width: 767.9px) {
  /* ===== มือถือ: ตารางแพ็กเกจ → การ์ดแนวตั้ง (HTML ชุดเดิม ไม่มี scroll แนวนอน) ===== */
  .pkg-table td.desktop-only { display: none; }
  .table-wrap { overflow: visible; border-radius: 0; }
  table.pkg-table { display: block; min-width: 0; }
  .pkg-table thead { display: none; }
  .pkg-table tbody { display: block; }
  .pkg-table tbody tr {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "price"
      "specs"
      "code"
      "apply";
    position: relative;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 14px;
    margin-bottom: 16px;
  }
  .pkg-table tbody tr:last-child { margin-bottom: 0; }
  .pkg-table td { display: block; padding: 0; text-align: left; }
  .pkg-table td.td-cta { display: contents; }

  /* 1) ชื่อโปร — เด่นสุด */
  .td-pkg-cell { grid-area: name; padding-right: 78px; }
  .td-pkg { min-width: 0; gap: 0; }
  .pkg-name { font-size: 17.5px; font-weight: 800; line-height: 1.45; }
  .pkg-note { font-size: 12.5px; }
  /* ป้ายหมวด → ริบบิ้นห้อยมุมขวาบนของการ์ด */
  .badge-tile {
    position: absolute; top: 0; right: 14px;
    width: auto; min-height: 0; flex-direction: row; gap: 5px;
    padding: 5px 10px 6px; border-radius: 0 0 9px 9px;
    font-size: 11px;
  }
  .badge-tile svg { width: 13px; height: 13px; }
  .badge-tile .tag { background: none; border: 0; padding: 0; white-space: nowrap; }

  /* 2) ราคา (สีหมวด ใหญ่) */
  .td-cta .m-price { grid-area: price; display: block; margin: 6px 0 0; }
  .m-price .price-val { font-size: 27px; }

  /* 3) icon list รายละเอียดโปร */
  .pkg-table td.td-specs { grid-area: specs; min-width: 0; margin-top: 6px; }

  /* 4) รหัส USSD — แถบคูปองขอบประ mono อ่านชัด + ปุ่ม copy */
  .ussd-pill {
    display: flex; width: 100%; justify-content: space-between; align-items: center;
    background: var(--hero-bg1);
    border: 1.5px dashed #B4CC96;
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    font-family: ui-monospace, 'Cascadia Mono', Consolas, 'Noto Sans Thai', monospace;
    font-size: 17px; font-weight: 700; letter-spacing: .3px;
    color: var(--green-800);
  }
  .ussd-pill .copy-btn { padding: 8px; margin: -8px -6px -8px 0; color: var(--icon-green); }
  .ussd-pill .copy-btn svg { width: 20px; height: 20px; }
  .ussd-pill.copied { background: var(--hero-bg2); }
  .td-cta .ussd-pill { grid-area: code; margin: 12px 0 10px; }

  /* 5) ปุ่มสมัคร — เต็มกว้าง แตะง่าย (≥48px) */
  .td-cta .btn-apply {
    grid-area: apply;
    display: flex; align-items: center; justify-content: center;
    min-height: 48px; margin-top: 0; padding: 12px 14px;
    font-size: 16.5px; border-radius: 10px;
  }

  /* ===== มือถือ: ตารางเปรียบเทียบ/บทความ/รหัสเช็ค → แถวการ์ดซ้อน (label จาก data-label) ===== */
  table.stack-table { display: block; min-width: 0 !important; font-size: 14.5px; }
  .stack-table thead { display: none; }
  .stack-table tbody { display: block; }
  .stack-table tbody tr {
    display: block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 12px 14px;
    margin-bottom: 12px;
  }
  .stack-table tbody tr:last-child { margin-bottom: 0; }
  .stack-table tbody tr > :first-child {
    display: block; text-align: left; background: none; border: 0;
    padding: 0 0 8px; margin-bottom: 8px;
    font-size: 15.5px; font-weight: 700;
    border-bottom: 1px dashed var(--border);
  }
  .stack-table tbody tr > :not(:first-child) {
    display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
    border: 0; padding: 5px 0; text-align: right;
  }
  .stack-table td[data-label]:not(:first-child)::before {
    content: attr(data-label);
    flex: none; max-width: 46%;
    color: var(--muted); font-size: 13px; font-weight: 600; text-align: left;
  }

  /* หน้าเช็คเบอร์: การ์ดรหัส — คูปองเต็มกว้าง + ปุ่มโทรเต็มกว้าง */
  .codes-table td::before { content: none !important; }
  .codes-table tbody tr > :not(:first-child) { display: block; text-align: left; padding: 0; }
  .codes-table .ussd-pill { margin: 8px 0 10px; }
  .codes-table .btn-dial {
    display: flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 12px 14px; font-size: 16px; border-radius: 10px;
  }
}
.th-cta { text-align: center; }
.td-cta { min-width: 185px; }
.td-cta .m-price { display: block; margin-bottom: 6px; }
.td-cta .ussd-pill { margin-bottom: 0; }
@media (min-width: 1024px) {
  .desktop-only { display: table-cell; }
  .td-cta .m-price { display: none; }
  .td-cta .ussd-pill { display: none; } /* desktop: โค้ดแสดงในปุ่ม outline ตามรูป */
  .td-cta { min-width: 170px; }
}
.pkg-card-head .see-all { color: var(--green-700); font-weight: 700; font-size: 14.5px; align-self: center; }
.pkg-card-head .see-all:hover { text-decoration: underline; }

/* ปุ่มโทร/กดรหัส (หน้าเช็คเบอร์) */
.btn-dial {
  display: inline-block; background: var(--cat-green); color: #fff; font-weight: 700; font-size: 14.5px;
  padding: 8px 20px; border-radius: 9px; white-space: nowrap;
}
.btn-dial:hover { background: var(--green-700); }

/* ===== helpers ===== */
.hidden-row { display: none !important; }
.mt-0 { margin-top: 0; }
.section-gap { height: 8px; }

/* long-tail v2: ลิงก์รายละเอียดใต้ชื่อโปรในตาราง */
.pkg-detail-link{display:inline-block;margin-top:4px;font-size:13px;font-weight:600;color:var(--cat-blue)}
.pkg-detail-link:hover{text-decoration:underline}
