/* ================== Menu Xinh — trang giới thiệu & thư viện mẫu ================== */
body.site { background: #fffaf5; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 18px; }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 30; background: rgba(255,250,245,.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(232,226,217,.7); }
.site-head .wrap { display: flex; align-items: center; gap: 14px; height: 62px; }
.site-nav { display: none; gap: 4px; margin-left: 18px; }
.site-nav a { color: #4a443d; text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: #f3ebe1; color: var(--ink); }
.site-head .btn-primary { margin-left: auto; min-height: 42px; padding: 8px 16px; border-radius: 999px; font-size: 14.5px; }
.nav-toggle { display: grid; }
@media (min-width: 820px) { .site-nav { display: flex; } .nav-toggle { display: none; } }
.mobile-nav { display: none; border-top: 1px solid var(--border); background: #fffaf5; padding: 8px 18px 14px; }
.mobile-nav a { display: block; padding: 12px 4px; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid #f1ece4; }
.site-head.nav-open .mobile-nav { display: block; }
@media (min-width: 820px) { .site-head.nav-open .mobile-nav { display: none; } }

/* ---------- Typo chung ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--brand-d); background: var(--brand-soft); padding: 5px 12px; border-radius: 999px; }
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.section-head h2 { font-size: clamp(26px, 4.4vw, 38px); line-height: 1.18; margin: 12px 0 10px; letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin: 0; font-size: 16px; }
.grad { background: linear-gradient(100deg, #e8590c, #e03170); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 30px; overflow: hidden; position: relative; }
.hero::before { content: ''; position: absolute; width: 620px; height: 620px; right: -200px; top: -160px; background: radial-gradient(circle, rgba(255,166,120,.35), transparent 65%); pointer-events: none; }
.hero .wrap { display: grid; gap: 40px; align-items: center; position: relative; }
@media (min-width: 900px) { .hero { padding: 70px 0 60px; } .hero .wrap { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { font-size: clamp(34px, 6.2vw, 58px); line-height: 1.08; letter-spacing: -.03em; margin: 16px 0 16px; }
.hero-lead { font-size: 17.5px; color: #5b544c; max-width: 540px; margin: 0 0 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cta .btn { min-height: 52px; padding: 12px 24px; font-size: 16px; border-radius: 14px; }
.hero-cta .btn-primary { box-shadow: 0 10px 24px rgba(232,89,12,.3); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: #5b544c; font-size: 14px; font-weight: 500; }
.trust li { display: flex; align-items: center; gap: 6px; }
.trust svg { width: 18px; height: 18px; color: var(--ok); stroke-width: 2.6; }

.hero-visual { position: relative; display: flex; justify-content: center; min-height: 520px; }
.hero-phone { width: 280px; height: 560px; border: 10px solid #1d1a17; border-radius: 42px; overflow: hidden; box-shadow: 0 30px 60px rgba(60,30,10,.25); background: #fff; position: relative; transform: rotate(-3deg); }
.hero-phone-screen { width: 375px; transform: scale(.693); transform-origin: 0 0; pointer-events: none; transition: opacity .35s; }
.hero-phone-screen.fade { opacity: 0; }
.hero-tag { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); background: #1d1a17; color: #fff; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.hero-qr { position: absolute; z-index: 2; right: 4%; bottom: 40px; background: #fff; border-radius: 18px; padding: 12px; box-shadow: 0 18px 40px rgba(60,30,10,.18); text-align: center; transform: rotate(4deg); width: 140px; }
.hero-qr img { width: 112px; height: 112px; image-rendering: pixelated; display: block; margin: 0 auto 4px; }
.hero-qr b { font-size: 12.5px; display: block; }
.hero-qr span { font-size: 11px; color: var(--muted); }
.hero-pdf { position: absolute; z-index: 2; left: 0; top: 40px; background: #fff; border-radius: 14px; padding: 10px 14px; box-shadow: 0 14px 30px rgba(60,30,10,.15); display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; transform: rotate(-4deg); }
.hero-pdf i { width: 34px; height: 40px; border-radius: 6px; background: #e03131; color: #fff; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800; }
.hero-pdf small { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; }
@media (max-width: 420px) { .hero-qr { right: -4px; width: 120px; } .hero-qr img { width: 92px; height: 92px; } .hero-pdf { left: -6px; } }

/* ---------- Phù hợp với ---------- */
.uses { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.uses span { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow); }
.uses span i { font-style: normal; margin-right: 6px; }

/* ---------- Tính năng ---------- */
.features { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: #fff; border-radius: 20px; padding: 22px; border: 1px solid rgba(232,226,217,.8); box-shadow: var(--shadow); }
.feature .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 6px; font-size: 17.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Các bước ---------- */
.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; background: linear-gradient(180deg, #fff, #fff7f0); border-radius: 20px; padding: 24px 22px 22px; border: 1px solid #f3dfcf; }
.step::before { counter-increment: step; content: counter(step); width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 17.5px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Showcase mẫu ---------- */
.showcase { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 760px) { .showcase { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .showcase { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.showcase a { text-decoration: none; color: var(--ink); }
.showcase .tpl-card { display: block; width: 100%; }
.center { text-align: center; margin-top: 26px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; padding: 14px 0; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq p { margin: 0 0 16px; color: #5b544c; }

/* ---------- CTA cuối & footer ---------- */
.cta-band { margin: 20px 18px 60px; border-radius: 28px; padding: 44px 24px; text-align: center; color: #fff; background: linear-gradient(120deg, #e8590c, #e03170); box-shadow: 0 20px 50px rgba(224,49,112,.25); }
.cta-band h2 { font-size: clamp(26px, 4.5vw, 38px); margin: 0 0 10px; letter-spacing: -.02em; }
.cta-band p { margin: 0 0 22px; opacity: .92; }
.cta-band .btn { background: #fff; color: var(--brand-d); border-color: #fff; min-height: 52px; padding: 12px 26px; font-size: 16px; border-radius: 14px; }
@media (min-width: 1196px) { .cta-band { max-width: 1160px; margin-left: auto; margin-right: auto; } }
.site-foot { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.site-foot nav { display: flex; gap: 18px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* =================== Thư viện mẫu (/mau) =================== */
.g-hero { padding: 34px 0 10px; }
.g-hero h1 { font-size: clamp(28px, 5vw, 42px); margin: 12px 0 8px; letter-spacing: -.02em; }
.g-hero p { color: var(--muted); margin: 0; font-size: 16px; }
.g-toolbar { position: sticky; top: 62px; z-index: 20; background: rgba(255,250,245,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 12px 0 10px; border-bottom: 1px solid rgba(232,226,217,.7); }
.g-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.g-search { flex: 1 1 240px; position: relative; }
.g-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.g-search input { width: 100%; border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 14px 11px 40px; font-size: 16px; background: #fff; outline: none; }
.g-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,89,12,.15); }
.g-select { border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 12px; background: #fff; font-weight: 600; font-size: 14.5px; min-height: 46px; }
.g-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-top: 10px; padding-bottom: 2px; }
.g-chips::-webkit-scrollbar { display: none; }
.g-chips .chip { flex: none; }
.chip .n { opacity: .55; font-weight: 500; margin-left: 4px; }
.g-sub { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 14px; font-size: 14px; color: var(--muted); }
.g-sub .seg button { padding: 6px 12px; font-size: 13.5px; }

.g-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 700px) { .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1040px) { .g-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.g-card { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); border: 2px solid transparent; display: flex; flex-direction: column; position: relative; }
.g-card.is-current { border-color: var(--brand); }
.g-thumb { display: block; width: 100%; border: 0; padding: 0; cursor: pointer; background: #f1ece4; position: relative; }
.g-thumb .tpl-thumb { height: 260px; }
@media (max-width: 699px) { .g-thumb .tpl-thumb { height: 220px; } }
.g-thumb .tpl-thumb:empty::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #f1ece4, #faf6f1, #f1ece4); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.g-badges { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; gap: 6px; }
.g-badges span { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.g-badges .b-new { background: #1e88e5; color: #fff; }
.g-badges .b-cur { background: var(--brand); color: #fff; }
.g-meta { padding: 10px 12px 4px; flex: 1; }
.g-meta b { display: block; font-size: 15px; }
.g-meta span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-meta .tpl-dots { margin-top: 6px; }
.g-actions { display: flex; gap: 6px; padding: 8px 10px 12px; }
.g-actions .btn { flex: 1; min-height: 38px; padding: 6px 8px; font-size: 13.5px; border-radius: 10px; }
.g-empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.g-more { display: flex; justify-content: center; margin: 26px 0 50px; }
.g-more .btn { min-width: 220px; }

/* Hộp xem trước */
.pv { border: 0; padding: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; background: #2a2622; color: #fff; }
.pv[open] { display: flex; flex-direction: column; }
.pv::backdrop { background: rgba(20,16,12,.6); }
@media (min-width: 900px) { .pv { width: min(1100px, 94vw); height: min(820px, 92vh); border-radius: 24px; margin: auto; overflow: hidden; } }
.pv-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.pv-head .seg { background: rgba(255,255,255,.12); margin-right: auto; }
.pv-head .seg button { color: rgba(255,255,255,.7); }
.pv-head .seg button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.pv-head .icon-btn { color: #fff; }
.pv-head .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.pv-main { flex: 1; display: flex; min-height: 0; }
.pv-stage { flex: 1; overflow: auto; display: flex; justify-content: center; align-items: flex-start; }
.pv-phone { width: 100%; min-height: 100%; background: #fff; }
.pv-paper { width: 794px; transform-origin: 0 0; margin: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.pv-side { display: none; }
.pv-foot { display: flex; align-items: center; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); background: #1d1a17; }
.pv-foot .pv-name { flex: 1; min-width: 0; }
.pv-foot .pv-name b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-foot .pv-name span { font-size: 12.5px; opacity: .7; }
.pv-foot .btn-primary { min-height: 46px; }
@media (min-width: 900px) {
  .pv-stage { padding: 20px; background: #ece6dd; }
  .pv-phone { width: 375px; min-height: 0; height: 100%; border: 10px solid #1d1a17; border-radius: 40px; overflow-y: auto; flex: none; }
  .pv-phone::-webkit-scrollbar { width: 0; }
  .pv-side { display: flex; flex-direction: column; gap: 10px; width: 320px; flex: none; padding: 26px 24px; background: #fff; color: var(--ink); overflow-y: auto; }
  .pv-side h2 { margin: 0; font-size: 24px; }
  .pv-side p { margin: 0; color: var(--muted); }
  .pv-side .tags { display: flex; flex-wrap: wrap; gap: 6px; }
  .pv-side .tags span { font-size: 12.5px; background: #f3ebe1; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
  .pv-side .tpl-dots i { width: 22px; height: 22px; }
  .pv-side .btn-primary { margin-top: auto; min-height: 50px; font-size: 16px; }
  .pv-side ul { margin: 6px 0; padding-left: 18px; color: #5b544c; font-size: 14px; }
  .pv-foot { display: none; }
}
@media (max-width: 699px) {
  .g-actions .btn:not(.btn-primary) { display: none; }
  .g-sub .seg button { padding: 6px 10px; }
}
