/* ============================================================
   Autoconnekt — Wireless CarPlay & Android Auto Decoder Kits
   Base stylesheet
   ============================================================ */

:root {
  --navy: #0B1B33;
  --navy-2: #102A4D;
  --blue: #2563EB;
  --blue-600: #1D4ED8;
  --blue-700: #1E40AF;
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --amber: #F59E0B;
  --amber-600: #D97706;
  --bg: #F6F8FB;
  --surface: #FFFFFF;
  --text: #0F172A;
  --muted: #5B6B82;
  --muted-2: #8492A6;
  --border: #E3E8F0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, 0.06), 0 20px 48px rgba(15, 23, 42, 0.10);
  --maxw: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }
.section-title { margin-bottom: 8px; }
.section-sub { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin-bottom: 40px; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.section-head .section-sub { margin: 0 auto; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-600);
  background: var(--blue-50);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25); }
.btn-amber { background: var(--amber); color: #1a1206; }
.btn-amber:hover { background: #EA8C00; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-600); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #EFF4FB; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ---------- Top utility bar ---------- */
.utility {
  background: var(--navy);
  color: #C7D2E3;
  font-size: 0.82rem;
  padding: 8px 0;
}
.utility .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.utility a { color: #fff; font-weight: 600; }
.utility a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 110px; gap: 24px; }
.logo { display: block; color: var(--navy); text-decoration: none; line-height: 0; }
.logo img { height: 86px; width: auto; display: block; }
.footer-col .logo img { height: 86px; width: auto; }
@media (max-width: 640px) {
  .header-inner { height: 90px; }
  .logo img { height: 70px; }
  .footer-col .logo img { height: 70px; }
}

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 0;
  position: relative;
  transition: color .15s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--navy); border-radius: 2px; transition: .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); }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(90deg, rgba(11,27,51,0.93) 0%, rgba(11,27,51,0.78) 42%, rgba(11,27,51,0.40) 100%),
    url('../img/bmw.jpg') center/cover no-repeat;
  color: #E7EDF7;
  padding: 80px 0 72px;
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 .accent { color: var(--amber); }
.hero p.lead { font-size: 1.12rem; color: #C7D2E3; max-width: 540px; margin-bottom: 28px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.86rem; font-weight: 600;
  color: #DCE6F5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 14px;
  border-radius: 999px;
}
.badge svg { width: 15px; height: 15px; flex: none; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 26px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-card {
  background: #fff;
  color: var(--text);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.hero-card .hc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hero-card .hc-title { font-weight: 700; font-size: 1.02rem; }
.hero-card .hc-tag { font-size: 0.72rem; font-weight: 700; color: var(--blue-600); background: var(--blue-50); padding: 4px 10px; border-radius: 999px; }
.hero-card .hc-sub { color: var(--muted); font-size: 0.86rem; margin-bottom: 16px; }
.feature-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 0.9rem; }
.feature-row:last-child { border-bottom: 1px solid var(--border); }
.feature-row .dot { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; flex: none; }
.feature-row .dot.warn { background: var(--amber); }

/* ---------- Brand strip ---------- */
.brand-strip { background: var(--surface); border-bottom: 1px solid var(--border); padding: 22px 0; }
.brand-strip .container { text-align: center; }
.brand-strip .label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; }
.brands { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 30px; align-items: center; }
.brands span { font-size: 1.05rem; font-weight: 700; color: #7C8AA0; letter-spacing: 0.01em; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--surface); }
.section.navy { background: var(--navy); color: #C7D2E3; }
.section.navy h2, .section.navy h3 { color: #fff; }
.section.navy .section-sub { color: #9FB0C7; }

/* USP cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-600);
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; font-size: 1.08rem; }
.card p { color: var(--muted); font-size: 0.94rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.step .num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 16px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Products ---------- */
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-media {
  height: 200px;
  background: linear-gradient(135deg, #0B1B33, #1E3A66);
  position: relative;
  overflow: hidden;
}
.product-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.product-card:hover .product-media img { transform: scale(1.04); }
.product-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(11,27,51,0.45), transparent 55%);
  pointer-events: none;
}
.product-media .brand-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(255,255,255,0.94); color: var(--navy);
  font-size: 0.78rem; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.product-media .p-mark { display: none; }
.product-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.product-body h3 a { color: inherit; transition: color .15s ease; }
.product-body h3 a:hover { color: var(--blue-600); }
.product-body .p-sys { color: var(--blue-600); font-size: 0.84rem; font-weight: 600; margin-bottom: 12px; }
.product-body ul { margin-bottom: 18px; }
.product-body ul li { font-size: 0.88rem; color: var(--muted); padding: 4px 0 4px 20px; position: relative; }
.product-body ul li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px; border-radius: 2px; background: var(--blue-100); border: 1.5px solid var(--blue); }
.product-body .btn { margin-top: auto; }

/* Spec table */
.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { padding: 14px 18px; text-align: left; font-size: 0.92rem; border-bottom: 1px solid var(--border); }
.spec-table th { background: var(--blue-50); color: var(--navy); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.spec-table tr:last-child td { border-bottom: none; }
.spec-table td:first-child { color: var(--muted); font-weight: 600; width: 260px; }
/* Wide spec tables (e.g. the 5-column thermal sensor comparison) must never
   push the page itself sideways on mobile — scroll inside their own box. */
.spec-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
@media (max-width: 620px) {
  .spec-table th, .spec-table td { padding: 11px 12px; font-size: 0.86rem; }
  .spec-table td:first-child { width: 150px; }
}

/* ---------- Compatibility ---------- */
.compat-controls { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; align-items: center; }
.compat-controls input[type="search"] {
  flex: 1; min-width: 240px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--surface);
}
.compat-controls input[type="search"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.brand-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pill {
  font-size: 0.85rem; font-weight: 600;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  color: var(--muted);
  transition: .15s ease;
}
.pill:hover { border-color: var(--blue); color: var(--blue-600); }
.pill.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.compat-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
.compat-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.compat-table th, .compat-table td { padding: 13px 16px; text-align: left; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
.compat-table th { background: var(--navy); color: #fff; font-weight: 600; position: sticky; top: 0; }
.compat-table tr:last-child td { border-bottom: none; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.status.yes { background: #EAF7EF; color: #15803D; }
.status.test { background: #FFF4E0; color: #B45309; }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 20px; font-size: 1rem; font-weight: 600; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--muted-2); transition: transform .2s ease; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a-inner { padding: 0 20px 20px; color: var(--muted); font-size: 0.94rem; }

/* ---------- Contact form ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.86rem; font-weight: 600; color: var(--text); }
.form-field label span { color: #E11D48; }
.form-field input, .form-field select, .form-field textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #FBFCFE;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); background: #fff;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--muted-2); margin-top: 12px; }

.contact-info-list { margin-top: 24px; }
.contact-info-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.contact-info-list li:last-child { border-bottom: none; }
.contact-info-list .ci-icon { width: 42px; height: 42px; flex: none; background: var(--blue-50); color: var(--blue-600); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.contact-info-list .ci-icon svg { width: 20px; height: 20px; }
.contact-info-list .ci-label { font-size: 0.8rem; color: var(--muted-2); }
.contact-info-list .ci-value { font-weight: 600; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--blue-600), var(--blue)); border-radius: var(--radius); padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: #DBEAFE; }
.cta-band .btn { flex: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #9FB0C7; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 44px; }
.footer-col .logo { color: #fff; margin-bottom: 14px; align-items: flex-start; }
.footer-col .logo-text strong { color: #fff; }
.footer-col .logo-text small { color: #9FB0C7; }
.footer-col p { font-size: 0.9rem; }
.footer-col h4 { color: #fff; font-size: 0.9rem; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: 0.9rem; color: #9FB0C7; transition: color .15s ease; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0; font-size: 0.84rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Page hero (subpages) ---------- */
.page-hero { background: var(--navy); color: #E7EDF7; padding: 64px 0 56px; }
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.page-hero p { color: #C7D2E3; max-width: 680px; font-size: 1.05rem; }
.breadcrumb { font-size: 0.82rem; color: #8492A6; margin-bottom: 18px; }
.breadcrumb a { color: #8492A6; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Hero product image ---------- */
.hero-image { padding-top: 0; padding-bottom: 64px; }
.hero-image img {
  width: 100%; max-width: 1100px; max-height: 620px;
  object-fit: cover; object-position: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: block; margin: 0 auto;
}

/* ---------- Notice ---------- */
.notice { background: #FFF7E8; border: 1px solid #F5D9A8; color: #8A5A0B; border-radius: var(--radius-sm); padding: 14px 18px; font-size: 0.9rem; margin-bottom: 24px; }

/* ---------- Brand detail (system grouping) ---------- */
.sys-heading {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.12rem; font-weight: 700; color: var(--navy);
  margin: 32px 0 12px; padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.sys-count {
  font-size: 0.76rem; font-weight: 700; color: var(--blue-600);
  background: var(--blue-50); padding: 3px 11px; border-radius: 999px;
  letter-spacing: 0.01em;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { max-width: 480px; }
  .grid-3, .grid-4, .steps, .products-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav {
    position: fixed; inset: 70px 0 auto 0;
    flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 4px;
    transform: translateY(-130%);
    transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; }
  .nav-cta .btn { display: none; }
}
/* ---------- Quote modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(11, 27, 51, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.modal-backdrop.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  transform: translateY(12px);
  transition: transform .2s ease;
}
.modal-backdrop.active .modal { transform: translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 2;
}
.modal-header h2 { font-size: 1.25rem; margin: 0; }
.modal-close {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 24px; }
.modal-body .form-card { box-shadow: none; border: none; padding: 0; }
.modal-body .form-grid { grid-template-columns: 1fr; gap: 0; }
@media (min-width: 540px) {
  .modal-body .form-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* ---------- Brand filter dropdown ---------- */
.brand-filter { position: relative; margin-bottom: 20px; max-width: 320px; }
.brand-filter-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); font-size: 0.95rem; font-weight: 600; color: var(--text);
  cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.brand-filter-toggle:hover { border-color: var(--blue); }
.brand-filter-toggle[aria-expanded="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.brand-filter-toggle svg { transition: transform .2s ease; color: var(--muted-2); }
.brand-filter-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.brand-filter-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 10px; overflow: hidden;
}
.brand-filter-panel[hidden] { display: none; }
.brand-filter-search {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.9rem; margin-bottom: 8px;
}
.brand-filter-search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.brand-filter-options { max-height: 260px; overflow-y: auto; }
.brand-filter-option {
  width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px;
  border: none; background: transparent; font-size: 0.92rem; color: var(--text);
  cursor: pointer; transition: background .12s ease;
}
.brand-filter-option:hover, .brand-filter-option.focused { background: var(--blue-50); color: var(--blue-700); }
.brand-filter-option.active { background: var(--blue); color: #fff; }
.brand-filter-option.empty {
  color: var(--muted-2); text-align: center; padding: 16px 12px; cursor: default;
}
.brand-filter-option.empty:hover { background: transparent; color: var(--muted-2); }

/* ---------- Mobile image clarity tweaks ---------- */
@media (max-width: 620px) {
  .grid-3, .grid-4, .steps, .products-grid, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .cta-band { padding: 32px 24px; }
  .hero { padding: 56px 0 52px; }
  .product-media { height: 220px; }
  .hero-image img { max-height: 420px; border-radius: var(--radius-sm); }
}

@media (max-width: 960px) {
  .product-media { height: 240px; }
}

/* ---------- Factory / Company gallery ---------- */
.factory-intro { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; margin-bottom: 48px; }
.factory-intro h2 { margin-bottom: 14px; }
.factory-intro p { color: var(--muted); font-size: 1.02rem; margin-bottom: 20px; }
.factory-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.factory-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; text-align: center; }
.factory-stat strong { display: block; font-size: 1.4rem; color: var(--navy); line-height: 1; }
.factory-stat span { font-size: 0.82rem; color: var(--muted); }
.factory-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.factory-card { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.factory-card.featured { grid-column: span 2; }
.factory-card img { width: 100%; height: 260px; object-fit: cover; display: block; transition: transform .35s ease; }
.factory-card:hover img { transform: scale(1.03); }
.factory-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(11,27,51,0.82), transparent);
  color: #fff; font-size: 0.88rem; font-weight: 600;
}

@media (max-width: 960px) {
  .factory-intro { grid-template-columns: 1fr; }
  .factory-gallery { grid-template-columns: repeat(2, 1fr); }
  .factory-card.featured { grid-column: span 2; }
}

@media (max-width: 620px) {
  .factory-gallery { grid-template-columns: 1fr; }
  .factory-card.featured { grid-column: span 1; }
  .factory-card img { height: 220px; }
  .factory-stats { grid-template-columns: 1fr; }
}

/* ---------- Products dropdown (nav) ---------- */
.nav-drop { position: relative; }
.nav-drop > a { display: inline-flex; align-items: center; gap: 6px; }
.nav-drop > a::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease;
  opacity: .55;
}
.nav-drop:hover > a::after, .nav-drop:focus-within > a::after { transform: rotate(225deg) translateY(-1px); }
.nav-drop-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 10px);
  min-width: 290px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 60;
}
.nav-drop:hover .nav-drop-panel, .nav-drop:focus-within .nav-drop-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 6px);
}
.nav-drop-panel a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
}
.nav-drop-panel a:hover { background: var(--blue-50, #EFF6FF); color: var(--text); }
.nav-drop-panel a strong { font-size: 0.92rem; font-weight: 700; }
.nav-drop-panel a span { font-size: 0.8rem; color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.g-item {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.g-item img { width: 100%; height: 190px; object-fit: cover; display: block; }
.g-item figcaption {
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---------- Fitment tables ---------- */
.fit-heading {
  font-size: 1.15rem;
  margin: 34px 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.fit-heading:first-of-type { margin-top: 0; }
.sys-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue, #2563EB);
  background: var(--blue-50, #EFF6FF);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.compat-table code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.84rem;
  background: var(--blue-50, #EFF6FF);
  color: var(--navy);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.compat-table .pn { font-size: 0.84rem; line-height: 1.9; white-space: nowrap; }
.compat-table .pn span {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-2, #F1F5F9);
  border-radius: 5px;
  padding: 1px 6px;
  margin-right: 6px;
}
.compat-table .pn.na { color: var(--muted-2, #94A3B8); }
.compat-table.wide-table { min-width: 900px; }
.p-note { font-size: 0.86rem; color: var(--muted); margin: 10px 0 0; }
.p-part { font-size: 0.88rem; color: var(--text); margin: 12px 0 0; }
.feature-list {
  max-width: 820px;
  margin: 0 auto;
  padding-left: 0;
  list-style: none;
}
.feature-list li {
  position: relative;
  padding: 9px 0 9px 30px;
  color: var(--muted);
  font-size: 0.95rem;
  border-bottom: 1px dashed var(--border);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--blue-50, #EFF6FF);
  color: var(--blue, #2563EB);
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Mobile nav dropdown ---------- */
@media (max-width: 960px) {
  .nav-drop > a::after { display: none; }
  .nav-drop-panel {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 4px 14px;
    min-width: 0;
  }
  .nav-drop:hover .nav-drop-panel, .nav-drop:focus-within .nav-drop-panel { transform: none; }
}

/* ---------- Phase 3: article / blog ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose p { color: var(--muted); font-size: 1rem; line-height: 1.78; margin-bottom: 18px; }
.prose h3 { margin: 34px 0 12px; font-size: 1.22rem; color: var(--text); }
.prose ul { margin: 0 0 18px 22px; color: var(--muted); }
.prose li { margin-bottom: 9px; line-height: 1.65; }
.prose strong { color: var(--text); }
.prose a { color: var(--blue-600); font-weight: 600; text-decoration: underline; text-decoration-color: var(--blue-100); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--blue-600); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; max-width: 900px; margin: 0 auto; }
.blog-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.blog-card img { width: 100%; height: 190px; object-fit: cover; display: block; }
.blog-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.blog-card-body h2 { font-size: 1.1rem; line-height: 1.4; color: var(--text); }
.blog-card-body p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.blog-more { margin-top: auto; font-weight: 700; font-size: 0.88rem; color: var(--blue-600); }

/* ---------- Footer social ---------- */
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.footer-social a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: #9FB0C7; font-size: 0.85rem; font-weight: 600;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.footer-social a:hover { color: #fff; border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.07); }
.footer-social svg { width: 15px; height: 15px; fill: currentColor; flex: none; }

/* ---------- Phase 4: brand link grid + related links ---------- */
.brand-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 10px;
}
.brand-link-grid a {
  display: block;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.brand-link-grid a:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow); }
.brand-link-grid a small { display: block; font-weight: 400; font-size: 0.76rem; color: var(--muted); margin-top: 4px; }

.related-links { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.related-links h3 { font-size: 1.02rem; margin-bottom: 14px; }
.related-links ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.related-links li { margin: 0; }
.related-links a {
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--blue-600);
  background: var(--surface);
}
.related-links a:hover { border-color: var(--blue); }

/* ---------- 404 / not-found page ---------- */
.notfound {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 96px 0 104px;
  text-align: center;
}
.notfound-inner { max-width: 720px; margin: 0 auto; }
.notfound-code {
  font-size: clamp(3.4rem, 12vw, 5.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--amber);
  margin-bottom: 14px;
}
.notfound h1 {
  font-size: clamp(1.5rem, 4.4vw, 2.3rem);
  line-height: 1.25;
  margin-bottom: 16px;
  /* The global "h1,h2,h3,h4 { color: var(--text) }" rule at the top of this file
     beats the #fff inherited from .notfound, leaving dark text on the dark navy
     banner. Set it explicitly. */
  color: #fff;
}
.notfound-lead {
  color: #B9C7DB;
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 30px;
}
.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
@media (max-width: 620px) {
  .notfound { padding: 64px 0 72px; }
  .notfound-actions .btn { width: 100%; text-align: center; }
}

/* ==========================================================================
   siteforge additions - components the generator emits that the original
   stylesheet did not have (nav, card grids, tick lists, two-column blocks)
   ========================================================================== */
.muted { color: var(--muted); }

.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a { color: var(--text); font-weight: 500; font-size: 0.95rem; text-decoration: none; }
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current="page"] { color: var(--blue); }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li {
  position: relative;
  padding: 0 0 0 26px;
  margin-bottom: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}
.ticks li strong { color: var(--text); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  position: relative;
  padding: 0 0 0 42px;
  margin-bottom: 16px;
  line-height: 1.65;
  color: var(--muted);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li strong { color: var(--text); }

.model-grid,
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.model-card,
.brand-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.model-card:hover,
.brand-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
}
.model-card strong,
.brand-card strong { display: block; font-size: 0.98rem; margin-bottom: 4px; }
.model-card span,
.brand-card span { color: var(--muted); font-size: 0.85rem; }

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 20px; border-top: 1px solid var(--border); }
  .site-header { position: relative; }
}

/* footer link columns need one link per line */
.footer-col a { display: block; padding: 3px 0; color: #B9C7DB; text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }

/* footer link columns need one link per line */
.footer-col a { display: block; padding: 3px 0; color: #B9C7DB; text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }

/* the generator emits nav.breadcrumb > ol > li; lay the list out horizontally */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li { color: #8492A6; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #C3CCDA; }
.breadcrumb li a { color: var(--blue); text-decoration: none; }
.breadcrumb li a:hover { text-decoration: underline; }
.breadcrumb li[aria-current="page"] { color: var(--text); }
