/* ==== Base ==== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  color: #010101;
  background: #fff;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* ==== 1. Topbar ==== */
.topbar { background: #f9ca00; }
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 30px; padding-top: 3px; padding-bottom: 3px;
}
.topbar-link { font-size: 14px; font-weight: 500; color: #000; }
.topbar-social { display: flex; gap: 6px; }
.social-square {
  width: 20px; height: 20px; background: #000; color: #f9ca00;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 3px;
}

/* ==== 2. Header ==== */
.site-header { background: #fff; border-bottom: 1px solid #eee; }
.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 128px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 52px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name { font-size: 20px; font-weight: 600; color: #000; }
.brand-tagline { font-size: 13px; color: #808285; }
.main-nav {
  display: flex; flex-wrap: wrap; justify-content: flex-start;
  column-gap: 28px; row-gap: 2px; max-width: 760px; margin-left: auto;
}
.main-nav a { font-size: 16px; font-weight: 500; color: #000; }
.main-nav a:hover { color: #b8960a; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: #333; margin: 4px 0; border-radius: 2px; }

/* ==== 3. Hero ==== */
.hero { padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 440px 1fr; gap: 48px; align-items: start; }
.hero-cover img { border-radius: 16px; }
.hero-content h1 { font-size: 32px; font-weight: 600; line-height: 1.4; margin-bottom: 18px; }
.hero-content > p { font-size: 15px; line-height: 1.7; margin-bottom: 14px; }

/* Flash sale card */
.flash-card {
  margin-top: 20px; border-radius: 12px; background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.flash-header {
  background: #000; color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 22px;
}
.flash-label {
  display: inline-flex; align-items: center; gap: 8px;
  color: #f9ca00; font-size: 17px; font-weight: 700; letter-spacing: 0.5px;
}
.countdown { display: flex; align-items: center; gap: 6px; }
.cd-box {
  background: #e02b20; color: #fff; font-size: 18px; font-weight: 700;
  min-width: 38px; text-align: center; padding: 3px 6px; border-radius: 5px;
}
.cd-colon { color: #e02b20; font-weight: 700; }
.flash-body { padding: 22px 26px 18px; }
.flash-price-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.price-label { font-size: 16px; color: #333; }
.price-big { font-size: 72px; font-weight: 900; color: #ff0000; line-height: 1.05; }
.price-old { font-size: 15px; color: #555; }
.price-old s { color: #777; }
.price-old strong { color: #e02b20; font-weight: 700; }
.buy-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #f9ca00; color: #000; font-size: 18px; font-weight: 500;
  padding: 13px 26px; border-radius: 8px; white-space: nowrap;
}
.buy-btn:hover { background: #e5ba00; }
.trust-row {
  display: flex; justify-content: space-between; gap: 10px;
  border-top: 1px solid #e8e8e8; margin-top: 18px; padding-top: 14px;
}
.trust-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; color: #8a8a8a;
}

/* ==== 4. Gray band ==== */
.gray-band { background: #f5f5f5; padding: 48px 0 56px; }

/* Accordions (learn / suitable / results) */
.accordion { border-bottom: 1px solid #dcdcdc; }
.accordion:first-child { border-top: 1px solid #dcdcdc; }
.accordion-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: none; border: none; cursor: pointer; padding: 15px 0;
  font-family: inherit; text-align: left;
}
.accordion-head h2 { font-size: 26px; font-weight: 700; color: #000; }
.chev { transition: transform 0.25s; flex-shrink: 0; color: #000; }
.accordion.open .chev { transform: rotate(180deg); }
.accordion-body { display: none; padding: 0 0 22px; }
.accordion.open .accordion-body { display: block; }
.accordion-body p { margin-bottom: 6px; }

/* Preview thumbnails */
.previews {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px;
  margin: 42px 0 52px;
}
.previews img { border: 1px solid #ddd; border-radius: 6px; background: #fff; width: 100%; height: auto; }

/* FAQ */
.faq-title { font-size: 26px; font-weight: 700; margin-bottom: 22px; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.faq-col { display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: #fff; border: 1px solid #e2e2e2; border-radius: 8px; }
.faq-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: none; border: none; cursor: pointer; padding: 14px 18px;
  font-family: inherit; font-size: 18px; text-align: left; color: #010101;
}
.faq-head strong { font-weight: 700; }
.faq-body { display: none; padding: 0 18px 14px; }
.faq-item.open .faq-body { display: block; }
.faq-item.open .chev { transform: rotate(180deg); }

/* ==== 5. Related ==== */
.related { padding: 56px 0 40px; }
.related-title { font-size: 30px; font-weight: 600; margin-bottom: 28px; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.related-card img { border-radius: 8px; }
.related-card p { font-size: 15px; font-weight: 500; margin-top: 10px; line-height: 1.5; }
.related-card:hover p { color: #b8960a; }

/* ==== 6. Prev / Next ==== */
.post-nav { border-top: 1px solid #e5e5e5; padding: 26px 0; }
.post-nav-inner { display: flex; justify-content: space-between; gap: 30px; }
.post-nav-prev, .post-nav-next { display: flex; flex-direction: column; gap: 4px; max-width: 46%; }
.post-nav-next { text-align: right; align-items: flex-end; }
.post-nav-label { font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.post-nav-title { font-size: 15px; color: #444; }

/* ==== 7. Footer ==== */
.site-footer { background: #111; color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 0.8fr 1.1fr 0.9fr; gap: 40px;
  padding-top: 52px; padding-bottom: 44px;
}
.footer-brand-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.footer-logo { width: 74px; height: auto; }
.footer-brand-name { font-size: 22px; font-weight: 700; color: #fff; }
.footer-brand-tagline { font-size: 14px; color: #b5b5b5; }
.footer-desc { font-size: 15px; color: #d6d6d6; line-height: 1.7; margin-bottom: 18px; }
.footer-social { display: flex; gap: 10px; }
.social-square-dark {
  width: 36px; height: 36px; background: #2b2b2b; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
}
.social-square-dark:hover { background: #f9ca00; color: #000; }
.footer-heading { color: #f9ca00; font-size: 15px; font-weight: 500; margin-bottom: 14px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { font-size: 15px; color: #e3e3e3; }
.footer-links a:hover { color: #f9ca00; }
.footer-qr img { width: 200px; border-radius: 18px; }
.footer-bottom { border-top: 1px solid #262626; padding: 16px 0; text-align: center; }
.footer-bottom p { font-size: 15px; color: #888; }

/* ==== Lightbox (bấm ảnh phóng to) ==== */
.zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 92vw; max-height: 92vh; width: auto; height: auto;
  border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  cursor: zoom-out; background: #fff;
}
.lightbox-close {
  position: absolute; top: 10px; right: 22px;
  background: none; border: none; color: #fff;
  font-size: 42px; line-height: 1; cursor: pointer;
}

/* ==== Polish / animations (nhẹ, có mục đích) ==== */
html { scroll-behavior: smooth; }

/* Header dính trên cùng khi cuộn */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

/* Rê chuột: nhấc thẻ ebook + nút lên nhẹ */
.related-card { transition: transform 0.2s ease; }
.related-card:hover { transform: translateY(-5px); }
.related-card img { transition: box-shadow 0.2s ease; }
.related-card:hover img { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15); }

.buy-btn { transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease; }
.buy-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(249, 202, 0, 0.5); }

/* Nút tải: nhấn nhá nhẹ để mắt dừng lại */
.buy-btn { animation: cta-pulse 2.4s ease-in-out infinite; }
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 202, 0, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(249, 202, 0, 0); }
}
.buy-btn:hover { animation: none; }

/* Hiện dần khi cuộn tới (chỉ các khối dưới màn hình đầu) */
html.js-reveal .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* Tôn trọng người bật "giảm chuyển động" trong máy */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .buy-btn { animation: none; }
  html.js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .related-card, .buy-btn { transition: none; }
}
