/*
Theme Name: Astra Child - YJ Electronic
Theme URI: https://yj333.com
Description: YJ 电子元器件站定制外观 —— 深蓝科技风，适配 BOM 配单业务
Author: YJ
Template: astra
Version: 1.0.0
Text Domain: astra-child-yj
*/

/* ============================================================
   设计变量（深蓝科技风 + 橙色 CTA）
   ============================================================ */
:root {
  --yj-navy: #0B3D91;
  --yj-navy-dark: #082B6B;
  --yj-navy-light: #1E5BC6;
  --yj-orange: #F97316;
  --yj-orange-dark: #EA580C;
  --yj-ink: #0F172A;
  --yj-slate: #334155;
  --yj-muted: #64748B;
  --yj-line: #E2E8F0;
  --yj-bg-soft: #F8FAFC;
  --yj-radius: 10px;
}

/* ============================================================
   全局
   ============================================================ */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--yj-slate);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--yj-ink);
  letter-spacing: -0.015em;
}

/* 页面内容区不加额外内边距，让 Hero 能贴边 */
.yj-page .site-content > .ast-container {
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
}
.yj-page .entry-content > *:not(.yj-full) {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ============================================================
   Hero 区域
   ============================================================ */
.yj-hero {
  position: relative;
  background: linear-gradient(135deg, #061F4F 0%, var(--yj-navy) 55%, #1560C4 100%);
  color: #fff;
  padding: 96px 24px 88px;
  overflow: hidden;
}
.yj-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.yj-hero::after {
  content: '';
  position: absolute;
  width: 620px; height: 620px;
  right: -180px; top: -220px;
  background: radial-gradient(circle, rgba(249,115,22,.22) 0%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}
.yj-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
}
.yj-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(249,115,22,.15);
  border: 1px solid rgba(249,115,22,.45);
  color: #FDBA74;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: .02em;
}
.yj-hero h1 {
  color: #fff;
  font-size: 50px;
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 22px;
  letter-spacing: -0.025em;
}
.yj-hero h1 span {
  color: #FDBA74;
}
.yj-hero p.yj-sub {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255,255,255,.82);
  margin: 0 0 34px;
  max-width: 560px;
}
.yj-hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.yj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 32px;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all .22s ease;
  border: 2px solid transparent;
  line-height: 1.2;
}
.yj-btn-primary {
  background: var(--yj-orange);
  color: #fff !important;
  box-shadow: 0 6px 22px rgba(249,115,22,.34);
}
.yj-btn-primary:hover {
  background: var(--yj-orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(249,115,22,.44);
}
.yj-btn-ghost {
  background: rgba(255,255,255,.07);
  color: #fff !important;
  border-color: rgba(255,255,255,.34);
  backdrop-filter: blur(4px);
}
.yj-btn-ghost:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.6);
  transform: translateY(-2px);
}

/* Hero 右侧视觉卡 */
.yj-hero-visual {
  position: relative;
}
.yj-hero-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  padding: 26px;
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 60px rgba(0,0,0,.34);
}
.yj-hero-card-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.62);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 18px;
}
.yj-hero-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-size: 14.5px;
}
.yj-hero-row:last-child { border-bottom: none; padding-bottom: 0; }
.yj-hero-row span:first-child { color: rgba(255,255,255,.72); }
.yj-hero-row span:last-child { color: #fff; font-weight: 600; }
.yj-hero-row .yj-good { color: #4ADE80 !important; }

/* ============================================================
   数据统计条
   ============================================================ */
.yj-stats {
  background: #fff;
  border-bottom: 1px solid var(--yj-line);
  padding: 44px 24px;
}
.yj-stats-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.yj-stat-num {
  font-size: 38px;
  font-weight: 800;
  color: var(--yj-navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.yj-stat-num em {
  font-style: normal;
  color: var(--yj-orange);
}
.yj-stat-label {
  font-size: 14px;
  color: var(--yj-muted);
  margin-top: 7px;
  font-weight: 500;
}

/* ============================================================
   通用区块
   ============================================================ */
.yj-section {
  padding: 88px 24px;
}
.yj-section.yj-soft { background: var(--yj-bg-soft); }
.yj-section.yj-navy {
  background: linear-gradient(135deg, #061F4F 0%, var(--yj-navy) 100%);
  color: rgba(255,255,255,.86);
}
.yj-wrap {
  max-width: 1140px;
  margin: 0 auto;
}
.yj-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--yj-orange);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}
.yj-h2 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.22;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.yj-navy .yj-h2 { color: #fff; }
.yj-lead {
  font-size: 17px;
  line-height: 1.75;
  color: var(--yj-muted);
  max-width: 680px;
  margin: 0 0 48px;
}
.yj-navy .yj-lead { color: rgba(255,255,255,.72); }
.yj-center { text-align: center; }
.yj-center .yj-lead { margin-left: auto; margin-right: auto; }

/* ============================================================
   服务卡片网格
   ============================================================ */
.yj-grid {
  display: grid;
  gap: 24px;
}
.yj-grid-3 { grid-template-columns: repeat(3, 1fr); }
.yj-grid-4 { grid-template-columns: repeat(4, 1fr); }
.yj-grid-2 { grid-template-columns: repeat(2, 1fr); }

.yj-card {
  background: #fff;
  border: 1px solid var(--yj-line);
  border-radius: var(--yj-radius);
  padding: 32px 28px;
  transition: all .24s ease;
  position: relative;
}
.yj-card:hover {
  border-color: rgba(11,61,145,.34);
  box-shadow: 0 14px 40px rgba(15,23,42,.09);
  transform: translateY(-4px);
}
.yj-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(11,61,145,.09), rgba(11,61,145,.04));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
}
.yj-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 11px;
}
.yj-card p {
  font-size: 15px;
  line-height: 1.72;
  color: var(--yj-muted);
  margin: 0;
}
.yj-card ul.yj-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.yj-card ul.yj-list li {
  font-size: 14.5px;
  color: var(--yj-slate);
  padding: 7px 0 7px 24px;
  position: relative;
  line-height: 1.6;
}
.yj-card ul.yj-list li::before {
  content: '';
  position: absolute;
  left: 2px; top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yj-orange);
}

/* 深色区块内的卡片 */
.yj-navy .yj-card {
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.13);
}
.yj-navy .yj-card:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(249,115,22,.5);
  box-shadow: 0 14px 40px rgba(0,0,0,.3);
}
.yj-navy .yj-card h3 { color: #fff; }
.yj-navy .yj-card p { color: rgba(255,255,255,.7); }
.yj-navy .yj-card ul.yj-list li { color: rgba(255,255,255,.82); }
.yj-navy .yj-card-icon {
  background: rgba(249,115,22,.16);
}

/* ============================================================
   流程步骤
   ============================================================ */
.yj-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.yj-step {
  position: relative;
  padding-top: 18px;
}
.yj-step-num {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--yj-navy);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}
.yj-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 41px; left: 58px; right: -12px;
  height: 2px;
  background: linear-gradient(90deg, var(--yj-line), rgba(226,232,240,.35));
  z-index: 1;
}
.yj-step h4 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 9px;
}
.yj-step p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--yj-muted);
  margin: 0;
}

/* ============================================================
   对比表格
   ============================================================ */
.yj-table-wrap {
  overflow-x: auto;
  border-radius: var(--yj-radius);
  border: 1px solid var(--yj-line);
  background: #fff;
}
table.yj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 0;
}
table.yj-table th {
  background: var(--yj-navy);
  color: #fff;
  font-weight: 600;
  padding: 16px 20px;
  text-align: left;
  font-size: 14px;
  letter-spacing: .01em;
}
table.yj-table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--yj-line);
  color: var(--yj-slate);
}
table.yj-table tr:last-child td { border-bottom: none; }
table.yj-table tr:nth-child(even) td { background: #FCFDFE; }

/* ============================================================
   CTA 区块
   ============================================================ */
.yj-cta {
  background: linear-gradient(135deg, var(--yj-navy) 0%, #1560C4 100%);
  border-radius: 16px;
  padding: 60px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.yj-cta::after {
  content: '';
  position: absolute;
  width: 460px; height: 460px;
  left: -140px; bottom: -220px;
  background: radial-gradient(circle, rgba(249,115,22,.2) 0%, transparent 70%);
  border-radius: 50%;
}
.yj-cta h2 {
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 14px;
  position: relative;
  z-index: 2;
}
.yj-cta p {
  color: rgba(255,255,255,.8);
  font-size: 17px;
  margin: 0 0 32px;
  position: relative;
  z-index: 2;
}
.yj-cta .yj-btn { position: relative; z-index: 2; }

/* ============================================================
   联系方式卡片
   ============================================================ */
.yj-contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--yj-line);
}
.yj-contact-item:last-child { border-bottom: none; }
.yj-contact-ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(11,61,145,.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.yj-contact-item h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 5px;
}
.yj-contact-item p {
  font-size: 14.5px;
  color: var(--yj-muted);
  margin: 0;
  line-height: 1.6;
  word-break: break-word;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .yj-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .yj-hero h1 { font-size: 40px; }
  .yj-grid-4, .yj-steps { grid-template-columns: repeat(2, 1fr); }
  .yj-step:not(:last-child)::after { display: none; }
  .yj-stats-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .yj-hero { padding: 64px 20px 56px; }
  .yj-hero h1 { font-size: 31px; }
  .yj-hero p.yj-sub { font-size: 16px; }
  .yj-section { padding: 56px 20px; }
  .yj-h2 { font-size: 27px; }
  .yj-lead { font-size: 16px; margin-bottom: 34px; }
  .yj-grid-3, .yj-grid-4, .yj-grid-2, .yj-steps { grid-template-columns: 1fr; }
  .yj-stats-inner { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .yj-stat-num { font-size: 30px; }
  .yj-cta { padding: 44px 24px; }
  .yj-cta h2 { font-size: 25px; }
  .yj-btn { width: 100%; }
  .yj-hero-cta { flex-direction: column; }
}

/* 隐藏 Astra 默认的行内标题空档 */
.yj-page .entry-header { display: none; }

/* ============================================================
   Fluent Forms · BOM 询盘表单
   ============================================================ */
.yj-ff.fluent_form_3 { margin: 0; }
.yj-ff .ff-el-group { margin-bottom: 18px; }
.yj-ff .ff-el-input--label label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--yj-ink);
  letter-spacing: 0.01em;
  margin-bottom: 7px;
}
.yj-ff .ff-el-input--label.ff-el-is-required.asterisk-right label::after {
  content: " *";
  color: var(--yj-orange);
}
.yj-ff .ff-el-input--content input[type="text"],
.yj-ff .ff-el-input--content input[type="email"],
.yj-ff .ff-el-input--content input[type="number"],
.yj-ff .ff-el-input--content input[type="tel"],
.yj-ff .ff-el-input--content select,
.yj-ff .ff-el-input--content textarea {
  width: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--yj-ink);
  background: #F8FAFC;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: none;
}
.yj-ff .ff-el-input--content input:focus,
.yj-ff .ff-el-input--content select:focus,
.yj-ff .ff-el-input--content textarea:focus {
  outline: none;
  border-color: var(--yj-navy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.10);
}
.yj-ff .ff-el-input--content textarea { min-height: 118px; resize: vertical; }
.yj-ff .ff-el-input--content input::placeholder,
.yj-ff .ff-el-input--content textarea::placeholder { color: #94A3B8; }
.yj-ff .ff-el-help-message { font-size: 12.5px; color: var(--yj-slate); margin-top: 5px; }
.yj-ff .ff-el-is-required.ff-el-input--label label { color: var(--yj-ink); }

/* Name 组合：姓名字段横向排 */
.yj-ff .ff-name-field-wrapper,
.yj-ff .ff-el-input--content > .ff-name-field-wrapper { display: flex; gap: 12px; }

/* 下拉箭头 */
.yj-ff select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748B' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px !important;
}

/* 文件上传 */
.yj-ff .ff_upload_btn,
.yj-ff .ff-upload-btn {
  background: #fff !important;
  border: 1px dashed #CBD5E1 !important;
  color: var(--yj-navy) !important;
  border-radius: 10px !important;
  padding: 11px 16px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition: border-color .18s, background .18s;
}
.yj-ff .ff_upload_btn:hover,
.yj-ff .ff-upload-btn:hover { border-color: var(--yj-navy) !important; background: #F1F5F9 !important; }

/* 提交按钮 */
.yj-ff .yj-ff-submit-wrap { margin-top: 6px; }
.yj-ff button.ff-btn-submit.yj-ff-submit,
.yj-ff .yj-ff-submit button {
  width: 100%;
  background: var(--yj-orange) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px;
  padding: 15px 24px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.28);
}
.yj-ff button.ff-btn-submit.yj-ff-submit:hover,
.yj-ff .yj-ff-submit button:hover {
  background: #EA6A0C !important;
  transform: translateY(-1px);
  box-shadow: 0 9px 24px rgba(249, 115, 22, 0.34);
}
.yj-ff button.ff-btn-submit.yj-ff-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* 校验提示 */
.yj-ff .ff-el-form-control.error,
.yj-ff .ff-el-input--content input.error { border-color: #DC2626 !important; background: #FEF2F2; }
.yj-ff .error.text-danger,
.yj-ff .ff-el-input--content .error {
  color: #DC2626;
  font-size: 12.5px;
  margin-top: 5px;
}

/* 提交成功提示 */
.yj-ff .ff-message-success,
.yj-ff .ff-msg-success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 15px;
}

@media (max-width: 768px) {
  .yj-ff .ff-name-field-wrapper { flex-direction: column; gap: 0; }
}

