/*
Theme Name: C-Stems Chalkboard
Theme URI: https://www.c-stems.com/store/
Description: Chalkboard classroom theme for C-Stems.com 中文童書網. Works with Ecwid.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: cstems-chalk
*/

:root{
  --board:#26402F; --board2:#2F4F3B; --wood:#6B4426; --wood-dk:#4E3019; --frame:#8B5A2B;
  --chalk:#F5F1E6; --chalk2:#E6E9DF; --muted:#C9D1C3;
  --yellow:#F6D365; --yellow-dk:#C9A23A; --pink:#F4A6B8; --blue:#9FD3F2;
  --paper:#FFFBEF; --ink:#22221E; --ink2:#3F3F37;
  --hand:'Patrick Hand','LXGW WenKai TC',cursive;
  --kai:'LXGW WenKai TC','Patrick Hand',cursive;
  --body:'Nunito','Noto Sans TC',system-ui,-apple-system,'PingFang TC','Microsoft JhengHei',sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--board);color:var(--chalk);font-family:var(--body);font-size:16px;line-height:1.55}
img{max-width:100%;height:auto}
a{color:var(--chalk);text-decoration:none}
a:hover,a:focus-visible{color:var(--yellow)}
:focus-visible{outline:3px solid var(--yellow);outline-offset:2px}
.wrap{max-width:1200px;margin:0 auto;padding:0 16px}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.kai{font-family:var(--kai)} .hand{font-family:var(--hand)}
.sm-only{display:flex} .lg-only{display:none!important}

/* ---------- Wood strip ---------- */
.strip{background:var(--wood);border-bottom:3px solid var(--wood-dk);color:#FBEFD9;font-size:14px}
.strip .wrap{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:40px}
.strip a{color:#FBEFD9}
.strip .ship{display:none}
.classic-btn{background:var(--yellow);color:#3A2512!important;padding:5px 12px;border-radius:999px;font-weight:800;white-space:nowrap}
.classic-btn:hover{background:#FFE08A}
.langs{display:flex;gap:14px;font-weight:700}

/* ---------- Header (one row) ---------- */
.site-header{border-bottom:2px dashed rgba(245,241,230,.35)}
.site-header .wrap{display:flex;align-items:center;gap:20px;padding-top:10px;padding-bottom:10px}
.brand{display:flex;align-items:center;gap:10px;flex:none}
.brand-mark{width:42px;height:42px;border-radius:12px;background:var(--yellow);color:var(--board);display:flex;align-items:center;justify-content:center;font-family:var(--kai);font-weight:700;font-size:25px;transform:rotate(-4deg)}
.brand-text{display:flex;flex-direction:column;line-height:1.05}
.brand-text b{font-family:var(--hand);font-weight:400;font-size:23px}
.brand-text span{font-family:var(--kai);font-size:14px;color:var(--yellow)}
.main-nav{display:none}
.header-tools{display:flex;gap:8px;align-items:center;margin-left:auto}
.icon-btn{width:44px;height:44px;border-radius:999px;border:2px solid rgba(245,241,230,.6);display:flex;align-items:center;justify-content:center}
.search-pill{display:none}

/* Phone shortcut row */
.chips{display:flex;gap:8px;overflow-x:auto;padding:10px 16px;white-space:nowrap;border-bottom:2px dashed rgba(245,241,230,.35);scrollbar-width:none;-webkit-overflow-scrolling:touch}
.chips::-webkit-scrollbar{display:none}
.chips a{flex:none;border:2px solid currentColor;border-radius:999px;padding:6px 14px;font-family:var(--kai);font-size:17px;line-height:1.3}
.c-y{color:var(--yellow)!important}.c-p{color:var(--pink)!important}.c-b{color:var(--blue)!important}.c-w{color:#fff!important}

/* ---------- Sections ---------- */
.sec{padding-top:32px;padding-bottom:8px}
.sec-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.sec-title{margin:0;font-family:var(--kai);font-weight:700;font-size:28px;line-height:1.25}
.sec-title small{font-family:var(--hand);font-weight:400;font-size:20px;margin-left:6px}
.see-all{font-family:var(--hand);font-size:19px;color:var(--yellow)}

/* Hero board */
.board{background:var(--board2);border:8px solid var(--frame);border-radius:10px;box-shadow:inset 0 0 60px rgba(0,0,0,.35),0 12px 26px rgba(0,0,0,.35);padding:18px 16px 20px;position:relative}
.hero-h{margin:0 0 12px;font-family:var(--kai);font-weight:700;font-size:clamp(22px,7vw,30px);line-height:1.3;color:#fff}
.hero-h span,.hero-h em{display:inline-block}
.hero-h em{font-style:normal;color:var(--yellow);border-bottom:3px solid var(--pink)}
#glt-translate-trigger{display:none!important}

/* Popular picks */
.picks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.pick{background:var(--paper);color:var(--ink)!important;border-radius:6px;padding:8px 8px 12px;display:flex;flex-direction:column;gap:6px;box-shadow:0 8px 16px rgba(0,0,0,.3)}
.pick:nth-child(odd){transform:rotate(-.8deg)} .pick:nth-child(even){transform:rotate(.8deg)}
.pick:hover{transform:translateY(-2px)}
.pick .ph{display:block;aspect-ratio:1/1;background:#fff;border-radius:4px;overflow:hidden}
.pick .ph img{width:100%;height:100%;object-fit:contain;display:block}
.pick .pn{font-family:var(--kai);font-size:15px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.7em}
.pick .pp{font-weight:800}
.picks .pick:nth-child(n+5){display:none}
.hero-p{margin:0 0 16px;font-size:16px;color:var(--chalk2);max-width:600px}
.btns{display:flex;flex-direction:column;gap:10px}
.btn{display:inline-block;text-align:center;padding:13px 22px;border-radius:14px;font-weight:800;font-size:16px;line-height:1.3}
.btn-y{background:var(--yellow);color:#2A1C0E!important;box-shadow:0 4px 0 var(--yellow-dk)}
.btn-y:hover{background:#FFE08A}
.btn-o{border:2px solid var(--chalk)}
.btn-d{background:var(--board);color:var(--chalk)!important}
.hero-stats{display:none}
.hero-art{display:none}
.tray{display:none}

/* Age notes */
.ages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.note-card{background:#FDE2D6;color:var(--ink)!important;border-radius:6px;padding:16px;display:flex;flex-direction:column;gap:4px;box-shadow:0 8px 16px rgba(0,0,0,.3);position:relative}
.note-card:hover{transform:translateY(-2px) rotate(0deg)!important}
.note-card .pin{position:absolute;top:-8px;left:50%;width:16px;height:16px;margin-left:-8px;border-radius:999px;box-shadow:0 2px 3px rgba(0,0,0,.4)}
.note-card .age{font-family:var(--hand);font-size:32px;line-height:1}
.note-card b{font-family:var(--kai);font-size:18px}
.note-card .desc{display:none;font-size:14px;color:var(--ink2)}
.ages a:nth-child(1){background:#FDE2D6;transform:rotate(-1.5deg)} .ages a:nth-child(1) .pin{background:#E07A5F}
.ages a:nth-child(2){background:#FFF1B8;transform:rotate(1deg)} .ages a:nth-child(2) .pin{background:#3B82C4}
.ages a:nth-child(3){background:#D6F0E6;transform:rotate(-1deg)} .ages a:nth-child(3) .pin{background:#E07A5F}
.ages a:nth-child(4){background:#DCEBFA;transform:rotate(1.5deg)} .ages a:nth-child(4) .pin{background:#C9A23A}
.ages a:nth-child(5){background:#F7E1EA;transform:rotate(-1deg);grid-column:1 / -1} .ages a:nth-child(5) .pin{background:#3B82C4}

/* Topic chips */
.topics{display:flex;flex-wrap:wrap;gap:10px}
.topics a{border:2px dashed currentColor;border-radius:999px;padding:7px 14px;display:flex;gap:8px;align-items:center;font-family:var(--kai);font-size:18px;font-weight:700}
.topics a span{display:none;font-family:var(--hand);font-weight:400;color:var(--chalk2);font-size:17px}
.langrow{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px;font-size:15px;color:var(--chalk2);align-items:center}
.langrow a{text-decoration:underline}

/* Magazines */
.paper{background:var(--paper);color:var(--ink);border-radius:8px;border-left:6px solid #E8A0A0;box-shadow:0 12px 26px rgba(0,0,0,.35)}
.paper a{color:var(--ink)}
.mag-list{list-style:none;margin:0;padding:0}
.mag-list li+li{border-top:1px solid #CFE0EC}
.mag-list a{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px;min-height:56px}
.mag-list .nm{display:flex;flex-direction:column}
.mag-list .nm b{font-family:var(--kai);font-size:17px;line-height:1.3}
.mag-list .nm span{font-size:13px;color:#5A5A50}
.mag-list .pr{font-weight:800;white-space:nowrap}
.mag-list .pr small{display:block;font-weight:600;font-size:12px;color:#8A3A22;text-align:right}
.fine{margin:10px 0 0;font-size:13px;color:var(--muted)}

/* Help notes */
.helps{display:flex;flex-direction:column;gap:18px}
.help{background:var(--paper);color:var(--ink);border-radius:6px;padding:22px;display:flex;flex-direction:column;gap:10px;box-shadow:0 10px 22px rgba(0,0,0,.35)}
.help h3{margin:0;font-family:var(--kai);font-weight:700;font-size:24px;line-height:1.3}
.help p{margin:0;color:var(--ink2)}
.help .btn{align-self:flex-start}
.help.b{border-top:10px solid var(--blue);transform:rotate(-.6deg)}
.help.p{border-top:10px solid var(--pink);transform:rotate(.6deg)}

/* All products (Ecwid) + generic pages on a paper sheet */
.sheet{background:var(--paper);color:var(--ink);border-radius:8px;padding:16px 12px;box-shadow:0 12px 26px rgba(0,0,0,.35)}
.sheet a{color:#1F5C8A}
.sheet a:hover{color:#8A3A22}
.sheet h1,.sheet h2,.sheet h3{color:var(--ink)}
.page-title{margin:0 0 12px;font-family:var(--kai);font-weight:700;font-size:28px}
.content-area{padding-top:24px;padding-bottom:40px}

/* Trust ledge + footer */
.ledge{background:var(--wood);border-top:3px solid var(--wood-dk);border-bottom:3px solid var(--wood-dk);margin-top:40px}
.ledge .wrap{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding-top:18px;padding-bottom:18px}
.ledge b{display:block;font-family:var(--hand);font-weight:400;font-size:20px;color:var(--yellow)}
.ledge span{font-size:14px;color:#FBEFD9}
.ledge a{color:#FBEFD9;text-decoration:underline}
.site-footer{background:#1B2E22;color:var(--muted);font-size:14px}
.site-footer .cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;padding-top:32px;padding-bottom:20px}
.site-footer .cols>div{display:flex;flex-direction:column;gap:6px}
.site-footer b{color:var(--yellow)}
.site-footer a{color:var(--muted)}
.site-footer a:hover{color:var(--yellow)}
.site-footer .fname{font-family:var(--hand);font-weight:400;font-size:21px;color:#fff}
.site-footer .bottom{border-top:1px solid #2F4A38;padding-top:14px;padding-bottom:22px;font-size:13px;color:#A7B3A2}

/* ---------- Tablet / desktop ---------- */
@media (min-width:768px){
  .wrap{padding:0 32px}
  .strip .ship{display:inline}
  .sec{padding-top:56px;padding-bottom:12px}
  .sec-title{font-size:38px}
  .sec-title small{font-size:24px}
  .board{border-width:16px;padding:34px 44px 40px}
  .hero-h{font-size:40px}
  .hero-h span,.hero-h em{display:inline}
  .hero-p{font-size:19px}
  .btns{flex-direction:row;flex-wrap:wrap;gap:12px}
  .ages{grid-template-columns:repeat(5,minmax(0,1fr));gap:20px}
  .ages a:nth-child(5){grid-column:auto}
  .note-card{padding:22px 20px 24px;min-height:170px}
  .note-card .age{font-size:44px}
  .note-card .desc{display:block}
  .topics a span{display:inline}
  .helps{flex-direction:row}
  .helps .help{flex:1;padding:32px}
  .help h3{font-size:28px}
  .ledge .wrap,.site-footer .cols{grid-template-columns:repeat(4,minmax(0,1fr))}
  .sheet{padding:28px}
  .mag-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .mag-list li+li{border-top:0}
  .mag-list li{border-bottom:1px solid #CFE0EC}
  .mag-list li:nth-child(odd){border-right:1px solid #CFE0EC}
  .mag-list a{padding:14px 18px}
  .picks{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
  .picks .pick:nth-child(n+5){display:flex}
  .pick{padding:10px 10px 14px}
  .pick .pn{font-size:16px}
}
@media (min-width:1024px){
  .sm-only{display:none!important}
  .lg-only{display:flex!important}
  .main-nav{display:flex;gap:24px;white-space:nowrap;font-family:var(--kai);font-size:20px}
  .search-pill{display:flex;align-items:center;gap:8px;border:2px solid rgba(245,241,230,.6);border-radius:999px;padding:6px 14px;width:200px}
  .search-pill input{border:0;background:transparent;color:var(--chalk);font:inherit;font-size:15px;outline:none;width:100%}
  .search-pill input::placeholder{color:#C9D1C3}
  .search-icon{display:none!important}
  .hero-h{font-size:52px;white-space:nowrap}
  .hero-row{display:flex;gap:36px;align-items:center}
  .hero-row .txt{flex:1 1 560px}
  .hero-stats{display:flex;gap:28px;flex-wrap:wrap;font-family:var(--hand);font-size:20px;color:var(--chalk2);margin-top:18px}
  .hero-stats b{font-size:30px}
  .hero-art{display:block;flex:0 1 360px;height:240px;position:relative}
  .hero-art a{position:absolute;border-radius:8px;overflow:hidden;box-shadow:0 12px 24px rgba(0,0,0,.35);display:flex;align-items:flex-end;padding:12px;font-family:var(--kai);font-size:17px;background:#E07A5F;color:#fff}
  .hero-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
  .hero-art a:nth-child(1){left:0;top:20px;width:150px;height:200px;transform:rotate(-7deg)}
  .hero-art a:nth-child(2){left:120px;top:0;width:160px;height:215px;transform:rotate(5deg);background:#F6D365;color:#2A1C0E}
  .hero-art a:nth-child(3){left:210px;top:60px;width:150px;height:180px;transform:rotate(-3deg);background:#9FD3F2;color:#1B2B3A}
  .tray{display:flex;position:absolute;left:40px;right:40px;bottom:-30px;height:14px;background:var(--wood);border-radius:4px;gap:16px;align-items:center;padding-left:24px}
  .tray i{display:block;height:8px;border-radius:4px}
}
