/* ================================================================
   DongKaichon — สไตล์ทั้งหมด (พื้นดำ เส้นขอบส้ม ตามหน้าเว็บ Wix ของลูกค้า)
   ================================================================ */
:root {
  --bg: #000;
  --bg-2: #0b0b0b;
  --surface: #121212;
  --surface-2: #1b1b1b;
  --line: #2b2b2b;
  --orange: #ff8a00;
  --orange-2: #ffae3d;
  --orange-dark: #d96f00;
  --text: #ffffff;
  --muted: #b9b9b9;
  --radius: 14px;
  --header-h: 68px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: 'Kanit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-logo: 'Playfair Display', Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 300; font-size: 16px; line-height: 1.6; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; }
p { margin: 0; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--orange-2); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 300; padding: 8px 14px; border-radius: 8px; background: var(--orange); color: #000; transform: translateY(-160%); transition: transform .2s; }
.skip-link:focus { transform: none; }

/* โลโก้: DongKaichon ตัวมีเชิง "Dong" สีส้ม + ดงไก่ชน ตัวเอียง */
.logo { display: inline-grid; justify-items: start; line-height: 1; }
.logo-en { font-family: var(--font-logo); font-weight: 700; letter-spacing: -.01em; color: #fff; }
.logo-en em { font-style: normal; color: var(--orange); }
.logo-th em { font-style: inherit; color: var(--orange); }
.logo-th { font-weight: 700; font-style: italic; color: #fff; }
.logo-big .logo-th { font-size: clamp(2.6rem, 6vw, 4.2rem); }
.logo-big .logo-en { font-size: clamp(2.8rem, 7vw, 4.8rem); }

/* ----- ปุ่ม ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 20px; border-radius: 10px; border: 1.5px solid transparent;
  font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .25s, border-color .25s, color .25s, transform .2s, box-shadow .25s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: #fff; box-shadow: 0 8px 20px -10px var(--orange); }
.btn-primary:hover { box-shadow: 0 10px 26px -8px var(--orange); }
.btn-outline { border-color: var(--orange); color: var(--orange); background: rgba(0, 0, 0, .35); }
.btn-outline:hover { background: var(--orange); color: #000; }
.btn-ghost { border-color: var(--line); background: var(--surface-2); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-2); }
.btn-glass { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .24); }
.btn-line { background: #06c755; color: #fff; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .92rem; }
.btn-lg { min-height: 54px; padding: 10px 26px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px 12px; }
.btn-ghost.is-on { color: #ff5a6e; border-color: #ff5a6e; }

/* ----- แถบบน ----- */
.site-header { position: sticky; top: 0; z-index: 90; background: rgba(0, 0, 0, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.hdr { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.hdr-logo { text-decoration: none; font-size: 1.45rem; }
.hdr-nav { display: flex; gap: 2px; margin-inline: auto; }
.hdr-nav a { padding: 8px 11px; border-radius: 8px; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: transparent; font-weight: 500; font-size: .95rem; white-space: nowrap; transition: color .2s, text-decoration-color .2s; }
.hdr-nav a:hover, .hdr-nav a.is-current, .hdr-nav a[aria-current] { color: var(--orange-2); text-decoration-color: var(--orange); }
.hdr-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.hdr-nav + .hdr-tools { margin-left: 0; }
.hdr-icon { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: background-color .2s, color .2s; }
.hdr-icon:hover { background: var(--surface-2); color: var(--orange-2); }
.hdr-icon .icon { width: 22px; height: 22px; }
.badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--orange); color: #000; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.badge.dot { min-width: 9px; width: 9px; height: 9px; top: 8px; right: 9px; padding: 0; background: #ff4d4f; }
.hdr-cta { margin-left: 6px; }
.hdr-user { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }
.hdr-user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--orange-2), var(--orange-dark)); color: #000; font-weight: 700; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }
.hdr-burger { display: none; }

/* ----- หน้าหลัก ----- */
.hero { position: relative; min-height: clamp(420px, 62vh, 620px); display: grid; align-items: center; background-size: cover; background-position: center right; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, .1)), linear-gradient(0deg, #000 0%, transparent 25%); }
.hero-inner { padding-block: 60px; }
.hero-logo { margin-bottom: 18px; }
.hero-tag { color: var(--orange); font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 600; }
.hero-sub { margin: 6px 0 34px; font-size: 1rem; }

/* ตัวเลข */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: -10px; position: relative; z-index: 2; }
.stat { display: grid; justify-items: center; gap: 2px; padding: 16px 10px 14px; border: 1.5px solid var(--orange); border-radius: 12px; background: var(--bg-2); text-align: center; }
.stat-ic { font-size: 2rem; line-height: 1.1; }
.stat b { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.stat span:last-child { color: var(--muted); font-size: clamp(.95rem, 1.6vw, 1.2rem); }

/* หัวข้อ */
.section { padding-block: clamp(48px, 7vw, 80px); }
.sec-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-title { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 600; }
.sec-title small { font-size: .95rem; font-weight: 500; margin-left: 8px; }
.sec-title-lg { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.sec-title em { font-style: normal; color: var(--orange); }
.sec-sub { margin: 8px 0 26px; color: var(--muted); font-size: 1.15rem; }
.sec-center { text-align: center; }
.sec-flame { display: flex; align-items: center; gap: 10px; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 22px; }
.sec-flame .icon { color: var(--orange); width: 1.1em; height: 1.1em; }
.eyebrow { color: var(--orange); font-size: 1.1rem; font-weight: 500; text-align: center; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px auto; color: var(--orange); }
.divider::before, .divider::after { content: ''; width: 70px; height: 1.5px; background: var(--orange); opacity: .7; }
.divider .icon { width: 30px; height: 30px; }

/* ตาราง */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* การ์ดไก่ */
.rcard { position: relative; display: flex; flex-direction: column; border: 1.5px solid var(--orange); border-radius: 12px; background: var(--bg-2); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.rcard:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px var(--orange); }
.rcard-featured { padding: 8px; border-width: 2px; }
.rcard-img { position: relative; display: block; padding: 0; border: 0; background: var(--surface-2); cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; }
.rcard-featured .rcard-img { border-radius: 6px; aspect-ratio: 5 / 4; }
.rcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.rcard:hover .rcard-img img { transform: scale(1.06); }
.rcard-tag { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: rgba(0, 0, 0, .7); color: var(--orange-2); font-size: .74rem; font-weight: 500; }
.rcard-fav { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; transition: transform .2s, color .2s; }
.rcard-featured .rcard-fav { top: 16px; right: 16px; }
.rcard-fav:hover { transform: scale(1.1); }
.rcard-fav.is-on { color: #ff5a6e; }
.rcard-body { display: grid; gap: 4px; padding: 12px 10px 10px; }
.rcard-featured .rcard-body { padding: 10px 2px 2px; }
.rcard-body h3 { font-size: 1.2rem; font-weight: 500; }
.rcard-loc { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.rcard-loc .icon { color: var(--orange); width: 1em; height: 1em; }
.rcard-price { color: var(--orange); font-weight: 500; font-size: 1.1rem; }
.rcard-featured .rcard-price { color: var(--text); font-size: .95rem; }
.rcard-more { margin-top: 4px; padding: 3px 8px; border: 1.5px solid var(--orange); border-radius: 6px; background: none; color: var(--text); font-weight: 500; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; transition: background-color .2s, color .2s; }
.rcard-more:hover { background: var(--orange); color: #000; }
.rcard-featured .rcard-more { justify-self: start; border: 0; padding: 0; color: var(--orange); }
.rcard-featured .rcard-more:hover { background: none; color: var(--orange-2); }

/* ค้นหา + ตัวกรอง */
.search { display: flex; gap: 10px; max-width: 760px; padding: 8px; border-radius: 18px; background: var(--surface-2); }
.search-box { display: flex; align-items: center; gap: 10px; flex: 1; padding-inline: 10px; }
.search-box .icon { width: 24px; height: 24px; color: var(--muted); }
.search-box input { flex: 1; min-width: 0; padding: 10px 0; border: 0; background: none; outline: 0; font-size: 1.1rem; }
.search .btn { border-radius: 12px; min-width: 110px; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 18px 0 6px; }
.select { display: grid; gap: 2px; font-size: .82rem; color: var(--muted); }
.select select { min-width: 150px; min-height: 40px; padding: 6px 30px 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23ff8a00' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center / 18px; color: var(--text); appearance: none; -webkit-appearance: none; cursor: pointer; }
.select select:hover, .select select:focus { border-color: var(--orange); }
.result-info { margin: 6px 0 14px; color: var(--muted); font-size: .92rem; }
.pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 30px; }
.pager button { min-width: 40px; height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--orange); font-size: 1.05rem; cursor: pointer; }
.pager button:first-child, .pager button:last-child { color: var(--text); }
.pager button:hover:not(:disabled) { background: var(--surface-2); }
.pager button[aria-current] { background: var(--orange); color: #000; font-weight: 600; }
.pager button:disabled { opacity: .35; cursor: default; }
.pager span { color: var(--orange); }
.empty { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 18px 0; }
.empty .icon { color: var(--orange); }
.empty-wide { grid-column: 1 / -1; justify-content: center; padding: 40px 0; }

/* ลงขายไก่ */
.sell-band { position: relative; isolation: isolate; padding-block: clamp(40px, 6vw, 64px); background-size: cover; background-position: right center; }
.sell-band::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .92) 30%, rgba(0, 0, 0, .45) 65%, rgba(0, 0, 0, .1)); }
.sell-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.sell-title em { font-style: italic; color: var(--orange); font-weight: 700; }
.sell-sub { margin: 6px 0 20px; color: #ddd; }
.sell-points { display: grid; grid-template-columns: .8fr 1fr 1fr 1.1fr; max-width: 560px; margin: 0; padding: 10px; list-style: none; border: 1.5px solid var(--orange); border-radius: 10px; background: rgba(0, 0, 0, .55); }
.sell-points li { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 6px; text-align: center; font-size: .78rem; color: #ccc; }
.sell-points li + li { border-left: 1px solid rgba(255, 138, 0, .45); }
.sell-points .icon { width: 30px; height: 30px; color: var(--orange); }
.sell-points b { color: #fff; font-size: .9rem; font-weight: 500; }
.sell-free b { color: var(--orange); font-size: 1.15rem; }
.sell-free strong { color: var(--orange); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.sell-free strong small { color: #fff; font-size: .9rem; }
.sell-cta { margin-top: 22px; }
.sell-cta .icon:first-child { width: 30px; height: 30px; }
.sell-note { margin-top: 12px; font-size: .9rem; color: #ddd; }

.steps-band { border-block: 1.5px solid var(--orange); padding-block: 26px 30px; background: var(--bg); }
.steps-title { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 20px; font-size: 1.15rem; }
.steps-title::before, .steps-title::after { content: ''; width: 60px; height: 1.5px; background: var(--orange); }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border: 1px solid #3a3a3a; border-radius: 8px; background: var(--bg-2); }
.steps .icon { width: 34px; height: 34px; color: var(--orange-2); }
.steps b { display: flex; align-items: center; gap: 4px; font-weight: 500; }
.steps b i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); color: #000; font-size: .72rem; font-style: normal; font-weight: 700; }
.steps span { display: block; color: var(--muted); font-size: .85rem; line-height: 1.4; }

/* คลังความรู้ */
.learn {
  display: grid; align-content: center; gap: 8px; min-height: 150px; padding: 18px; text-align: left;
  border: 1.5px solid var(--orange); border-radius: 8px; background-size: cover; background-position: center right; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.learn:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px var(--orange); }
.learn-title { display: flex; align-items: center; gap: 10px; }
.learn-title .icon { width: 34px; height: 34px; color: var(--orange); }
.learn-title b { font-size: 1.4rem; font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.learn-text { max-width: 60%; font-size: 1rem; line-height: 1.45; }
.learn-more { display: inline-flex; align-items: center; gap: 10px; color: var(--orange); font-weight: 500; text-decoration: underline; }

/* บทความ */
.acard { display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); text-align: left; cursor: pointer; transition: transform .3s var(--ease), border-color .3s; }
.acard:hover { transform: translateY(-4px); border-color: var(--orange); }
.acard-img { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.acard-img img { width: 100%; height: 100%; object-fit: cover; }
.acard-cat { position: absolute; top: 8px; left: 8px; padding: 1px 12px; border-radius: 6px; background: var(--orange); color: #000; font-size: .82rem; font-weight: 600; }
.acard-body { display: grid; gap: 6px; padding: 12px; }
.acard-body > b { font-size: 1.1rem; font-weight: 500; line-height: 1.35; }
.acard-body > span:not(.acard-meta) { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.acard-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: .85rem; }
.acard-meta span { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.disclaimer { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 26px; }
.disclaimer p { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--orange); border-radius: 10px; font-size: .9rem; color: #ddd; }
.disclaimer p .icon { width: 26px; height: 26px; color: var(--orange); }

/* ทำไมต้อง DongKaichon */
.why { position: relative; isolation: isolate; padding-block: clamp(48px, 7vw, 80px); background-size: cover; background-position: center right; }
.why::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .85) 25%, rgba(0, 0, 0, .3) 60%, rgba(0, 0, 0, .15)); }
.why-inner { position: relative; }
.why-title { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.why-title .logo-en { font-size: 1.1em; }
.why-sub { margin: 14px 0 34px; font-size: 1.1rem; }
.why-list { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.why-list li { display: flex; align-items: center; gap: 12px; }
.why-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--orange); color: #000; }
.why-ic .icon { width: 30px; height: 30px; }
.why-list b { display: block; font-size: 1.1rem; font-weight: 500; }
.why-list span { font-size: .9rem; color: #ddd; }
.why-cta { position: absolute; right: var(--gutter); bottom: 0; min-width: 160px; }

/* ท้ายเว็บ */
.site-footer { padding-block: 48px 30px; background: #000; text-align: center; }
.ftr-logo { text-decoration: none; display: inline-block; }
.ftr-logo .logo { justify-items: center; }
.ftr-tag { margin-top: 10px; font-size: clamp(1.05rem, 2.4vw, 1.4rem); }
.ftr-line { display: block; width: 120px; height: 1.5px; margin: 14px auto 28px; background: var(--orange); }
.ftr-contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 42px; margin: 0 0 28px; padding: 0; list-style: none; text-align: left; }
.ftr-contacts a { display: flex; align-items: flex-start; gap: 10px; text-decoration: none; }
.ftr-contacts .icon { width: 30px; height: 30px; }
.ftr-contacts span { display: grid; line-height: 1.3; font-size: .9rem; color: #ccc; max-width: 160px; }
.ftr-contacts b { color: #fff; font-size: 1.05rem; font-weight: 500; }
.c-line { color: #06c755; } .c-fb { color: #1877f2; } .c-tt { color: #fff; } .c-orange { color: var(--orange); }
.ftr-copy { color: #bbb; font-size: .9rem; }
.ftr-copy small { color: #777; }

/* ----- แชตบอต ----- */
.chat { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 95; display: grid; justify-items: end; gap: 10px; }
.chat-hint { position: relative; max-width: 220px; padding: 10px 30px 10px 12px; border-radius: 12px; background: #fff; color: #222; font-size: .85rem; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); animation: hint 3s ease-in-out infinite; }
.chat-hint button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: #444; cursor: pointer; }
@keyframes hint { 50% { transform: translateY(-4px); } }
.chat-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 18px; border: 0; border-radius: 999px; background: #2563eb; color: #fff; font-weight: 500; cursor: pointer; box-shadow: 0 10px 24px -8px rgba(37, 99, 235, .8); }
.chat.is-open .chat-btn { display: none; }
.chat-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; width: min(360px, calc(100vw - 32px)); height: min(520px, calc(100svh - 120px)); border: 1.5px solid var(--orange); border-radius: 16px; background: var(--surface); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.chat-panel header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(90deg, var(--orange-dark), var(--orange)); color: #000; }
.chat-panel header small { display: block; font-size: .78rem; opacity: .8; }
.chat-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #000; color: var(--orange); }
.chat-x { margin-left: auto; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .15); color: #000; cursor: pointer; }
.chat-log { display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow-y: auto; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: .92rem; line-height: 1.5; }
.msg-bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg-me { align-self: flex-end; background: var(--orange); color: #000; border-bottom-right-radius: 4px; }
.msg-link { display: inline-block; margin-top: 6px; color: var(--orange-2); font-weight: 500; }
.chat-quick { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
.chat-quick button { flex: none; padding: 5px 12px; border: 1px solid var(--orange); border-radius: 999px; background: none; color: var(--orange-2); font-size: .82rem; cursor: pointer; }
.chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); outline: 0; }
.chat-form input:focus { border-color: var(--orange); }
.chat-form button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--orange); color: #000; cursor: pointer; }

/* ----- กล่องข้อความ ----- */
.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100svh - 32px); padding: 26px; border: 1.5px solid var(--orange); border-radius: 16px; background: var(--surface); color: var(--text); overflow-y: auto; }
.modal::backdrop { background: rgba(0, 0, 0, .75); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-sm { width: min(440px, calc(100vw - 24px)); }
.modal-md { width: min(760px, calc(100vw - 24px)); }
.modal-lg { width: min(1000px, calc(100vw - 24px)); }
.modal-x { position: sticky; top: -12px; float: right; margin: -12px -12px 0 0; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: #fff; cursor: pointer; }
.modal-x:hover { border-color: var(--orange); color: var(--orange-2); }
.modal-title { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; margin-bottom: 14px; }
.modal-title .icon { color: var(--orange); }
.modal-sub { margin: -8px 0 16px; color: var(--muted); }
.modal-foot { margin-top: 16px; text-align: center; color: var(--muted); font-size: .9rem; }
.modal-foot a { color: var(--orange-2); }
.mini-list, .notice-list, .user-menu { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.mini-list img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.mini-list span { display: grid; flex: 1; min-width: 0; }
.mini-list small { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.notice-list li { display: flex; gap: 12px; padding: 10px; border-bottom: 1px solid var(--line); }
.notice-list small { display: block; color: var(--muted); font-size: .8rem; }
.notice-ic { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 138, 0, .15); color: var(--orange); }
.user-card { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.user-card p { color: var(--muted); }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); text-decoration: none; text-align: left; cursor: pointer; }
.user-menu a:hover, .user-menu button:hover { border-color: var(--orange); }
.user-menu .icon { color: var(--orange); }
.user-menu small { margin-left: auto; color: var(--muted); }
.confirm { text-align: center; }
.confirm-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 138, 0, .15); color: var(--orange); }
.confirm-ic .icon { width: 28px; height: 28px; }
.confirm h2 { margin-top: 12px; font-size: 1.3rem; }
.confirm p { margin-top: 6px; color: var(--muted); }
.confirm-actions { display: flex; gap: 10px; margin-top: 20px; }
.confirm-actions .btn { flex: 1; }

/* รายละเอียดไก่ */
.detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; }
.detail-main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--orange); }
.detail-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.detail-thumbs button { width: 74px; height: 74px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; opacity: .6; }
.detail-thumbs button[aria-current="true"] { border-color: var(--orange); opacity: 1; }
.detail-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-info .eyebrow { text-align: left; font-size: .9rem; }
.detail-info h2 { font-size: 1.8rem; }
.detail-price { margin: 4px 0 14px; color: var(--orange); font-size: 1.8rem; font-weight: 600; }
.detail-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.detail-specs div { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); }
.detail-specs .icon { grid-row: span 2; color: var(--orange); }
.detail-specs dt { color: var(--muted); font-size: .78rem; }
.detail-specs dd { margin: 0; font-weight: 500; }
.detail-desc { color: #ddd; margin-bottom: 14px; }
.seller { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.seller small { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.seller small .icon { color: #22c55e; width: 1em; height: 1em; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-safe { display: flex; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 138, 0, .1); color: #ddd; font-size: .85rem; }
.detail-safe .icon { color: var(--orange); }

/* บทความ (กล่อง) */
.article h2 { font-size: 1.7rem; margin: 6px 0 4px; }
.article .eyebrow { text-align: left; margin-top: 14px; }
.article-img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 12px; }
.article > p:not(.eyebrow):not(.acard-meta) { margin-top: 12px; color: #e5e5e5; line-height: 1.8; }
.article h3 { margin: 22px 0 10px; }
.article-note { display: flex; gap: 8px; padding: 10px 12px; border: 1px solid var(--orange); border-radius: 10px; font-size: .9rem; }
.article-note .icon { color: var(--orange); }

/* ----- ฟอร์ม (สมัครสมาชิก / ลงขาย / เข้าสู่ระบบ) ----- */
.page-head { padding-block: 40px 20px; text-align: center; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-head h1 .logo-en { font-size: 1.05em; }
.page-head p { margin-top: 6px; color: #ddd; font-size: 1.1rem; }
.form-card { max-width: 980px; margin: 0 auto 30px; padding: clamp(18px, 3vw, 30px); border: 1.5px solid var(--orange); border-radius: 14px; background: var(--bg-2); }
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row-3 { grid-template-columns: 1fr 1.6fr 1fr; }
.form-h { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--orange-2); font-size: 1.05rem; }
.field { display: grid; gap: 4px; font-size: .9rem; }
.field > span { font-weight: 500; }
.field > span i { color: var(--orange); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #3a3a3a; border-radius: 8px; background: #000; color: #fff; outline: 0;
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; -webkit-appearance: none; background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23ff8a00' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center / 18px; padding-right: 34px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 138, 0, .2); }
.field small { color: var(--muted); font-size: .78rem; }
.field.is-bad input, .field.is-bad select, .field.is-bad textarea, .field.is-bad .upload { border-color: #ff5a5f; }
.field .err { color: #ff7a7f; font-size: .8rem; }
.upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; border: 1px dashed #3a3a3a; border-radius: 10px; }
.upload-btn { display: inline-grid; place-items: center; width: 64px; height: 36px; border-radius: 8px; background: var(--orange); color: #fff; cursor: pointer; }
.upload-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-btn:focus-within { outline: 3px solid var(--orange-2); outline-offset: 2px; }
.thumb { position: relative; width: 70px; height: 70px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; }
.thumb button .icon { width: 14px; height: 14px; }
.btn-submit { min-height: 48px; background: #2563eb; color: #fff; border-radius: 8px; }
.btn-submit:hover { background: #1d4ed8; }
.form-error { color: #ff7a7f; font-size: .9rem; }
.form-foot { display: grid; justify-items: center; gap: 14px; margin-bottom: 40px; }
.form-foot .btn { min-width: 220px; }
.secure-note { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: #ddd; }
.secure-note .icon { color: var(--orange); }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--orange); }
.done { display: grid; justify-items: center; gap: 10px; padding: 30px 10px; text-align: center; }
.done-ic { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: rgba(34, 197, 94, .15); color: #22c55e; }
.done-ic .icon { width: 40px; height: 40px; }
.done h2 { font-size: 1.6rem; }
.done p { color: #ccc; max-width: 520px; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

/* ประกาศของฉัน */
.my-list { display: grid; gap: 10px; }
.my-item { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.my-item img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; }
.my-item b { display: block; font-size: 1.05rem; font-weight: 500; }
.my-item small { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; }
.status-pending { background: rgba(255, 174, 61, .15); color: var(--orange-2); }
.status-live { background: rgba(34, 197, 94, .15); color: #4ade80; }
.my-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.quota { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 18px; border-radius: 12px; background: rgba(255, 138, 0, .1); border: 1px solid rgba(255, 138, 0, .4); }
.quota b { color: var(--orange-2); }

/* toast */
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 400; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: #fff; color: #111; font-weight: 500; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .8); translate: -50% 20px; opacity: 0; pointer-events: none; transition: translate .35s var(--ease), opacity .3s; max-width: calc(100vw - 32px); }
.toast.is-shown { translate: -50% 0; opacity: 1; }
.toast .icon { color: #16a34a; }
.toast.is-warn .icon { color: var(--orange-dark); }

/* แสดงเมื่อเลื่อนถึง */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ----- จอกลาง / เล็ก ----- */
@media (max-width: 1180px) {
  .hdr-burger { display: inline-grid; }
  .hdr-nav {
    position: fixed; inset: var(--header-h) 0 auto; display: grid; gap: 2px; padding: 12px var(--gutter) 20px;
    background: #000; border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px rgba(0, 0, 0, .7);
    clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .35s var(--ease), visibility .35s;
  }
  .nav-open .hdr-nav { clip-path: inset(0 0 0 0); visibility: visible; }
  .hdr-nav a { padding: 12px; font-size: 1.05rem; text-decoration: none; }
  .hdr-nav a:hover, .hdr-nav a.is-current { background: var(--surface-2); }
}
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .hdr-cta { display: none; }
  .hdr-user-name { display: none; }
  .hdr-user { padding: 3px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 14px; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  .rcard-body h3 { font-size: 1.05rem; }
  .search { flex-direction: column; }
  .filters .select { flex: 1 1 calc(50% - 10px); }
  .filters .select select { min-width: 0; width: 100%; }
  .sell-points { grid-template-columns: 1fr 1fr; }
  .sell-points li + li { border-left: 0; }
  .sell-points li { border-top: 1px solid rgba(255, 138, 0, .3); }
  .sell-points li:nth-child(-n+2) { border-top: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .learn-text { max-width: 70%; }
  [data-learn] { grid-template-columns: 1fr; }
  .learn { min-height: 128px; }
  .why-cta { position: static; margin-top: 26px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .my-item { grid-template-columns: 64px minmax(0, 1fr); }
  .my-item img { width: 64px; height: 64px; }
  .my-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .chat-btn span { display: none; }
  .chat-btn { width: 52px; padding: 0; }
  .chat-hint { max-width: 180px; }
  .modal { padding: 20px 16px; }
  .detail-specs { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  /* จอแคบมาก: ซ่อนไอคอนค้นหา/แจ้งเตือนที่แถบบน (ค้นหาได้ในส่วนไก่ชนทั้งหมด) แถบบนจะได้ไม่ล้นจอ */
  [data-search-open], [data-notice-open] { display: none !important; }
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rcard-featured { padding: 5px; }
  .hdr { gap: 8px; }
  .hdr-logo { font-size: 1.2rem; }
  .hdr-icon { width: 36px; height: 36px; }
  .steps { grid-template-columns: 1fr; }
  .stat { padding: 12px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
