:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #65717f;
  --line: #d9e0e7;
  --red: #c81e35;
  --red-dark: #9f1728;
  --yellow: #f4bd2a;
  --green: #1c7c54;
  --blue: #2166a5;
  --gray: #68717a;
  --shadow: 0 12px 30px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.5;
}

.app-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 18px 14px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 2px 16px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.site-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #ffffff;
  object-fit: contain;
}

.title-stack {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 2.35rem);
  line-height: 1.1;
}

.last-updated {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.count-box {
  min-width: 82px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow);
}

.count-box span {
  display: block;
  font-size: 1.28rem;
  font-weight: 800;
}

.count-box small {
  color: var(--muted);
  font-size: 0.78rem;
}

.finder-panel {
  position: static;
  top: 0;
  z-index: 5;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.finder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.control span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

select,
input[type="search"] {
  width: 100%;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  font: inherit;
  outline: none;
}

select:disabled {
  color: #8f99a4;
  background: #eef2f5;
}

select:focus,
input[type="search"]:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 30, 53, 0.14);
}

.keyword-control {
  margin-top: 10px;
}

.toolbar {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.filter-button,
.reset-button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
}

.filter-button {
  width: 100%;
}

.filter-button.is-active {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
  font-weight: 800;
}

.reset-button {
  justify-self: stretch;
  color: var(--red-dark);
  font-weight: 800;
}

.status {
  margin-top: 14px;
  padding: 18px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.notice-panel {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(244, 189, 42, 0.62);
  border-radius: 8px;
  background: #fff9e8;
  color: #4a3a07;
  font-size: 0.92rem;
}

.notice-panel strong {
  flex: 0 0 auto;
}

.notice-panel span {
  min-width: 0;
}

.seo-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.seo-panel > summary {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--red-dark);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.seo-panel > summary::-webkit-details-marker,
.faq-list summary::-webkit-details-marker {
  display: none;
}

.seo-panel > summary::after {
  content: "+";
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f1f3f6;
  color: var(--red-dark);
  line-height: 24px;
  text-align: center;
}

.seo-panel[open] > summary::after {
  content: "-";
}

.seo-content {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
}

.section-kicker {
  margin: 0 0 4px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
}

.intro-copy h2,
.faq-list h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  line-height: 1.35;
}

.intro-copy p {
  margin: 0;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.feature-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.feature-item h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.faq-list {
  display: grid;
  gap: 8px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.faq-list summary {
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.faq-list p {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 12px;
  margin-top: 16px;
}

.result-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.result-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.brand {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.fitment-badge {
  max-width: 112px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  white-space: normal;
}

.fitment-badge.direct_fit {
  background: var(--green);
}

.fitment-badge.check_required {
  background: var(--yellow);
  color: #382600;
}

.fitment-badge.modification_required {
  background: var(--blue);
}

.fitment-badge.no_match {
  background: var(--gray);
}

.product-media {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 92px;
}

.product-image {
  display: block;
  width: min(220px, 100%);
  max-width: 220px;
  height: auto;
  object-fit: contain;
}

.product-image-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(220px, 100%);
  min-height: 88px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f7f9fb;
  color: var(--muted);
  font-weight: 800;
}

.product-name {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.field {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.field-name {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.field-value {
  min-width: 0;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.line-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #06c755;
  color: #ffffff;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.line-button-buy {
  background: #06c755;
}

.line-button-help {
  background: #1c7c54;
}

.line-button:focus,
.line-button:hover {
  background: #05ad4a;
}

.cases-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.12rem;
}

.section-link {
  flex: 0 0 auto;
  color: var(--red-dark);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.section-link:focus,
.section-link:hover {
  text-decoration: underline;
}

.cases-intro {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.case-group {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.case-group h3 {
  margin: 0;
  font-size: 1rem;
}

.case-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.case-media {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.case-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.case-media-overlay {
  display: flex;
  position: absolute;
  inset: 0;
  flex-direction: column;
  justify-content: end;
  gap: 6px;
  padding: 14px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.08));
  color: #ffffff;
}

.case-media-overlay span {
  color: #ffcf33;
  font-size: 0.76rem;
  font-weight: 900;
}

.case-media-overlay strong {
  max-width: 88%;
  font-size: 1.28rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.case-body {
  display: grid;
  gap: 5px;
}

.case-label,
.case-meta,
.case-description {
  margin: 0;
}

.case-label {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
}

.case-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.case-meta {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.case-description {
  color: var(--muted);
  font-size: 0.9rem;
}

.case-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--red);
  border-radius: 8px;
  color: var(--red-dark);
  font-weight: 900;
  text-decoration: none;
}

.case-link:focus,
.case-link:hover {
  background: var(--red);
  color: #ffffff;
}

.company-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.company-panel h2 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.company-name,
.company-name-en {
  margin: 0;
  font-weight: 900;
}

.company-name-en {
  color: var(--muted);
  font-size: 0.9rem;
}

.company-contact {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-style: normal;
}

.company-contact a {
  color: var(--red-dark);
  font-weight: 900;
  text-decoration: none;
}

.company-contact a:focus,
.company-contact a:hover {
  text-decoration: underline;
}

.official-links {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.official-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.official-link-site {
  border-color: #2f3a45;
}

.official-link-fb {
  border-color: #1877f2;
  color: #145dbd;
}

.official-link-line {
  border-color: #06c755;
  background: #06c755;
  color: #ffffff;
}

.official-link:focus,
.official-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.1);
}

@media (min-width: 720px) {
  .app-shell {
    padding: 28px 22px 56px;
  }

  .finder-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .finder-panel {
    position: sticky;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .filters {
    display: flex;
  }

  .filter-button {
    width: auto;
  }

  .reset-button {
    justify-self: end;
  }

  .field-grid {
    grid-template-columns: 1fr 1fr;
  }

  .seo-panel > summary {
    display: none;
  }

  .seo-content {
    display: grid;
    padding: 16px;
  }

  .feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .cases-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .company-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .company-contact {
    justify-items: end;
    text-align: right;
  }

  .official-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  .app-shell {
    padding-bottom: 72px;
  }

  .topbar {
    gap: 10px;
  }

  .site-logo {
    width: 42px;
    height: 42px;
  }

  .finder-panel {
    margin-bottom: 12px;
  }

  .result-card {
    scroll-margin-top: 12px;
  }
}
