/* Kaichu Academy 2026 - Static site styles
   Design goal: real e-commerce / course purchase vibe, no "AI template" look.
*/
:root{
  --primary:#ff4d4f;
  --secondary:#faad14;
  --text:#222;
  --muted:#667085;
  --border:#e6e8ec;
  --bg:#f6f7fb;
  --card:#ffffff;
  --ok:#12b76a;
  --shadow:0 8px 24px rgba(16, 24, 40, .08);
  --radius:10px;
  --radius-sm:8px;
  --max:1180px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,"PingFang SC","Microsoft YaHei",Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}

.container{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:0 16px;
}

.topbar{
  background:#fff;
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:40;
}
.topbar-inner{
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:220px;
}
.brand-badge{
  width:36px;height:36px;border-radius:10px;
  background:linear-gradient(180deg,#fff1f0,#ffffff);
  border:1px solid #ffd6d7;
  display:grid;place-items:center;
  color:var(--primary);
  font-weight:800;
}
.brand-title{font-weight:800;letter-spacing:.2px}
.brand-sub{font-size:12px;color:var(--muted);margin-top:2px}
.nav{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.nav a{
  padding:8px 10px;
  border-radius:10px;
  color:#344054;
}
.nav a:hover{background:#f2f4f7}
.nav .cta{
  background:var(--primary);
  color:#fff;
  padding:10px 14px;
  box-shadow:0 10px 18px rgba(255,77,79,.18);
}
.nav .cta:hover{filter:brightness(.98)}

.hero{
  padding:24px 0 18px;
}
.hero-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow);
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:0;
}
.hero-left{
  padding:22px 20px 18px;
}
.hero-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background:#fff7e6;
  border:1px solid #ffe7ba;
  color:#ad4e00;
  font-size:12px;
  font-weight:600;
}
.hero h1{
  margin:12px 0 10px;
  font-size:28px;
  line-height:1.2;
  letter-spacing:-.2px;
}
.hero p{
  margin:0 0 14px;
  color:#475467;
  line-height:1.65;
}
.hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}
.btn{
  border:1px solid var(--border);
  background:#fff;
  color:#111827;
  border-radius:12px;
  padding:10px 14px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover{background:#f9fafb}
.btn:active{transform:translateY(1px)}
.btn-primary{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
  box-shadow:0 10px 18px rgba(255,77,79,.18);
}
.btn-primary:hover{filter:brightness(.98)}
.btn-secondary{
  background:#fff7e6;
  border-color:#ffe7ba;
  color:#ad4e00;
}
.hero-right{
  border-left:1px solid var(--border);
  background:#0b1220;
  position:relative;
  min-height:260px;
}
.hero-right img{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.88;
}
.hero-right .hero-overlay{
  position:absolute;inset:0;
  display:flex;
  align-items:flex-end;
  padding:14px;
  background:linear-gradient(180deg,rgba(0,0,0,0) 45%, rgba(0,0,0,.55));
  color:#fff;
}
.hero-metrics{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  width:100%;
}
.metric{
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  border-radius:14px;
  padding:10px 10px 8px;
}
.metric b{display:block;font-size:16px}
.metric span{display:block;font-size:12px;opacity:.9;margin-top:2px}

.section{
  padding:14px 0 24px;
}
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin:8px 0 12px;
}
.section-head h2{
  margin:0;
  font-size:18px;
  letter-spacing:-.1px;
}
.section-head p{
  margin:0;
  color:var(--muted);
  font-size:13px;
}

.grid{
  display:grid;
  gap:14px;
}
.grid.courses{
  grid-template-columns:repeat(4,1fr);
}
@media (max-width: 980px){
  .grid.courses{grid-template-columns:repeat(3,1fr)}
}
@media (max-width: 740px){
  .grid.courses{grid-template-columns:repeat(2,1fr);gap:10px}
}

.course-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 2px 10px rgba(16,24,40,.06);
  transition:transform .14s ease, box-shadow .14s ease;
}
.course-card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(16,24,40,.10);
}
.course-media{
  position:relative;
  aspect-ratio: 4/3;
  background:#111827;
}
.course-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.tag{
  position:absolute;
  top:10px;left:10px;
  font-size:12px;
  padding:3px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.06);
  color:#111827;
  font-weight:700;
}
.tag.hot{background:#fff1f0;border-color:#ffd6d7;color:#b42318}
.tag.new{background:#ecfdf3;border-color:#abefc6;color:#067647}
.tag.pro{background:#eff8ff;border-color:#b2ddff;color:#175cd3}

.course-body{
  padding:12px 12px 10px;
}
.course-title{
  font-size:14px;
  line-height:1.35;
  margin:0 0 6px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.course-desc{
  margin:0 0 10px;
  font-size:12px;
  color:#667085;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:32px;
}
.price-row{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}
.price{
  display:flex;align-items:baseline;gap:6px;
}
.price .now{
  color:var(--primary);
  font-weight:900;
  font-size:18px;
}
.price .old{
  color:#98a2b3;
  font-size:12px;
  text-decoration:line-through;
}
.meta{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  color:#98a2b3;
}
.stars{display:inline-flex;gap:2px;align-items:center}
.star{width:14px;height:14px;display:inline-block}

.pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--border);
  color:#344054;
  font-size:12px;
}
.pill b{color:#111827}

.info-strip{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}
@media (max-width: 900px){
  .info-strip{grid-template-columns:repeat(2,1fr)}
}
.strip-item{
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
}
.strip-item h3{margin:0 0 6px;font-size:14px}
.strip-item p{margin:0;color:#667085;font-size:12px;line-height:1.6}

.panel{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
}
.panel.pad{padding:16px}

.split{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:14px;
  align-items:start;
}
@media (max-width: 900px){
  .split{grid-template-columns: 1fr}
}

.breadcrumb{
  color:#667085;
  font-size:12px;
  margin:12px 0 10px;
}
.breadcrumb a{color:#475467}
.breadcrumb span{opacity:.7}

.detail-hero{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
@media (max-width: 900px){
  .detail-hero{grid-template-columns:1fr}
}
.gallery{
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#111827;
}
.gallery img{
  width:100%;
  height:100%;
  object-fit:cover;
  aspect-ratio: 16/10;
}
.thumbs{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin-top:10px;
}
.thumb{
  border-radius:12px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#111827;
  cursor:pointer;
}
.thumb img{width:100%;height:100%;object-fit:cover;aspect-ratio:16/10}
.thumb.active{outline:2px solid rgba(255,77,79,.45);border-color:#ffd6d7}

.detail-title{margin:0;font-size:20px;line-height:1.25}
.detail-sub{margin:8px 0 0;color:#667085;line-height:1.65}
.detail-badges{margin-top:10px;display:flex;flex-wrap:wrap;gap:8px}
.detail-buy{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}
.detail-buy .btn{flex:1;min-width:170px}

.kv{
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap:10px;
  margin-top:12px;
}
@media (max-width: 740px){
  .kv{grid-template-columns: repeat(2,1fr)}
}
.kv .k{
  border:1px dashed #d0d5dd;
  border-radius:14px;
  padding:10px;
  background:#fafbff;
}
.kv .k b{display:block;font-size:12px}
.kv .k span{display:block;color:#667085;font-size:12px;margin-top:3px;line-height:1.4}

.list{
  display:grid;
  gap:10px;
  margin-top:10px;
}
.li{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
}
.li .dot{
  width:22px;height:22px;border-radius:8px;
  display:grid;place-items:center;
  background:#fff1f0;
  border:1px solid #ffd6d7;
  color:#b42318;
  font-weight:900;
  flex:0 0 22px;
}
.li p{margin:0;color:#475467;line-height:1.65;font-size:13px}

.review{
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
}
.review-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.review-name{font-weight:800}
.review-date{font-size:12px;color:#98a2b3}
.review-text{margin:8px 0 0;color:#475467;line-height:1.7;font-size:13px}

.form{
  display:grid;
  gap:10px;
}
.field{
  display:grid;
  gap:6px;
}
.field label{font-size:12px;color:#475467;font-weight:700}
.field input,.field textarea,.field select{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  outline:none;
}
.field textarea{min-height:88px;resize:vertical}
.hint{font-size:12px;color:#98a2b3;line-height:1.55}

.summary{
  display:grid;
  gap:10px;
}
.sum-line{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  font-size:13px;
  color:#475467;
}
.sum-line b{color:#111827}
.sum-total{
  padding-top:10px;
  border-top:1px dashed #d0d5dd;
}
.sum-total .sum-line{font-size:14px}
.sum-total .money{color:var(--primary);font-weight:900}
.notice{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid #ffe7ba;
  background:#fff7e6;
  color:#ad4e00;
  font-size:12px;
  line-height:1.65;
}

.footer{
  padding:18px 0 26px;
  color:#667085;
}
.footer-inner{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px 16px;
}
.foot-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:12px;
}
@media (max-width: 900px){
  .foot-grid{grid-template-columns:1fr}
}
.foot-title{margin:0 0 6px;font-weight:900;color:#111827}
.foot-meta{margin:0;color:#667085;line-height:1.7;font-size:13px}
.foot-links{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
.foot-links a{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:12px;
}
.foot-links a:hover{background:#f9fafb}
.beian{
  margin-top:10px;
  font-size:12px;
}
.beian a{color:#344054;text-decoration:underline;text-underline-offset:3px}

/* Floating actions */
.float-actions{
  position:fixed;
  left:16px;
  bottom:calc(16px + env(safe-area-inset-bottom));
  z-index:60;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.float-actions.right{
  left:auto;
  right:16px;
}
.float-btn{
  border:none;
  cursor:pointer;
  border-radius:999px;
  padding:12px 14px;
  background:#111827;
  color:#fff;
  box-shadow:0 14px 30px rgba(16,24,40,.18);
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.float-btn.secondary{
  background:#fff;
  color:#111827;
  border:1px solid var(--border);
}
.float-btn .bubble{
  width:10px;height:10px;border-radius:999px;background:var(--ok);
  box-shadow:0 0 0 3px rgba(18,183,106,.16);
}
.float-btn small{opacity:.92}
.float-btn:active{transform:translateY(1px)}

/* AI chat panel */
.chat-panel{
  position:fixed;
  left:16px;
  bottom:calc(74px + env(safe-area-inset-bottom));
  width:min(360px, calc(100vw - 32px));
  max-height:72vh;
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
  overflow:hidden;
  z-index:70;
  display:none;
}
.chat-panel.open{display:block}
.chat-head{
  padding:12px 12px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.chat-head b{font-size:13px}
.chat-head span{font-size:12px;color:#667085}
.chat-close{
  border:none;
  background:#f2f4f7;
  border-radius:10px;
  padding:6px 10px;
  cursor:pointer;
}
.chat-body{
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:auto;
  max-height:calc(72vh - 110px);
  background:#fbfcff;
}
.msg{
  max-width:86%;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  color:#344054;
  line-height:1.55;
  font-size:13px;
}
.msg.me{
  margin-left:auto;
  background:#fff1f0;
  border-color:#ffd6d7;
  color:#7a271a;
}
.chat-foot{
  border-top:1px solid var(--border);
  padding:10px 10px;
  display:flex;
  gap:8px;
  background:#fff;
}
.chat-foot input{
  flex:1;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  outline:none;
}
.chat-foot button{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#111827;
  color:#fff;
  cursor:pointer;
}
.chat-suggest{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:2px;
}
.chip{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
  font-size:12px;
  color:#344054;
}
.chip:hover{background:#f9fafb}

/* Modal */
.modal{
  position:fixed;inset:0;
  background:rgba(16,24,40,.45);
  z-index:80;
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.modal.open{display:flex}
.modal-card{
  width:min(520px, 100%);
  background:#fff;
  border-radius:16px;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.modal-card header{
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.modal-card header b{font-size:14px}
.modal-card .content{padding:14px}
.modal-card .content p{margin:0;color:#475467;line-height:1.7}
.modal-card .actions{
  padding:12px 14px;
  border-top:1px solid var(--border);
  display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;
}

/* Small helpers */
.hide{display:none !important}
.muted{color:var(--muted)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}
