/* YUTOP Lighting — bright & clean B2B style */
:root {
  --blue: #1e9ad6;
  --blue-dark: #0c6ea3;
  --blue-light: #e8f5fc;
  --ink: #1c2b36;
  --gray: #5b6b76;
  --bg: #ffffff;
  --bg-alt: #f5f9fc;
  --line: #e3ecf2;
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1140px, 92%); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; letter-spacing: .5px;
}
.logo-text { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: .5px; }
.logo-text span { color: var(--blue); }
.main-nav { display: flex; gap: 26px; align-items: center; }
.main-nav a {
  color: var(--ink); font-size: 15px; font-weight: 500;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: var(--blue); border-bottom-color: var(--blue); text-decoration: none; }
.nav-cta {
  background: var(--blue); color: #fff !important;
  padding: 9px 20px !important; border-radius: 999px;
  border-bottom: none !important;
}
.nav-cta:hover { background: var(--blue-dark); }

/* Hamburger menu button (mobile only) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: -8px 0;
  flex-direction: column;
  gap: 5px;
  border-radius: 6px;
  transition: background .2s;
}
.nav-toggle:hover { background: var(--bg-alt); }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: .3s;
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Hero */
.hero {
  background: linear-gradient(160deg, #0f4c75 0%, #1e9ad6 55%, #63c5ef 100%);
  color: #fff;
  padding: 96px 0 110px;
  position: relative; overflow: hidden;
}
.hero-kicker {
  display: inline-block; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.35);
  padding: 5px 16px; border-radius: 999px;
  font-size: 13.5px; letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 { font-size: 46px; line-height: 1.18; font-weight: 700; max-width: 720px; }
.hero p.lead { margin-top: 18px; font-size: 19px; max-width: 640px; color: rgba(255,255,255,.92); }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; transition: .2s;
}
.btn-primary { background: #fff; color: var(--blue-dark); }
.btn-primary:hover { background: var(--blue-light); text-decoration: none; }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.hero-stats {
  display: flex; gap: 0; margin-top: 56px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  max-width: 780px;
}
.hero-stat { flex: 1; padding: 22px 10px; text-align: center; }
.hero-stat + .hero-stat { border-left: 1px solid rgba(255,255,255,.25); }
.hero-stat b { display: block; font-size: 30px; }
.hero-stat span { font-size: 13.5px; color: rgba(255,255,255,.85); }

/* Sections */
section.section { padding: 84px 0; }
section.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.kicker {
  color: var(--blue); font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; font-size: 13px;
}
.section-head h2 { font-size: 34px; margin-top: 10px; font-weight: 700; }
.section-head p { margin-top: 14px; color: var(--gray); font-size: 17px; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: .25s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(12,110,163,.13); }
.card-img { aspect-ratio: 4/3; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.card-img.cover img { object-fit: cover; padding: 0; }
.card-body { padding: 20px 22px 24px; }
.card-body h3 { font-size: 18.5px; font-weight: 600; }
.card-body .sku { color: var(--blue); font-size: 13px; font-weight: 600; letter-spacing: .6px; }
.card-body p { margin-top: 8px; color: var(--gray); font-size: 14.5px; }
.spec-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.spec-tags span {
  background: var(--blue-light); color: var(--blue-dark);
  font-size: 12.5px; padding: 3px 11px; border-radius: 999px; font-weight: 500;
}

/* Feature list (About / OEM) */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; margin-bottom: 64px; }
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
.feature-img { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.feature-txt h3 { font-size: 25px; margin-bottom: 14px; }
.feature-txt p { color: var(--gray); margin-bottom: 12px; }
.check-list { list-style: none; margin-top: 14px; }
.check-list li { padding: 7px 0 7px 30px; position: relative; color: var(--ink); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue); 
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M9.55 17.6 4.2 12.25l1.6-1.6 3.75 3.75 8.65-8.65 1.6 1.6z"/></svg>') center/contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M9.55 17.6 4.2 12.25l1.6-1.6 3.75 3.75 8.65-8.65 1.6 1.6z"/></svg>') center/contain no-repeat;
}

/* OEM steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: step; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 20px; position: relative; counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-size: 24px; font-weight: 700; color: var(--blue-light);
  position: absolute; top: 18px; right: 16px;
  -webkit-text-stroke: 1px var(--blue);
}
.step h4 { font-size: 16.5px; margin-top: 8px; padding-right: 44px; }
.step p { font-size: 13.5px; color: var(--gray); margin-top: 8px; }

/* Certifications */
.cert-strip { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.cert-badge {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  width: 150px; padding: 26px 12px; text-align: center;
}
.cert-badge b { display: block; font-size: 21px; color: var(--blue); letter-spacing: 1px; }
.cert-badge span { font-size: 12.5px; color: var(--gray); display: block; margin-top: 6px; }

/* CTA band */
.cta-band {
  background: linear-gradient(150deg, #0f4c75, #1e9ad6);
  border-radius: 20px; color: #fff; text-align: center;
  padding: 64px 30px;
}
.cta-band h2 { font-size: 30px; }
.cta-band p { margin: 12px auto 28px; max-width: 560px; color: rgba(255,255,255,.9); }

/* Page hero (inner pages) */
.page-hero { background: linear-gradient(160deg,#0f4c75,#1e9ad6); color: #fff; padding: 64px 0; }
.page-hero h1 { font-size: 36px; }
.page-hero p { margin-top: 10px; color: rgba(255,255,255,.9); max-width: 640px; }
.breadcrumb { font-size: 13.5px; color: rgba(255,255,255,.75); margin-bottom: 12px; }
.breadcrumb a { color: #fff; opacity: .85; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.contact-info-card {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px;
}
.contact-line { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.contact-line:last-child { border-bottom: none; }
.contact-line b { min-width: 120px; color: var(--blue-dark); }
form .field { margin-bottom: 16px; }
form label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 6px; }
form input, form textarea, form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; font-family: inherit;
  background: #fff; color: var(--ink);
}
form input:focus, form textarea:focus { outline: 2px solid var(--blue-light); border-color: var(--blue); }

/* WhatsApp float */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  background: #25d366; color: #fff;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(37,211,102,.4);
}
.wa-float:hover { text-decoration: none; transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* Footer */
.site-footer { background: #10293a; color: rgba(255,255,255,.82); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding: 60px 0 40px; }
.site-footer h4 { color: #fff; font-size: 15.5px; margin-bottom: 16px; letter-spacing: .5px; }
.site-footer a { color: rgba(255,255,255,.82); font-size: 14.5px; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 18px 0; font-size: 13.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-brand p { font-size: 14.5px; margin-top: 10px; max-width: 300px; }

/* News */
.news-featured { display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; margin-bottom: 44px; }
.news-featured .fimg { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 320px; }
.news-featured .fimg img { width: 100%; height: 100%; object-fit: cover; }
.news-featured .fbody { display: flex; flex-direction: column; justify-content: center; }
.news-meta { display: flex; align-items: center; gap: 12px; margin: 12px 0 14px; font-size: 13.5px; }
.news-cat { background: var(--blue); color: #fff; padding: 3px 12px; border-radius: 999px; font-weight: 600; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; }
.news-date { color: var(--gray); }
.page-hero .news-date { color: rgba(255,255,255,.88); }
.news-featured h2 { font-size: 28px; line-height: 1.25; }
.news-featured h2 a { color: var(--ink); }
.news-featured p { margin-top: 12px; color: var(--gray); }
.news-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .25s; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(12,110,163,.13); }
.news-card .cimg { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.news-card .cimg img { width: 100%; height: 100%; object-fit: cover; }
.news-card .cbody { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.news-card h3 { font-size: 17.5px; line-height: 1.35; color: var(--ink); }
.news-card p { margin-top: 8px; color: var(--gray); font-size: 14px; flex: 1; }
.news-card .readmore { margin-top: 14px; color: var(--blue-dark); font-weight: 600; font-size: 14px; }

/* Article */
.article { max-width: 820px; margin: 0 auto; }
.article .ahero { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin: 30px 0; }
.article .ahero img { width: 100%; }
.article h2 { font-size: 23px; margin: 26px 0 12px; }
.article p { color: var(--ink); margin-bottom: 16px; }
.article ul.qlist { margin: 0 0 18px; padding-left: 20px; color: var(--ink); }
.article ul.qlist li { margin: 8px 0; }
.back-link { display: inline-block; margin: 8px 0 4px; color: var(--blue-dark); font-weight: 600; }

/* Spec table (commercial lighting components) */
.spec-table { width:100%; border-collapse:collapse; font-size:14px; margin-top:14px; }
.spec-table th { background:var(--blue); color:#fff; text-align:left; padding:9px 12px; font-weight:600; }
.spec-table td { border:1px solid var(--line); padding:8px 12px; color:var(--gray); background:#fff; }
.spec-table tr td:first-child { font-weight:600; color:var(--ink); white-space:nowrap; }

/* Responsive */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .feature-row, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 34px; }
  /* Mobile nav */
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    padding: 10px 0;
    gap: 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 14px 24px;
    border-bottom: none;
    font-size: 16px;
  }
  .main-nav a:hover, .main-nav a.active {
    background: var(--bg-alt);
    color: var(--blue);
    border-bottom: none;
  }
  .nav-cta {
    margin: 8px 24px 10px;
    border-radius: 8px !important;
    padding: 12px 20px !important;
  }
  .news-featured { grid-template-columns: 1fr; }
  .news-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .steps, .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; }
  .hero-stat { flex: 1 1 45%; }
  .news-list { grid-template-columns: 1fr; }
}

/* Homepage only: Product Lines & Newsroom stay one row of three.
   只作用于 index.html 上带 .grid-3-lock 的两个网格，
   其他页面（products.html / 各分类页的新闻与产品网格）仍按上面正常响应式折行。 */
@media (max-width: 960px) {
  .grid-3-lock { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  /* 平板下三卡变窄，收紧卡片内边距与字号，避免正文溢出 */
  .grid-3-lock .card-body { padding: 16px 15px 18px; }
  .grid-3-lock .card-body h3,
  .grid-3-lock .news-card h3 { font-size: 15.5px; line-height: 1.3; }
  .grid-3-lock .card-body p,
  .grid-3-lock .news-card p { font-size: 13px; }
  .grid-3-lock .spec-tags span,
  .grid-3-lock .news-card .news-meta span { font-size: 11.5px; }
}
@media (max-width: 640px) {
  /* 手机竖屏：三卡每张只剩约 100px 宽，标题会被挤到 6-8 行，改为单列堆叠 */
  .grid-3-lock { grid-template-columns: 1fr; gap: 22px; }
}

/* 草稿文章：顶部醒目标记，避免半成品被当成正式发布内容分享出去。
   只在 data/news.json 里勾了「保存为草稿」时出现；取消勾选并重新生成后自动消失。 */
.draft-note {
  background: #fff3cd;
  border-bottom: 1px solid #ffe69c;
  color: #7a5c00;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  padding: 9px 20px;
}

/* 所有文章都还是草稿时，新闻页的兜底空状态 */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state h2 { font-size: 26px; margin-bottom: 10px; }
.empty-state p { color: var(--muted, #6b7280); }
