﻿/*
Theme Name: China Source Lab
Theme URI: https://www.chinasourcelab.com/
Author: China Source Lab
Description: A clean resource-first WordPress theme for China sourcing guides, tools, templates, and supplier verification content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: china-source-lab
*/

:root {
  --csl-ink: #16211d;
  --csl-soft-ink: #304139;
  --csl-muted: #65756d;
  --csl-line: #e3e9e3;
  --csl-paper: #f5f3eb;
  --csl-cream: #fffdf7;
  --csl-sage: #e6eee7;
  --csl-mist: #edf2f3;
  --csl-green: #247158;
  --csl-green-dark: #0f3f32;
  --csl-copper: #a86026;
  --csl-blue: #365f70;
  --csl-white: #ffffff;
  --csl-shadow: 0 18px 48px rgba(24, 35, 31, 0.10);
  --csl-radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--csl-ink);
  background: var(--csl-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.68;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 15px clamp(18px, 4vw, 64px);
  background: rgba(255, 253, 247, 0.94);
  border-bottom: 1px solid rgba(227, 233, 227, 0.76);
  backdrop-filter: blur(14px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.site-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--csl-green-dark);
  box-shadow: 0 8px 22px rgba(15, 63, 50, 0.16);
}

.site-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--csl-muted);
  font-size: 13.5px;
  font-weight: 700;
}

.site-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a:hover,
.site-nav .current-menu-item a {
  color: var(--csl-green-dark);
}

.wrap {
  width: min(1160px, calc(100% - 36px));
  margin-inline: auto;
}

.hero {
  padding: 48px 0 68px;
  background:
    linear-gradient(90deg, rgba(230, 238, 231, 0.82) 0%, rgba(255, 253, 247, 0.94) 45%, rgba(237, 242, 243, 0.92) 100%);
  border-bottom: 1px solid rgba(227, 233, 227, 0.6);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.66fr) minmax(560px, 1.08fr);
  gap: clamp(34px, 4.8vw, 70px);
  align-items: center;
}

.home .hero-grid {
  grid-template-columns: minmax(520px, 0.92fr) minmax(520px, 1fr);
  gap: clamp(30px, 4vw, 58px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--csl-copper);
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  margin: 0;
  color: var(--csl-ink);
  line-height: 1.13;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(40px, 4.2vw, 56px);
  font-weight: 800;
}

.home .hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 3.72vw, 54px);
}

h2 {
  font-size: clamp(26px, 2.55vw, 36px);
  font-weight: 800;
}

h3 {
  font-size: 20px;
  font-weight: 800;
}

.hero-copy {
  max-width: 710px;
  margin-top: 18px;
  color: var(--csl-soft-ink);
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid var(--csl-green-dark);
  border-radius: var(--csl-radius);
  font-size: 15px;
  font-weight: 800;
}

.button-primary {
  color: var(--csl-white);
  background: var(--csl-green-dark);
}

.button-secondary {
  color: var(--csl-green-dark);
  background: var(--csl-white);
}

.hero-media {
  overflow: hidden;
  border: 1px solid rgba(227, 233, 227, 0.86);
  border-radius: 18px;
  background: var(--csl-white);
  box-shadow: 0 26px 76px rgba(24, 35, 31, 0.14);
}

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

.hero-note {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--csl-line);
  border-top: 1px solid rgba(227, 233, 227, 0.86);
}

.hero-note span {
  padding: 13px 12px;
  background: var(--csl-white);
  color: var(--csl-muted);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.section {
  padding: 76px 0;
  border-bottom: 0;
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 63, 50, 0.14), rgba(168, 96, 38, 0.12), transparent);
  opacity: 1;
}

.section-alt {
  background: var(--csl-sage);
}

.section:nth-of-type(4) {
  background: var(--csl-cream);
}

.section:nth-of-type(5) {
  background: var(--csl-mist);
}

.section-head {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-head p,
.intro-text,
.card p,
.article-card p,
.tool-card p,
.content-card p,
.page-hero p {
  color: var(--csl-muted);
}

.grid-3,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.card,
.article-card,
.tool-card,
.content-card,
.download-box,
.problem-pill {
  border: 1px solid rgba(227, 233, 227, 0.88);
  border-radius: var(--csl-radius);
  background: var(--csl-white);
}

.card,
.article-card,
.tool-card,
.content-card {
  position: relative;
  padding: 28px 26px;
  box-shadow: 0 12px 34px rgba(24, 35, 31, 0.055);
}

.card::before,
.article-card::before,
.tool-card::before,
.content-card::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--csl-copper), var(--csl-green));
  box-shadow: 0 0 0 6px rgba(168, 96, 38, 0.09);
}

.card-label,
.article-card span,
.tool-card span,
.content-card span {
  display: inline-block;
  margin-bottom: 11px;
  color: var(--csl-green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.feature-link {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(227, 233, 227, 0.88);
  border-radius: var(--csl-radius);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 8px 26px rgba(24, 35, 31, 0.05);
}

.feature-link + .feature-link {
  margin-top: 12px;
}

.feature-link span {
  color: var(--csl-copper);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.feature-link em,
.feature-link b {
  grid-column: 2;
}

.feature-link em {
  color: var(--csl-soft-ink);
  font-style: normal;
  line-height: 1.6;
}

.feature-link b {
  color: var(--csl-green);
  font-size: 14px;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.problem-pill {
  padding: 16px 18px;
  color: var(--csl-soft-ink);
  background: var(--csl-white);
  font-weight: 760;
  box-shadow: 0 10px 28px rgba(24, 35, 31, 0.045);
}

.download {
  padding: 72px 0;
  color: var(--csl-white);
  background: var(--csl-green-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.download h2 {
  color: var(--csl-white);
}

.download .eyebrow,
.download p {
  color: #d9eadf;
}

.download-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
  gap: 30px;
  align-items: center;
}

.download-box {
  padding: 22px;
  color: var(--csl-ink);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--csl-muted);
  font-size: 14px;
  font-weight: 760;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--csl-line);
  border-radius: var(--csl-radius);
  background: var(--csl-white);
  font: inherit;
}

.field textarea {
  resize: vertical;
}

.field input[type="file"] {
  padding: 12px;
  background: var(--csl-cream);
}

.supplier-form {
  align-self: start;
}

.text-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--csl-green-dark);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.fine-print {
  margin-top: 16px;
  color: var(--csl-muted);
  font-size: 13px;
  line-height: 1.5;
}

.price {
  display: block;
  margin: 8px 0 14px;
  color: var(--csl-green-dark);
  font-family: Manrope, Inter, sans-serif;
  font-size: 44px;
  font-weight: 850;
  line-height: 1;
}

.page-hero {
  padding: 70px 0 42px;
  background:
    linear-gradient(90deg, rgba(230, 238, 231, 0.84) 0%, rgba(255, 253, 247, 0.96) 52%, rgba(237, 242, 243, 0.88) 100%);
  border-bottom: 1px solid rgba(227, 233, 227, 0.62);
}

.page-hero p {
  max-width: 760px;
  font-size: 19px;
}

.content-section {
  padding: 54px 0 76px;
  background: var(--csl-paper);
  position: relative;
}

.page-template-page-guides .content-section:first-of-type {
  padding-bottom: 34px;
}

.page-template-page-guides .content-section:first-of-type + .content-section {
  padding-top: 34px;
}

.content-section::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 63, 50, 0.13), rgba(168, 96, 38, 0.11), transparent);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(280px, 0.42fr);
  gap: 22px;
  align-items: start;
}

.content-card {
  margin-bottom: 18px;
}

.content-card h2 {
  font-size: clamp(24px, 2.2vw, 32px);
  margin-bottom: 14px;
}

.content-card h3 {
  margin-top: 22px;
  margin-bottom: 8px;
}

.check-list,
.link-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.link-list a {
  position: relative;
  padding: 12px 14px 12px 34px;
  border-radius: 12px;
  background: rgba(230, 238, 231, 0.6);
  color: var(--csl-soft-ink);
  font-weight: 650;
}

.check-list li::before,
.link-list a::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 21px;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--csl-copper);
}

.sidebar-note {
  position: sticky;
  top: 92px;
}

.site-footer {
  padding: 34px 0;
  color: var(--csl-muted);
  background: var(--csl-cream);
  border-top: 1px solid var(--csl-line);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
  font-weight: 750;
}

@media (max-width: 900px) {
  .site-header,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 8px;
  }

  .site-menu {
    justify-content: flex-start;
  }

  .site-nav a,
  .site-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--csl-line);
    border-radius: 8px;
    background: var(--csl-white);
  }

  .hero-grid,
  .grid-3,
  .grid-2,
  .article-grid,
  .tool-grid,
  .split,
  .detail-grid,
  .problem-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .home .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 38px;
    padding-bottom: 54px;
  }

  h1 {
    font-size: clamp(38px, 11vw, 48px);
  }

  .hero-copy {
    font-size: 18px;
  }

  .home .hero h1 {
    font-size: clamp(38px, 11vw, 48px);
  }

  .page-template-page-guides .content-section:first-of-type {
    padding-bottom: 30px;
  }

  .page-template-page-guides .content-section:first-of-type + .content-section {
    padding-top: 36px;
  }

  .hero-media {
    margin-top: 6px;
  }

  .hero-note {
    grid-template-columns: 1fr;
  }

  .feature-link {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .feature-link em,
  .feature-link b {
    grid-column: auto;
  }
}

/* Single post template */
.single-post .page-hero {
  padding-bottom: 34px;
}

.single-post .single-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.single-post .single-guide-summary {
  align-self: center;
  padding: 22px 22px 20px;
  border: 1px solid rgba(227, 233, 227, 0.9);
  border-radius: var(--csl-radius);
  background: rgba(230, 238, 231, 0.72);
  box-shadow: 0 14px 34px rgba(24, 35, 31, 0.07);
}

.single-post .single-guide-summary span {
  display: block;
  margin-bottom: 12px;
  color: var(--csl-green-dark);
  font-size: 13px;
  font-weight: 850;
}

.single-post .single-guide-summary ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.single-post .single-guide-summary li {
  position: relative;
  padding-left: 24px;
  color: var(--csl-soft-ink);
  font-size: 14px;
  font-weight: 700;
}

.single-post .single-guide-summary li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--csl-green);
  transform: translateY(-50%);
}

.single-post .single-guide-summary li::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.72em;
  width: 3px;
  height: 6px;
  border-right: 2px solid var(--csl-white);
  border-bottom: 2px solid var(--csl-white);
  transform: translateY(-58%) rotate(45deg);
}

.single-post .content-section {
  padding-top: 30px;
}

.single-post .single-featured-image {
  max-width: 960px;
  margin: 0 auto 2rem;
  overflow: hidden;
  border: 1px solid rgba(227, 233, 227, 0.9);
  border-radius: 18px;
  background: var(--csl-white);
  box-shadow: 0 18px 48px rgba(24, 35, 31, 0.10);
}

.single-post .single-featured-image img {
  width: 100%;
  height: auto;
}

.single-post .entry-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 24px;
  color: #17231f;
  font-size: 17px;
  line-height: 1.8;
}

.single-post .entry-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 2.4rem;
  margin-bottom: 0.8rem;
  color: #111;
  border-left: 2px solid #1A6B5A;
  padding-left: 10px;
}

.single-post .entry-content h3 {
  font-size: 19px;
  font-weight: 700;
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
  color: #10231D;
}

.single-post .entry-content p {
  margin-bottom: 1.3rem;
  font-size: 17px;
  line-height: 1.85;
}

.single-post .entry-content strong {
  color: #10231D;
  font-weight: 700;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
  margin: 0.8rem 0 1.5rem;
  padding-left: 1.5rem;
}

.single-post .entry-content li {
  margin-bottom: 0.6rem;
  line-height: 1.75;
}

.single-post .entry-content li::marker {
  color: #1A6B5A;
  font-weight: 700;
}

.single-post .entry-content blockquote {
  margin: 2rem 0;
  padding: 18px 22px;
  color: #0F4A3C;
  font-style: normal;
  background: #ECF5F1;
  border-left: 4px solid #1A6B5A;
  border-radius: 10px;
}

.single-post .entry-content blockquote p {
  margin-bottom: 0.75rem;
}

.single-post .entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.single-post .entry-content blockquote a {
  color: #1A6B5A;
  font-weight: 700;
}

.single-post .entry-content hr {
  max-width: 100%;
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid rgba(26, 107, 90, 0.22);
}

.single-post .entry-content table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.55;
  background: #fff;
  border: 1px solid rgba(26, 107, 90, 0.16);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 35, 29, 0.06);
}

.single-post .entry-content th,
.single-post .entry-content td {
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(26, 107, 90, 0.12);
}

.single-post .entry-content th {
  color: #0F4A3C;
  font-weight: 700;
  background: #ECF5F1;
}

.single-post .entry-content tr:last-child td {
  border-bottom: 0;
}

.single-post .entry-content td:first-child,
.single-post .entry-content th:first-child {
  color: #10231D;
  font-weight: 700;
}

.single-post .entry-content tr:hover td {
  background: rgba(230, 242, 238, 0.32);
}

.single-post .entry-content input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  accent-color: #1A6B5A;
  vertical-align: middle;
  transform: translateY(-1px);
}

.single-post .single-bottom-cta {
  max-width: 820px;
  margin: 48px auto 0;
  padding: 28px;
  border: 1px solid rgba(227, 233, 227, 0.96);
  border-left: 4px solid var(--csl-green);
  border-radius: var(--csl-radius);
  background: var(--csl-sage);
  box-shadow: 0 14px 36px rgba(24, 35, 31, 0.07);
}

.single-post .single-bottom-cta h2 {
  font-size: clamp(24px, 2.3vw, 32px);
  margin-bottom: 12px;
}

.single-post .single-bottom-cta p {
  max-width: 720px;
  color: var(--csl-soft-ink);
}

@media (max-width: 900px) {
  .single-post .single-hero-grid {
    grid-template-columns: 1fr;
  }

  .single-post .single-guide-summary {
    align-self: stretch;
  }

  .single-post .single-featured-image {
    margin-right: 18px;
    margin-left: 18px;
  }

  .single-post .single-bottom-cta .actions {
    flex-direction: column;
  }

  .single-post .entry-content table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }

  .single-post .entry-content th,
  .single-post .entry-content td {
    min-width: 180px;
  }
}
