:root {
  --bg:       #0e0e0e;
  --surface:  #161616;
  --surface2: #1e1e1e;
  --border:   #2a2a2a;
  --accent:   #e8c84a;
  --red:      #c0392b;
  --green:    #27ae60;
  --text:     #f0ede6;
  --muted:    #777;
  --radius:   4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── HEADER ── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14,14,14,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  height: 64px;
}
.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px; letter-spacing: 4px;
  color: var(--accent); text-decoration: none;
}
.logo span { color: var(--text); }
nav { display: flex; gap: 6px; }
.nav-btn {
  font-family: 'DM Mono', monospace;
  font-size: 12px; letter-spacing: 2px;
  padding: 9px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  cursor: pointer; transition: all .2s;
  text-transform: uppercase;
  background: transparent; color: var(--muted);
  text-decoration: none;
  display: inline-flex; align-items: center;
}
.nav-btn:hover { color: var(--text); border-color: var(--border); }
.nav-btn.active-buy  { background: var(--accent); color: #0e0e0e; border-color: var(--accent); }
.nav-btn.active-sell { background: var(--red);    color: #fff;    border-color: var(--red); }
.header-right { display: flex; align-items: center; gap: 10px; }
.admin-btn {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 1.5px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
  padding: 7px 14px; border-radius: var(--radius);
  cursor: pointer; transition: all .2s;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  position: relative;
}
.admin-btn:hover { color: var(--text); border-color: var(--muted); }
.notif-badge {
  background: var(--red); color: #fff;
  font-size: 9px; width: 16px; height: 16px;
  border-radius: 50%; display: none;
  align-items: center; justify-content: center;
}
.notif-badge.show { display: flex; }

/* ── HERO ── */
.hero {
  position: relative;
  padding: 80px 48px 70px;
  background: linear-gradient(135deg, #0e0e0e 0%, #1a1408 60%, #0e0e0e 100%);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -55deg, transparent, transparent 40px,
    rgba(232,200,74,.022) 40px, rgba(232,200,74,.022) 41px
  );
  pointer-events: none;
}
.hero-inner { max-width: 1200px; margin: 0 auto; position: relative; }
.hero-tag {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 3px;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.hero-tag::before { content: ''; width: 28px; height: 1.5px; background: var(--accent); }
.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(56px, 9vw, 108px);
  letter-spacing: 4px; line-height: .93;
  margin-bottom: 20px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-sub {
  color: var(--muted); font-size: 15px;
  max-width: 480px; line-height: 1.7; margin-bottom: 40px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-hero {
  font-family: 'DM Mono', monospace;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  padding: 14px 40px; border: none; border-radius: var(--radius);
  cursor: pointer; transition: all .22s; font-weight: 500;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-hero.buy  { background: var(--accent); color: #0e0e0e; }
.btn-hero.buy:hover  { background: #f5d660; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,200,74,.25); }
.btn-hero.sell { background: transparent; color: var(--text); border: 1.5px solid rgba(255,255,255,.25); }
.btn-hero.sell:hover { border-color: rgba(255,255,255,.6); transform: translateY(-2px); }

/* ── SECTION ── */
.section-wrap { max-width: 1200px; margin: 0 auto; padding: 64px 48px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 12px; margin-bottom: 36px;
}
.section-title { font-family: 'Bebas Neue', sans-serif; font-size: 40px; letter-spacing: 4px; }
.section-title .ac { color: var(--accent); }
.section-title .rc { color: var(--red); }
.section-link {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.section-link:hover { border-bottom-color: var(--accent); }

/* ── CARDS ── */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden; cursor: pointer;
  transition: all .22s; text-decoration: none; color: var(--text); display: block;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,.5); }
.card-img {
  height: 195px; overflow: hidden; background: var(--surface2);
  position: relative; display: flex; align-items: center; justify-content: center;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-img .no-img { font-size: 52px; opacity: .2; }
.card-badge {
  position: absolute; top: 10px; left: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px;
  background: var(--surface2); color: var(--muted); border: 1px solid var(--border);
}
.card-badge.new-b { background: var(--green); color: #fff; border-color: var(--green); }
.card-body { padding: 18px; }
.card-cat { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 5px; }
.card-name { font-size: 15px; font-weight: 600; margin-bottom: 7px; line-height: 1.3; }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); }
.card-price { font-family: 'Bebas Neue', sans-serif; font-size: 26px; letter-spacing: 1px; }
.card-price small { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted); }
.btn-inquiry {
  font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 8px 14px; background: var(--accent); color: #0e0e0e;
  border: none; border-radius: var(--radius); cursor: pointer; transition: all .18s;
}
.btn-inquiry:hover { background: #f5d660; }

/* ── STATES ── */
.spinner { display: flex; align-items: center; justify-content: center; padding: 60px; grid-column: 1/-1; }
.spinner::after { content: ''; width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { grid-column: 1/-1; text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 2px; }

/* ── FORMS ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.req { color: var(--red); }
input[type=text], input[type=email], input[type=tel],
input[type=number], input[type=password], textarea, select {
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--text); padding: 10px 14px;
  border-radius: var(--radius); transition: border-color .18s; width: 100%;
}
select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23777' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 110px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* DROP ZONE */
.drop-zone {
  border: 2px dashed var(--border); border-radius: 6px; padding: 32px;
  text-align: center; cursor: pointer; transition: all .2s;
  background: var(--surface2); position: relative;
}
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: rgba(232,200,74,.04); }
.drop-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-icon { font-size: 28px; margin-bottom: 8px; }
.drop-text { font-size: 13px; color: var(--muted); }
.drop-text strong { color: var(--accent); }
.drop-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fchip {
  font-family: 'DM Mono', monospace; font-size: 10px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px 10px;
  display: flex; align-items: center; gap: 6px;
}
.fchip img { width: 28px; height: 28px; border-radius: 2px; object-fit: cover; }

/* BUTTONS */
.btn-primary {
  font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  padding: 14px 32px; width: 100%; background: var(--accent); color: #0e0e0e;
  border: none; border-radius: var(--radius); cursor: pointer; font-weight: 500;
  transition: all .22s; margin-top: 6px;
}
.btn-primary:hover { background: #f5d660; transform: translateY(-2px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-danger {
  font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 7px 16px; background: transparent; color: var(--red);
  border: 1px solid var(--red); border-radius: var(--radius); cursor: pointer; transition: all .18s;
}
.btn-danger:hover { background: var(--red); color: #fff; }

/* MODAL */
.overlay { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.75); backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 20px; }
.overlay.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; animation: popIn .22s ease; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
@keyframes popIn { from { opacity:0; transform:scale(.96); } to { opacity:1; transform:scale(1); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: 2px; }
.modal-x { width: 32px; height: 32px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all .18s; }
.modal-x:hover { background: var(--red); color: #fff; border-color: var(--red); }
.modal-body { padding: 24px; }
.modal-note { font-size: 13px; color: var(--muted); margin-bottom: 18px; line-height: 1.6; }

/* TOAST */
.toast { position: fixed; bottom: 28px; right: 28px; z-index: 999; background: #1a1a1a; color: var(--text); padding: 14px 20px; border-radius: 5px; font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 1px; border-left: 3px solid var(--green); transform: translateY(60px); opacity: 0; pointer-events: none; transition: all .28s; box-shadow: 0 8px 32px rgba(0,0,0,.5); max-width: 340px; }
.toast.show  { transform: translateY(0); opacity: 1; }
.toast.error { border-left-color: var(--red); }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 28px 48px; display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.footer-logo { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: 4px; color: var(--muted); }
.footer-logo em { color: var(--accent); font-style: normal; }
.footer-links { display: flex; gap: 20px; }
.footer-link { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-link:hover { color: var(--text); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  header { padding: 0 20px; }
  .hero  { padding: 52px 20px 44px; }
  .section-wrap { padding: 44px 20px; }
  footer { padding: 24px 20px; flex-direction: column; gap: 16px; text-align: center; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }
  .hero-cta { flex-direction: column; }
  .btn-hero { justify-content: center; }
}