/* J.H CAR 嘉和汽車 — black / white / red. Shared by storefront, lookup and admin. */
:root {
  --black: #0c0c0d;
  --ink: #17171a;
  --ink-2: #2a2a2f;
  --line: #e3e3e6;
  --muted: #6b6b73;
  --bg: #ffffff;
  --bg-2: #f4f4f5;
  --red: #d8141c;
  --red-dark: #a80f15;
  --ok: #1d7a3a;
  --warn: #9a6a00;
  --radius: 6px;
  --font: -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* banner */
.banner { background: #fff3cd; color: #5c4400; text-align: center; font-size: .85rem; padding: 6px 16px; border-bottom: 1px solid #ecd58a; }
.banner.test { background: var(--red); color: #fff; border: 0; }

/* header */
.site-header { background: var(--black); color: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.logo .mark { font-size: 1.5rem; font-style: italic; }
.logo .slash { color: var(--red); font-size: 1.6rem; font-weight: 400; }
.logo .name { font-size: 1.35rem; }
.nav { display: flex; gap: 22px; font-size: .95rem; }
.nav a { text-decoration: none; opacity: .88; }
.nav a:hover { opacity: 1; color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 6px; }
@media (max-width: 760px) { .nav { display: none; } }

/* hero (CSS-only artwork; no stock photo) */
.hero { position: relative; color: #fff; overflow: hidden; background:
  radial-gradient(circle at 18% 30%, rgba(216,20,28,.35) 0 2px, transparent 3px) 0 0 / 46px 46px,
  radial-gradient(circle at 70% 60%, rgba(255,255,255,.18) 0 1.5px, transparent 2.5px) 0 0 / 31px 31px,
  linear-gradient(115deg, #050506 0%, #16161a 55%, #2a0507 100%); }
.hero::after { content: ""; position: absolute; right: -8%; top: 18%; width: 78%; height: 14px; background: linear-gradient(90deg, #000, #3a3a40 40%, #111);
  border-radius: 8px; transform: rotate(-14deg); box-shadow: 0 0 0 2px rgba(216,20,28,.55), 0 20px 50px rgba(0,0,0,.6); }
.hero .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { margin: 0 0 24px; font-size: clamp(2.2rem, 7vw, 4.2rem); line-height: 1.12; font-weight: 900; letter-spacing: .02em; }
.hero p { max-width: 30em; opacity: .85; margin: 0 0 28px; }
.art-note { position: absolute; right: 16px; bottom: 10px; font-size: .75rem; opacity: .55; z-index: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--radius); padding: 12px 22px;
  font-weight: 700; cursor: pointer; text-decoration: none; background: var(--red); color: #fff; min-height: 44px; }
.btn:hover { background: var(--red-dark); }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.dark { background: var(--black); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: .875rem; }
.btn[disabled], .btn.disabled { background: #9a9aa0; cursor: not-allowed; pointer-events: none; }
.btn .arrow::after { content: "›"; font-size: 1.3em; line-height: 1; }

/* fitment bar */
.finder { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.finder .wrap { display: grid; grid-template-columns: 180px repeat(3, 1fr) auto; gap: 14px; align-items: end; padding-top: 20px; padding-bottom: 20px; }
.finder h2 { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label, .field .label { font-size: .85rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #cfcfd4; border-radius: var(--radius); padding: 10px 12px; background: #fff; min-height: 44px; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.finder .hint { grid-column: 2 / -1; font-size: .82rem; color: var(--muted); margin: -4px 0 0; }
@media (max-width: 860px) { .finder .wrap { grid-template-columns: 1fr 1fr; } .finder h2, .finder .hint, .finder .btn { grid-column: 1 / -1; } }

/* sections */
section.block { padding: 64px 0; }
section.block.alt { background: var(--bg-2); }
section.block.dark { background: var(--black); color: #fff; }
.kicker { display: block; width: 44px; height: 4px; background: var(--red); margin-bottom: 14px; }
.block h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 8px; font-weight: 900; }
.lead { color: var(--muted); margin: 0 0 28px; }
.dark .lead { color: #c9c9cf; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 1.1rem; }
.card .price { font-size: 1.3rem; font-weight: 800; color: var(--red); }
.card.placeholder { border-style: dashed; color: var(--muted); align-items: flex-start; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.tag.red { background: #fde8e9; color: var(--red-dark); }
.tag.warn { background: #fff3cd; color: #6b4e00; }
.tag.ok { background: #e3f4e8; color: var(--ok); }
.spec { font-size: .9rem; color: var(--ink-2); }

.services { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.service { background: var(--ink); color: #fff; border-radius: 10px; padding: 22px; }
.service h3 { margin: 0 0 6px; }
.service p { margin: 0; color: #c9c9cf; }
@media (max-width: 640px) { .services { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: step; }
.steps li { position: relative; padding: 18px 16px 18px 56px; border: 1px solid #2c2c31; border-radius: 10px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 18px; width: 28px; height: 28px; border-radius: 50%; background: var(--red);
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps b { display: block; font-size: 1.05rem; }
.steps span { color: #c9c9cf; font-size: .9rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.phone-mock { background: #fff; border-radius: 16px; padding: 18px; box-shadow: 0 12px 40px rgba(0,0,0,.12); border: 1px solid var(--line); max-width: 340px; justify-self: center; width: 100%; }
.phone-mock .msg { background: var(--bg-2); border-radius: 12px; padding: 12px 14px; font-size: .92rem; }
.phone-mock .from { font-size: .78rem; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

details.faq { border: 1px solid var(--line); border-radius: 8px; padding: 0 16px; background: #fff; margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "＋"; color: var(--red); }
details.faq[open] summary::after { content: "－"; }
details.faq p { margin: 0 0 14px; color: var(--ink-2); }

/* forms */
.form { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form .full { grid-column: 1 / -1; }
.choice { display: flex; flex-wrap: wrap; gap: 10px; }
.choice label { display: flex; align-items: center; gap: 6px; border: 1px solid #cfcfd4; border-radius: var(--radius); padding: 8px 12px; cursor: pointer; background: #fff; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }
.notice { border-left: 4px solid var(--red); background: #fff5f5; padding: 12px 16px; border-radius: 4px; }
.notice.info { border-color: var(--ink-2); background: var(--bg-2); }
.notice.ok { border-color: var(--ok); background: #eef8f1; }
.error { color: var(--red-dark); font-weight: 700; }
.result-code { font-family: ui-monospace, Menlo, monospace; font-size: 1.4rem; font-weight: 800; letter-spacing: .08em; background: #fff; border: 2px dashed var(--red); padding: 6px 12px; display: inline-block; border-radius: 6px; }

/* footer + floating LINE */
.site-footer { background: var(--black); color: #c9c9cf; padding: 32px 0; font-size: .875rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.line-float { position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 64px; height: 64px; border-radius: 50%; background: #06c755; color: #fff;
  font-weight: 800; font-size: .8rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); border: 0; line-height: 1.15; text-align: center; }
.line-float.pending { background: #7d8a80; }

/* tables (lookup + admin) */
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--bg-2); font-weight: 700; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
