/* ============================================================
   Dongguan HJ Technology Co., Ltd. — style.css
   Plain CSS3 only. No frameworks. Responsive + CSS-only nav.
   Font: Inter (Google Fonts) with system fallback.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --bg-muted: #f1efec;
  --text: #1a1d21;
  --text-muted: #5b626b;
  --line: #e6e2dc;
  --card-border: #e8e4de;
  --accent: #b4232a;          /* corporate red drawn from logo */
  --accent-dark: #8f1b21;
  --accent-soft: #fdf0f0;
  --dark: #141414;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 18, 20, 0.06), 0 4px 14px rgba(16, 18, 20, 0.06);
  --shadow-hover: 0 2px 4px rgba(16, 18, 20, 0.08), 0 10px 28px rgba(16, 18, 20, 0.10);
  --max: 1180px;
  --header-h: 72px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

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

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  color: var(--text);
}
h1 { font-size: 2.35rem; font-weight: 700; }
h2 { font-size: 1.7rem; font-weight: 700; }
h3 { font-size: 1.08rem; font-weight: 650; }

p { margin: 0 0 1em; color: var(--text-muted); }
p strong, li strong { color: var(--text); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-tight { padding: 48px 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.lead { font-size: 1.08rem; max-width: 46rem; }

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 650;
  font-size: 0.95rem;
  padding: 12px 26px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(180, 35, 42, 0.22); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: #fff; color: var(--text); border-color: #d8d3cc; }
.btn-outline:hover { border-color: var(--text); background: #fff; }
.btn-light { background: #fff; color: var(--accent); }
.btn-light:hover { background: #f6f6f6; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img {
  height: 52px;
  width: auto;
  max-width: 230px;
  object-fit: contain;
  border-radius: 4px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 0.92rem; color: var(--text); font-weight: 750; white-space: nowrap; }
.brand-text span { font-size: 0.74rem; color: var(--text-muted); letter-spacing: 0.04em; }

/* CSS-only mobile nav */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label {
  display: none;
  font-size: 1.7rem;
  line-height: 1;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  color: var(--text);
  background: #fff;
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-nav a {
  display: inline-block;
  color: var(--text);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
}
.main-nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.main-nav a.active { color: var(--accent); background: var(--accent-soft); }

/* ---------- Hero ---------- */
.hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 68px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { margin-bottom: 14px; }
.hero p.lead { margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.hero-meta div { font-size: 0.86rem; color: var(--text-muted); }
.hero-meta strong { display: block; color: var(--text); font-size: 0.95rem; }
.hero-visual {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-visual img { width: 100%; height: 320px; object-fit: cover; }
.hero-visual figcaption {
  padding: 14px 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
}
.hero-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.hero-collage img { height: 200px; object-fit: cover; width: 100%; }

/* ---------- Category cards ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.category-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.category-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.category-card .cat-image {
  background: #fbfbfa;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.category-card .cat-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.category-card .cat-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.category-card .cat-body h3 { margin-bottom: 6px; }
.category-card .cat-body p { font-size: 0.92rem; margin-bottom: 14px; flex: 1; }
.card-link { font-weight: 700; font-size: 0.92rem; color: var(--accent); }
.card-link:hover { color: var(--accent-dark); }
.count-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ---------- Product cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.product-image {
  background: #fbfbfa;
  border-bottom: 1px solid var(--line);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 {
  font-size: 0.95rem;
  margin: 0 0 4px;
  word-break: break-word;
}
.product-cat { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 12px; }
.product-contact {
  margin-top: auto;
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--accent);
}
.product-contact:hover { color: var(--accent-dark); }

/* ---------- Category sections (products page) ---------- */
.pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 8px;
}
.pill-nav a {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text);
  background: #fff;
  border: 1px solid #d8d3cc;
  border-radius: 999px;
  padding: 8px 18px;
  text-decoration: none;
}
.pill-nav a:hover { border-color: var(--text); text-decoration: none; }
.pill-nav a.accent { background: var(--dark); color: #fff; border-color: var(--dark); }
.category-section { padding: 34px 0 8px; scroll-margin-top: 90px; }
.category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--text);
}
.category-head h2 { margin: 0; font-size: 1.45rem; }
.category-head p { margin: 0; font-size: 0.88rem; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 52px 0 44px;
}
.page-hero h1 { margin-bottom: 10px; }
.page-hero p { max-width: 48rem; margin-bottom: 0; }
.breadcrumb { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--text-muted); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
}
.info-box {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}
.info-box h3 { margin-top: 0; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  padding: 10px 0 10px 30px;
  position: relative;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 4px;
  top: 10px;
  color: var(--accent);
  font-weight: 800;
}
.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 8px;
}
.value-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.value-card h3 { margin-bottom: 6px; font-size: 1rem; }
.value-card p { font-size: 0.9rem; margin: 0; }

/* ---------- Split / CTA ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.split img {
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.cta {
  background: var(--dark);
  color: #fff;
  border-radius: 16px;
  padding: 52px 48px;
  text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #c9c9c9; max-width: 40rem; margin: 0 auto 26px; }
.cta .btn-primary { box-shadow: none; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.contact-rows { display: grid; gap: 0; margin-top: 6px; }
.contact-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
.contact-row:last-child { border-bottom: 0; }
.contact-row dt { font-weight: 700; color: var(--text); margin: 0; }
.contact-row dd { margin: 0; color: var(--text-muted); word-break: break-word; }
.contact-row dd a { word-break: break-all; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 650; font-size: 0.88rem; margin-bottom: 6px; color: var(--text); }
.form-group label .req { color: var(--accent); }
.form-group input,
.form-group textarea {
  width: 100%;
  font: inherit;
  font-size: 0.94rem;
  padding: 11px 13px;
  border: 1px solid #d3cec6;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid rgba(180, 35, 42, 0.25);
  border-color: var(--accent);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.83rem; color: var(--text-muted); margin-top: 12px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.location-box {
  margin-top: 24px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #d7d7d7; margin-top: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 36px;
  padding: 52px 0 36px;
}
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-brand img { height: 46px; width: auto; border-radius: 4px; margin-bottom: 14px; background: #111; }
.footer-brand p { color: #bdbdbd; font-size: 0.9rem; }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { color: #d7d7d7; font-size: 0.92rem; }
.footer-nav a:hover { color: #fff; }
.footer-contact { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.footer-contact li { margin-bottom: 10px; color: #c4c4c4; }
.footer-contact a { color: #e8e8e8; }
.footer-contact strong { color: #fff; }
.footer-bottom {
  border-top: 1px solid #2c2c2c;
  padding: 18px 0;
  font-size: 0.84rem;
  color: #9a9a9a;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- About additions: stats, facts, tags, FAQ ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.stat-card strong { display: block; font-size: 1.15rem; font-weight: 800; color: var(--text); }
.stat-card span { font-size: 0.85rem; color: var(--text-muted); }

.facts-table {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.facts-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
.facts-row:last-child { border-bottom: 0; }
.facts-row dt { font-weight: 700; color: var(--text); }
.facts-row dd { margin: 0; color: var(--text-muted); }

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-list li {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  background: #fff;
  border: 1px solid #d8d3cc;
  border-radius: 999px;
  padding: 7px 18px;
}

.faq { display: grid; gap: 12px; max-width: 52rem; }
.faq details {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.96rem;
  padding: 16px 20px;
  list-style: none;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 24px;
  text-align: center;
  border: 1px solid #d8d3cc;
  border-radius: 50%;
  margin-right: 12px;
  color: var(--accent);
  font-weight: 800;
}
.faq details[open] summary::before { content: "–"; }
.faq details p {
  margin: 0;
  padding: 0 20px 18px 58px;
  font-size: 0.93rem;
}

/* ---------- Helpers ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 28px; }
.mb-0 { margin-bottom: 0; }
.section-head { max-width: 46rem; margin-bottom: 30px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.link-row { margin-top: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .grid-4, .product-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.4rem; }
  .section { padding: 46px 0; }
  .hero { padding: 46px 0 42px; }

  /* CSS-only dropdown nav */
  .nav-toggle-label { display: inline-block; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: none;
    box-shadow: 0 14px 30px rgba(0,0,0,0.08);
  }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; }
  .main-nav a { display: block; padding: 12px 10px; border-radius: 6px; }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .brand img { height: 44px; max-width: 180px; }
  .brand-text strong { font-size: 0.8rem; }

  .grid-4, .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .grid-3, .grid-2, .value-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .facts-row { grid-template-columns: 1fr; gap: 2px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .cta { padding: 38px 24px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 1fr; gap: 2px; }
  .hero-visual img { height: 220px; }
  .hero-collage img { height: 140px; }
  .split img { height: 230px; }
}

@media (max-width: 400px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-body h3 { font-size: 0.86rem; }
  .container { padding-left: 16px; padding-right: 16px; }
}
