/* Graymirth Academy – styles
   Colours are taken from the logo (saffron orange + charcoal) and warmed up with
   Thai temple gold, rice-paper cream and jade. Change them here in one place. */
:root {
  --saffron: #B93A0E;        /* logo orange – buttons, highlights */
  --saffron-dark: #932C08;
  --saffron-soft: #FBE7DC;
  --ink: #1E2D33;            /* logo charcoal, deepened – dark sections */
  --ink-2: #2E3F45;          /* logo charcoal – headings */
  --gold: #C9982F;           /* temple gold – accents, borders */
  --gold-soft: #F4E6C4;
  --jade: #2F6B5A;           /* savings, success */
  --jade-soft: #E1EFE9;
  --cream: #FBF6EE;          /* page background */
  --sand: #F3EADB;           /* alternate sections */
  --card: #FFFDF9;
  --text: #2B2F31;
  --muted: #6B6560;
  --line: #E8DDCB;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(30, 45, 51, .08);
  --shadow-lg: 0 22px 50px rgba(30, 45, 51, .16);
  --font-head: "Prompt", "Sarabun", system-ui, sans-serif;
  --font-body: "Sarabun", "Prompt", system-ui, sans-serif;
  --font-thai-deco: "Srisakdi", "Prompt", serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23C9982F' stroke-width='1'%3E%3Cpath d='M28 4 L52 28 L28 52 L4 28 Z'/%3E%3Cpath d='M28 18 C31 23 33 25 38 28 C33 31 31 33 28 38 C25 33 23 31 18 28 C23 25 25 23 28 18 Z'/%3E%3C/g%3E%3Ccircle cx='28' cy='28' r='1.6' fill='%23C9982F'/%3E%3Ccircle cx='0' cy='0' r='2' fill='%23C9982F'/%3E%3Ccircle cx='56' cy='0' r='2' fill='%23C9982F'/%3E%3Ccircle cx='0' cy='56' r='2' fill='%23C9982F'/%3E%3Ccircle cx='56' cy='56' r='2' fill='%23C9982F'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--cream); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink-2); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; }
.wrap { width: min(92%, 1180px); margin: 0 auto; }
.pad { padding: 88px 0; }
.sand { background: var(--sand); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: 999px; border: 2px solid var(--saffron); background: var(--saffron); color: #fff; font-family: var(--font-head); font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s; }
.btn:hover { background: var(--saffron-dark); border-color: var(--saffron-dark); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(185, 58, 14, .25); }
.btn-outline { background: transparent; color: var(--saffron); }
.btn-outline:hover { background: var(--saffron); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #b5841f; border-color: #b5841f; color: #fff; }
.btn-ghost-light { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); border-color: #fff; box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--saffron); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Section headings ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--saffron); margin: 0 0 12px; }
.eyebrow::before, .eyebrow::after { content: ""; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); }
.section-head p { color: var(--muted); font-size: 18px; }
.thai-deco { font-family: var(--font-thai-deco); color: var(--gold); font-weight: 400; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 auto 18px; color: var(--gold); }
.divider::before, .divider::after { content: ""; width: 60px; height: 1px; background: currentColor; opacity: .6; }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(251, 246, 238, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--saffron), var(--gold), var(--saffron)); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-family: var(--font-head); font-size: 15px; color: var(--ink-2); position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px; background: var(--saffron); transition: right .25s; }
.nav a:not(.btn):hover::after { right: 0; }
.nav .btn { color: #fff; padding: 10px 18px; font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.basket-link { position: relative; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); font-family: var(--font-head); font-size: 15px; }
.basket-link:hover { background: var(--sand); }
.basket-count { position: absolute; top: 0; left: 24px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--saffron); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; cursor: pointer; color: var(--ink-2); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); opacity: .13; }
.hero::after { content: ""; position: absolute; right: -200px; top: -200px; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(185,58,14,.45), transparent 65%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding: 84px 0 96px; }
.hero .greeting { font-size: clamp(40px, 5vw, 58px); line-height: 1.2; margin: 0 0 6px; }
.hero .eyebrow { color: var(--gold-soft); }
.hero h1 { color: #fff; font-size: clamp(36px, 5vw, 56px); font-weight: 600; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-sub { font-size: 19px; color: #D9DEDF; max-width: 600px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; padding: 0; margin: 0; color: #E9E2D3; font-size: 15px; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.arch { position: relative; border-radius: 240px 240px 22px 22px; padding: 10px; background: linear-gradient(160deg, var(--gold), #8c6516); box-shadow: var(--shadow-lg); }
.arch img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 60%; border-radius: 232px 232px 14px 14px; }
.arch-badge { position: absolute; left: -26px; bottom: 34px; background: var(--card); color: var(--ink-2); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow-lg); font-family: var(--font-head); font-size: 14px; line-height: 1.35; }
.arch-badge strong { display: block; font-size: 24px; color: var(--saffron); }
.arch-badge small { display: block; font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.scallop { height: 22px; background: radial-gradient(circle at 11px -2px, transparent 12px, var(--cream) 13px) repeat-x; background-size: 22px 22px; margin-top: -21px; position: relative; z-index: 2; }

/* ---------- Trust strip ---------- */
.trust { background: var(--cream); padding: 34px 0 10px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-icon { flex: 0 0 46px; height: 46px; border-radius: 14px; background: var(--saffron-soft); color: var(--saffron); display: grid; place-items: center; }
.trust-item strong { display: block; font-family: var(--font-head); font-weight: 500; color: var(--ink-2); }
.trust-item span { font-size: 15px; color: var(--muted); }

/* ---------- Teacher + video ---------- */
.teacher-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.teacher-grid.no-video { grid-template-columns: .7fr 1.3fr; }
.teacher-photo { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); border: 6px solid var(--card); outline: 1px solid var(--gold); }
.teacher-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.teacher-text h2 { font-size: clamp(30px, 4vw, 40px); }
.teacher-text h2 .thai-deco { font-size: .8em; margin-left: 8px; }
.teacher-text p { color: #4a4a48; }
.video-card { margin-top: 26px; background: var(--ink); border-radius: 22px; padding: 10px; box-shadow: var(--shadow-lg); }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-caption { color: #E9E2D3; font-size: 15px; padding: 12px 10px 4px; display: flex; gap: 10px; align-items: center; }
.video-caption strong { color: #fff; font-family: var(--font-head); font-weight: 500; }

/* ---------- Pricing cards ---------- */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 24px 26px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.price-card.featured { background: var(--ink); color: #E9E2D3; border: 2px solid var(--gold); transform: translateY(-10px); }
.price-card.featured:hover { transform: translateY(-14px); }
.price-card.featured::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background-image: var(--pattern); opacity: .08; pointer-events: none; }
.price-card.featured h3, .price-card.featured .price { color: #fff; }
.ribbon { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--ink); font-family: var(--font-head); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 6px 16px; border-radius: 999px; white-space: nowrap; }
.tier { font-family: var(--font-head); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--saffron); margin-bottom: 6px; }
.price-card.featured .tier { color: var(--gold); }
.price-card h3 { font-size: 23px; margin-bottom: 14px; }
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price { font-family: var(--font-head); font-size: 44px; font-weight: 600; color: var(--ink-2); line-height: 1; }
.was { color: var(--muted); text-decoration: line-through; font-size: 18px; }
.price-card.featured .was { color: #9fa9ab; }
.per { font-size: 15px; color: var(--muted); margin: 8px 0 18px; }
.price-card.featured .per { color: #c9cfd0; }
.save { display: inline-block; align-self: flex-start; background: var(--jade-soft); color: var(--jade); font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.price-card.featured .save { background: rgba(47,107,90,.35); color: #bfe5d6; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 9px; font-size: 15.5px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li::before { content: ""; flex: 0 0 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--saffron-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B93A0E' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat; }
.price-card.featured .ticks li::before { background-color: rgba(201,152,47,.25); }
.card-actions { margin-top: auto; display: grid; gap: 10px; }
.card-actions .small-link { text-align: center; font-size: 14px; color: var(--muted); }
.price-card.featured .small-link { color: #c9cfd0; }
.intro-note { text-align: center; margin-top: 34px; color: var(--muted); }

/* Group classes */
.group-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.group-card { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.group-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(var(--saffron), var(--gold)); }
.group-card .level { font-family: var(--font-head); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--saffron); }
.group-card h3 { font-size: 25px; margin: 4px 0 6px; }
.group-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; grid-column: 1 / -1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--sand); font-size: 14px; color: var(--ink-2); }
.chip.status { background: var(--jade-soft); color: var(--jade); font-weight: 700; }
.chip.status.full { background: #f3dcd6; color: #8a2a0b; }
.group-price { text-align: right; }
.group-price .price { font-size: 38px; }
.group-price small { display: block; color: var(--muted); font-size: 14px; }
.group-card .ticks { grid-column: 1 / -1; }
.group-card .schedule { grid-column: 1 / -1; font-size: 15px; color: var(--muted); margin: -8px 0 18px; }
.group-card .card-actions { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 18px; }
.private-group { margin-top: 26px; text-align: center; color: var(--muted); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { position: relative; padding: 30px 26px 26px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -22px; left: 26px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--saffron); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 18px; box-shadow: 0 0 0 6px var(--sand); }
.step h3 { margin-top: 10px; font-size: 20px; }
.step p { color: var(--muted); margin: 0; font-size: 16px; }

/* ---------- Shop ---------- */
.book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.book-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.book-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.book-stage { position: relative; background: var(--sand); padding: 28px 30px; display: grid; place-items: center; }
.book-stage .tag { position: absolute; top: 14px; left: 14px; z-index: 3; }
.book-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.book-body h3 { font-size: 19px; margin-bottom: 4px; }
.book-body p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.book-formats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.book-from { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-head); }
.book-from strong { font-size: 22px; color: var(--ink-2); }
.tag { display: inline-block; background: var(--gold); color: var(--ink); font-family: var(--font-head); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.tag.sample { background: #FFF3CD; color: #7A5A00; }

/* generated book cover */
.cover { position: relative; width: 100%; max-width: 200px; aspect-ratio: 2 / 3; border-radius: 4px 12px 12px 4px; overflow: hidden; box-shadow: -6px 0 0 rgba(0,0,0,.18) inset, 0 16px 30px rgba(0,0,0,.25); color: #fff; display: flex; flex-direction: column; padding: 18% 12% 10%; text-align: center; }
.cover::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); opacity: .22; background-size: 40px; }
.cover::after { content: ""; position: absolute; inset: 7px 7px 7px 11px; border: 1px solid rgba(244,230,196,.6); border-radius: 2px 8px 8px 2px; pointer-events: none; }
.cover > * { position: relative; z-index: 1; }
.cover-kicker { font-family: var(--font-head); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); }
.cover-title { font-family: var(--font-head); font-weight: 600; font-size: clamp(16px, 2.1vw, 22px); line-height: 1.15; margin: 10px 0 8px; }
.cover-thai { font-family: var(--font-thai-deco); color: var(--gold-soft); font-size: 22px; margin-top: auto; }
.cover-brand { font-family: var(--font-head); font-size: 8px; letter-spacing: .25em; text-transform: uppercase; opacity: .85; }
.cover-img { width: 100%; max-width: 200px; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px 12px 12px 4px; box-shadow: 0 16px 30px rgba(0,0,0,.25); }

/* Product page */
.crumbs { font-size: 14px; color: var(--muted); padding: 28px 0 0; }
.crumbs a { color: var(--saffron); }
.product { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; padding: 30px 0 90px; align-items: start; }
.product-stage { background: var(--sand); border-radius: 26px; padding: 50px; display: grid; place-items: center; position: sticky; top: 110px; }
.product-stage .cover, .product-stage .cover-img { max-width: 300px; }
.product-stage .cover-title { font-size: 30px; }
.product h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 6px; }
.product .subtitle { font-size: 19px; color: var(--muted); margin-bottom: 22px; }
.format-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 10px 0 22px; border: 0; padding: 0; }
.format-options legend { font-family: var(--font-head); font-weight: 500; margin-bottom: 10px; color: var(--ink-2); }
.format { position: relative; display: block; cursor: pointer; }
.format input { position: absolute; opacity: 0; }
.format-box { display: block; border: 2px solid var(--line); border-radius: 16px; padding: 16px 18px; background: var(--card); transition: border-color .2s, box-shadow .2s; }
.format-box strong { display: block; font-family: var(--font-head); font-weight: 500; color: var(--ink-2); }
.format-box .fprice { font-family: var(--font-head); font-size: 24px; font-weight: 600; color: var(--saffron); }
.format-box small { display: block; color: var(--muted); font-size: 14px; }
.format input:checked + .format-box { border-color: var(--saffron); box-shadow: 0 0 0 4px var(--saffron-soft); }
.format input:focus-visible + .format-box { outline: 3px solid var(--gold); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.qty button { width: 40px; height: 40px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--ink-2); border-radius: 50%; }
.qty button:hover { background: var(--sand); }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }
.buy-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 8px 0 26px; }
.product-desc { border-top: 1px solid var(--line); padding-top: 22px; color: #4a4a48; }
.perks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.perks li::before { content: "◆"; color: var(--gold); margin-right: 10px; font-size: 11px; }

/* ---------- Reviews ---------- */
.reviews-section { background: var(--ink); color: #E9E2D3; position: relative; overflow: hidden; }
.reviews-section::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); opacity: .07; }
.reviews-section .wrap { position: relative; }
.reviews-section .section-head h2 { color: #fff; }
.reviews-section .section-head p { color: #c9cfd0; }
.reviews-section .eyebrow { color: var(--gold); }
.rating-summary { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; color: #fff; font-family: var(--font-head); }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.review-card { background: var(--card); color: var(--text); border-radius: var(--radius); padding: 28px 26px 24px; position: relative; display: flex; flex-direction: column; }
.review-card::before { content: "“"; position: absolute; top: 4px; right: 22px; font-family: Georgia, serif; font-size: 80px; color: var(--gold-soft); line-height: 1; }
.stars { color: var(--gold); letter-spacing: 3px; font-size: 18px; }
.review-card blockquote { margin: 12px 0 18px; font-size: 16.5px; color: #3d3d3b; }
.review-card footer { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--saffron); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 600; overflow: hidden; flex: 0 0 42px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-card footer strong { display: block; font-family: var(--font-head); font-weight: 500; color: var(--ink-2); line-height: 1.3; }
.review-card footer span { font-size: 14px; color: var(--muted); }
.review-cta { text-align: center; margin-top: 40px; }
.review-form-wrap { max-width: 680px; margin: 30px auto 0; background: var(--card); color: var(--text); border-radius: 22px; padding: 30px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { font-size: 30px; color: #d8cdb8; cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--saffron); border-radius: 4px; }

/* ---------- Free resources ---------- */
.tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 34px; }
.tab { border: 1px solid var(--line); background: var(--card); padding: 10px 20px; border-radius: 999px; font-family: var(--font-head); font-size: 15px; cursor: pointer; color: var(--ink-2); }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.res-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.res-grid.three { grid-template-columns: repeat(3, 1fr); }
.res-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: var(--shadow); transition: transform .25s; }
.res-card:hover { transform: translateY(-5px); }
.res-icon { width: 84px; height: 84px; border-radius: 24px; background: var(--sand); display: grid; place-items: center; margin-bottom: 16px; }
.res-icon img { width: 62px; height: 62px; object-fit: contain; }
.res-icon .thai-glyph { font-family: var(--font-thai-deco); font-size: 40px; color: var(--saffron); line-height: 1; }
.res-card h3 { font-size: 19px; margin-bottom: 6px; }
.res-card p { color: var(--muted); font-size: 15px; }
.res-card .btn { margin-top: auto; }
.ebook-card { display: grid; grid-template-columns: 120px 1fr; gap: 18px; text-align: left; align-items: center; text-decoration: none; }
.ebook-card img { width: 120px; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px 10px 10px 6px; box-shadow: 0 10px 20px rgba(0,0,0,.18); }
.ebook-card .btn { margin-top: 6px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery a { border-radius: 18px; overflow: hidden; display: block; }
.gallery img { width: 100%; aspect-ratio: 3/4; object-fit: cover; transition: transform .5s; }
.gallery a:hover img { transform: scale(1.05); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-family: var(--font-head); font-weight: 500; color: var(--ink-2); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; color: var(--saffron); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* CTA */
.cta { position: relative; overflow: hidden; border-radius: 30px; padding: 60px 40px; text-align: center; background: linear-gradient(135deg, var(--saffron), #8f2a07); color: #fff; }
.cta::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); opacity: .14; }
.cta > * { position: relative; }
.cta h2 { color: #fff; font-size: clamp(28px, 4vw, 40px); }
.cta p { color: #fbe3d6; font-size: 18px; max-width: 620px; margin: 0 auto 26px; }
.cta .thai-deco { font-size: 34px; color: var(--gold-soft); }

/* Footer */
.footer { background: var(--ink); color: #c9cfd0; padding: 60px 0 30px; margin-top: 90px; position: relative; }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--saffron), var(--gold), var(--saffron)); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer img.flogo { height: 58px; width: auto; margin-bottom: 14px; }
.footer h4 { color: #fff; font-size: 16px; }
.footer a { color: #c9cfd0; text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; }
.socials { display: flex; gap: 12px; margin-top: 16px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; transition: background .2s; }
.socials a:hover { background: var(--gold); }
.socials img { width: 22px; height: 22px; object-fit: contain; }
.copyright { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: 14px; text-align: center; }

/* ---------- Basket & checkout ---------- */
.page { padding: 40px 0 40px; min-height: 60vh; }
.page h1 { font-size: clamp(30px, 4vw, 40px); }
.basket-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 36px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.line-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line-item:last-child { border-bottom: 0; }
.thumb { width: 76px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--sand); display: grid; place-items: center; }
.thumb .cover { max-width: none; width: 100%; height: 100%; padding: 14% 8%; border-radius: 3px 8px 8px 3px; }
.thumb .cover-title { font-size: 9px; margin: 4px 0; }
.thumb .cover-kicker, .thumb .cover-brand, .thumb .cover-thai { display: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .lesson-mark { width: 100%; height: 100%; display: grid; place-items: center; background: var(--ink); color: var(--gold); font-family: var(--font-head); font-weight: 600; font-size: 28px; }
.li-title { font-family: var(--font-head); font-weight: 500; color: var(--ink-2); }
.li-sub { font-size: 14px; color: var(--muted); }
.li-controls { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.li-price { font-family: var(--font-head); font-weight: 600; font-size: 18px; text-align: right; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 14px; font-family: var(--font-head); font-weight: 600; font-size: 20px; color: var(--ink-2); }
.note { background: var(--gold-soft); color: #5d4510; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 12px 0; }
.note.jade { background: var(--jade-soft); color: var(--jade); }
.note.warn { background: #FBE7DC; color: #7d2a0b; }
.empty { text-align: center; padding: 60px 20px; }
.empty .thai-deco { font-size: 46px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 15px; }
.check-row input { margin-top: 5px; accent-color: var(--saffron); width: 18px; height: 18px; }

.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 30px; counter-reset: p; }
.progress li { list-style: none; position: relative; padding-top: 14px; font-family: var(--font-head); font-size: 14px; color: var(--muted); }
.progress li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 99px; background: var(--line); }
.progress li.done::before, .progress li.active::before { background: var(--saffron); }
.progress li.active { color: var(--ink-2); font-weight: 600; }
.secure { display: inline-flex; align-items: center; gap: 8px; color: var(--jade); font-weight: 600; font-size: 15px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--font-head); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea { border: 1px solid #d9ccb6; border-radius: 12px; padding: 12px 14px; background: #fff; color: var(--text); width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 4px var(--saffron-soft); }
.field.error input, .field.error select, .field.error textarea { border-color: #c0392b; background: #fff6f4; }
.field .err { color: #b02a1a; font-size: 13px; display: none; }
.field.error .err { display: block; }
.form-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.pay-methods { display: grid; gap: 12px; }
.pay-method { display: flex; align-items: center; gap: 14px; border: 2px solid var(--line); border-radius: 14px; padding: 16px 18px; cursor: pointer; background: #fff; }
.pay-method input { accent-color: var(--saffron); width: 18px; height: 18px; }
.pay-method:has(input:checked) { border-color: var(--saffron); box-shadow: 0 0 0 4px var(--saffron-soft); }
.pay-method strong { font-family: var(--font-head); font-weight: 500; }
.pay-method small { display: block; color: var(--muted); }
.review-block { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; background: #fff; }
.review-block h3 { font-size: 16px; display: flex; justify-content: space-between; margin-bottom: 6px; }
.review-block p { margin: 0; color: var(--muted); font-size: 15px; white-space: pre-line; }
.fallback-links { display: grid; gap: 10px; margin-top: 14px; }
.fallback-links a { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.downloads { display: grid; gap: 10px; margin: 18px 0; }

/* Toast + mini-basket */
.toast { position: fixed; right: 20px; top: 90px; z-index: 80; width: min(360px, calc(100% - 40px)); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 18px; transform: translateY(-20px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { transform: none; opacity: 1; pointer-events: auto; }
.toast-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-head); font-weight: 500; color: var(--jade); margin-bottom: 12px; }
.toast-close { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); }
.toast-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.sample-banner { background: #FFF3CD; color: #7A5A00; text-align: center; font-size: 14px; padding: 8px 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .price-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 22px; }
  .price-card.featured { transform: none; }
  .book-grid, .res-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--cream); border-bottom: 1px solid var(--line); padding: 8px 4%; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin: 12px 0 6px; }
  .hero-grid, .teacher-grid, .teacher-grid.no-video, .product, .basket-layout, .group-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-grid { padding: 56px 0 80px; gap: 40px; }
  .hero-art { max-width: 420px; margin: 0 auto; width: 100%; }
  .arch-badge { left: 10px; }
  .steps, .review-grid, .res-grid.three { grid-template-columns: 1fr; gap: 34px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .product-stage { position: static; padding: 34px; }
  .pad { padding: 64px 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand img { height: 42px; }
  .basket-link .label { display: none; }
  .price-grid, .book-grid, .res-grid, .trust-grid { grid-template-columns: 1fr; }
  .form-grid, .format-options { grid-template-columns: 1fr; }
  .group-card { grid-template-columns: 1fr; }
  .group-price { text-align: left; }
  .group-card .card-actions { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .line-item { grid-template-columns: 60px 1fr; }
  .line-item .li-price { grid-column: 2; text-align: left; }
  .thumb { width: 60px; height: 78px; }
  .cta { padding: 44px 22px; }
  .ebook-card { grid-template-columns: 90px 1fr; }
  .ebook-card img { width: 90px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
