/* DUAN — 五金工具站，工业风：炭黑 + 安全橙 + 钢灰 */
:root {
  --ink: #191c20;
  --ink-2: #24282e;
  --steel: #565d66;
  --steel-light: #9aa3ad;
  --line: #e2e5e9;
  --paper: #f4f5f6;
  --white: #ffffff;
  --accent: #ff6a00;
  --accent-dark: #e05e00;
  --hazard: #ffd400;
  --radius: 6px;
  --shadow: 0 2px 10px rgba(15, 18, 22, .08);
  --font: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.6; font-size: 16px; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
input, button, textarea { font: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.eyebrow.light { color: var(--accent); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 900; text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius); font-weight: 700; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; transition: all .18s ease; white-space: nowrap;
}
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: var(--accent); border-color: var(--accent); }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- 顶部 ----------
*/
.topbar { background: var(--ink); color: var(--steel-light); font-size: 12.5px; }
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; padding: 7px 20px; flex-wrap: wrap; }

.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }

.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 42px; height: 42px; background: var(--ink); color: var(--accent);
  display: grid; place-items: center; font-weight: 900; font-size: 24px; border-radius: 4px;
  font-family: "Arial Black", Arial, sans-serif;
}
.logo-text { font-weight: 900; font-size: 24px; letter-spacing: .04em; display: flex; flex-direction: column; line-height: 1; }
.logo-text em { font-style: normal; font-size: 9px; letter-spacing: .32em; color: var(--steel); font-weight: 700; margin-top: 3px; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav > a { font-weight: 600; font-size: 15px; color: var(--ink-2); position: relative; padding: 6px 0; }
.main-nav > a:hover, .main-nav > a.active { color: var(--accent); }
.main-nav > a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--accent);
}
.nav-cta { margin-left: 4px; }

/* 下拉分类菜单 */
.nav-dropdown { position: relative; }
.drop-trigger { font-weight: 600; font-size: 15px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; padding: 6px 0; }
.nav-dropdown:hover .drop-trigger { color: var(--accent); }
.dropdown-menu {
  position: absolute; top: 100%; left: -14px; min-width: 210px; background: #fff;
  border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow); padding: 6px 0; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .18s ease;
}
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 9px 16px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.dropdown-menu a:hover { background: var(--paper); color: var(--accent); }

/* 移动端汉堡按钮 */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--ink); margin: 5px 0; transition: all .2s; border-radius: 2px; }
.nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(118deg, var(--ink) 0%, #20242a 55%, #2b3138 100%); color: #fff; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .05;
  background-image: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 26px);
}
.hero-stripe { height: 6px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 16px, var(--ink) 16px 32px); }
.hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; padding: 84px 20px; position: relative; }
.hero-tag { color: var(--accent); font-weight: 800; letter-spacing: .2em; font-size: 13px; margin-bottom: 14px; }
.hero h1 .accent { color: var(--accent); }
.hero-sub { color: #c4cad1; max-width: 520px; margin-top: 18px; font-size: 17px; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: grid; gap: 14px; }
.stat {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 18px 22px; display: flex; align-items: baseline; gap: 14px;
}
.stat strong { font-size: 30px; font-weight: 900; color: var(--accent); min-width: 74px; }
.stat span { color: #c4cad1; font-size: 14px; font-weight: 600; }

/* ---------- 价值条 ---------- */
.value-strip { background: var(--paper); border-bottom: 1px solid var(--line); }
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; padding: 34px 20px; }
.value-item h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.value-item h3::before { content: "▸ "; color: var(--accent); }
.value-item p { font-size: 13.5px; color: var(--steel); }

/* ---------- 区块 ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--paper); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.link-more { color: var(--accent); font-weight: 700; font-size: 15px; }
.link-more:hover { text-decoration: underline; }

/* ---------- 分类卡 ---------- */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.category-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; background: #fff;
  transition: all .2s ease; position: relative; overflow: hidden;
}
.category-card::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--accent); transition: width .25s;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d4d8dd; }
.category-card:hover::after { width: 100%; }
.cc-icon { color: var(--accent); margin-bottom: 14px; }
.category-card h3 { font-size: 18px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .02em; }
.category-card p { font-size: 13.5px; color: var(--steel); margin-bottom: 14px; }
.cc-count { font-size: 13px; font-weight: 800; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- 产品卡 ---------- */
.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;
  display: flex; flex-direction: column; transition: all .2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d4d8dd; }

.product-media {
  position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center;
  background: #fff; color: #6b747e; overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-media img { transform: scale(1.06); }
.ph-stripe { position: absolute; bottom: 0; left: 0; right: 0; height: 5px; z-index: 2;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 12px, var(--ink) 12px 24px); }
.ph-icon { opacity: .85; transition: transform .25s; }
.product-card:hover .ph-icon { transform: scale(1.12); color: var(--accent); }
.ph-cat {
  position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--ink); color: #fff; font-size: 10px;
  font-weight: 800; letter-spacing: .1em; padding: 4px 8px; border-radius: 3px;
}
.save-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 900; padding: 4px 8px; border-radius: 3px; letter-spacing: .04em;
}
.price-was { font-size: 13px; font-weight: 600; color: var(--steel-light); margin-right: 6px; }

.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--steel-light); }
.product-name { font-size: 15.5px; margin: 6px 0 8px; line-height: 1.35; }
.product-name a:hover { color: var(--accent); }
.product-desc { font-size: 13px; color: var(--steel); flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 10px; }
.product-price { font-size: 20px; font-weight: 900; color: var(--accent); }

/* ---------- 产品页筛选 ---------- */
.page-hero { background: linear-gradient(118deg, var(--ink) 0%, #2b3138 100%); color: #fff; }
.page-hero .container { padding: 56px 20px; }
.page-hero p { color: #c4cad1; max-width: 560px; margin-top: 10px; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.filter-btn {
  padding: 9px 18px; border-radius: var(--radius); border: 1.5px solid var(--line); background: #fff;
  font-weight: 700; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: all .15s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.search-input {
  margin-left: auto; padding: 9px 16px; border: 1.5px solid var(--line); border-radius: var(--radius);
  min-width: 220px; outline: none; transition: border-color .15s;
}
.search-input:focus { border-color: var(--accent); }
.result-count { font-size: 13px; color: var(--steel); margin-bottom: 22px; }
.no-results { text-align: center; color: var(--steel); padding: 50px 0; font-size: 16px; }

/* ---------- 联系区块 ---------- */
.contact-block { background: linear-gradient(118deg, var(--ink) 0%, #262b31 100%); color: #fff; }
.contact-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.contact-copy .eyebrow { margin-bottom: 10px; }
.contact-copy h2 { margin-bottom: 14px; }
.contact-copy p { color: #c4cad1; margin-bottom: 24px; max-width: 480px; }
.contact-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 28px; }
.contact-card h3 { font-size: 18px; letter-spacing: .04em; margin-bottom: 16px; text-transform: uppercase; }
.contact-card li { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 14.5px; }
.contact-card li:last-child { border-bottom: 0; }
.contact-card .lbl { color: var(--steel-light); font-weight: 700; min-width: 74px; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; padding-top: 2px; }
.contact-card a:hover { color: var(--accent); }

/* ---------- 联系页 ---------- */
.contact-page-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.contact-cards { display: grid; gap: 16px; }
.contact-item {
  display: flex; gap: 18px; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  background: #fff; transition: border-color .15s;
}
.contact-item:hover { border-color: var(--accent); }
.ci-icon {
  width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center;
  background: #fff2e8; color: var(--accent); border-radius: var(--radius);
}
.contact-item h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.contact-item p { font-weight: 600; }
.contact-item a:hover { color: var(--accent); }
.ci-note { font-size: 13px; color: var(--steel); }
.contact-form-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; background: #fff; box-shadow: var(--shadow); }
.contact-form-card h2 { margin-bottom: 6px; }
.form-note { color: var(--steel); font-size: 14px; margin-bottom: 20px; }
.contact-form-card form { display: grid; gap: 14px; }
.contact-form-card label { display: grid; gap: 6px; font-weight: 700; font-size: 13.5px; }
.contact-form-card input, .contact-form-card textarea {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 11px 14px; outline: none;
  font-weight: 400; transition: border-color .15s; resize: vertical;
}
.contact-form-card input:focus, .contact-form-card textarea:focus { border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--ink); color: #aab1b9; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 36px; padding: 52px 20px 40px; }
.footer-brand p { font-size: 13.5px; margin-top: 16px; max-width: 300px; }
.footer-col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 14px; }
.footer-col a, .footer-addr { display: block; padding: 5px 0; font-size: 14px; color: #aab1b9; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 10px; padding: 16px 20px; font-size: 12.5px; flex-wrap: wrap; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column;
    align-items: stretch; gap: 0; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none; padding: 8px 0;
  }
  .main-nav.open { display: flex; }
  .main-nav > a { padding: 13px 24px; border-top: 1px solid var(--line); }
  .main-nav > a.active::after { display: none; }
  .nav-dropdown .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-top: 0; padding: 0 0 6px 24px; }
  .drop-trigger { padding: 13px 24px 5px; display: block; }
  .nav-cta { margin: 10px 24px 12px; justify-content: center; display: flex; }
  .hero-inner { grid-template-columns: 1fr; padding: 56px 20px; gap: 36px; }
  .contact-inner { grid-template-columns: 1fr; }
  .contact-page-grid { grid-template-columns: 1fr; }
  .search-input { margin-left: 0; width: 100%; }
}

@media (max-width: 620px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product-body { padding: 12px 14px 14px; }
  .product-name { font-size: 14px; }
  .product-price { font-size: 17px; }
  .value-grid { grid-template-columns: 1fr; gap: 18px; padding: 26px 20px; }
  .category-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .topbar-inner { justify-content: center; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr; }
}
