/* JCS Auto Parts — site styles (static pages + SSR pages share this file) */

:root {
  --navy: #102a43;
  --navy-2: #173a5e;
  --ink: #1c2b3a;
  --muted: #5b6b7c;
  --line: #dfe6ee;
  --bg: #f6f8fb;
  --card: #ffffff;
  --accent: #f97316;
  --accent-2: #ea580c;
  --green: #15803d;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 42, 67, 0.07), 0 10px 28px rgba(16, 42, 67, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); }
h1 { font-size: clamp(26px, 4vw, 40px); }
h2 { font-size: clamp(21px, 3vw, 28px); }
h3 { font-size: 17px; }

.container { width: min(1180px, 92vw); margin: 0 auto; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 8px 14px; z-index: 300; }
.skip-link:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid transparent; border-radius: 9px; padding: 10px 20px;
  font-weight: 700; font-size: 15px; cursor: pointer; transition: 0.15s;
  background: var(--navy); color: #fff;
}
.btn:hover { filter: brightness(1.08); color: #fff; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-2); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.14); color: #fff; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1fb959; color: #fff; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-sm { padding: 6px 13px; font-size: 13.5px; border-radius: 7px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90; background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand-mark { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 19px; letter-spacing: 1.5px; }
.brand-text small { font-size: 11.5px; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 13px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--ink); }
.site-nav a:hover { background: #eef2f7; color: var(--navy); }
.site-nav a.active { color: var(--accent-2); background: #fff1e6; }
.site-nav .nav-cta { margin-left: 8px; padding: 8px 16px; color: #fff; font-size: 14px; }
.nav-toggle { display: none; background: none; border: 0; width: 42px; height: 42px; padding: 9px; border-radius: 8px; }
.nav-toggle span { display: block; height: 3px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: 0.2s; }

/* ---------- hero ---------- */
.hero { background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 62%, #1d4a74 100%); color: #e8f0f8; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 30px; align-items: center; padding: 74px 0 84px; position: relative; }
.hero .tag { display: inline-block; background: rgba(249,115,22,0.16); color: #fdba74; border: 1px solid rgba(249,115,22,0.4); padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 0.6px; margin-bottom: 18px; }
.hero h1 { color: #fff; margin-bottom: 16px; }
.hero-copy > p { font-size: 17.5px; color: #c3d3e4; max-width: 560px; margin-bottom: 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; color: #a9c0d6; font-size: 14.5px; }
.hero-art { position: relative; height: 320px; }
.hero-disc { position: absolute; inset: 30px 20px; border: 14px solid rgba(255,255,255,0.14); border-radius: 50%; }
.hero-disc::after { content: ""; position: absolute; inset: 26%; border: 4px dashed rgba(249,115,22,0.6); border-radius: 50%; }
.hero-gear { position: absolute; border: 10px solid rgba(255,255,255,0.16); border-radius: 50%; }
.hero-gear.g1 { width: 150px; height: 150px; right: 8px; top: 30px; }
.hero-gear.g2 { width: 96px; height: 96px; left: 12px; bottom: 26px; border-color: rgba(249,115,22,0.35); }
.hero-gear::before { content: ""; position: absolute; inset: -22px; border: 4px dashed rgba(255,255,255,0.18); border-radius: 50%; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 36px; }
.page-hero { background: linear-gradient(150deg, var(--navy), var(--navy-2)); color: #e8f0f8; padding: 52px 0 56px; text-align: center; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #b9cbdd; font-size: 17px; margin-top: 10px; }
.page-hero a { color: #fdba74; }
.page-hero.compact { padding: 26px 0 28px; text-align: left; }

/* ---------- category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.cat-card {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); color: var(--ink); transition: 0.15s;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--ink); }
.cat-ico { color: var(--accent); margin-bottom: 8px; }
.cat-card strong { font-size: 16px; color: var(--navy); }
.cat-card small { color: var(--muted); }

/* ---------- product grid & cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.product-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: 0.15s; }
.product-card:hover { transform: translateY(-3px); border-color: #c7d3e0; }
.card-cover { position: relative; display: block; background: #eef2f7; aspect-ratio: 4/3; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-cat { position: absolute; left: 10px; top: 10px; background: rgba(16,42,67,0.82); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.4px; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 16.5px; }
.card-body h3 a { color: var(--navy); }
.card-body h3 a:hover { color: var(--accent-2); }
.card-desc { color: var(--muted); font-size: 13.5px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card-meta .price { color: var(--accent-2); font-weight: 800; font-size: 17px; }
.card-meta .price small { color: var(--muted); font-weight: 600; font-size: 12px; }
.card-meta .moq { color: var(--muted); font-size: 12.5px; }
.card-actions { display: flex; gap: 8px; margin-top: 4px; }
.card-actions .btn { flex: 1; }

/* ---------- chips / filters ---------- */
.chips-row { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 28px; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 15px; font-weight: 600; font-size: 14px; color: var(--ink); }
.chip:hover { border-color: var(--accent); color: var(--accent-2); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip-count { background: #eef2f7; border-radius: 999px; font-size: 12px; padding: 1px 8px; color: var(--muted); }
.chip.active .chip-count { background: rgba(255,255,255,0.2); color: #fff; }
.empty-state { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state h2 { color: var(--ink); margin-bottom: 6px; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--accent), #fb923c); color: #fff; padding: 46px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; }
.cta-inner p { color: #ffe9d6; margin-top: 4px; }
.cta-band .btn-accent { background: var(--navy); }
.cta-band .btn-accent:hover { background: var(--navy-2); }
.cta-band.accepted { background: linear-gradient(120deg, #15803d, #22c55e); }
.cta-band.accepted .btn-ghost { border-color: rgba(255,255,255,0.75); }

/* ---------- why / steps ---------- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.why-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.why-ico { font-size: 26px; }
.why-item h3 { margin: 10px 0 6px; }
.why-item p { color: var(--muted); font-size: 14.5px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step-n { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; background: var(--accent); color: #fff; border-radius: 50%; font-weight: 800; margin-bottom: 10px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* ---------- prose ---------- */
.prose h2 { margin: 30px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 12px; color: #33475b; }
.prose ul { margin: 0 0 14px 22px; color: #33475b; }
.prose li { margin-bottom: 8px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.spec-table { width: 100%; border-collapse: collapse; min-width: 420px; }
.spec-table th, .spec-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14.5px; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { background: #f4f7fa; color: var(--navy); width: 34%; font-weight: 700; }
.spec-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.quote-table thead th { background: var(--navy); color: #fff; }
.quote-table tfoot td { font-weight: 700; }
.quote-table .total-row td { background: #fff7ed; color: var(--accent-2); font-size: 16px; }

/* ---------- breadcrumbs / detail ---------- */
.breadcrumbs { font-size: 14px; color: #a9c0d6; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumbs a { color: #dbe7f2; }
.breadcrumbs span[aria-current] { color: #fdba74; }
.product-detail { padding: 34px 0 10px; }
.detail-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: start; }
.detail-cover { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.detail-cover img { width: 100%; height: auto; display: block; aspect-ratio: 4/3; object-fit: cover; }
.detail-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.detail-thumbs img { width: 76px; height: 58px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.detail-info .tag { display: inline-block; background: #eef2f7; color: var(--muted); border-radius: 999px; font-size: 12.5px; font-weight: 700; padding: 3px 12px; margin-bottom: 10px; }
.detail-info h1 { margin-bottom: 12px; }
.oe-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.oe-chip { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 3px 10px; font-size: 12.5px; font-family: ui-monospace, Consolas, monospace; color: var(--navy-2); }
.detail-price { font-size: 26px; font-weight: 800; color: var(--accent-2); margin-bottom: 4px; }
.detail-price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.detail-moq { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.point-list { list-style: none; margin: 6px 0 20px; display: grid; gap: 7px; }
.point-list li { position: relative; padding-left: 24px; font-size: 15px; color: #33475b; }
.point-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.detail-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-promise { color: var(--muted); font-size: 13.5px; }
.app-row { display: flex; flex-wrap: wrap; gap: 8px; }
.app-chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 13.5px; font-weight: 600; color: var(--navy); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 15px 18px; font-weight: 700; color: var(--navy); list-style: none; position: relative; padding-right: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--accent); font-weight: 800; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 18px 16px; color: #33475b; font-size: 15px; }

/* ---------- forms ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.form-card { max-width: 760px; }
.lead-form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.span-2 { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--navy); }
.field input, .field textarea {
  border: 1.5px solid var(--line); border-radius: 9px; padding: 11px 13px; font: inherit;
  font-size: 15px; background: #fbfcfe; transition: 0.15s; width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-result { font-weight: 700; color: var(--green); min-height: 22px; }
.form-result.err { color: #dc2626; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 34px; align-items: start; }
.contact-info h2 { margin-bottom: 14px; }
.contact-info h2:not(:first-child) { margin-top: 30px; }
.contact-list { list-style: none; display: grid; gap: 12px; margin-bottom: 8px; }
.contact-list li { display: flex; flex-direction: column; }
.contact-list strong { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.6px; }
.contact-list a { font-size: 17px; font-weight: 700; }
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.social-card { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink); transition: 0.15s; }
.social-card:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
.social-card-ico { width: 40px; height: 40px; border-radius: 10px; background: #eef2f7; color: var(--navy); display: flex; align-items: center; justify-content: center; flex: none; }
.social-card span:last-child { display: flex; flex-direction: column; }
.social-card strong { font-size: 14px; color: var(--navy); }
.social-card small { color: var(--muted); font-size: 12px; word-break: break-all; }

/* ---------- quote page ---------- */
.quote-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.status-pill { padding: 5px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.status-draft { background: #e2e8f0; color: #475569; }
.status-sent { background: #dbeafe; color: #1e40af; }
.status-accepted { background: #dcfce7; color: #166534; }
.quote-sheet { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.quote-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 24px; margin-bottom: 20px; font-size: 14.5px; }
.quote-notes { background: #f4f7fa; border-radius: 10px; padding: 14px 18px; margin-top: 18px; }
.quote-notes h3 { font-size: 14.5px; margin-bottom: 6px; }
.quote-notes + .quote-notes { margin-top: 12px; }
.quote-notes-customer { background: #fff; border: 1px dashed var(--line); }

/* ---------- inquiry section ---------- */
.inquiry-section { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.inquiry-section h2 { text-align: center; }
.inquiry-section > .container > .muted { text-align: center; margin: 8px 0 26px; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #a9c0d6; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 34px; padding: 52px 0 40px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: 0.5px; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: #a9c0d6; font-size: 14.5px; }
.footer-col a:hover { color: #fdba74; }
.footer-col .brand { color: #fff; margin-bottom: 14px; }
.footer-col p { font-size: 14px; }
.social-row { display: flex; gap: 9px; margin-bottom: 18px; flex-wrap: wrap; }
.social-link { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,0.08); display: inline-flex; align-items: center; justify-content: center; color: #c3d3e4; transition: 0.15s; }
.social-link:hover { background: var(--accent); color: #fff; }
.footer-contact a { font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; }
.footer-bottom p { font-size: 13px; }
.footer-bottom a { color: #fdba74; }

/* ---------- floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 80; width: 56px; height: 56px;
  border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45); transition: 0.15s;
}
.wa-float:hover { transform: scale(1.08); color: #fff; background: #1fb959; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0 60px; }
  .hero-art { display: none; }
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px 5vw 20px;
    display: none; box-shadow: 0 18px 40px rgba(16,42,67,0.14);
  }
  .site-nav.open { display: flex; }
  .site-nav .nav-cta { margin: 8px 0 0; }
}
@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .social-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
