/*
Theme Name: 机器人浪潮
Theme URI: https://www.example.com
Author: 机器人浪潮
Author URI: https://www.example.com
Description: 机器人行业宣传引流主题。支持每日商机（含附件下载）、每日资讯、产品介绍（厂商二级目录，可无限扩展）、联系我们（微信/QQ二维码）等模块，全站内容通过后台维护，无需改代码。
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: robotwave
Tags: blog, news, business, one-column, custom-menu
*/

/* ==========================================================================
   全局变量与基础
   ========================================================================== */
:root {
  --primary: #1652f0;
  --primary-dark: #0b3b8c;
  --accent: #ff7a18;
  --navy: #0b1f3f;
  --ink: #1a2333;
  --muted: #6b7688;
  --line: #e6eaf2;
  --bg: #f5f7fb;
  --card: #ffffff;
  --green: #12b76a;
  --red: #e53935;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(20, 40, 90, .08);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "微软雅黑", "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==========================================================================
   头部与导航
   ========================================================================== */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { color: #fff; }
.brand .logo {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #6f8bff);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff;
}
.brand .name { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.brand .sub { font-size: 11px; color: #9fb0d0; margin-left: 2px; }

.main-nav { display: flex; align-items: center; }
.main-nav ul { display: flex; align-items: center; gap: 4px; }
.main-nav li { position: relative; }
.main-nav > ul > li > a {
  color: #dbe4f5;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 15px;
  display: block;
  white-space: nowrap;
}
.main-nav > ul > li > a:hover { color: #fff; background: rgba(255,255,255,.08); }
.main-nav li.current-menu-item > a,
.main-nav li.current_page_item > a { color: #fff; background: rgba(255,255,255,.12); }

/* 下拉菜单（产品介绍-厂商） */
.main-nav ul ul {
  position: absolute;
  top: 100%; left: 0;
  background: #fff;
  min-width: 180px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .2s;
  z-index: 200;
}
.main-nav li:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav ul ul li a {
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 7px;
  display: block;
  font-size: 14px;
}
.main-nav ul ul li a:hover { background: var(--bg); color: var(--primary); }

.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; gap: 5px;
}
.menu-toggle span { display: block; height: 2px; width: 22px; background: #fff; border-radius: 2px; }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  background: var(--navy);
  color: #9fb0d0;
  margin-top: 60px;
  padding: 44px 0 0;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #9fb0d0; }
.footer-col ul li a:hover { color: #fff; }
.footer-col .brand { margin-bottom: 12px; }
.footer-col .brand .name { font-size: 18px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: #7184a8;
}
.footer-bottom a { color: #9fb0d0; }

/* ==========================================================================
   通用
   ========================================================================== */
.page-head {
  background: linear-gradient(135deg, var(--navy), var(--primary-dark));
  color: #fff;
  padding: 56px 0 44px;
  text-align: center;
}
.page-head h1 { font-size: 32px; font-weight: 700; margin-bottom: 10px; }
.page-head p { color: #b8c6e0; font-size: 15px; }

.section-title {
  font-size: 24px; font-weight: 700; color: var(--ink);
  margin-bottom: 6px; display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ""; width: 5px; height: 22px; border-radius: 3px;
  background: linear-gradient(var(--primary), var(--accent));
}
.section-desc { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff;
  padding: 12px 26px; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: none; transition: all .2s;
}
.btn:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: #e56a08; }
.btn.ghost {
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.4);
}
.btn.ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn.lg { padding: 15px 34px; font-size: 17px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(20,40,90,.14); }

/* ==========================================================================
   首页（引流落地页）
   ========================================================================== */
.hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(22,82,240,.35), transparent 45%),
    linear-gradient(135deg, var(--navy) 0%, #0d2f66 55%, var(--primary-dark) 100%);
  color: #fff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero .badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  padding: 5px 14px; border-radius: 20px;
  font-size: 13px; color: #cfe0ff; margin-bottom: 22px;
}
.hero h1 { font-size: 44px; line-height: 1.25; font-weight: 800; margin-bottom: 18px; }
.hero h1 .hl { color: #6f9bff; }
.hero .lead { font-size: 17px; color: #c7d4ec; line-height: 1.8; margin-bottom: 30px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: flex; gap: 40px; margin-top: 44px; flex-wrap: wrap;
}
.hero-stats .stat b { font-size: 30px; color: #fff; display: block; }
.hero-stats .stat span { font-size: 13px; color: #9fb0d0; }

/* 模块卡片 */
.modules { padding: 60px 0 10px; }
.module-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.module-card .icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 16px;
}
.module-card .icon.b1 { background: #e8f0ff; }
.module-card .icon.b2 { background: #fff1e6; }
.module-card .icon.b3 { background: #e9faf1; }
.module-card h3 { font-size: 18px; margin-bottom: 8px; }
.module-card p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.module-card .more { font-size: 14px; font-weight: 600; }

/* 优势区块 */
.why { padding: 60px 0; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-item { text-align: center; padding: 26px 14px; }
.why-item .num { font-size: 28px; font-weight: 800; color: var(--primary); }
.why-item .label { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* 合作厂商 */
.vendors { padding: 30px 0 60px; }
.vendor-strip {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
}
.vendor-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  padding: 10px 18px; border-radius: 30px; font-weight: 600; color: var(--ink);
  transition: all .2s;
}
.vendor-chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.vendor-chip .vlogo {
  width: 24px; height: 24px; border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), #6f8bff);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

/* 首页联系区块 */
.home-contact {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: 20px;
  padding: 48px 40px; text-align: center; margin-top: 10px;
}
.home-contact h2 { font-size: 26px; margin-bottom: 10px; }
.home-contact p { color: #d5e0ff; margin-bottom: 24px; }
.qr-row { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
.qr-card {
  background: #fff; color: var(--ink);
  border-radius: 14px; padding: 18px 22px; width: 170px;
}
.qr-card img { width: 120px; height: 120px; margin: 0 auto 10px; border-radius: 8px; }
.qr-card .t { font-weight: 700; font-size: 15px; }
.qr-card .id { color: var(--muted); font-size: 13px; }

/* ==========================================================================
   列表页（商机/资讯/产品）
   ========================================================================== */
.archive-list { padding: 40px 0; }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.post-item { display: flex; flex-direction: column; }
.post-item .meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tag { background: #e8f0ff; color: var(--primary); padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.tag.green { background: #e9faf1; color: var(--green); }
.post-item h2 { font-size: 19px; margin-bottom: 8px; }
.post-item h2 a { color: var(--ink); }
.post-item h2 a:hover { color: var(--primary); }
.post-item p { color: var(--muted); font-size: 14px; flex: 1; }
.post-item .foot { margin-top: 16px; }

/* 厂商卡片 */
.vendor-card { display: flex; gap: 18px; align-items: flex-start; }
.vendor-card .vlogo-lg {
  width: 64px; height: 64px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), #6f8bff);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; overflow: hidden;
}
.vendor-card .vlogo-lg img { width: 100%; height: 100%; object-fit: cover; }
.vendor-card h3 { font-size: 19px; margin-bottom: 6px; }
.vendor-card h3 a { color: var(--ink); }
.vendor-card p { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.vendor-card .count { font-size: 13px; color: var(--primary); font-weight: 600; }

/* 产品卡片 */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product-card .thumb {
  height: 170px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #e8f0ff, #dfe9fb);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb .ph { font-size: 40px; color: #a9bce0; }
.product-card h3 { font-size: 17px; margin-bottom: 6px; }
.product-card h3 a { color: var(--ink); }
.product-card .model { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.product-card p { color: var(--muted); font-size: 13px; }

/* ==========================================================================
   单篇页
   ========================================================================== */
.single-wrap { padding: 40px 0; }
.article { max-width: 860px; margin: 0 auto; }
.article-head { margin-bottom: 24px; }
.article-head h1 { font-size: 28px; line-height: 1.4; margin-bottom: 12px; }
.article-head .meta { color: var(--muted); font-size: 14px; }
.article-body { font-size: 16px; line-height: 1.9; }
.article-body h2 { font-size: 21px; margin: 26px 0 12px; }
.article-body h3 { font-size: 18px; margin: 20px 0 10px; }
.article-body p { margin-bottom: 14px; }
.article-body ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.article-body li { margin-bottom: 6px; }

/* 商机附件下载框 */
.attach-box {
  margin: 26px 0; padding: 22px 24px;
  background: #eef4ff; border: 1px dashed var(--primary);
  border-radius: 12px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.attach-box .file-icon { font-size: 34px; }
.attach-box .fname { font-weight: 600; }
.attach-box .fmeta { color: var(--muted); font-size: 13px; }

/* 产品详情 */
.product-single { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.product-single .gallery {
  border-radius: 14px; overflow: hidden; background: var(--bg);
  display: flex; align-items: center; justify-content: center; min-height: 320px;
}
.product-single .gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-single .gallery .ph { font-size: 70px; color: #a9bce0; }
.product-info h1 { font-size: 28px; margin-bottom: 10px; }
.product-info .model-tag { display: inline-block; background: #e8f0ff; color: var(--primary); padding: 4px 12px; border-radius: 12px; font-size: 13px; margin-bottom: 16px; }
.product-info .vendor-link { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.product-info .vendor-link a { font-weight: 600; }
.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.spec-table td:first-child { color: var(--muted); width: 120px; }

/* 联系我们页面 */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 760px; margin: 0 auto; }
.contact-card { text-align: center; padding: 36px 24px; }
.contact-card img { width: 200px; height: 200px; margin: 0 auto 16px; border-radius: 12px; }
.contact-card h2 { font-size: 20px; margin-bottom: 6px; }
.contact-card .id { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.contact-card .hint { font-size: 13px; color: var(--muted); }
.disclaimer {
  max-width: 860px; margin: 40px auto 0; padding: 24px;
  background: #fff8f0; border: 1px solid #ffe3c2; border-radius: 12px;
  font-size: 13px; color: #8a6a3b;
}
.disclaimer h3 { color: #c07a1c; font-size: 15px; margin-bottom: 10px; }
.disclaimer li { margin-bottom: 6px; list-style: disc; margin-left: 18px; }

/* 空状态 */
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr; }
  .product-single { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 760px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 66px; left: 0; right: 0;
    background: var(--navy);
    flex-direction: column; align-items: stretch;
    padding: 12px 16px 20px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav ul ul { position: static; opacity: 1; visibility: visible; transform: none; background: rgba(255,255,255,.06); box-shadow: none; padding-left: 12px; }
  .main-nav ul ul li a { color: #dbe4f5; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 56px 0; }
  .hero-stats { gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; }
  .qr-row { gap: 20px; }
}
