:root{
  --bg:#0b0f14;
  --panel:#0f1620;
  --card:#121b27;
  --text:#e8eef7;
  --muted:#9db0c7;
  --border:rgba(255,255,255,.10);
  --accent:#ff6a00;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

:root[data-theme="light"]{
  --bg:#f4f6f8;
  --panel:#ffffff;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:rgba(17,24,39,.12);
  --accent:#ff6a00;
  --shadow: 0 10px 30px rgba(0,0,0,.10);
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a{ color:inherit; text-decoration:none; }

.topbar{
  position: sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 18px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(90deg, rgba(255,106,0,.18), rgba(255,106,0,0) 55%), var(--panel);
  backdrop-filter: blur(6px);
}

.brand{ display:flex; flex-direction:column; }
.logo{ font-weight:800; letter-spacing:.2px; font-size:18px; }
.subtitle{ color:var(--muted); font-size:12px; margin-top:2px; }

.top-actions{ display:flex; gap:10px; align-items:center; }

.layout{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:16px;
  padding:16px;
  max-width:1400px;
  margin:0 auto;
}

.sidebar .panel{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius:16px;
  padding:14px;
  box-shadow: var(--shadow);
}

.panel-title{
  font-weight:700;
  margin-bottom:10px;
}

.label{
  display:block;
  color:var(--muted);
  font-size:12px;
  margin:10px 0 6px;
}

.input{
  width:100%;
  border:1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding:10px 12px;
  border-radius:10px;
  outline:none;
}

.hint{
  margin-top:12px;
  color: var(--muted);
  font-size:12px;
  line-height:1.45;
}

.content{
  min-width:0;
}

.grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:14px;
}

.card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  min-height: 230px;
}

.thumb{
  height:120px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:rgba(255,255,255,.35);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,106,0,.18), rgba(255,106,0,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0));
  border-bottom:1px solid var(--border);
  font-weight:700;
}

:root[data-theme="light"] .thumb{
  color: rgba(17,24,39,.35);
}

.card-body{
  padding:12px 12px 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.title{
  margin:0;
  font-size:14px;
  line-height:1.25;
  font-weight:800;
  text-transform: uppercase;
}

.meta{ display:flex; flex-wrap:wrap; gap:6px; }
.chip{
  border:1px solid var(--border);
  color: var(--muted);
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
}

.price{
  font-size:16px;
  font-weight:900;
}

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:auto;
}

.muted{ color:var(--muted); font-size:12px; }

.btn{
  border:none;
  background: var(--accent);
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}

.btn.ghost{
  background: transparent;
  border:1px solid var(--border);
  color: var(--text);
}

.btn.full{ width:100%; }

.pagination{
  margin:16px 0 6px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
}

.pageinfo{ color:var(--muted); font-size:13px; }

@media (max-width: 1200px){
  .grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px){
  .grid{ grid-template-columns: 1fr; }
}