
:root{
  --bg1:#050b17;
  --bg2:#02060f;
  --card:#0b1224;
  --text:#eaf0ff;
  --muted:#aab6d6;
  --line:rgba(255,255,255,.12);
  --pill:rgba(255,255,255,.08);
  --pillActive:rgba(255,255,255,.16);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 50% -20%, rgba(120,160,255,.18), transparent 60%),
    radial-gradient(900px 600px at 20% 0%, rgba(80,220,255,.10), transparent 60%),
    linear-gradient(180deg,var(--bg1),var(--bg2));
}

a{color:inherit;text-decoration:none}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  gap:16px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0));
}

.brand{display:flex;align-items:center;gap:14px;min-width:0}
.brand-logo{
  width:56px;height:56px;
  border-radius:12px;
  object-fit:cover;
  box-shadow:0 8px 26px rgba(0,0,0,.35);
}
.brand-text{min-width:0}
.brand-text h1{
  margin:0;
  font-size:20px;
  letter-spacing:.2px;
}
.brand-text p{
  margin:2px 0 0;
  color:var(--muted);
  font-size:12px;
}

.socials{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.social{
  font-size:12px;
  padding:8px 10px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  border-radius:999px;
}
.social:hover{background:rgba(255,255,255,.08)}

.container{max-width:1100px;margin:0 auto;padding:18px}

.featured{
  display:flex;
  justify-content:center;
  margin:16px 0 10px;
}

.featured-carousel{
  width:min(980px, 96vw);
  display:flex;
  gap:12px;
  padding:6px 4px 14px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
}

.featured-card{
  flex:0 0 auto;
  width:220px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.03);
  padding:10px;
  cursor:pointer;
  scroll-snap-align:center;
  transition:transform .12s ease, background .12s ease;
}
.featured-card:hover{transform:translateY(-2px);background:rgba(255,255,255,.05)}

.featured-card img{
  width:100%;
  height:160px;
  object-fit:contain;
  border-radius:14px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.08);
}

.featured-title{
  margin-top:8px;
  font-weight:700;
  font-size:13px;
  color:rgba(234,240,255,.92);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


.controls{margin:10px auto 18px;display:flex;flex-direction:column;gap:10px;align-items:center}
.search{
  width:min(560px, 92vw);
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
}
.search::placeholder{color:rgba(234,240,255,.55)}
.filter-row{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.filters{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.pill{
  cursor:pointer;
  font-size:12px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--pill);
  color:var(--text);
}
.pill.active{background:var(--pillActive)}
.pill:hover{background:rgba(255,255,255,.12)}

.grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
}

.card{
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  border-radius:16px;
  padding:14px;
  cursor:pointer;
  transition:transform .12s ease, background .12s ease;
}
.card:hover{transform:translateY(-2px);background:rgba(255,255,255,.05)}
.thumb{
  width:100%;
  height:260px;
  border-radius:14px;
  object-fit:contain;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.08);
}
.title{margin:10px 0 4px;font-weight:700;font-size:16px}
.meta{color:var(--muted);font-size:12px;margin:0 0 6px}
.desc{color:rgba(234,240,255,.85);font-size:12px;margin:0;line-height:1.35}
.cond{margin-top:8px;font-size:12px;color:rgba(234,240,255,.9)}

.modal{position:fixed;inset:0;display:none;place-items:center;z-index:50}
.modal.open{display:grid}
.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.65)}
.modal-card{
  position:relative;
  width:min(780px, 92vw);
  max-height:88vh;
  border-radius:18px;
  background:#0b1020;
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 24px 70px rgba(0,0,0,.65);
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.modal-close{
  position:absolute;top:10px;right:12px;
  width:34px;height:34px;border-radius:10px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:20px;
  cursor:pointer;
}
#modalImg{
  width:100%;
  max-height:68vh;
  object-fit:contain;
  border-radius:14px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.10);
}
.modal-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.modal-title{font-weight:700}
.modal-ebay{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
}
.modal-ebay:hover{background:rgba(255,255,255,.10)}

@media (max-width:640px){
  .topbar{flex-direction:column;align-items:flex-start}
  .socials{justify-content:flex-start}
  .featured-card{width:200px}
  .featured-card img{height:150px}
}
