/* KERB WEIGHT — shared styles for index.php and products.php */

:root {
  --bg: #f7f6f3;
  --paper: #ffffff;
  --ink: #14140f;
  --ink-muted: #6b6a63;
  --line: #e3e1da;
  --accent: #b1121f; /* restrained racing red */
  --gold: #9c8449;   /* premium metallic accent, used sparingly */
  --radius: 2px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand, .btn, .filter-btn {
  font-family: 'Archivo', sans-serif;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

button { font: inherit; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 640px) {
  .container { padding: 0 24px; }
}

/* Top utility bar */
.utility-bar {
  background: var(--ink);
  color: #f2f1ec;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 8px 16px;
}

@media (min-width: 640px) {
  .utility-bar { font-size: 12px; letter-spacing: 0.04em; }
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 246, 243, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 12px;
}

@media (min-width: 640px) {
  .nav { padding: 18px 24px; }
}

.brand {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .brand { font-size: 19px; }
}

.brand span.mark {
  color: var(--accent);
}

.nav-links {
  display: none;
  gap: 32px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
}

@media (min-width: 860px) {
  .nav-links { display: flex; }
}

.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }

.nav-cta { display: none; }

@media (min-width: 860px) {
  .nav-cta { display: block; }
}

/* Mobile menu toggle */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 8px 20px 20px;
}

.mobile-menu.open { display: flex; }

@media (min-width: 860px) {
  .mobile-menu { display: none !important; }
}

.mobile-menu a {
  padding: 13px 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.mobile-menu .btn { margin-top: 16px; width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .btn { padding: 13px 26px; font-size: 12.5px; }
}

.btn:hover { opacity: 0.85; }

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: #fff;
  opacity: 1;
}

.btn-block { width: 100%; }

@media (min-width: 560px) {
  .btn-block { width: auto; }
}

/* Hero — dramatic photo background, premium dark treatment */
.hero {
  position: relative;
  padding: 64px 0 48px;
  overflow: hidden;
  background-color: #14140f;
  background-image:
    linear-gradient(180deg, rgba(14,14,10,0.55) 0%, rgba(14,14,10,0.88) 70%, rgba(14,14,10,0.98) 100%),
    url('../images/hero-bmw-carbon.png');
  background-size: cover;
  background-position: center 40%;
  color: #f2f1ec;
}

@media (min-width: 760px) {
  .hero { padding: 120px 0 96px; min-height: 560px; display: flex; align-items: center; }
}

.hero-content { position: relative; max-width: 640px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff5a63;
  border: 1px solid rgba(255, 90, 99, 0.5);
  padding: 7px 14px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(32px, 8vw, 62px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.hero h1 .accent { color: #ff5a63; }

.hero p {
  color: #cfcdc3;
  font-size: 15.5px;
  max-width: 460px;
  margin-bottom: 30px;
}

@media (min-width: 640px) {
  .hero p { font-size: 16.5px; }
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 560px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; gap: 16px; }
}

.hero .btn-outline {
  border-color: rgba(242, 241, 236, 0.5);
  color: #f2f1ec;
}

.hero .btn-outline:hover {
  background: #f2f1ec;
  color: var(--ink);
}

/* Brand / manufacturer logo strip */
.brand-strip {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.brand-strip-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

@media (min-width: 760px) {
  .brand-strip-inner { flex-direction: row; justify-content: space-between; gap: 28px; }
}

.brand-strip-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
  text-align: center;
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: clamp(20px, 6vw, 48px);
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
}

@media (min-width: 760px) {
  .brand-logos { justify-content: flex-end; }
}

.brand-logos img {
  height: 22px;
  width: auto;
  filter: grayscale(1) opacity(0.55);
  transition: filter 0.2s ease, transform 0.2s ease;
}

@media (min-width: 640px) {
  .brand-logos img { height: 26px; }
}

.brand-logos img:hover {
  filter: grayscale(0) opacity(1);
  transform: translateY(-1px);
}

/* Brand filter pills (products page) */
.brand-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.brand-pills::-webkit-scrollbar { display: none; }

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  transition: all 0.2s ease;
}

.brand-pill img {
  height: 15px;
  width: auto;
  filter: grayscale(1) opacity(0.6);
}

.brand-pill:hover { border-color: var(--ink); color: var(--ink); }

.brand-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.brand-pill.active img { filter: grayscale(1) opacity(1) invert(1); }

/* Car select dropdown (products page) */
.car-select-wrap {
  position: relative;
  max-width: 100%;
}

@media (min-width: 560px) {
  .car-select-wrap { max-width: 320px; }
}

.car-select-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.car-select {
  width: 100%;
  padding: 13px 40px 13px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  appearance: none;
  cursor: pointer;
}

.car-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.filter-row {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

@media (min-width: 860px) {
  .filter-row { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}

/* Car badge strip (homepage) */
.badges-section { padding: 48px 0; }

@media (min-width: 760px) { .badges-section { padding: 56px 0; } }

.badges-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 480px) { .badge-grid { gap: 12px; } }
@media (min-width: 620px) { .badge-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .badge-grid { grid-template-columns: repeat(6, 1fr); } }

.car-badge {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

@media (min-width: 640px) { .car-badge { padding: 16px 14px; gap: 12px; } }

.car-badge:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.car-badge img {
  height: 18px;
  width: auto;
  flex-shrink: 0;
  filter: grayscale(1);
}

@media (min-width: 640px) { .car-badge img { height: 20px; } }

.car-badge-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.car-badge .chassis {
  font-family: 'Archivo', sans-serif;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-transform: uppercase;
}

.car-badge .model {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) { .car-badge .model { font-size: 13px; } }

/* Stats strip */
.stats {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: #f2f1ec;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 28px 20px;
}

@media (min-width: 720px) { .stats-grid { grid-template-columns: repeat(4, 1fr); padding: 32px 24px; gap: 24px; } }

.stat { text-align: center; }

.stat strong {
  display: block;
  font-family: 'Archivo', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

@media (min-width: 640px) { .stat strong { font-size: 25px; } }

.stat span {
  font-size: 10.5px;
  color: #b8b6ac;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (min-width: 640px) { .stat span { font-size: 11.5px; } }

/* Section shared */
.section { padding: 56px 0; }

@media (min-width: 760px) { .section { padding: 84px 0; } }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

@media (min-width: 760px) { .section-head { margin-bottom: 40px; } }

.section-head .kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-head h2 {
  font-size: clamp(24px, 6vw, 38px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.section-head p { color: var(--ink-muted); max-width: 540px; font-size: 14.5px; }

@media (min-width: 640px) { .section-head p { font-size: 15px; } }

.page-header {
  padding: 40px 0 8px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

@media (min-width: 760px) { .page-header { padding: 56px 0 8px; } }

.breadcrumb {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.breadcrumb a:hover { color: var(--accent); }

.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar { display: none; }

@media (min-width: 760px) { .filters { flex-wrap: wrap; overflow: visible; } }

.filter-btn {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (min-width: 640px) { .filter-btn { padding: 11px 22px; font-size: 12.5px; } }

.filter-btn:hover { color: var(--ink); border-color: var(--ink); }

.filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.results-count {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 20px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 540px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

.grid-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
}

@media (min-width: 640px) { .grid-scroll { gap: 28px; } }

.grid-scroll .card { min-width: 250px; scroll-snap-align: start; }

@media (min-width: 480px) { .grid-scroll .card { min-width: 280px; } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: 0 12px 24px -16px rgba(20, 20, 15, 0.25);
}

/* PLACEHOLDER media block — replace with <img src="..."> once photos are ready */
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(135deg, #ececE6 0 14px, #f4f3ee 14px 28px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-media .placeholder-tag {
  font-family: 'Archivo', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px dashed var(--line);
  padding: 7px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: var(--radius);
  z-index: 2;
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

@media (min-width: 640px) { .card-body { padding: 22px; gap: 10px; } }

.card-fitment {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.card-title { font-family: 'Archivo', sans-serif; font-size: 17px; font-weight: 700; }

@media (min-width: 640px) { .card-title { font-size: 18.5px; } }

.card-desc { color: var(--ink-muted); font-size: 13.5px; flex: 1; }

@media (min-width: 640px) { .card-desc { font-size: 14px; } }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.card-price { font-family: 'Archivo', sans-serif; font-size: 18px; font-weight: 700; }

@media (min-width: 640px) { .card-price { font-size: 20px; } }

.card-price span {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  display: block;
  font-family: 'Inter', sans-serif;
}

/* Info band */
.info { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.info-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }

@media (min-width: 800px) { .info-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

.info-item { display: flex; flex-direction: column; gap: 10px; }

.info-item .num {
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  font-weight: 700;
}

.info-item h3 { font-size: 17px; font-weight: 700; }

@media (min-width: 640px) { .info-item h3 { font-size: 18px; } }

.info-item p { color: var(--ink-muted); font-size: 13.5px; }

@media (min-width: 640px) { .info-item p { font-size: 14px; } }

/* Contact / CTA */
.cta { text-align: center; background: var(--ink); color: #f2f1ec; border-radius: var(--radius); padding: 48px 24px; }

@media (min-width: 640px) { .cta { padding: 64px 32px; } }

.cta h2 { font-size: clamp(24px, 6vw, 38px); font-weight: 800; margin-bottom: 14px; text-transform: uppercase; }

.cta p { color: #b8b6ac; max-width: 480px; margin: 0 auto 28px; font-size: 14.5px; }

@media (min-width: 640px) { .cta p { margin-bottom: 32px; font-size: 15px; } }

.cta .btn-outline { border-color: #f2f1ec; color: #f2f1ec; }
.cta .btn-outline:hover { background: #f2f1ec; color: var(--ink); }

.cta-actions { display: flex; flex-direction: column; gap: 12px; }

@media (min-width: 560px) { .cta-actions { flex-direction: row; justify-content: center; gap: 16px; } }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 28px; background: var(--paper); }

@media (min-width: 640px) { footer { padding: 48px 0 32px; } }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 32px; margin-bottom: 24px; } }

.footer-brand p { color: var(--ink-muted); font-size: 13px; max-width: 320px; margin-top: 10px; }

@media (min-width: 640px) { .footer-brand p { font-size: 13.5px; } }

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--ink-muted);
}

.footer-col a, .footer-col p {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 8px;
}

@media (min-width: 640px) { .footer-col a, .footer-col p { font-size: 13.5px; } }

.footer-col a:hover { color: var(--accent); }

.footer-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

@media (min-width: 720px) {
  .footer-row { flex-direction: row; justify-content: space-between; text-align: left; }
}

.footer-note { font-size: 11.5px; color: var(--ink-muted); }

.empty-state { text-align: center; padding: 48px 0; color: var(--ink-muted); display: none; }
