/* Chongfeng Hardware - Global Styles */
:root {
  --orange: #e8630a;
  --orange-dark: #c85108;
  --orange-light: #ff8c42;
  --ink: #14161a;
  --ink-2: #1e2228;
  --gray: #2a2f36;
  --line: #e6e8eb;
  --paper: #ffffff;
  --paper-2: #f5f6f8;
  --text: #1a1d21;
  --muted: #6b7280;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(20, 22, 26, 0.08);
  --max: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: min(var(--max), 92%); margin: 0 auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600;
  font-size: 15px; cursor: pointer; border: none; transition: .25s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-ghost:hover { border-color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0; transition: .3s;
}
.site-header.scrolled { background: rgba(20,22,26,.92); backdrop-filter: blur(10px); padding: 12px 0; box-shadow: 0 2px 20px rgba(0,0,0,.25); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px; letter-spacing: .5px; }
.logo .mark { width: 34px; height: 34px; border-radius: 8px; background: var(--orange); display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 800; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: rgba(255,255,255,.85); font-size: 15px; font-weight: 500; position: relative; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--orange); transition: .25s; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { padding: 9px 20px; font-size: 14px; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }

/* Hero */
.hero {
  position: relative; min-height: 88vh; display: flex; align-items: center;
  background: linear-gradient(120deg, rgba(20,22,26,.88), rgba(20,22,26,.55)), var(--ink) center/cover no-repeat;
  color: #fff; padding: 140px 0 90px;
}
.hero-content { max-width: 760px; }
.hero .eyebrow { display: inline-block; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--orange-light); margin-bottom: 20px; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.1; font-weight: 800; margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--orange-light); }
.hero p { font-size: 18px; color: rgba(255,255,255,.8); max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Section */
.section { padding: 90px 0; }
.section-dark { background: var(--ink); color: #fff; }
.section-gray { background: var(--paper-2); }
.section-head { max-width: 680px; margin: 0 auto 50px; text-align: center; }
.section-head .kicker { display: inline-block; color: var(--orange); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; margin-bottom: 12px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-bottom: 14px; }
.section-dark .section-head h2 { color: #fff; }
.section-head p { color: var(--muted); font-size: 16px; }
.section-dark .section-head p { color: rgba(255,255,255,.65); }

/* Feature cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: .3s; box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(20,22,26,.14); }
.card .icon { width: 52px; height: 52px; border-radius: 12px; background: rgba(232,99,10,.1); color: var(--orange); display: grid; place-items: center; font-size: 24px; margin-bottom: 18px; }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* Product cards */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  transition: .3s; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(20,22,26,.12); }
.product-card .thumb { aspect-ratio: 1/1; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .thumb .ph { font-size: 42px; color: #c4c8ce; }
.product-card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .cat { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--orange); font-weight: 700; }
.product-card h3 { font-size: 16px; line-height: 1.3; }
.product-card .meta { font-size: 13px; color: var(--muted); }
.product-card .foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.product-card .moq { color: var(--muted); }
.product-card .link { color: var(--orange); font-weight: 600; }

/* Video */
.video-hero { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16/7; background: #000; }
.video-hero video { width: 100%; height: 100%; object-fit: cover; }
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.video-item { border-radius: var(--radius); overflow: hidden; background: #000; position: relative; aspect-ratio: 16/9; }
.video-item video { width: 100%; height: 100%; object-fit: cover; }
.video-item .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; font-weight: 600; }
.video-empty { padding: 60px 20px; text-align: center; color: rgba(255,255,255,.6); background: var(--ink-2); border-radius: 16px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat .num { font-size: 44px; font-weight: 800; color: var(--orange-light); }
.stat .label { color: rgba(255,255,255,.7); font-size: 14px; margin-top: 6px; }

/* Tables */
.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.spec-table th { background: var(--paper-2); font-weight: 600; color: var(--muted); width: 180px; }

/* Inquiry form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; background: #fff; transition: .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232,99,10,.12); }
.field textarea { min-height: 120px; resize: vertical; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 28px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-size: 38px; font-weight: 800; color: rgba(232,99,10,.18); display: block; margin-bottom: 12px; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14px; }

/* Page hero (inner pages) */
.page-hero { background: var(--ink); color: #fff; padding: 150px 0 70px; text-align: center; }
.page-hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; }
.page-hero p { color: rgba(255,255,255,.7); margin-top: 12px; max-width: 640px; margin-inline: auto; }

/* Filter */
.filters { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn { padding: 9px 22px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; transition: .2s; }
.filter-btn.active, .filter-btn:hover { background: var(--orange); color: #fff; border-color: var(--orange); }

/* Footer */
.site-footer { background: #0e1013; color: rgba(255,255,255,.7); padding: 70px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.footer-grid a { display: block; margin-bottom: 10px; font-size: 14px; }
.footer-grid a:hover { color: var(--orange-light); }
.footer-brand p { margin-top: 14px; font-size: 14px; max-width: 300px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 50px; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; }

/* Detail layout */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.detail .gallery { border-radius: var(--radius); overflow: hidden; background: var(--paper-2); aspect-ratio: 1/1; display: grid; place-items: center; }
.detail .gallery img { width: 100%; height: 100%; object-fit: cover; }
.detail h1 { font-size: 32px; font-weight: 800; margin-bottom: 10px; }
.detail .sku { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.detail .price { font-size: 22px; font-weight: 700; color: var(--orange); margin-bottom: 24px; }
.inquiry-box { background: var(--paper-2); border-radius: var(--radius); padding: 24px; }

/* Toast */
.toast { position: fixed; bottom: 30px; right: 30px; background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 10px; z-index: 999; opacity: 0; transform: translateY(10px); transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.toast.ok { background: #15803d; }
.toast.err { background: #b91c1c; }

/* Responsive */
@media (max-width: 1024px) {
  .grid-4, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats, .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--ink); flex-direction: column; padding: 24px; gap: 18px; }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
  .grid-4, .grid-3, .product-grid, .stats, .steps, .video-grid, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 70vh; }
  .section { padding: 60px 0; }
}
