:root {
  --ink: #172326;
  --muted: #5c686b;
  --paper: #f7f5ef;
  --white: #fff;
  --teal: #0b7775;
  --teal-dark: #064f52;
  --amber: #dda329;
  --red: #b33b32;
  --line: #d8dddb;
  --shadow: 0 18px 45px rgba(23, 35, 38, .14);
  --radius: 10px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.65; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(247,245,239,.95); border-bottom: 1px solid rgba(23,35,38,.12); backdrop-filter: blur(14px); }
.topbar-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand strong { display: block; font-size: 18px; line-height: 1.15; }
.brand span { display: block; color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 18px; align-items: center; font-size: 14px; font-weight: 800; }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--teal-dark); }
.nav .call { background: var(--red); color: var(--white); border-radius: 8px; padding: 10px 14px; }
.breadcrumb { padding: 20px 0; color: var(--muted); font-size: 14px; }
.breadcrumb a { color: var(--teal-dark); font-weight: 800; }
.eyebrow { color: var(--teal-dark); font-size: 14px; font-weight: 900; letter-spacing: .08em; }
h1, h2, h3 { line-height: 1.2; }
h1 { margin: 12px 0 0; font-size: clamp(38px, 6vw, 68px); letter-spacing: -.025em; }
h2 { margin: 0; font-size: clamp(28px, 4vw, 44px); }
.lead { max-width: 720px; color: var(--muted); font-size: clamp(17px, 2vw, 21px); }
.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-weight: 900; cursor: pointer; }
.btn-primary { background: var(--amber); color: #1c1607; }
.btn-dark { background: var(--teal-dark); color: var(--white); }
.btn-light { background: var(--white); border-color: var(--line); color: var(--ink); }
.hero { padding: 70px 0 54px; background: linear-gradient(135deg, #f7f5ef 0%, #e8efec 100%); border-bottom: 1px solid var(--line); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.inventory { padding: 68px 0 84px; }
.inventory-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.inventory-count { color: var(--muted); font-weight: 800; }
.inventory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.vehicle-card { display: grid; grid-template-columns: 1.12fr .88fr; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.vehicle-card-media { min-height: 460px; position: relative; background: #1f2a2d; }
.vehicle-card-media img { width: 100%; height: 100%; min-height: 460px; object-fit: cover; }
.status { position: absolute; left: 18px; top: 18px; padding: 7px 11px; border-radius: 999px; background: var(--teal-dark); color: white; font-weight: 900; font-size: 14px; }
.vehicle-card-body { padding: clamp(28px, 5vw, 54px); display: flex; flex-direction: column; justify-content: center; }
.vehicle-card-body h2 { margin-top: 10px; }
.price { margin: 18px 0 8px; color: var(--red); font-size: clamp(34px, 5vw, 52px); font-weight: 950; line-height: 1; }
.price small { color: var(--muted); font-size: 14px; font-weight: 800; }
.spec-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.spec-chips li { background: #eef2ef; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; font-size: 14px; font-weight: 800; }
.card-copy { color: var(--muted); margin: 20px 0 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.inventory-grid .vehicle-card { display: flex; min-width: 0; flex-direction: column; }
.inventory-grid .vehicle-card-media { min-height: 0; aspect-ratio: 16 / 10; }
.inventory-grid .vehicle-card-media img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.inventory-grid .vehicle-card-body { flex: 1; justify-content: flex-start; padding: 28px; }
.inventory-grid .vehicle-card-body h2 { font-size: clamp(27px, 3vw, 36px); }
.inventory-grid .price { font-size: clamp(34px, 4vw, 42px); }
.inventory-grid .card-actions { margin-top: auto; padding-top: 26px; }
.empty-note { margin-top: 24px; color: var(--muted); font-size: 14px; }
.detail-hero { padding: 20px 0 48px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 30px; align-items: start; }
.main-photo { width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: #1f2a2d; box-shadow: var(--shadow); cursor: zoom-in; }
.main-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.vehicle-summary { position: sticky; top: 92px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 10px 30px rgba(23,35,38,.08); }
.vehicle-summary h1 { font-size: clamp(32px, 4vw, 48px); }
.vehicle-summary .price { margin-top: 22px; }
.summary-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-list div { padding: 14px 8px; }
.summary-list small { display: block; color: var(--muted); font-weight: 800; }
.summary-list strong { display: block; margin-top: 3px; }
.summary-actions { display: grid; gap: 10px; }
.availability { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.gallery-section, .details-section, .contact-section { padding: 68px 0; }
.gallery-section { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-copy { color: var(--muted); margin: 10px 0 28px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.thumb { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #1f2a2d; cursor: pointer; }
.thumb:hover, .thumb:focus-visible, .thumb.is-active { border-color: var(--amber); outline: none; }
.thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.video-section { padding: 68px 0; background: #eef2ef; border-bottom: 1px solid var(--line); }
.vehicle-video { width: min(860px, 100%); max-height: 72vh; border-radius: var(--radius); background: #101719; box-shadow: var(--shadow); }
.detail-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.detail-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.detail-panel h3 { margin: 0 0 18px; font-size: 23px; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0; padding: 0; list-style: none; }
.feature-list li { position: relative; padding-left: 20px; color: var(--muted); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.notice { margin-top: 24px; padding: 18px 20px; background: #fff8e8; border-left: 4px solid var(--amber); color: #594916; }
.contact-section { background: #1f2a2d; color: white; }
.contact-card { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.contact-card p { color: rgba(255,255,255,.76); margin-bottom: 0; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.footer { padding: 24px 0 96px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mobile-cta { display: none; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 40; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(247,245,239,.96); box-shadow: var(--shadow); }
.mobile-cta a { min-height: 46px; display: grid; place-items: center; border-radius: 7px; background: var(--teal-dark); color: white; text-decoration: none; font-weight: 900; }
.mobile-cta a:first-child { background: var(--amber); color: #1c1607; }
dialog { width: min(1180px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 10px; background: #101719; color: white; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(0,0,0,.82); }
.lightbox-bar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 18px; }
.lightbox-bar button, .lightbox-nav button { border: 1px solid rgba(255,255,255,.3); border-radius: 7px; background: rgba(255,255,255,.1); color: white; padding: 8px 12px; cursor: pointer; }
.lightbox-image { width: 100%; max-height: calc(100vh - 130px); object-fit: contain; background: #050708; }
.lightbox-nav { display: flex; gap: 8px; }

@media (max-width: 900px) {
  .nav a:not(.call) { display: none; }
  .inventory-grid { grid-template-columns: 1fr; }
  .vehicle-card, .detail-grid, .detail-columns, .contact-card { grid-template-columns: 1fr; }
  .vehicle-card-media, .vehicle-card-media img { min-height: 340px; }
  .vehicle-summary { position: static; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
  body { padding-bottom: 74px; }
  .wrap { width: min(100% - 24px, 1120px); }
  .brand span { display: none; }
  .topbar .nav { display: none; }
  .hero { padding: 50px 0 42px; }
  .inventory { padding: 46px 0 58px; }
  .inventory-head { align-items: start; flex-direction: column; gap: 8px; }
  .vehicle-card-media, .vehicle-card-media img { min-height: 270px; }
  .vehicle-card-body { padding: 24px 20px 28px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-list { grid-template-columns: 1fr; }
  .summary-list { grid-template-columns: 1fr 1fr; }
  .contact-actions { width: 100%; }
  .contact-actions .btn { flex: 1; }
  .mobile-cta { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
