/* AutoHash — Dark Bitcoin-themed design system */
:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #16161f;
  --accent-orange: #f7931a;
  --accent-gold: #ffd866;
  --text-primary: #f0f0f5;
  --text-secondary: #8a8a9a;
  --text-muted: #5a5a6a;
  --border: #1e1e2e;
  --border-hover: #2e2e4e;
  --gradient-btc: linear-gradient(135deg, #f7931a, #ffd866);
  --gradient-btc-subtle: linear-gradient(135deg, rgba(247,147,26,0.15), rgba(255,216,102,0.08));
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* Grid texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(247, 147, 26, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 147, 26, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── NAVIGATION ── */
.nav {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--gradient-btc);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.nav-links a.active {
  color: var(--accent-orange);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--gradient-btc);
  color: #0a0a0f;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-orange);
  border: 1px solid var(--accent-orange);
}

.btn-outline:hover {
  background: rgba(247,147,26,0.1);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.09);
  color: var(--text-primary);
}

/* ── HERO ── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(247,147,26,0.12);
  border: 1px solid rgba(247,147,26,0.3);
  color: var(--accent-orange);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--gradient-btc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient-btc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── HOW IT WORKS SECTION ── */
.section {
  padding: 60px 0;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-secondary);
  margin-bottom: 40px;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-btc-subtle);
  border: 1px solid rgba(247,147,26,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── CAR GRID ── */
.listings-header {
  padding: 40px 0 28px;
}

.listings-header h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.listings-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.filters-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  align-items: center;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background: rgba(247,147,26,0.08);
}

.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding-bottom: 60px;
}

.car-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: block;
}

.car-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.car-photo {
  width: 100%;
  height: 195px;
  object-fit: cover;
  background: var(--border);
  display: block;
}

.car-card-body {
  padding: 18px;
}

.car-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.car-meta {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.car-price-usd {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.car-price-btc {
  font-size: 0.82rem;
  color: var(--accent-orange);
  font-weight: 600;
}

.car-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-excellent { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-good { background: rgba(247,147,26,0.15); color: #f7931a; }
.badge-fair { background: rgba(148,163,184,0.15); color: #94a3b8; }

/* ── CAR DETAIL ── */
.car-detail {
  padding: 40px 0 80px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-orange); }
.breadcrumb span { color: var(--text-muted); }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 860px) {
  .detail-layout { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 24px; }
}

.photo-gallery {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.main-photo {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

.thumb-row {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--border);
}

.thumb {
  flex: 1;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.thumb:hover { opacity: 1; }

.car-info-panel {
  margin-top: 20px;
}

.car-info-panel h1 {
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.price-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
}

.price-usd-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.price-btc-big {
  font-size: 1rem;
  color: var(--accent-orange);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btc-dot {
  width: 8px; height: 8px;
  background: var(--accent-orange);
  border-radius: 50%;
  flex-shrink: 0;
}

.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.spec-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.spec-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.spec-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.car-description {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── INQUIRY FORM ── */
.inquiry-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 80px;
}

.inquiry-panel h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.inquiry-panel .sub {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 10px 14px;
  transition: border-color 0.2s;
  appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a9a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.crypto-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.crypto-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.crypto-option input[type="radio"] { display: none; }

.crypto-option:has(input:checked),
.crypto-option.selected {
  border-color: var(--accent-orange);
  background: rgba(247,147,26,0.08);
  color: var(--accent-orange);
}

.btn-submit {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
  margin-top: 6px;
}

.form-success {
  display: none;
  text-align: center;
  padding: 20px 0;
}

.form-success .success-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.form-success h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.form-success p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ── ERROR PAGE ── */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.error-page h1 { font-size: 1.5rem; margin-bottom: 8px; }
.error-page p { color: var(--text-secondary); }

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.footer a { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--accent-orange); }
