/*
Theme Name: Chinese Car Brands
Theme URI: https://example.com
Author: Custom Build
Author URI: https://example.com
Description: A showcase theme for Chinese car brands — overview, model line-ups, and countries of availability for each manufacturer.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: chinese-car-brands
*/

/* ---------- Variables ---------- */
:root {
  --ccb-bg: #0f1115;
  --ccb-bg-alt: #171a21;
  --ccb-surface: #1d2129;
  --ccb-border: #2a2f3a;
  --ccb-text: #eef0f3;
  --ccb-text-muted: #9aa3b2;
  --ccb-accent: #00c2b2;
  --ccb-accent-dim: #0a3d3a;
  --ccb-radius: 10px;
  --ccb-max-width: 1180px;
  --ccb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset-ish ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ccb-bg);
  color: var(--ccb-text);
  font-family: var(--ccb-font);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.container {
  max-width: var(--ccb-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ccb-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-branding a {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.site-branding span {
  color: var(--ccb-accent);
}
.main-navigation ul {
  display: flex;
  gap: 28px;
}
.main-navigation a {
  font-size: 0.95rem;
  color: var(--ccb-text-muted);
  transition: color 0.15s ease;
}
.main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: var(--ccb-text);
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ccb-border);
  color: var(--ccb-text);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  padding: 90px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--ccb-border);
  background:
    radial-gradient(ellipse at top, var(--ccb-accent-dim), transparent 60%),
    var(--ccb-bg);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 0.3em;
}
.hero p {
  color: var(--ccb-text-muted);
  max-width: 620px;
  margin: 0 auto 1.5em;
  font-size: 1.1rem;
}
.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}
.hero-stats div {
  text-align: center;
}
.hero-stats strong {
  display: block;
  font-size: 1.8rem;
  color: var(--ccb-accent);
}
.hero-stats span {
  font-size: 0.85rem;
  color: var(--ccb-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Section headings ---------- */
.section {
  padding: 60px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-head h2 {
  font-size: 1.6rem;
}
.section-head a.view-all {
  color: var(--ccb-accent);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Country filter pills ---------- */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.filter-pills a {
  padding: 6px 14px;
  border: 1px solid var(--ccb-border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ccb-text-muted);
  transition: all 0.15s ease;
}
.filter-pills a:hover,
.filter-pills a.active {
  border-color: var(--ccb-accent);
  color: var(--ccb-accent);
}

/* ---------- Grids & Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.card {
  background: var(--ccb-surface);
  border: 1px solid var(--ccb-border);
  border-radius: var(--ccb-radius);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--ccb-accent);
}
.card-media {
  aspect-ratio: 16/10;
  background: var(--ccb-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.card-media--logo {
  background: #ffffff;
}
.card-media.card-media--logo img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}
.card-media .placeholder {
  color: var(--ccb-text-muted);
  font-size: 0.85rem;
}
.card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.card-meta {
  font-size: 0.82rem;
  color: var(--ccb-text-muted);
  margin-bottom: 10px;
}
.card-excerpt {
  font-size: 0.9rem;
  color: var(--ccb-text-muted);
  flex: 1;
}
.card-cta {
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ccb-accent);
}

/* ---------- Badges ---------- */
.badge-list { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  background: var(--ccb-accent-dim);
  color: var(--ccb-accent);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge.neutral {
  background: var(--ccb-bg-alt);
  color: var(--ccb-text-muted);
}

/* ---------- Single Brand ---------- */
.brand-header {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 50px 0 30px;
  border-bottom: 1px solid var(--ccb-border);
  flex-wrap: wrap;
}
.brand-logo {
  width: 120px;
  height: 120px;
  background: #ffffff;
  border: 1px solid var(--ccb-border);
  border-radius: var(--ccb-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-logo img { width: 80%; height: 80%; object-fit: contain; }
.brand-header h1 { font-size: 2rem; margin-bottom: 8px; }
.brand-facts {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--ccb-text-muted);
}
.brand-facts strong { color: var(--ccb-text); }

.brand-overview {
  padding: 40px 0;
  max-width: 760px;
}
.brand-overview h2 { font-size: 1.3rem; margin-bottom: 16px; }

/* ---------- Model single ---------- */
.model-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 50px 0;
  align-items: center;
}
.model-media {
  background: var(--ccb-surface);
  border: 1px solid var(--ccb-border);
  border-radius: var(--ccb-radius);
  overflow: hidden;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.model-media img { width: 100%; height: 100%; object-fit: cover; }
.model-info .eyebrow {
  color: var(--ccb-accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.model-info h1 { font-size: 2.1rem; margin-bottom: 14px; }
.spec-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 20px 0;
}
.spec-list div {
  background: var(--ccb-surface);
  border: 1px solid var(--ccb-border);
  border-radius: 8px;
  padding: 12px 14px;
}
.spec-list span {
  display: block;
  font-size: 0.75rem;
  color: var(--ccb-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.model-body { max-width: 760px; padding-bottom: 40px; }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ccb-text-muted);
  border: 1px dashed var(--ccb-border);
  border-radius: var(--ccb-radius);
}

/* ---------- Breadcrumb / back link ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ccb-text-muted);
  margin: 24px 0 0;
}
.back-link:hover { color: var(--ccb-accent); }

/* ---------- Page / generic content ---------- */
.page-content {
  padding: 60px 0;
  max-width: 760px;
}
.page-content h1 { font-size: 2rem; margin-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--ccb-border);
  padding: 40px 0;
  margin-top: 40px;
  color: var(--ccb-text-muted);
  font-size: 0.85rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .main-navigation { display: none; }
  .nav-toggle { display: inline-block; }
  .main-navigation.is-open {
    display: block;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--ccb-bg-alt);
    border-bottom: 1px solid var(--ccb-border);
    padding: 16px 24px;
  }
  .main-navigation.is-open ul { flex-direction: column; gap: 14px; }
  .model-header { grid-template-columns: 1fr; }
  .brand-header { text-align: center; justify-content: center; }
  .brand-facts { justify-content: center; }
}
