/*
Theme Name: Jiajiajia Export
Theme URI: https://www.qdddm.cn/
Author: Jiajiajia
Description: Lightweight B2B export theme for Shandong Jiajiajia Technology & Environmental Protection Co., Ltd. Custom home page, product catalog, applications, news and inquiry form.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: jjj
*/

:root {
  --brand: #0b6b4b;
  --brand-dark: #084a34;
  --brand-light: #e8f4ee;
  --accent: #e08a1e;
  --ink: #12211c;
  --text: #3d4a45;
  --muted: #6d7b76;
  --line: #e2e8e5;
  --bg: #ffffff;
  --bg-soft: #f6f9f7;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(10, 40, 30, .08);
  --wrap: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 13px 26px; border-radius: 6px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: all .2s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }

/* ---------- Top bar / header ---------- */
.topbar { background: var(--brand-dark); color: #cfe3da; font-size: .82rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 16px; flex-wrap: wrap; }
.topbar a { color: #eaf5ef; }
.topbar .tb-right { display: flex; gap: 18px; flex-wrap: wrap; }

.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand), #12a06f);
  color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: .5px;
  display: grid; place-items: center;
}
.brand-text strong { display: block; color: var(--ink); font-size: 1rem; line-height: 1.2; letter-spacing: .2px; }
.brand-text span { display: block; color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.main-nav a { color: var(--ink); font-weight: 600; font-size: .93rem; padding: 6px 0; position: relative; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--brand); }
.main-nav .current-menu-item > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--brand);
}
.main-nav .sub-menu {
  position: absolute; background: #fff; box-shadow: var(--shadow); border-radius: 8px;
  padding: 12px; min-width: 220px; display: none; flex-direction: column; gap: 2px; margin-top: 12px;
}
.main-nav li { position: relative; }
.main-nav li:hover > .sub-menu { display: flex; }
.main-nav .sub-menu a { font-weight: 500; font-size: .88rem; padding: 8px 12px; border-radius: 6px; display: block; }
.main-nav .sub-menu a:hover { background: var(--brand-light); }
.header-cta { margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(100deg, rgba(6,44,32,.94) 0%, rgba(8,74,52,.86) 45%, rgba(11,107,75,.55) 100%), var(--brand-dark);
  background-size: cover; background-position: center;
}
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 85% 20%, rgba(18,160,111,.35), transparent 70%); }
.hero .wrap { position: relative; z-index: 2; padding-top: 84px; padding-bottom: 84px; max-width: 1200px; }
.hero-inner { max-width: 660px; }
.hero .eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: #a9e3c8; border: 1px solid rgba(169,227,200,.45); border-radius: 40px; padding: 5px 14px; margin-bottom: 20px;
}
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero p { color: #d6e8df; font-size: 1.07rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-meta { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 42px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.16); }
.hero-meta div strong { display: block; font-size: 1.5rem; color: #fff; line-height: 1.2; }
.hero-meta div span { font-size: .82rem; color: #bcd6c9; letter-spacing: .04em; }

/* ---------- Sections ---------- */
.section { padding: 78px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 46px; text-align: center; }
.section-head .kicker {
  color: var(--brand); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; display: block; margin-bottom: 10px;
}
.section-head p { color: var(--muted); margin: 0; }
.section-head.left { margin-left: 0; text-align: left; }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cat-card {
  position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-card .thumb { aspect-ratio: 4 / 3; background: #eef3f0 center/cover no-repeat; }
.cat-card .body { padding: 20px 22px 24px; }
.cat-card h3 { margin-bottom: 8px; }
.cat-card p { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.cat-card .more { font-weight: 600; font-size: .88rem; color: var(--brand); }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: all .25s; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.product-card .thumb { aspect-ratio: 1 / 1; background: #f2f6f3 center/cover no-repeat; }
.product-card .body { padding: 16px 18px 20px; }
.product-card h3 { font-size: .98rem; margin-bottom: 6px; }
.product-card .cat { font-size: .76rem; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.feature .ico {
  width: 44px; height: 44px; border-radius: 10px; background: var(--brand-light); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; margin-bottom: 16px;
}
.feature h3 { font-size: 1.02rem; margin-bottom: 8px; }
.feature p { font-size: .9rem; color: var(--muted); margin: 0; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.split .media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #e9f0ec; aspect-ratio: 4/3; background-size: cover; background-position: center; }
.split h2 { margin-bottom: 16px; }
.checklist { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; font-size: .95rem; }
.checklist li::before {
  content: "\2713"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand); font-size: .72rem; font-weight: 700; display: grid; place-items: center;
}

/* ---------- Application cards ---------- */
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.app-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 240px; background: #0d3b2c center/cover; }
.app-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,30,22,.15), rgba(4,30,22,.88)); }
.app-card .body { position: relative; z-index: 2; padding: 22px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; }
.app-card h3 { color: #fff; font-size: 1.05rem; margin-bottom: 4px; }
.app-card p { color: #cfe3da; font-size: .86rem; margin: 0; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.news-card .thumb { aspect-ratio: 16/9; background: #eef3f0 center/cover no-repeat; }
.news-card .body { padding: 20px 22px 24px; }
.news-card .date { font-size: .78rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.news-card h3 { font-size: 1.02rem; margin: 8px 0 10px; }
.news-card p { font-size: .9rem; color: var(--muted); margin: 0; }

/* ---------- CTA ---------- */
.cta-band { background: linear-gradient(100deg, var(--brand-dark), var(--brand)); color: #fff; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-top: 54px; padding-bottom: 54px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { color: #cfe3da; margin: 0; }

/* ---------- Page / content ---------- */
.page-hero { background: var(--brand-dark) center/cover; color: #fff; position: relative; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,36,26,.92), rgba(8,74,52,.72)); }
.page-hero .wrap { position: relative; z-index: 2; padding: 62px 24px; }
.page-hero h1 { color: #fff; margin-bottom: 8px; }
.page-hero p { color: #cfe3da; margin: 0; max-width: 720px; }
.breadcrumb { font-size: .82rem; color: #9fc3b1; margin-bottom: 14px; }
.breadcrumb a { color: #cfe3da; }

.entry { padding: 64px 0; }
.entry-inner { max-width: 820px; margin: 0 auto; }
.entry-inner h2 { margin-top: 1.6em; }
.entry-inner h3 { margin-top: 1.4em; }
.prose { font-size: 1.02rem; }
.prose img { border-radius: var(--radius); margin: 1.4em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .94rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; }
.prose th { background: var(--bg-soft); color: var(--ink); font-weight: 600; width: 220px; }

/* ---------- Product single ---------- */
.product-single { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; padding: 56px 0; }
.product-single .gallery .main { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; background: #f5f8f6 center/contain no-repeat; }
.product-single h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.product-single .cat-tag { display: inline-block; background: var(--brand-light); color: var(--brand); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 30px; margin-bottom: 14px; }
.spec-list { list-style: none; padding: 0; margin: 20px 0 26px; border-top: 1px solid var(--line); }
.spec-list li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.spec-list li strong { flex: 0 0 150px; color: var(--ink); font-weight: 600; }
.inquiry-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .84rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px;
  font-family: inherit; font-size: .95rem; color: var(--ink); background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,107,75,.1); }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .8rem; color: var(--muted); margin-top: 12px; }
.notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 24px; font-size: .94rem; }
.notice-ok { background: #e9f7ef; border: 1px solid #b7e2c8; color: #146c43; }
.notice-err { background: #fdecea; border: 1px solid #f5c2c0; color: #a12622; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; padding: 64px 0; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 20px; }
.contact-list li { display: flex; gap: 14px; }
.contact-list .ico { width: 40px; height: 40px; border-radius: 9px; background: var(--brand-light); color: var(--brand); display: grid; place-items: center; flex: 0 0 auto; font-size: .95rem; }
.contact-list strong { display: block; color: var(--ink); font-size: .92rem; }
.contact-list span { color: var(--muted); font-size: .92rem; }
.map-box { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); padding: 26px; }
.map-box p { margin: 0; font-size: .92rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0a2419; color: #a9c2b7; font-size: .9rem; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 62px 0 44px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; letter-spacing: .02em; }
.site-footer a { color: #a9c2b7; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .88rem; }
.footer-brand .brand-text strong { color: #fff; }
.footer-brand .brand-text span { color: #7fa392; }
.footer-brand p { margin: 18px 0 0; font-size: .88rem; color: #93b0a2; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: #7f9d8e; }

/* ---------- Pagination ---------- */
.pagination { margin-top: 40px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers { padding: 9px 14px; border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; color: var(--text); }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.filters a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 40px; font-size: .86rem; font-weight: 600; color: var(--text); }
.filters a:hover, .filters a.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid, .app-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
  .split, .contact-grid, .product-single { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 860px) {
  .topbar .tb-right { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 12px 24px 20px; margin: 0;
  }
  .site-header.nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav a { display: block; padding: 12px 0; }
  .main-nav .sub-menu { position: static; display: flex; box-shadow: none; padding: 0 0 8px 14px; margin: 0; }
  .header-cta { display: none; }
  .site-header .wrap { position: relative; }
  .cat-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 56px 0; }
  .hero .wrap { padding-top: 60px; padding-bottom: 60px; }
}
@media (max-width: 600px) {
  .product-grid, .cat-grid, .news-grid, .feature-grid, .app-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
  .hero-meta { gap: 20px; }
  .hero-meta div strong { font-size: 1.25rem; }
}
