/* WhatToBuyInChina.com — mobile-first stylesheet. No external assets. */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --text: #1f2937;
  --text-muted: #6b7280;
  --brand: #d93025;
  --brand-dark: #b4231a;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --link: #1a73e8;
  --border: #e5e7eb;
  --note-bg: #fffbeb;
  --note-border: #fcd34d;
  --radius: 10px;
  --max-width: 1080px;
  --narrow: 760px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}

h1, h2, h3 { line-height: 1.3; margin-top: 0; }
h1 { font-size: 1.9rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.45rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p { margin: 0 0 1rem; }

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
.container.narrow { max-width: var(--narrow); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.cn { color: var(--text-muted); font-weight: 400; font-size: 0.9em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding-top: 0.6rem; padding-bottom: 0.6rem;
  flex-wrap: wrap;
}
.logo {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem;
}
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem;
}
.site-nav a {
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  padding: 0.25rem 0;
}
.site-nav a:hover { color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--text); color: #d1d5db;
  margin-top: 3rem; padding: 2rem 0 1.5rem;
}
.footer-nav ul {
  list-style: none; margin: 0 0 1.25rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
}
.footer-nav a { color: #e5e7eb; text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.disclosure { font-size: 0.85rem; color: #9ca3af; }
.disclosure a { color: #e5e7eb; }
.copyright { font-size: 0.85rem; color: #9ca3af; margin: 0.5rem 0 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--link); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 0.65rem 1.25rem;
  font-size: 1rem; font-weight: 600; text-decoration: none;
  cursor: pointer; line-height: 1.4;
}
.btn:hover { filter: brightness(1.08); color: #fff; }
.btn-affiliate { background: var(--accent); color: #1f2937; }
.btn-affiliate:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--link);
  border: 2px solid var(--link);
}
.btn-ghost:hover { background: var(--link); color: #fff; }
p .btn + .btn, p > .btn { margin: 0.25rem 0.5rem 0.25rem 0; }

/* ---------- Hero / sections ---------- */
.hero {
  background: linear-gradient(135deg, #b4231a 0%, #d93025 60%, #e9710f 100%);
  color: #fff; padding: 2.5rem 0;
}
.hero h1 { font-size: 2.1rem; margin-bottom: 0.5rem; }
.hero-subtitle { font-size: 1.15rem; font-weight: 500; opacity: 0.95; }
.hero p { opacity: 0.92; }

.section { padding: 2.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { color: var(--text-muted); font-size: 1.05rem; max-width: 60ch; }

/* ---------- Stats ---------- */
.stats { background: var(--bg-alt); padding: 1.5rem 0; }
.stats-row {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
  text-align: center;
}
.stat-value { display: block; font-size: 1.6rem; font-weight: 800; color: var(--brand); }
.stat-label { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Cards / grids ---------- */
.card-grid {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--brand); }
.card p:last-child { margin-bottom: 0; }
.section-alt .card { background: var(--bg); }

/* ---------- Teaser / newsletter ---------- */
.teaser-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.teaser-card {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.teaser-card h2 { margin-top: 0; }

.newsletter { background: var(--text); color: #f3f4f6; }
.newsletter h2 { color: #fff; margin-top: 0; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 0.5rem; }
.newsletter-form input[type="email"] {
  flex: 1 1 220px; padding: 0.65rem 0.9rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 1rem;
}
.form-note { font-size: 0.85rem; color: #9ca3af; margin-bottom: 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding: 1rem 0 0; }
.breadcrumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  font-size: 0.9rem; color: var(--text-muted);
}
.breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Article bits ---------- */
.tagline { font-size: 1.15rem; color: var(--text-muted); }

.pick-list { list-style: none; margin: 1.5rem 0; padding: 0; counter-reset: pick; }
.pick {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1rem; background: var(--bg);
  box-shadow: var(--shadow);
}
.pick-header { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 0.5rem; }
.rank {
  flex: none; width: 2rem; height: 2rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-weight: 800;
  border-radius: 50%; font-size: 1rem;
}
.pick-header h3 { margin: 0; }
.price-hint, .buy-tip { font-size: 0.95rem; }

.tips-list, .steps-list { padding-left: 1.25rem; }
.tips-list li, .steps-list li { margin-bottom: 0.6rem; }
.steps-list li::marker { font-weight: 700; color: var(--brand); }

.address { color: var(--text-muted); font-size: 0.92rem; }

.note-box {
  background: var(--note-bg); border: 1px solid var(--note-border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius); padding: 1.25rem; margin: 2rem 0;
}
.note-box h2 { margin-top: 0; font-size: 1.2rem; }
.note-box p:last-child { margin-bottom: 0; }
.note-warning { border-left-color: var(--brand); }

.inline-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }

.faq details {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.9rem 1.1rem; margin-bottom: 0.75rem; background: var(--bg);
}
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 0.6rem 0 0; }

.haul-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.haul-links .btn { font-size: 0.92rem; padding: 0.55rem 1rem; }

/* ---------- Tables & forms (tools pages) ---------- */
table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem;
}
th, td { border: 1px solid var(--border); padding: 0.65rem 0.8rem; text-align: left; }
th { background: var(--bg-alt); font-weight: 700; }
tr:nth-child(even) td { background: #fafbfc; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

form.tool-form { max-width: 480px; margin: 1.5rem 0; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field select {
  width: 100%; padding: 0.65rem 0.9rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 1rem; font-family: inherit;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link);
}
.tool-result {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; margin-top: 1.25rem;
}
.tool-result .result-value { font-size: 1.5rem; font-weight: 800; color: var(--brand); }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  h1 { font-size: 2.3rem; }
  .hero h1 { font-size: 2.6rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(4, 1fr); }
  .teaser-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .header-inner { flex-wrap: nowrap; }
}
