:root {
  --bg: #070b16;
  --bg-2: #0d1424;
  --card: #121a2e;
  --line: rgba(255, 191, 0, 0.18);
  --gold: #ffbf00;
  --gold-2: #f5a623;
  --text: #f4f1ea;
  --muted: #9aa3b5;
  --wa: #25d366;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 500px at 50% -10%, #1a1630 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.wrap { width: min(1160px, calc(100% - 28px)); margin: 0 auto; }

.top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(7, 11, 22, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,191,0,.12);
}
.top-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
}
.brand { font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.brand span { color: var(--gold); }
.nav { display: flex; gap: 12px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); }
.nav a:hover { color: var(--gold); }
.nav a.active { color: var(--gold); }
.lang { margin-left: auto; display: flex; gap: 6px; }
.lang b {
  background: var(--gold); color: #111; border-radius: 999px;
  padding: 4px 8px; font-size: .72rem;
}
.lang a { color: var(--muted); font-size: .72rem; padding: 4px 6px; }

.hero { text-align: center; padding: 42px 0 28px; }
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -.03em;
}
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { color: var(--muted); max-width: 560px; margin: 10px auto 20px; }
.cta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.btn {
  border: 0; cursor: pointer; border-radius: 999px;
  padding: 11px 18px; font-weight: 700;
}
.btn-gold { background: var(--gold); color: #14110a; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-wa { background: var(--wa); color: #062; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}

.layout { display: grid; grid-template-columns: 250px 1fr; gap: 22px; padding-bottom: 80px; }
.filters {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  height: fit-content;
  position: sticky; top: 72px;
}
.filters h3 { font-size: .95rem; margin-bottom: 12px; color: var(--gold); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  background: #0b1220;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: #0b1220; border: 1px solid var(--line);
  color: var(--muted); border-radius: 999px;
  padding: 5px 10px; font-size: .78rem; cursor: pointer;
}
.chip.active { background: var(--gold); color: #111; border-color: var(--gold); }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.toolbar h2 { font-size: 1.2rem; }
.count { color: var(--muted); font-weight: 400; }
.searchbar {
  display: flex; gap: 8px; margin-bottom: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
}
.searchbar input { flex: 1; background: transparent; border: 0; outline: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--gold); }
.photo { height: 176px; background: #0b1220 center/cover no-repeat; position: relative; }
.badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(7,11,22,.85); color: var(--gold);
  font-size: .72rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
}
.body { padding: 12px 13px 14px; }
.body h3 { font-size: .98rem; line-height: 1.3; margin-bottom: 6px; }
.meta { color: var(--muted); font-size: .8rem; }
.price { margin-top: 8px; color: var(--gold); font-weight: 800; font-size: 1.15rem; }
.price small { color: var(--muted); font-weight: 500; font-size: .75rem; margin-left: 6px; }
.empty { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 40px 10px; }

.backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.62);
  display: none; align-items: flex-start; justify-content: center;
  padding: 28px 12px; overflow: auto;
}
.backdrop.open { display: flex; }
.modal {
  width: min(900px, 100%);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.detail { display: grid; grid-template-columns: 1.05fr .95fr; }
.detail-photo { min-height: 340px; background: #0b1220 center/cover no-repeat; position: relative; }
.close {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(7,11,22,.8); color: #fff; cursor: pointer;
}
.detail-body { padding: 24px; }
.detail-body h2 { font-size: 1.45rem; margin: 6px 0 8px; }
.seller {
  background: #0b1220;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-top: 16px;
}
.form-body { padding: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.span-2 { grid-column: 1 / -1; }
textarea { min-height: 100px; resize: vertical; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.alert { display: none; background: #3a1b1b; color: #ffb4b4; padding: 8px 12px; border-radius: 10px; margin-top: 10px; }
.alert.show, .ok.show { display: block; }
.ok { display: none; background: #16321f; color: #9dffc0; padding: 8px 12px; border-radius: 10px; margin-top: 10px; }
.preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.preview img { width: 68px; height: 68px; object-fit: cover; border-radius: 8px; }
.note { color: var(--muted); font-size: .86rem; margin-top: 6px; }

footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 36px;
  color: var(--muted);
  font-size: .85rem;
}
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .detail { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
}
