:root{
  --bg:#ffffff;
  --fg:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --soft:#f8fafc;
  --brand:#2563eb;
  --btn:#0f172a;
  --btnfg:#ffffff;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue";
  color:var(--fg);
  background:var(--bg);
}
a{color:inherit; text-decoration:none}
a.underline{ text-decoration: underline;}
.container{max-width:1100px; margin:0 auto; padding:0 16px;}
.topbar{
  border-bottom:1px solid var(--border);
  background:#fff;
}
.topbar__inner{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px 0;
}
.brand{
  display:flex; align-items:center; gap:12px;
}
.brand__logo{
  width:44px; height:44px; border-radius:14px;
  background:var(--soft); display:flex; align-items:center; justify-content:center;
  font-weight:900;
}
.brand__title{font-weight:800; letter-spacing:.2px}
.brand__title span{color:var(--brand)}
.brand__subtitle{font-size:12px; color:var(--muted)}
.toplinks{display:none; gap:18px; font-size:13px; color:var(--muted)}
.toplinks a:hover{color:var(--fg)}
.login{
  display:flex; gap:8px; align-items:center;
}
.input{
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 12px;
  font-size:13px;
  outline:none;
  background:#fff;
}
.input:focus{border-color:#cbd5e1}
.btn{
  border:1px solid transparent;
  border-radius:999px;
  padding:10px 14px;
  font-size:13px;
  cursor:pointer;
  display:inline-flex; align-items:center; gap:8px;
}
.btn--primary{background:var(--btn); color:var(--btnfg)}
.btn--outline{background:#fff; border-color:var(--border); color:var(--fg); border-radius:12px}
.btn--ghost{background:transparent; color:var(--fg)}
.navbar{
  border-top:1px solid var(--border);
  background:#fff;
}
.navbar__inner{
  display:flex; justify-content:flex-end; gap:18px; padding:10px 0; font-size:13px; color:var(--fg);
}
.navbar__inner a{color:#334155}
.navbar__inner a:hover{text-decoration:underline}
.cartBadge{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:18px; height:18px;
  background:var(--fg); color:#fff;
  border-radius:999px; font-size:11px; padding:0 6px; margin-left:6px;
}
.hero{
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  padding:44px 0;
}
.hero h1{
  font-size:44px; line-height:1.05; margin:0;
}
.hero p{
  margin:18px 0 0;
  max-width:720px;
  color:#334155;
  line-height:1.6;
  font-size:15px;
}
.section{
  padding:28px 0 10px;
  border-bottom:1px solid var(--border);
}
.section__title{
  font-weight:700;
  margin:0 0 14px;
  font-size:14px;
  color:#0f172a;
}
.carousel{
  position:relative;
}
.carousel__track{
  display:flex;
  gap:34px;
  overflow:auto;
  scroll-behavior:smooth;
  padding:8px 44px 18px;
}
.carousel__track::-webkit-scrollbar{height:10px}
.carousel__track::-webkit-scrollbar-thumb{background:#cbd5e1; border-radius:999px}
.cardP{
  width:220px;
  flex:0 0 auto;
  text-align:center;
}
.cardP__img{
  height:120px;
  display:flex; align-items:center; justify-content:center;
}
.cardP__img img{
  max-height:120px;
  max-width:200px;
  object-fit:contain;
}
.placeholder{
  width:120px; height:120px; border-radius:18px; background:var(--soft);
}
.cardP__name{
  font-weight:600; margin-top:10px;
}
.cardP__meta{font-size:12px; color:var(--muted); margin-top:6px}
.cardP__price{font-size:12px; margin-top:8px; color:#111827}
.carousel__btn{
  position:absolute; top:50%;
  transform:translateY(-50%);
  width:40px; height:40px;
  border-radius:999px; background:#fff;
  border:1px solid var(--border);
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 20px rgba(15,23,42,.08);
}
.carousel__btn--left{left:0}
.carousel__btn--right{right:0}
.footer{
  border-top:1px solid var(--border);
  margin-top:46px;
  padding:42px 0;
}
.footergrid{
  display:grid;
  grid-template-columns: 1fr;
  gap:28px;
  font-size:13px;
}
.footer h4{margin:0 0 10px; font-size:13px}
.footer a{color:var(--muted); display:block; margin:8px 0}
.footer a:hover{text-decoration:underline}
.powered{font-size:11px; color:#94a3b8; margin-top:12px}

/* Catalog layout */
.breadcrumbs{font-size:12px; color:var(--muted); margin-top:12px}
.breadcrumbs a:hover{text-decoration:underline}
.h1{font-size:36px; font-weight:800; margin:14px 0 0}
.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:18px;
  margin-top:18px;
}
.panel{
  border:1px solid var(--border);
  background:#fff;
  border-radius:16px;
}
.panel__head{
  padding:14px 16px 10px;
  border-bottom:1px solid var(--border);
  font-weight:700;
}
.panel__body{padding:14px 16px}
.field{margin-bottom:10px}
.label{display:block; font-size:12px; color:var(--muted); margin-bottom:6px}
.row{display:flex; gap:10px}
.row .btn{border-radius:12px}
.catTree{margin-top:10px}
.catItem{
  display:flex; align-items:center; gap:8px;
  padding:7px 8px;
  border-radius:10px;
  cursor:pointer;
  font-size:13px;
}
.catItem:hover{background:var(--soft)}
.catItem--active{background:#eef2ff}
.chev{width:18px; height:18px; border-radius:8px; display:flex; align-items:center; justify-content:center;}
.chev:hover{background:#e2e8f0}
.catChildren{margin-left:22px; margin-top:4px}
.toolbar{
  display:flex; flex-direction:column; gap:10px;
  margin-bottom:12px;
}
.toolbar__row{
  display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between;
}
.select{
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  background:#fff;
  font-size:13px;
}
.tableWrap{overflow:auto}
table{border-collapse:collapse; width:100%; min-width:1100px}
thead tr{background:var(--soft); border-top:1px solid var(--border); border-bottom:1px solid var(--border)}
th,td{padding:10px 10px; text-align:left; font-size:12px; color:#0f172a}
td{border-bottom:1px solid var(--border); vertical-align:top}
td.muted{color:var(--muted)}
.thumb{
  width:40px; height:40px; border-radius:12px; background:var(--soft);
  display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.thumb img{max-width:40px; max-height:40px; object-fit:contain}
.small{font-size:11px; color:var(--muted)}
.actions{white-space:nowrap}
.pager{
  display:flex; gap:10px; align-items:center; justify-content:flex-end;
}
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--border);
  background:#fff;
  color:#334155;
}
.badge--soft{background:var(--soft)}
/* Product page */
.pgrid{display:grid; grid-template-columns:1fr; gap:18px; margin-top:16px}
.gallery{
  display:grid; grid-template-columns:1fr; gap:10px;
}
.gmain{
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--soft);
  display:flex; align-items:center; justify-content:center;
  min-height:340px;
  overflow:hidden;
}
.gmain img{max-width:100%; max-height:340px; object-fit:contain}
.gthumbs{display:flex; gap:10px; overflow:auto; padding-bottom:4px}
.gthumbs img{
  width:84px; height:84px;
  border-radius:16px;
  border:1px solid var(--border);
  background:#fff;
  object-fit:contain;
  cursor:pointer;
}
.kv{display:flex; flex-wrap:wrap; gap:10px; margin-top:10px}
.kv .badge{background:var(--soft)}
.priceBig{font-size:28px; font-weight:800; margin-top:8px}
.qtybox{display:flex; align-items:center; gap:8px; margin-top:14px}
.qtybtn{
  width:40px; height:40px; border-radius:12px; border:1px solid var(--border);
  background:#fff; cursor:pointer; font-size:18px;
}
.qtyval{width:70px; text-align:center; font-weight:700}
.hr{height:1px; background:var(--border); margin:18px 0}
/* Cart */
.cartItem{display:flex; flex-direction:column; gap:10px; padding:14px; border:1px solid var(--border); border-radius:16px; margin-bottom:12px}
.cartRow{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.totalBox{text-align:right}
.notice{color:var(--muted); font-size:12px; line-height:1.55}
@media (min-width: 920px){
  .toplinks{display:flex}
  .grid{grid-template-columns: 360px 1fr}
  .pgrid{grid-template-columns: 1.3fr .7fr}
  .footergrid{grid-template-columns: 1fr 1fr 1fr}
}

/* === Header logo replace === */
.brand__logo{width:auto;height:44px;border-radius:0;background:transparent;display:flex;align-items:center;justify-content:center;padding:0}
.brand__logo img{height:44px;width:auto;display:block}
.login{gap:12px}
/* Footer now 2 columns */
@media (min-width: 920px){.footergrid{grid-template-columns: 1fr 1fr;}}
