:root{
  /* color tokens */
  --ebay-blue: #0064D2;
  --bg-light: #f6f8fb;
  --card-light: #ffffff;
  --muted-light: #556174;
  --text-light: #0b1726;

  --bg-dark: #0b0f14;
  --card-dark: #0f1720;
  --muted-dark: #9aa6b2;
  --text-dark: #e6eef6;

  /* neutral tokens */
  --radius: 12px;
  --shadow: 0 8px 24px rgba(2,6,23,0.08);
  --accent: var(--ebay-blue);
  --glass: rgba(255,255,255,0.03);

  --max-width: 1200px;
  --gap: 14px;
}

/* theme switcher using data-theme on body */
body[data-theme="light"]{
  --bg: var(--bg-light);
  --card: var(--card-light);
  --muted: var(--muted-light);
  --text: var(--text-light);
  --card-shadow: 0 6px 20px rgba(2,6,23,0.06);
}
body[data-theme="dark"]{
  --bg: var(--bg-dark);
  --card: var(--card-dark);
  --muted: var(--muted-dark);
  --text: var(--text-dark);
  --card-shadow: 0 8px 30px rgba(0,0,0,0.7);
}

body { background: var(--bg); color: var(--text); transition: background 0.3s ease, color 0.3s ease; }

/* layout */
.container { max-width: var(--max-width); margin: 24px auto; padding: 0 16px; }
.site-header { background: linear-gradient(90deg, rgba(0,0,0,0.02), rgba(0,0,0,0.01)); box-shadow: var(--card-shadow); padding: 10px 0; position: sticky; top:0; z-index:40; }
.header-inner { max-width: var(--max-width); margin: 0 auto; display:flex; align-items:center; gap:12px; padding: 0 16px; }

/* brand */
.brand { display:flex; align-items:center; gap:10px; text-decoration:none; transition:all 0.2s ease; }
.brand:hover { opacity:0.8; }
.brand-logo { width:40px; height:40px; border-radius:8px; background: linear-gradient(135deg,var(--accent), #4b7bd8); color:white; display:flex; align-items:center; justify-content:center; font-weight:700; }
.brand-text { font-weight:700; color: var(--accent); font-size:1.05rem; }

/* search */
.search-wrap { flex:1; display:flex; gap:8px; align-items:center; max-width:600px; }
.search-input { flex:1; padding:10px 12px; border-radius:8px; border:1px solid rgba(2,6,23,0.06); background: var(--card); color:var(--text); transition:all 0.2s ease; }
.search-input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(0,100,210,0.1); }

/* header-right */
.header-right { display:flex; gap:10px; align-items:center; }

/* nav link */
.nav-link { color:var(--text); text-decoration:none; font-size:0.95rem; transition:color 0.2s ease; }
.nav-link:hover { color:var(--accent); }

/* footer */
.site-footer { margin-top:28px; padding: 18px; text-align:center; color:var(--muted); }

/* small helpers */
.muted { color: var(--muted); }
.small { font-size:0.85rem; }

.card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--card-shadow); transition:all 0.2s ease; }
.card:hover { box-shadow:var(--card-shadow); }

/* buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:8px 12px; border-radius:10px; cursor:pointer; border: none; background: transparent; color: var(--text); font-size:1rem; font-weight:600; transition:all 0.2s ease; }
.btn:hover { opacity:0.85; }
.btn:active { transform:scale(0.98); }

.btn.small { padding:6px 8px; font-size:0.95rem; }
.btn.primary { background: var(--accent); color: white; box-shadow: 0 6px 16px rgba(0,100,210,0.14); }
.btn.primary:hover { background:linear-gradient(135deg, var(--accent), #4b7bd8); }

.btn.outline { border:1px solid rgba(2,6,23,0.06); background: transparent; }
.btn.outline:hover { background:var(--glass); border-color:var(--accent); }

.btn.ghost { background: transparent; color: var(--muted); border:1px solid rgba(2,6,23,0.04); }
.btn.ghost:hover { background:var(--glass); color:var(--text); }

.btn.btn-ghost { background: transparent; color: var(--muted); border:1px solid rgba(2,6,23,0.04); }
.btn.btn-ghost:hover { background:var(--glass); color:var(--text); }

.cta { background: linear-gradient(90deg,var(--accent), #4b7bd8); color:white; padding:8px 12px; border-radius:10px; font-weight:700; text-decoration:none; display:inline-flex; align-items:center; gap:8px; transition:all 0.2s ease; }
.cta:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(0,100,210,0.2); }

.list-plain li { margin-bottom:8px; }
.list-plain { list-style:none; padding:0; }

/* utility grid */
.market-grid { display:grid; grid-template-columns: 260px 1fr; gap: 16px; margin-top: 18px; }
@media (max-width:980px){ .market-grid { grid-template-columns: 1fr; } }

.filters { display:flex; flex-direction:column; gap:12px; }
.filters h4 { margin-bottom:8px; }

.listings { display:flex; flex-direction:column; }

/* auctions grid */
.auctions-grid { display:grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap:14px; margin-top:12px; }
.auction-card { border-radius:12px; overflow:hidden; display:flex; flex-direction:column; gap:0; }

/* small responsive */
@media (max-width:640px){
  .search-wrap { display:block; }
  .search-input{ width:100%; margin-bottom:8px; }
  .header-inner { gap:8px; padding:0 12px; }
  .header-right { gap:6px; flex-wrap:wrap; }
  .auctions-grid { grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); }
}