/* css/style.css — Makaniko Auto Marketplace */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Sora:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0f0f0f;
  --surface: #181818;
  --surface2: #222222;
  --surface3: #2a2a2a;
  --border: #333;
  --border2: #444;
  --accent: #e8a020;
  --accent2: #df9e25;
  --text: #f0ede8;
  --text2: #a09a90;
  --text3: #666;
  --green: #4caf7d;
  --red: #e05555;
  --blue: #4a9eff;
  --radius: 8px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body { font-family: 'Sora', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; min-height: 100vh; }
.mono { font-family: 'DM Mono', monospace; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

/* NAV */
.nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px; display: flex; align-items: center; gap: 16px; height: 64px; position: sticky; top: 0; z-index: 100; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-img { height: 36px; width: auto; object-fit: contain; }
.nav-logo-text { font-size: 15px; font-weight: 800; color: var(--accent); letter-spacing: 0.05em; }
.nav-logo-sub { font-size: 10px; color: var(--text3); font-family: 'DM Mono', monospace; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-link { padding: 7px 14px; border-radius: var(--radius); font-size: 13px; color: var(--text2); font-weight: 500; transition: all 0.15s; }
.nav-link:hover { background: var(--surface2); color: var(--text); }
.nav-link.active { color: var(--accent); }

/* HERO */
.hero { background: linear-gradient(160deg, #1a1200 0%, #0f0f0f 60%); border-bottom: 1px solid var(--border); padding: 72px 24px 64px; text-align: center; }
.hero-inner { max-width: 700px; margin: 0 auto; }
.hero-badge { display: inline-block; background: rgba(232,160,32,0.12); border: 1px solid rgba(232,160,32,0.3); color: var(--accent); font-size: 11px; font-weight: 700; font-family: 'DM Mono', monospace; letter-spacing: 0.08em; padding: 5px 14px; border-radius: 20px; margin-bottom: 20px; text-transform: uppercase; }
.hero-title { font-size: clamp(32px, 6vw, 52px); font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin-bottom: 16px; color: var(--text); }
.hero-sub { font-size: 16px; color: var(--text2); margin-bottom: 32px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.hero-btn { padding: 13px 28px; font-size: 15px; }
.hero-stats { display: flex; align-items: center; justify-content: center; gap: 0; }
.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 28px; }
.hero-stat span:first-child { font-size: 22px; font-weight: 800; color: var(--accent); font-family: 'DM Mono', monospace; }
.hero-stat span:last-child { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; }
.hero-stat-div { width: 1px; height: 32px; background: var(--border); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: var(--radius); font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--border2); background: var(--surface2); color: var(--text); transition: all 0.15s; font-family: 'Sora', sans-serif; }
.btn:hover { background: var(--surface3); }
.btn-accent { background: var(--accent); color: #0f0f0f; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent2); border-color: var(--accent2); }
.btn-green { background: var(--green); color: #0f0f0f; border-color: var(--green); }
.btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text2); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* CONTAINER */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-body { padding: 32px 24px; max-width: 1200px; margin: 0 auto; }

/* CARDS */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }

/* LISTING CARD (browse grid) */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.listing-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: all 0.2s; text-decoration: none; display: block; color: var(--text); }
.listing-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }
.listing-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.listing-photo { width: 100%; aspect-ratio: 4/3; background: var(--surface2); position: relative; overflow: hidden; }
.listing-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.listing-card:hover .listing-photo img { transform: scale(1.03); }
.listing-no-photo { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text3); }
.listing-featured-badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #0f0f0f; font-size: 10px; font-weight: 700; font-family: 'DM Mono', monospace; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 20px; }
.listing-body { padding: 16px; }
.listing-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.listing-price { font-size: 22px; font-weight: 800; color: var(--accent); font-family: 'DM Mono', monospace; margin-bottom: 10px; }
.listing-meta { font-size: 12px; color: var(--text2); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.listing-meta span { display: flex; align-items: center; gap: 4px; }
.listing-seller { font-size: 11px; color: var(--text3); display: flex; align-items: center; gap: 5px; padding-top: 10px; border-top: 1px solid var(--border); }

/* BADGES */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 700; font-family: 'DM Mono', monospace; letter-spacing: 0.05em; }
.badge-featured { background: var(--accent); color: #0f0f0f; }
.badge-pending { background: #3a2a10; color: var(--accent); }
.badge-active { background: #103a20; color: var(--green); }
.badge-sold { background: var(--surface3); color: var(--text3); }
.badge-rejected { background: #3a1010; color: var(--red); }
.badge-excellent { background: #103a20; color: var(--green); }
.badge-good { background: #1a2a3a; color: var(--blue); }
.badge-fair { background: #3a2a10; color: var(--accent); }

/* FORMS */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 11px; color: var(--text2); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.form-input { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; color: var(--text); font-family: 'Sora', sans-serif; font-size: 14px; transition: border-color 0.15s; width: 100%; }
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--text3); }
select.form-input { cursor: pointer; }
select.form-input option { background: var(--surface2); }
textarea.form-input { resize: vertical; min-height: 100px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.form-hint { font-size: 11px; color: var(--text3); margin-top: -10px; margin-bottom: 16px; }

/* FILTER BAR */
.filter-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 20px; margin-bottom: 24px; display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter-bar .form-group { margin-bottom: 0; min-width: 140px; }

/* TABLE */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 14px; font-size: 11px; color: var(--text3); font-family: 'DM Mono', monospace; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); font-weight: 500; }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }

/* PHOTO UPLOAD */
.photo-upload-area { border: 2px dashed var(--border2); border-radius: var(--radius-lg); padding: 32px; text-align: center; cursor: pointer; transition: all 0.15s; background: var(--surface2); }
.photo-upload-area:hover { border-color: var(--accent); background: var(--surface3); }
.photo-upload-area p { color: var(--text2); font-size: 13px; margin-top: 8px; }
.photo-preview-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.photo-preview { position: relative; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--surface3); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview-remove { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.7); border: none; color: #fff; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); width: 100%; max-width: 480px; padding: 28px; }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: var(--text2); margin-bottom: 24px; }
.hidden { display: none !important; }

/* INSPECTION CTA BANNER */
.inspection-banner { background: linear-gradient(135deg, #1a1200, #0f0f0f); border: 1px solid var(--accent); border-radius: var(--radius-lg); padding: 20px 24px; margin: 24px 0; display: flex; align-items: center; gap: 20px; }
.inspection-banner-text h3 { font-size: 16px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.inspection-banner-text p { font-size: 13px; color: var(--text2); }
.inspection-banner .btn { flex-shrink: 0; }

/* TOAST */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--green); border-radius: var(--radius); padding: 12px 18px; font-size: 13px; z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,0.4); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.toast.show { opacity: 1; }
.toast.error { border-left-color: var(--red); }

/* PAGE HEADER */
.page-header { margin-bottom: 28px; }
.page-title { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; }
.page-sub { font-size: 13px; color: var(--text2); }

/* FOOTER */
footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 24px; margin-top: 64px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand { font-size: 15px; font-weight: 700; color: var(--accent); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--text3); }
.footer-links a:hover { color: var(--text); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .page-body { padding: 20px 16px; }
  .listing-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar .form-group { min-width: 100%; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .photo-preview-grid { grid-template-columns: repeat(3, 1fr); }
  .inspection-banner { flex-direction: column; text-align: center; }
  .nav-logo-sub { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .hero { padding: 48px 20px 40px; }
  .hero-stat { padding: 0 16px; }
}
@media (max-width: 480px) {
  .listing-grid { grid-template-columns: 1fr; }
  .nav-links .btn-accent { display: none; }
  .nav-logo-img { height: 28px; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .hero-stat-div { display: none; }
}
