/* cssbuyqc.org — hand-written stylesheet
   Editorial "inspection manual" direction: white paper, cocoa-brown accent,
   sand-toned checklist blocks, borders instead of shadows. */

:root {
  --font-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --paper: #ffffff;
  --sand: #f5efe4;
  --sand-deep: #efe6d6;
  --ink: #211d18;
  --muted: #605747;
  --cocoa: #6a3f1d;
  --cocoa-deep: #4f2f14;
  --cocoa-soft: #f2e7da;
  --line: #e2d8c6;
  --line-strong: #cbba9d;
  --focus: #8a5a2b;
  --warn-bg: #fbf3e2;
  --warn-line: #e4c47a;
  --maxw: 1240px;
  --readw: 68ch;

  --space-section: 56px;
  --radius: 6px;
}

@media (max-width: 700px) {
  :root { --space-section: 40px; }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (max-width: 700px) {
  body { font-size: 15px; line-height: 1.6; }
}

img { max-width: 100%; display: block; }

a { color: var(--cocoa); text-underline-offset: 2px; }
a:hover { color: var(--cocoa-deep); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3 { color: var(--ink); text-wrap: balance; margin: 0; }

h1 { font-size: 48px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 28px; font-weight: 700; line-height: 1.3; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.4; }

@media (max-width: 700px) {
  h1 { font-size: 32px; line-height: 1.2; }
  h2 { font-size: 22px; }
  h3 { font-size: 16px; }
}

p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.25em; }

.small { font-size: 14px; }
@media (max-width: 700px) { .small { font-size: 13px; } }

.muted { color: var(--muted); }

/* ---------- layout primitives ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
@media (max-width: 700px) { .wrap { padding-inline: 16px; } }

.stack > * + * { margin-top: var(--space-section); }
.stack-sm > * + * { margin-top: 18px; }

.prose { max-width: var(--readw); }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose h2 + p, .prose h3 + p { margin-top: 0.6em; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--cocoa); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 40;
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 64px; padding-block: 10px;
}
.brand {
  font-weight: 800; font-size: 18px; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: baseline; gap: 8px;
}
.brand:hover { color: var(--ink); }
.brand .brand-dot { color: var(--cocoa); }
.brand-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.primary-nav a {
  display: block; padding: 8px 10px; font-size: 14px; font-weight: 500;
  color: var(--ink); text-decoration: none; border-radius: 4px;
}
.primary-nav a:hover { background: var(--sand); color: var(--cocoa-deep); }
.primary-nav a[aria-current="page"] { color: var(--cocoa); box-shadow: inset 0 -2px 0 var(--cocoa); }

.nav-toggle {
  margin-left: auto; display: none; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer;
}

@media (max-width: 940px) {
  .primary-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .primary-nav.is-open {
    display: block; position: static; margin: 0;
    order: 3; width: 100%; border-top: 1px solid var(--line); padding-top: 8px;
  }
  .primary-nav.is-open ul { flex-direction: column; gap: 2px; }
  .primary-nav.is-open a { padding: 10px 8px; }
  .header-inner { flex-wrap: wrap; }
}

/* ---------- search ---------- */
.search-strip { background: var(--sand); border-bottom: 1px solid var(--line); }
.search-strip .wrap { padding-block: 14px; }
.search-strip .search-form { max-width: 560px; }
.search-strip .search-note { margin-top: 6px; }
.nav-search { display: none; }
.primary-nav.is-open .nav-search { display: flex; margin-top: 10px; }

.search-form { display: flex; gap: 8px; align-items: stretch; }
.search-form input[type="search"] {
  flex: 1 1 auto; min-width: 0;
  border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 10px 12px; font: inherit; font-size: 15px; color: var(--ink); background: var(--paper);
}
.search-form input[type="search"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
  padding: 11px 18px; border-radius: 4px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
@media (max-width: 700px) { .btn { font-size: 14px; } }
.btn-primary { background: var(--cocoa); color: #fff; border-color: var(--cocoa); }
.btn-primary:hover { background: var(--cocoa-deep); border-color: var(--cocoa-deep); color: #fff; }
.btn-outline { background: var(--paper); color: var(--cocoa-deep); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--sand); color: var(--cocoa-deep); }
.btn-block { width: 100%; }

/* ---------- hero ---------- */
.hero { padding-top: 40px; }
.hero .eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cocoa); margin-bottom: 12px;
}
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 60ch; margin-top: 16px; }
@media (max-width: 700px) { .hero p.lead { font-size: 16px; } }
.hero-search { margin-top: 22px; max-width: 520px; }
.hero-search .search-note { margin-top: 8px; }

/* ---------- sections ---------- */
.section-head { max-width: 62ch; }
.section-head .kicker {
  font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--cocoa); margin-bottom: 8px;
}
.section-head p { margin-top: 12px; color: var(--muted); }

/* ---------- checklist blocks ---------- */
.panel {
  background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
@media (max-width: 700px) { .panel { padding: 16px; } }
.panel-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative; padding-left: 30px; padding-block: 9px;
  border-top: 1px solid var(--line);
}
.checklist li:first-child { border-top: 0; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 15px;
  width: 14px; height: 14px; border: 2px solid var(--cocoa); border-radius: 3px;
}
.checklist li strong { font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- copyable request sentences ---------- */
.request-line {
  background: var(--sand); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 14px 16px; margin: 0;
}
.request-line + .request-line { margin-top: 12px; }
.request-line .rq-text { font-size: 15px; }
.request-line .rq-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.request-line .rq-label { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.copy-btn {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--cocoa-deep);
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 6px 12px; cursor: pointer;
}
.copy-btn:hover { background: var(--cocoa-soft); }

/* ---------- product cards ---------- */
.card-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
@media (max-width: 700px) {
  .card-grid { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.product-card {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  overflow: hidden;
}
.product-card a.card-link { text-decoration: none; color: inherit; display: block; }
.product-card .thumb {
  background: var(--sand-deep); aspect-ratio: 1 / 1; overflow: hidden; border-bottom: 1px solid var(--line);
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .card-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.product-card .card-title {
  font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .card-meta { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.product-card .price-cny { font-size: 14px; font-weight: 700; color: var(--ink); }
.product-card .price-usd { font-size: 12px; color: var(--muted); }
.tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted);
}
.tag-qc { color: var(--cocoa-deep); border-color: var(--line-strong); background: var(--cocoa-soft); }

/* ---------- breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumb li { display: flex; gap: 6px; align-items: center; }
.breadcrumb li + li::before { content: "/"; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--cocoa); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink); }

/* ---------- product detail ---------- */
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .product-layout { grid-template-columns: 1fr; gap: 22px; } }
.product-hero-img { border: 1px solid var(--line); border-radius: var(--radius); background: var(--sand-deep); overflow: hidden; }
.product-hero-img img { width: 100%; height: auto; }
.price-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--sand); }
.price-block .price-main { font-size: 26px; font-weight: 800; color: var(--ink); }
.price-block .price-approx { font-size: 15px; color: var(--muted); margin-top: 2px; }
.price-block .price-note { margin-top: 10px; }

.qc-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 700px) { .qc-gallery { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }
.qc-gallery figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--sand-deep); }
.qc-gallery img { width: 100%; height: auto; }

.note-box {
  border: 1px solid var(--warn-line); background: var(--warn-bg); border-radius: var(--radius);
  padding: 16px 18px;
}
.note-box .note-title { font-weight: 700; margin-bottom: 4px; }

.empty-state {
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 18px; background: var(--sand); color: var(--muted);
}

.agent-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding: 0; list-style: none; }
.agent-list li {
  font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--muted);
}

/* ---------- category / hub cards ---------- */
.link-card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; background: var(--paper); text-decoration: none; color: inherit;
}
.link-card:hover { border-color: var(--line-strong); background: var(--sand); }
.link-card h3 { color: var(--cocoa-deep); }
.link-card p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.link-card .count { font-size: 13px; color: var(--muted); margin-top: 10px; display: block; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--sand); font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--line); padding-block: 18px; }
.faq-item:first-child { border-top: 0; }
.faq-item h3 { font-size: 18px; }
.faq-item p { margin-top: 8px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--sand); margin-top: var(--space-section); }
.footer-inner { padding-block: 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (max-width: 500px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col h4 { font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li + li { margin-top: 8px; }
.footer-col a { color: var(--ink); text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: var(--cocoa); text-decoration: underline; }
.footer-about p { font-size: 14px; color: var(--muted); margin-top: 10px; max-width: 40ch; }
.footer-bottom { border-top: 1px solid var(--line-strong); padding-block: 18px; font-size: 13px; color: var(--muted); }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ---------- misc ---------- */
.notice-strip { background: var(--cocoa-soft); border-bottom: 1px solid var(--line); font-size: 13px; }
.notice-strip .wrap { padding-block: 8px; color: var(--cocoa-deep); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.divider { border: 0; border-top: 1px solid var(--line); margin-block: 0; }

.callout-inline { border-left: 3px solid var(--cocoa); padding-left: 14px; color: var(--muted); }

.error-page { text-align: center; padding-block: 80px; }
.error-page .code { font-size: 72px; font-weight: 800; color: var(--cocoa); line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
