/* ============================================================
   Tren Tay — he thiet ke
   Doi mau thuong hieu: sua --primary va --accent ben duoi
   ============================================================ */
:root{
  --bg:#f7f8fb;
  --panel:#ffffff;
  --panel-2:#f2f4f9;
  --text:#131722;
  --muted:#5f6880;
  --border:#e3e7f0;
  --primary:#2f6bff;
  --primary-dark:#1e4fd8;
  --accent:#00c2a8;
  --success:#12a150;
  --danger:#e5484d;
  --radius:14px;
  --radius-sm:9px;
  --shadow:0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
  --shadow-lg:0 12px 40px rgba(16,24,40,.12);
  --maxw:1140px;
  --font:"Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0e1117; --panel:#161b25; --panel-2:#1d2331; --text:#e8ecf4;
    --muted:#98a2b8; --border:#262d3d; --primary:#5b8cff; --primary-dark:#3f74f5;
    --shadow:0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg:0 12px 40px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"]{
  --bg:#0e1117; --panel:#161b25; --panel-2:#1d2331; --text:#e8ecf4;
  --muted:#98a2b8; --border:#262d3d; --primary:#5b8cff; --primary-dark:#3f74f5;
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg:0 12px 40px rgba(0,0,0,.5);
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; font-family:var(--font); background:var(--bg); color:var(--text);
  line-height:1.65; -webkit-font-smoothing:antialiased;
}
img{max-width:100%; display:block}
a{color:var(--primary); text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{line-height:1.25; margin:0 0 .5em; font-weight:700; letter-spacing:-.02em}
h1{font-size:clamp(2rem,5vw,3.1rem)}
h2{font-size:clamp(1.5rem,3vw,2.1rem)}
h3{font-size:1.15rem}
p{margin:0 0 1em}
.muted{color:var(--muted)}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 20px}
.center{text-align:center}
.hidden{display:none !important}

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter:blur(12px); border-bottom:1px solid var(--border);
}
.header-inner{display:flex; align-items:center; gap:20px; height:66px; max-width:var(--maxw); margin:0 auto; padding:0 20px}
.brand{display:flex; align-items:center; gap:10px; font-weight:800; font-size:1.15rem; color:var(--text); text-decoration:none; letter-spacing:-.03em}
.brand:hover{text-decoration:none}
.brand-mark{
  width:32px; height:32px; border-radius:9px; display:grid; place-items:center;
  background:linear-gradient(135deg,var(--primary),var(--accent)); color:#fff; font-size:1rem; font-weight:800;
}
.main-nav{display:flex; gap:4px; margin-left:auto}
.main-nav a{
  padding:8px 13px; border-radius:var(--radius-sm); color:var(--muted);
  font-size:.94rem; font-weight:500; transition:.15s;
}
.main-nav a:hover,.main-nav a.active{background:var(--panel-2); color:var(--text); text-decoration:none}
.header-right{display:flex; align-items:center; gap:8px}
.icon-btn{
  width:38px; height:38px; border-radius:var(--radius-sm); border:1px solid var(--border);
  background:var(--panel); color:var(--text); cursor:pointer; display:grid; place-items:center; font-size:1rem;
}
.icon-btn:hover{background:var(--panel-2)}
.nav-toggle{display:none}
.user-chip{display:flex; align-items:center; gap:8px; padding:4px 12px 4px 4px; border:1px solid var(--border); border-radius:999px; font-size:.88rem; font-weight:600}
.user-chip img{width:28px; height:28px; border-radius:50%}

/* ---------- Nut ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 22px; border-radius:var(--radius-sm); font-weight:600; font-size:.95rem;
  border:1px solid transparent; cursor:pointer; transition:.18s; white-space:nowrap;
  font-family:inherit;
}
.btn:hover{text-decoration:none; transform:translateY(-1px)}
.btn:disabled{opacity:.55; cursor:not-allowed; transform:none}
.btn-primary{background:var(--primary); color:#fff}
.btn-primary:hover{background:var(--primary-dark)}
.btn-ghost{background:var(--panel); color:var(--text); border-color:var(--border)}
.btn-ghost:hover{background:var(--panel-2)}
.btn-lg{padding:14px 28px; font-size:1.02rem}
.btn-block{width:100%}

/* ---------- Hero ---------- */
.hero{
  padding:80px 0 70px; text-align:center; position:relative; overflow:hidden;
  background:radial-gradient(900px 380px at 50% -10%, color-mix(in srgb,var(--primary) 14%, transparent), transparent 70%);
}
.hero .eyebrow{
  display:inline-block; padding:6px 14px; border-radius:999px; background:var(--panel);
  border:1px solid var(--border); font-size:.85rem; font-weight:600; color:var(--muted); margin-bottom:22px;
}
.hero p.lead{font-size:1.15rem; color:var(--muted); max-width:640px; margin:0 auto 32px}
.hero-cta{display:flex; gap:12px; justify-content:center; flex-wrap:wrap}
.hero-stats{display:flex; gap:40px; justify-content:center; margin-top:52px; flex-wrap:wrap}
.hero-stats div{text-align:center}
.hero-stats b{display:block; font-size:1.8rem; font-weight:800; letter-spacing:-.03em}
.hero-stats span{font-size:.88rem; color:var(--muted)}

/* ---------- Section ---------- */
.section{padding:64px 0}
.section-head{margin-bottom:34px}
.section-head.row{display:flex; align-items:end; justify-content:space-between; gap:20px; flex-wrap:wrap}
.section-head h2{margin-bottom:6px}
.section-head p{margin:0; color:var(--muted)}

/* ---------- Luoi ---------- */
.grid{display:grid; gap:22px}
.products-grid{grid-template-columns:repeat(auto-fit,minmax(290px,1fr))}
.posts-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.why-grid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}

/* ---------- The san pham ---------- */
.card{
  background:var(--panel); border:1px solid var(--border); border-radius:var(--radius);
  overflow:hidden; box-shadow:var(--shadow); transition:.2s; display:flex; flex-direction:column;
}
.card:hover{transform:translateY(-3px); box-shadow:var(--shadow-lg); border-color:color-mix(in srgb,var(--primary) 40%, var(--border))}
.product-thumb{
  height:150px; display:grid; place-items:center; font-size:2.6rem;
  background:linear-gradient(135deg, color-mix(in srgb,var(--primary) 16%,transparent), color-mix(in srgb,var(--accent) 16%,transparent));
}
.card-body{padding:20px; display:flex; flex-direction:column; flex:1}
.product-title{font-size:1.1rem; font-weight:700; margin-bottom:6px}
.product-title a{color:var(--text)}
.product-sub{color:var(--muted); font-size:.92rem; margin-bottom:16px; flex:1}
.tag-row{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px}
.tag{font-size:.76rem; padding:3px 9px; border-radius:999px; background:var(--panel-2); color:var(--muted); font-weight:600}
.price-row{display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:14px; border-top:1px solid var(--border)}
.price{font-weight:800; font-size:1.15rem; letter-spacing:-.02em}
.price small{display:block; font-weight:500; font-size:.78rem; color:var(--muted); text-decoration:line-through}
.badge-free{color:var(--success); font-weight:700}

/* ---------- The bai viet ---------- */
.post-thumb{height:132px; background:var(--panel-2); display:grid; place-items:center; font-size:2rem}
.post-title{font-weight:700; font-size:1.02rem; margin-bottom:6px}
.post-title a{color:var(--text)}
.post-excerpt{color:var(--muted); font-size:.9rem; margin-bottom:12px; flex:1}
.post-meta{font-size:.82rem}

/* ---------- Vi sao chon ---------- */
.why{
  background:var(--panel); border:1px solid var(--border); border-radius:var(--radius);
  padding:24px; text-align:center;
}
.why .ico{font-size:1.9rem; margin-bottom:10px}
.why h3{font-size:1rem; margin-bottom:6px}
.why p{font-size:.9rem; color:var(--muted); margin:0}

/* ---------- Dai CTA ---------- */
.cta-band{
  background:linear-gradient(135deg,var(--primary),var(--accent)); color:#fff;
  border-radius:var(--radius); padding:48px 30px; text-align:center; margin:20px 0;
}
.cta-band h2{color:#fff}
.cta-band p{color:rgba(255,255,255,.9); max-width:560px; margin:0 auto 24px}
.cta-band .btn-ghost{background:#fff; color:var(--primary-dark); border-color:#fff}

/* ---------- Trang noi dung ---------- */
.page-head{padding:52px 0 26px; border-bottom:1px solid var(--border); margin-bottom:40px}
.page-head h1{margin-bottom:8px}
.page-head p{color:var(--muted); margin:0; max-width:680px}
.article{max-width:760px; margin:0 auto}
.article h2{margin-top:1.8em}
.article ul,.article ol{padding-left:22px}
.article li{margin-bottom:.4em}
.article code{background:var(--panel-2); padding:2px 6px; border-radius:5px; font-size:.9em}
.article blockquote{border-left:3px solid var(--primary); margin:1.4em 0; padding:2px 0 2px 18px; color:var(--muted)}
.callout{background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--primary); border-radius:var(--radius-sm); padding:16px 20px; margin:1.6em 0}
.callout p:last-child{margin:0}
table{width:100%; border-collapse:collapse; margin:1.4em 0; font-size:.94rem}
th,td{padding:11px 13px; border-bottom:1px solid var(--border); text-align:left}
th{font-weight:700; background:var(--panel-2)}
.table-wrap{overflow-x:auto}
.crumb{font-size:.88rem; color:var(--muted); margin-bottom:14px}

/* ---------- Chi tiet san pham ---------- */
.product-hero{display:grid; grid-template-columns:1.15fr .85fr; gap:44px; align-items:start; padding:48px 0}
.buy-box{background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); padding:24px; box-shadow:var(--shadow); position:sticky; top:90px}
.buy-box .price{font-size:2rem; margin-bottom:4px}
.spec-list{list-style:none; padding:0; margin:0 0 20px}
.spec-list li{padding:9px 0; border-bottom:1px solid var(--border); font-size:.92rem; display:flex; justify-content:space-between; gap:14px}
.spec-list li:last-child{border-bottom:0}
.spec-list b{font-weight:600}
.feat-list{list-style:none; padding:0; margin:0}
.feat-list li{padding-left:28px; position:relative; margin-bottom:11px}
.feat-list li::before{content:"\2713"; position:absolute; left:0; top:0; color:var(--success); font-weight:800}

/* ---------- Hop thoai thu lead ---------- */
.modal-backdrop{
  position:fixed; inset:0; background:rgba(9,12,20,.62); backdrop-filter:blur(4px);
  display:grid; place-items:center; padding:20px; z-index:100;
}
.modal{
  background:var(--panel); border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--shadow-lg); width:100%; max-width:420px; padding:28px; position:relative;
  max-height:90vh; overflow-y:auto;
}
.modal h3{margin-bottom:6px; font-size:1.3rem}
.modal .sub{color:var(--muted); font-size:.92rem; margin-bottom:22px}
.modal-close{position:absolute; top:14px; right:14px; background:none; border:0; font-size:1.4rem; color:var(--muted); cursor:pointer; line-height:1; padding:4px}
.step{display:flex; align-items:center; gap:8px; margin-bottom:20px; font-size:.82rem; color:var(--muted)}
.step i{width:26px; height:26px; border-radius:50%; background:var(--panel-2); display:grid; place-items:center; font-style:normal; font-weight:700; font-size:.8rem}
.step i.on{background:var(--primary); color:#fff}
.step hr{flex:1; border:0; border-top:1px solid var(--border); margin:0}
.field{margin-bottom:16px}
.field label{display:block; font-size:.88rem; font-weight:600; margin-bottom:6px}
.field input{
  width:100%; padding:11px 14px; border:1px solid var(--border); border-radius:var(--radius-sm);
  background:var(--bg); color:var(--text); font-size:.98rem; font-family:inherit;
}
.field input:focus{outline:2px solid color-mix(in srgb,var(--primary) 45%, transparent); outline-offset:1px; border-color:var(--primary)}
.field .err{color:var(--danger); font-size:.83rem; margin-top:5px; display:none}
.field.invalid .err{display:block}
.field.invalid input{border-color:var(--danger)}
.consent{display:flex; gap:9px; align-items:flex-start; font-size:.83rem; color:var(--muted); margin-bottom:18px}
.consent input{margin-top:3px; flex-shrink:0}
.gbtn-wrap{display:grid; place-items:center; margin-bottom:18px; min-height:44px}
.divider{display:flex; align-items:center; gap:12px; color:var(--muted); font-size:.82rem; margin:18px 0}
.divider::before,.divider::after{content:""; flex:1; border-top:1px solid var(--border)}
.ok-icon{font-size:2.6rem; text-align:center; margin-bottom:10px}

/* ---------- Footer ---------- */
.site-footer{background:var(--panel); border-top:1px solid var(--border); margin-top:70px; padding:52px 0 26px}
.footer-grid{display:grid; grid-template-columns:1.6fr repeat(3,1fr); gap:34px; margin-bottom:34px}
.footer-grid h4{font-size:.88rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:14px}
.footer-grid ul{list-style:none; padding:0; margin:0}
.footer-grid li{margin-bottom:9px}
.footer-grid a{color:var(--text); font-size:.93rem}
.footer-brand p{font-size:.92rem; color:var(--muted); max-width:300px}
.footer-bottom{border-top:1px solid var(--border); padding-top:22px; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:.88rem; color:var(--muted)}

/* ---------- Di dong ---------- */
@media (max-width:880px){
  .product-hero{grid-template-columns:1fr; gap:28px}
  .buy-box{position:static}
  .footer-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:760px){
  .nav-toggle{display:grid}
  .main-nav{
    position:fixed; inset:66px 0 auto 0; flex-direction:column; gap:0; background:var(--panel);
    border-bottom:1px solid var(--border); padding:10px 16px 18px; display:none; box-shadow:var(--shadow-lg);
  }
  .main-nav.open{display:flex}
  .main-nav a{padding:12px 10px; font-size:1rem}
  .hero{padding:56px 0 48px}
  .hero-stats{gap:26px}
  .section{padding:46px 0}
}
@media (max-width:480px){
  .footer-grid{grid-template-columns:1fr}
  .hero-cta .btn{width:100%}
}
