:root{
  --bg:#f5f6f8; --card:#ffffff; --ink:#1b2236; --muted:#7a8499; --line:#e7eaf0;
  --brand:#3a7bd5; --accent:#f07820; --green:#00a651; --navy:#0d1b3e;
  --radius:14px; --tabh:64px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;max-width:100%;overflow-x:hidden}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans Bengali","Noto Sans",Arial,sans-serif;background:var(--bg);color:var(--ink);padding-bottom:calc(var(--tabh) + env(safe-area-inset-bottom))}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.wrap{max-width:1100px;margin:0 auto;padding:0 16px}

/* ---- Top bar ---- */
.topbar{position:sticky;top:0;z-index:50;background:rgba(245,246,248,.96);backdrop-filter:blur(8px);border-bottom:1px solid transparent;transition:border-color .2s,background .2s}
.topbar.stuck{background:#fff;border-bottom-color:var(--line)}
.topbar .wrap{display:flex;align-items:center;gap:12px;height:56px}
.brand{display:flex;align-items:center;gap:8px;font-weight:800;font-size:15px;white-space:nowrap}
.brand b{color:var(--accent);font-weight:800}
.topsearch{flex:1;display:none}
.topbar.stuck .topsearch{display:block}
.topbar.stuck .brand .brand-text{display:none}
.topsearch form{margin:0}
.topsearch input{width:100%;height:38px;border:0;background:#e9ebf0;border-radius:10px;padding:0 12px 0 36px;font-size:15px;color:var(--ink);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%237a8499' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:10px center}
.spacer{flex:1}
.topbar.stuck .spacer{display:none}
.langs{display:flex;gap:4px}
.langs a{font-size:12px;font-weight:700;padding:5px 8px;border-radius:8px;background:#e9ebf0;color:#44506a}
.langs a.on{background:var(--brand);color:#fff}
.iconbtn{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%}
.iconbtn svg{width:26px;height:26px}
.desk-nav{display:none;gap:4px;margin-left:12px}
.desk-nav a{padding:8px 12px;border-radius:8px;font-weight:600;font-size:14px;color:#44506a}
.desk-nav a:hover,.desk-nav a.on{color:var(--brand);background:#eaf1fb}

/* ---- Hero ---- */
.hero{padding:34px 0 30px;text-align:center}
.hero h1{font-size:clamp(24px,5.4vw,36px);line-height:1.25;margin:0 auto 22px;max-width:640px;font-weight:800;color:var(--ink)}
.search{max-width:640px;margin:0 auto;position:relative}
.search input{width:100%;height:54px;border:0;border-radius:12px;background:#fff;box-shadow:0 2px 10px rgba(13,27,62,.09);padding:0 16px 0 48px;font-size:17px;color:var(--ink);outline:none}
.search input:focus{box-shadow:0 0 0 2px var(--brand),0 2px 10px rgba(13,27,62,.09)}
.search svg{position:absolute;left:15px;top:15px;width:24px;height:24px;color:var(--muted)}
.noadv{display:inline-flex;align-items:center;gap:7px;margin-top:16px;background:#e6f6ec;color:#0a7a3d;font-weight:700;font-size:13px;padding:7px 14px;border-radius:30px}
.noadv svg{width:16px;height:16px}

/* ---- Sections ---- */
.sec{background:#fff;padding:26px 0 22px;border-top:1px solid var(--line)}
.sec:nth-of-type(even){background:#fff}
.sec-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:4px}
.sec-h h2{font-size:22px;margin:0;font-weight:800}
.sec-h a{font-size:14px;font-weight:700;color:var(--brand);white-space:nowrap}
.sec-sub{color:var(--muted);font-size:15px;margin:2px 0 14px}
.slider{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x proximity;padding:4px 16px 14px;margin:0 -16px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.slider::-webkit-scrollbar{display:none}
.card{flex:0 0 min(300px,78vw);scroll-snap-align:start;background:var(--card);border-radius:var(--radius);box-shadow:0 2px 10px rgba(13,27,62,.09);overflow:hidden;display:flex;flex-direction:column}
.card .im{aspect-ratio:16/10;background:#e9ebf0;overflow:hidden}
.card .im img{width:100%;height:100%;object-fit:cover}
.card .bd{padding:14px 16px 16px;display:flex;flex-direction:column;gap:8px;flex:1}
.card .nm{font-size:15.5px;line-height:1.35;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:42px}
.card .pr{margin-top:auto;font-weight:800;color:var(--green);font-size:16px;display:flex;justify-content:space-between;align-items:center}
.card .pr small{font-weight:600;color:var(--muted);font-size:12px}

/* ---- Catalog categories ---- */
.catlist{list-style:none;margin:6px 0 0;padding:0}
.catlist li a{display:flex;align-items:center;gap:16px;padding:14px 0;border-bottom:1px solid var(--line)}
.catlist li:last-child a{border-bottom:0}
.av{width:56px;height:56px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:22px;flex:0 0 56px}
.catlist .t{font-size:18px;font-weight:600}
.catlist .n{font-size:13px;color:var(--muted);margin-top:2px}

/* ---- Popular list ---- */
.poplist{list-style:none;margin:4px 0 0;padding:0}
.poplist li a{display:flex;align-items:center;justify-content:space-between;padding:15px 0;border-bottom:1px solid var(--line);font-size:17px}
.poplist li a svg{width:20px;height:20px;color:#9aa3b5}
.poplist li.more a{color:var(--brand);font-weight:600}
.empty{padding:40px 0;text-align:center;color:var(--muted)}

/* ---- Bottom tab bar ---- */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:60;background:#fff;border-top:1px solid var(--line);display:flex;padding-bottom:env(safe-area-inset-bottom)}
.tabbar a{flex:1;height:var(--tabh);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:12px;color:#5b6479}
.tabbar a svg{width:28px;height:28px}
.tabbar a.on{color:#3b5bdb}

/* ---- Desktop ---- */
@media (min-width:900px){
  body{padding-bottom:0}
  .tabbar{display:none}
  .desk-nav{display:flex}
  .spacer{flex:1}
  .slider{margin:0;padding:4px 2px 14px;flex-wrap:nowrap}
  .card{flex-basis:260px}
  .catlist{display:grid;grid-template-columns:1fr 1fr;column-gap:40px}
  .poplist{display:grid;grid-template-columns:1fr 1fr;column-gap:40px}
}
