/* หน้าเว็บ โรงเรียนกวดวิชา ยูเก็ตอิท — ครีมอบอุ่น + ทอง เรียบ สะอาด น่าเชื่อถือ
   ฟอนต์เดียว Anuphan (400/500/600/700) · ไอคอนเส้น 1.75 เท่ากันทั้งเว็บ */

:root {
  --paper: #fbf7ee;
  --paper-2: #f4ecd9;
  --card: #fffdf8;
  --ink: #2a2721;
  --ink-2: #4a463d;
  --muted: #736d60;
  --line: #e7dcc4;
  --gold: #c9971c;          /* ทองเข้ม ใช้กับตัวหนังสือ/เส้น ผ่านคอนทราสต์บนพื้นครีม */
  --gold-ink: #8a6410;
  --yellow: #eed951;        /* เหลืองแบรนด์ ใช้เป็นพื้นปุ่มและไฮไลต์ */
  --yellow-2: #f6e98f;
  --red: #b3261e;
  --green: #2f7a4a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(60, 45, 10, .06), 0 6px 18px -8px rgba(60, 45, 10, .18);
  --shadow-up: 0 2px 4px rgba(60, 45, 10, .06), 0 14px 30px -12px rgba(60, 45, 10, .28);
  --font: 'Anuphan', 'Noto Sans Thai', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.005em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.75; flex: none; }
[hidden] { display: none !important; }
small { font-size: max(14px, .85em); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--yellow); color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
  box-shadow: 0 2px 0 var(--ink);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--ink); }
.btn svg { width: 1.1em; height: 1.1em; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--card); }
.btn-sm { min-height: 44px; padding: 7px 14px; font-size: 15px; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 17px; }
.btn-block { width: 100%; }
.btn.is-off, .btn:disabled { background: #e9e4d8; border-color: #c9c2b2; color: #8c8577; box-shadow: none; cursor: not-allowed; transform: none; pointer-events: none; }

/* ---------- แถบบนและหัวเว็บ ---------- */
.topbar { background: var(--ink); color: #f3ead2; font-size: 14px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.topbar span { display: inline-flex; align-items: center; gap: 6px; }
.topbar svg { color: var(--yellow); width: 16px; height: 16px; }
.nav { position: sticky; top: 0; z-index: 40; background: rgba(251, 247, 238, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-width: 0; }
.logo-img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 3px; }
.logo b { font-size: 17px; line-height: 1.4; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#site-nav { display: flex; gap: 4px; }
#site-nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 16px; white-space: nowrap; }
#site-nav a:hover { background: var(--paper-2); color: var(--ink); }
#site-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.nav-act { display: flex; align-items: center; gap: 6px; }
.cart-btn, .nav-toggle { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; }
.cart-btn:hover { background: var(--yellow); }
.cart-count { position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 14px; font-weight: 700; line-height: 22px; text-align: center; }
.nav-toggle { display: none; }

/* ---------- ส่วนทั่วไป ---------- */
.sec { padding: 72px 0; }
.sec-head { max-width: 680px; margin: 0 0 32px; }
.sec-head h1, .sec-head h2 { font-size: clamp(28px, 4vw, 42px); }
.sec-head h2::before, .page-title h1::before { content: ''; display: block; width: 44px; height: 4px; border-radius: 4px; background: var(--gold); margin-bottom: 14px; }
.sec-head p { color: var(--muted); font-size: 18px; }
.sec-more { margin-top: 28px; text-align: center; }
.page-title { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 44px 0 36px; }
.page-title h1 { font-size: clamp(30px, 4.5vw, 46px); margin: 0; }
.page-title p { color: var(--muted); margin: 8px 0 0; max-width: 640px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--gold-ink); background: var(--yellow-2); border-radius: 999px; padding: 5px 14px 5px 10px; margin-bottom: 18px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--ink-2); }
.msg { min-height: 1.5em; margin: 10px 0 0; font-size: 15px; }
.msg.ok { color: var(--green); } .msg.bad { color: var(--red); }
.note { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; background: var(--yellow-2); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; margin: 12px 0 0; }
.fine { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.badge-red { background: #fbe4e2; color: var(--red); }

/* ---------- แบนเนอร์ ---------- */
.hero { position: relative; background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-slide { display: none; }
.hero-slide.is-on { display: block; animation: fade .6s var(--ease); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding: 56px 0 64px; }
.hero h1, .hero .h1 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.4; margin-bottom: 16px; font-weight: 700; }
.hero-sub { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-pic { position: relative; }
.hero-pic img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-up); }
.hero-pic::before { content: ''; position: absolute; inset: 18px -18px -18px 18px; border: 2px solid var(--gold); border-radius: var(--radius); z-index: -1; }
.hero-full .hero-grid, .hero-compact .hero-grid { grid-template-columns: 1fr; }
.hero-full .hero-pic { order: -1; }
.hero-compact .hero-grid { padding: 36px 0; }
.hero-compact .hero-pic { display: none; }
.hero-dots { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; display: flex; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; cursor: pointer; }
.hero-dots button[aria-current="true"] { background: var(--ink); width: 26px; border-radius: 6px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- จุดเด่น ---------- */
.sec-features { background: var(--card); border-bottom: 1px solid var(--line); padding: 56px 0; }
.features { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 20px; }
.feature { padding: 22px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.feature-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--yellow); color: var(--ink); margin-bottom: 14px; border: 1.5px solid var(--ink); }
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 19px; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 16px; margin: 0; }

/* ---------- เกี่ยวกับ ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.about.pic-right .about-pic { order: 2; }
.about-pic img { width: 100%; max-width: 250px; margin-inline: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.about-text h2 { font-size: clamp(28px, 3.6vw, 40px); }
.about-text h2::before { content: ''; display: block; width: 44px; height: 4px; border-radius: 4px; background: var(--gold); margin-bottom: 14px; }
.about-text p { color: var(--ink-2); font-size: 18px; }
.about:not(:has(.about-pic)) { grid-template-columns: minmax(0, 760px); }

/* ---------- การ์ดคอร์ส ---------- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.card-pic { display: block; text-decoration: none; aspect-ratio: 1 / 1; background: var(--paper-2); overflow: hidden; }
.card-pic img { width: 100%; height: 100%; object-fit: contain; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.card-cat { font-size: 14px; font-weight: 600; color: var(--gold-ink); letter-spacing: .02em; }
.card h3 { font-size: 17px; line-height: 1.45; margin: 0; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card p { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.55; }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price b { font-size: 22px; font-weight: 700; }
.price small { font-size: 14px; color: var(--muted); }
.price s, .pd-price s { color: var(--muted); font-size: 14px; }
.sold { color: var(--red); font-weight: 600; font-size: 15px; }
.cards-list { grid-template-columns: 1fr; }
.card-row { flex-direction: row; align-items: stretch; }
.card-row .card-pic { width: 150px; flex: none; }

/* ปกตัวอักษรของคอร์สที่ยังไม่มีรูป */
.tile { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; position: relative; overflow: hidden; background: var(--yellow); color: var(--ink); }
.tile::before { content: ''; position: absolute; width: 70%; aspect-ratio: 1; right: -18%; top: -18%; border-radius: 50%; border: 18px solid rgba(255, 255, 255, .35); }
.tile::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #e2321a; right: 20%; top: 18%; }
.tile-kicker { position: absolute; top: 16px; left: 18px; font-size: 14px; font-weight: 600; letter-spacing: .04em; opacity: .75; }
.tile b { font-size: clamp(30px, 5.2vw, 46px); line-height: 1.4; font-weight: 700; position: relative; }
.tile span:not(.tile-kicker) { font-size: 16px; font-weight: 600; margin-top: 6px; position: relative; }
.tile-ink { background: var(--ink); color: #fbf3d9; }
.tile-ink::before { border-color: rgba(238, 217, 81, .25); }
.tile-sage { background: #d8e2c9; } .tile-leaf { background: #bfd9b8; }
.tile-cream { background: var(--paper-2); } .tile-gold { background: var(--yellow); }
.mini-tile { display: grid; place-items: center; width: 100%; height: 100%; background: var(--yellow); font-weight: 700; font-size: 15px; }

/* ---------- แคตตาล็อก: หมวดด้านซ้าย ---------- */
.catalog { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.cat-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 14px; }
.search:focus-within { border-color: var(--ink); }
.search svg { color: var(--muted); }
.search input { border: 0; background: none; outline: none; min-height: 46px; width: 100%; font-size: 16px; }
.cat-list { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.cat-list button { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 0; background: none; cursor: pointer; font-weight: 500; }
.cat-list button span { font-size: 14px; color: var(--muted); background: var(--paper-2); border-radius: 999px; padding: 1px 9px; }
.cat-list button:hover { background: var(--paper); }
.cat-list button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.cat-list button[aria-pressed="true"] span { background: var(--yellow); color: var(--ink); }
.cat-desc { font-size: 15px; color: var(--muted); margin: 0; padding: 0 6px; }
.cat-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--muted); font-size: 15px; }
.cat-bar select { min-height: 42px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); padding: 0 12px; font-size: 16px; margin-left: 6px; }
.catalog .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.empty { color: var(--muted); padding: 24px 0; }
.more { text-align: center; margin-top: 24px; }

/* ---------- รีวิว (masonry ไม่ครอป) ---------- */
.sec-gallery { background: var(--paper-2); }
.gal { columns: var(--cols, 3); column-gap: 16px; }
.gal-item { break-inside: avoid; margin: 0 0 16px; }
.gal-item a { display: block; border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.gal-item img { width: 100%; transition: transform .3s var(--ease); }
.gal-item a:hover img { transform: scale(1.02); }
.gal-item figcaption { font-size: 14px; color: var(--muted); padding: 6px 2px 0; }
.gal-item figcaption b { color: var(--ink); display: block; }
dialog.light { border: 0; padding: 0; background: transparent; max-width: min(96vw, 900px); max-height: 92vh; }
dialog.light::backdrop { background: rgba(20, 17, 10, .82); }
dialog.light img { max-height: 88vh; width: auto; margin: auto; border-radius: 10px; }
dialog.light button { position: fixed; top: 14px; right: 14px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; font-size: 28px; line-height: 1; cursor: pointer; }

/* ---------- คำชม ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.quote { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.quote blockquote { margin: 0; font-size: 17px; }
.quote figcaption { display: flex; gap: 12px; align-items: center; margin-top: auto; }
.quote figcaption img, .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.avatar { display: grid; place-items: center; background: var(--yellow); font-weight: 700; }
.quote small { display: block; color: var(--muted); font-size: 14px; }

/* ---------- คำถามที่พบบ่อย ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq-x { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--paper-2); flex: none; transition: transform .2s var(--ease); }
.faq details[open] .faq-x { transform: rotate(45deg); background: var(--yellow); }
.faq-a { padding: 0 18px 16px; color: var(--ink-2); }
.faq-a p:last-child { margin: 0; }

/* ---------- แถบชวนติดต่อ ---------- */
.cta-band { padding: 56px 0; text-align: center; }
.cta-band .wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cta-text { font-size: clamp(22px, 3vw, 32px); font-weight: 700; line-height: 1.4; margin: 0; max-width: 24em; }
.cta-dark { background: var(--ink); color: #fbf3d9; }
.cta-dark .btn { border-color: var(--yellow); box-shadow: 0 2px 0 var(--yellow); }
.cta-soft { background: var(--yellow-2); }

/* ---------- ติดต่อ ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.ci { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); flex: none; }
.contact-list small { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; }
.contact-list a { font-weight: 600; text-decoration: none; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; }
.hours h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.hours ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.hours li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.closed { color: var(--red); }
.lead, .box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.lead h3, .box h2 { font-size: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field input, .field textarea, .coupon input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; font-size: 16px; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .coupon input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--yellow-2); }
.hint { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.err { font-size: 14px; color: var(--red); margin: 4px 0 0; min-height: 0; }
.err:empty { display: none; }
.map { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.map-wrap { margin-top: 28px; }

/* ---------- ข้อความยาว / บทความ ---------- */
.prose { font-size: 18px; color: var(--ink-2); }
.prose h2 { font-size: 26px; margin-top: 1.4em; } .prose h3 { font-size: 21px; margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--gold); background: var(--card); border-radius: 0 10px 10px 0; }
.a-wrap h1 { font-size: clamp(30px, 4.4vw, 44px); }
.a-meta { color: var(--muted); font-size: 15px; }
.a-cover img { border-radius: var(--radius); }
.a-lead { font-size: 20px; color: var(--ink-2); }
.a-toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.a-fig figcaption { font-size: 14px; color: var(--muted); }
.a-embed { margin-top: 36px; } .a-cta { margin: 28px 0; padding: 22px; background: var(--yellow-2); border-radius: var(--radius); }

/* ---------- หน้ารายละเอียดคอร์ส ---------- */
.sec-pd { padding-top: 32px; }
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.pd-gallery { position: sticky; top: 90px; }
.pd-main { aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); }
.pd-main img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pd-thumbs button { width: 72px; height: 72px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--paper-2); cursor: pointer; flex: none; }
.pd-thumbs button[aria-current="true"] { border-color: var(--ink); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-size: clamp(28px, 3.6vw, 40px); margin: 6px 0 10px; }
.pd-short { color: var(--ink-2); font-size: 18px; }
.pd-price { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 18px; }
.pd-price b { font-size: 36px; font-weight: 700; }
.pd-opts { border: 0; padding: 0; margin: 0 0 16px; }
.pd-opts legend { font-weight: 600; margin-bottom: 8px; }
.pd-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt input { position: absolute; opacity: 0; }
.opt span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; }
.opt input:checked + span { border-color: var(--ink); background: var(--yellow); }
.opt input:focus-visible + span { outline: 3px solid var(--gold); }
.opt.is-off span { opacity: .5; text-decoration: line-through; cursor: not-allowed; }
.pd-stock { color: var(--red); font-weight: 600; font-size: 15px; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 22px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--card); height: 52px; }
.qty button { width: 44px; height: 100%; border: 0; background: none; cursor: pointer; display: grid; place-items: center; font-size: 20px; }
.qty input { width: 44px; text-align: center; border: 0; background: none; font-size: 17px; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-sm { height: 42px; } .qty-sm button { width: 36px; } .qty-sm input { width: 34px; font-size: 16px; }
.pd-points { list-style: none; padding: 18px 0 0; margin: 0 0 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.pd-points li { display: flex; gap: 10px; align-items: center; color: var(--ink-2); }
.pd-points svg { color: var(--gold-ink); }
.pd-ask { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; color: var(--gold-ink); }
.pd-more { margin-top: 56px; max-width: 800px; }

/* ---------- ตะกร้าและชำระเงิน ---------- */
.cart, .checkout, .order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.summary { position: sticky; top: 90px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.summary h2 { font-size: 20px; }
.sum { margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.sum div { display: flex; justify-content: space-between; gap: 10px; font-size: 16px; }
.sum dt { color: var(--muted); } .sum dd { margin: 0; font-weight: 600; text-align: right; }
.sum .total { border-top: 1.5px dashed var(--line); padding-top: 12px; margin-top: 4px; font-size: 20px; }
.sum .total dt { color: var(--ink); font-weight: 700; }
.sum-note { color: var(--green); font-weight: 600; font-size: 15px; margin: 10px 0 0; }
.sum-note:empty { display: none; }
.summary .btn-block { margin-top: 16px; }
.link-back { display: inline-flex; gap: 6px; align-items: center; margin-top: 14px; font-size: 15px; color: var(--ink-2); }
.cart-lines { display: flex; flex-direction: column; gap: 12px; }
.line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.line-pic { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--paper-2); }
.line-pic img { width: 100%; height: 100%; object-fit: cover; }
.line-body { display: flex; flex-direction: column; min-width: 0; }
.line-body a { text-decoration: none; } .line-body b { font-size: 16px; line-height: 1.4; }
.line-body small { color: var(--muted); font-size: 14px; }
.line-price { font-weight: 600; font-size: 15px; }
.line-x { width: 42px; height: 42px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.line-x:hover { background: #fbe4e2; color: var(--red); }
.empty-cart { text-align: center; padding: 48px 20px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.box { margin: 0 0 20px; }
.box legend { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; padding: 0; margin-bottom: 14px; float: left; width: 100%; }
.box legend + * { clear: both; }
fieldset.box { min-width: 0; }
.step { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--yellow); font-size: 15px; }
.pay-opts { display: flex; flex-direction: column; gap: 10px; clear: both; }
.pay { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: #fff; }
.pay:has(input:checked) { border-color: var(--ink); background: var(--yellow-2); }
.pay input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--ink); }
.pay small { display: block; color: var(--muted); font-size: 14px; }
.pay.is-off { opacity: .5; pointer-events: none; }
.mini-lines { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 8px; }
.mini-lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.mini-lines small { color: var(--muted); }
.coupon { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.coupon label { font-weight: 600; font-size: 15px; }
.coupon-row { display: flex; gap: 8px; margin-top: 6px; }
.coupon-row input { text-transform: uppercase; }

/* ---------- หน้าออเดอร์และตรวจสถานะ ---------- */
.order-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 28px; }
.ok-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--yellow); border: 1.5px solid var(--ink); flex: none; }
.ok-mark svg { width: 28px; height: 28px; stroke-width: 2.25; }
.order-head h1 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 4px; }
.order-head p { margin: 0; }
.order-no { font-size: 1.15em; letter-spacing: .04em; background: var(--yellow-2); padding: 0 8px; border-radius: 6px; }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 0 0 28px; counter-reset: s; }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 14px; color: var(--muted); position: relative; }
.stepper li::before { content: ''; position: absolute; top: 17px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.now::before { background: var(--ink); }
.stepper .dot { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--line); font-weight: 700; }
.stepper .dot svg { width: 18px; height: 18px; stroke-width: 2.5; }
.stepper .done .dot { background: var(--ink); color: var(--yellow); border-color: var(--ink); }
.stepper .now .dot { background: var(--yellow); border-color: var(--ink); color: var(--ink); }
.stepper .now { color: var(--ink); font-weight: 600; }
.stepper.is-stop { display: block; }
.pay-amount { display: flex; flex-direction: column; align-items: center; padding: 16px; background: var(--paper); border-radius: var(--radius-sm); margin: 0; }
.pay-amount small { color: var(--muted); }
.pay-amount b { font-size: 44px; line-height: 1.4; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin: 18px 0; font-size: 15px; }
.qr-code { width: 232px; max-width: 100%; aspect-ratio: 1; background: #fff; border-radius: 12px; padding: 8px; border: 1px solid var(--line); }
.qr-code svg { width: 100%; height: 100%; stroke: none; }
.banks { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.banks li { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.banks img { width: 36px; height: 36px; border-radius: 8px; }
.banks div { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.4; }
.banks small { color: var(--muted); font-size: 14px; } .banks b { font-size: 18px; letter-spacing: .03em; }
.banks span { font-size: 14px; }
.slip { margin-top: 20px; padding-top: 18px; border-top: 1.5px dashed var(--line); }
.slip h3 { font-size: 18px; }
.drop { display: grid; place-items: center; min-height: 160px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; margin-bottom: 12px; overflow: hidden; position: relative; }
.drop:hover { border-color: var(--gold); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); text-align: center; padding: 20px; }
.drop-empty svg { width: 32px; height: 32px; color: var(--gold-ink); }
.drop-empty b { color: var(--ink); }
.drop img { max-height: 320px; width: auto; }
.timeline { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 10px; font-size: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.timeline time { color: var(--muted); }
.ship-to { display: flex; flex-direction: column; margin: 18px 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
.ship-to small { color: var(--muted); }
.order-grid .summary .btn { margin-top: 4px; }
.track-res { margin-top: 20px; }

/* ---------- ท้ายเว็บ ---------- */
.foot { background: var(--ink); color: #e9e1cb; padding: 56px 0 110px; margin-top: 0; }
.foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 36px; }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.foot-logo { width: 64px; height: 64px; border-radius: 14px; background: #fff; padding: 4px; object-fit: contain; }
.foot-brand b { font-size: 19px; color: #fff; }
.foot-brand p { font-size: 15px; color: #c8bfa8; margin: 6px 0 0; }
.foot h2 { font-size: 15px; color: var(--yellow); letter-spacing: .04em; margin-bottom: 12px; }
.foot-col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.foot-col a, .foot-col p { display: inline-flex; align-items: flex-start; gap: 8px; text-decoration: none; color: #e9e1cb; margin: 0; }
.foot-col a:hover { color: #fff; text-decoration: underline; }
.foot-col svg { margin-top: 4px; width: 17px; height: 17px; color: var(--yellow); }
.foot-col a[aria-current] { color: #fff; }
.social { display: flex; gap: 8px; margin-top: 6px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #5a5446; }
.social a svg { margin: 0; }
.copy { grid-column: 1 / -1; border-top: 1px solid #454034; padding-top: 18px; color: #a79f89; font-size: 14px; }

/* ปุ่มลอยล่างจอบนมือถือ: ไลน์กับโทรเท่านั้น */
.float-contact { display: none; }
.toast { position: fixed; left: 50%; bottom: 84px; translate: -50% 20px; opacity: 0; z-index: 60; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; box-shadow: var(--shadow-up); transition: opacity .25s, translate .25s var(--ease); pointer-events: none; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; translate: -50% 0; pointer-events: auto; }
.toast a { color: var(--yellow); font-weight: 600; margin-left: 6px; }

/* ---------- อนิเมชันตอนเลื่อนถึง (ครั้งเดียว) ---------- */
.reveal.pre { opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.reveal.pre.in { opacity: 1; transform: none; }

/* ---------- จอกลาง ---------- */
@media (max-width: 1023px) {
  #site-nav { position: fixed; inset: 0 0 auto; top: 0; flex-direction: column; gap: 0; padding: 88px 16px 20px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-up); transform: translateY(-110%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; z-index: -1; }
  .nav-open #site-nav { transform: none; visibility: visible; transition: transform .3s var(--ease); }
  #site-nav a { padding: 14px 12px; border-radius: 10px; font-size: 17px; }
  .nav-toggle { display: grid; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog { grid-template-columns: minmax(0, 1fr); }
  .cat-side { position: static; }
  .cat-list { flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .cat-list button { white-space: nowrap; flex: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; padding: 32px 0 44px; }
  .hero-pic { order: -1; }
  .hero-pic::before { inset: 10px -10px -10px 10px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cart, .checkout, .order-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
  .foot .wrap { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (min-width: 768px) and (max-width: 1023px) { .features[style*="--cols:4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- มือถือ ---------- */
@media (max-width: 767px) {
  body { font-size: 16px; }
  .topbar .tb-hours { display: none; }
  .topbar .wrap { justify-content: center; font-size: 14px; }
  .nav .wrap { min-height: 62px; gap: 10px; }
  .logo-img { width: 40px; height: 40px; }
  .logo b { font-size: 15px; }
  .sec { padding: 52px 0; }
  .sec-head { margin-bottom: 24px; }
  .sec-head p { font-size: 16px; }
  .cards, .catalog .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px 12px 12px; }
  .card h3 { font-size: 15px; }
  .card p { display: none; }
  .price b { font-size: 18px; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .card-foot .btn { width: 100%; }
  .tile { padding: 12px; } .tile-kicker { display: none; } .tile span:not(.tile-kicker) { font-size: 14px; }
  .card-row { flex-direction: column; } .card-row .card-pic { width: 100%; }
  .gal { columns: 2; column-gap: 10px; } .gal-item { margin-bottom: 10px; }
  .features { gap: 10px; } .feature { padding: 16px; } .feature h3 { font-size: 17px; } .feature p { font-size: 14px; }
  .feature-icon { width: 44px; height: 44px; } .feature-icon svg { width: 22px; height: 22px; }
  .quotes { grid-template-columns: 1fr; }
  .about, .contact, .pd { grid-template-columns: 1fr; gap: 28px; }
  .about.pic-right .about-pic { order: 0; }
  .pd-gallery { position: static; }
  .pd-price b { font-size: 30px; }
  .pd-actions .btn { flex: 1 1 100%; }
  .pd-actions .qty { flex: none; }
  .pd-actions .qty + .btn { flex: 1 1 0; }
  .hero-cta .btn { flex: 1 1 100%; }
  .line { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: 'p b x' 'p q q'; gap: 8px 12px; }
  .line-pic { width: 64px; height: 64px; grid-area: p; } .line-body { grid-area: b; } .line .qty { grid-area: q; justify-self: start; } .line-x { grid-area: x; }
  .stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .stepper li:nth-child(4)::before { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .lead, .box, .summary { padding: 18px; }
  .foot { padding-bottom: 120px; }
  .foot .wrap { grid-template-columns: 1fr; gap: 26px; }
  .float-contact { display: flex; gap: 8px; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50; }
  .float-contact a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 999px; font-weight: 600; text-decoration: none; box-shadow: var(--shadow-up); }
  .fc-line { background: #06c755; color: #fff; }
  .fc-call { background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); }
  .fc-line svg { fill: #fff; stroke: none; }
}
@media (max-width: 380px) { .logo b { max-width: 150px; } }

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

/* พื้นที่กดอย่างน้อย 44px บนมือถือ */
.logo { min-height: 48px; }
.card h3 a { display: inline-block; padding: 2px 0; min-height: 44px; }
.contact-list a, .foot-col a { display: inline-flex; align-items: center; min-height: 44px; }
.contact-list small { margin-bottom: -6px; }
