/*
Theme Name: Yunding Textile Child (Astra)
Theme URI: https://yunding-textile.com
Description: 丹阳市云顶纺织品有限公司企业官网子主题，基于 Astra。内置首页 / 关于我们 / 产品服务 / 联系我们 / 会员账户页面模板、产品自定义文章类型、中英双语切换与询盘表单。兼容 Elementor（标准页面仍可用 Elementor 编辑）。
Author: Yunding Textile
Template: astra
Version: 1.0.0
Text Domain: yunding-textile
*/

/* ============ 基础变量 ============ */
:root {
  --yd-ink: #101C2C;
  --yd-navy: #14304A;
  --yd-navy-deep: #0C2036;
  --yd-gold: #B08D57;
  --yd-bg-soft: #F6F7F9;
  --yd-line: #E5E8EC;
  --yd-muted: #6E7A88;
  --yd-font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
}

body { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif; }

.yd-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.yd-section { padding: 88px 0; }
.yd-section-alt { background: var(--yd-bg-soft); }
.yd-center { text-align: center; }

.yd-kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--yd-gold);
}
.yd-kicker::before { content: ""; width: 34px; height: 1px; background: var(--yd-gold); }
.yd-center .yd-kicker::after { content: ""; width: 34px; height: 1px; background: var(--yd-gold); }

.yd-section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.yd-section-head h2 {
  font-family: var(--yd-font-display); color: var(--yd-ink);
  font-size: clamp(26px, 3vw, 36px); letter-spacing: .04em; margin: 14px 0 12px;
}
.yd-section-head p { color: var(--yd-muted); }

.yd-h1 { font-family: var(--yd-font-display); font-size: clamp(32px, 5vw, 54px); line-height: 1.28; letter-spacing: .04em; }

.yd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 30px; border-radius: 4px; border: 1px solid transparent;
  font-size: 15px; letter-spacing: .06em; text-decoration: none; transition: all .25s ease;
}
.yd-btn-primary { background: var(--yd-navy); color: #fff; }
.yd-btn-primary:hover { background: var(--yd-navy-deep); color: #fff; }
.yd-btn-outline { border-color: var(--yd-navy); color: var(--yd-navy); }
.yd-btn-outline:hover { background: var(--yd-navy); color: #fff; }
.yd-btn-light { background: #fff; color: var(--yd-navy); }
.yd-btn-light:hover { background: var(--yd-gold); color: #fff; }

/* =========================================================
 * 全宽布局修正：防止 Astra/Elementor 容器把页面排成一行
 * （作用于 body.yd-template，即本主题的页面模板）
 * ======================================================= */
body.yd-template #content,
body.yd-template .site-content,
body.yd-template .site-content .ast-container,
body.yd-template #primary,
body.yd-template .site-main,
body.yd-template .entry-content {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  grid-template-columns: none !important;
  flex-wrap: wrap !important;
}
body.yd-template .site-content .ast-container > * {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.yd-template .yd-hero,
body.yd-template .yd-section,
body.yd-template .yd-page-head,
body.yd-template .yd-cta {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  display: block !important;
}
body.yd-template .yd-container { margin: 0 auto; }

/* ============ 语言切换 ============ */
.yd-lang-switch { display: inline-flex; border: 1px solid var(--yd-line); border-radius: 4px; overflow: hidden; }
.yd-lang-switch a { padding: 6px 14px; font-size: 13px; color: var(--yd-navy); text-decoration: none; }
.yd-lang-switch a.on { background: var(--yd-navy); color: #fff; }

/* ============ Hero ============ */
.yd-hero { position: relative; min-height: 600px; display: flex; align-items: center; color: #fff; }
.yd-hero-bg { position: absolute; inset: 0; background-color: #0C2036; background-size: cover; background-position: center; }
.yd-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(12,32,54,.88), rgba(12,32,54,.55) 55%, rgba(12,32,54,.25)); }
.yd-hero .yd-container { position: relative; z-index: 2; }
.yd-hero p.lead { font-size: 18px; color: rgba(255,255,255,.86); max-width: 560px; margin: 20px 0 34px; }

/* ============ 数据条 ============ */
.yd-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--yd-line); border-bottom: 1px solid var(--yd-line); }
.yd-stat { padding: 42px 16px; text-align: center; border-left: 1px solid var(--yd-line); }
.yd-stat:first-child { border-left: none; }
.yd-stat b { display: block; font-family: var(--yd-font-display); font-size: 36px; color: var(--yd-navy); }
.yd-stat span { font-size: 14px; color: var(--yd-muted); letter-spacing: .08em; }

/* ============ 卡片 ============ */
.yd-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.yd-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.yd-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px; align-items: center; }

.yd-card { background: #fff; border: 1px solid var(--yd-line); border-radius: 4px; padding: 34px 28px; transition: all .25s ease; }
.yd-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(16,28,44,.08); }
.yd-card h3 { font-family: var(--yd-font-display); font-size: 19px; margin: 14px 0 8px; }
.yd-card p { color: var(--yd-muted); font-size: 15px; }
.yd-card .icon { font-size: 26px; color: var(--yd-gold); }

/* ============ 产品卡 ============ */
.yd-product { background: #fff; border: 1px solid var(--yd-line); border-radius: 4px; overflow: hidden; transition: all .25s ease; }
.yd-product:hover { transform: translateY(-4px); box-shadow: 0 22px 60px rgba(16,28,44,.14); }
.yd-product-media { aspect-ratio: 1/1; overflow: hidden; background: var(--yd-bg-soft); }
.yd-product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.yd-product:hover .yd-product-media img { transform: scale(1.05); }
.yd-product-body { padding: 22px; }
.yd-product-body h3 { font-family: var(--yd-font-display); font-size: 19px; margin: 0 0 8px; }
.yd-product-body p { color: var(--yd-muted); font-size: 14px; }
.yd-product-tag { display: inline-block; font-size: 12px; color: var(--yd-gold); border: 1px solid rgba(176,141,87,.4); padding: 2px 10px; border-radius: 999px; margin-bottom: 10px; }

/* ============ 表单 ============ */
.yd-form { background: #fff; border: 1px solid var(--yd-line); border-radius: 4px; padding: 36px; box-shadow: 0 10px 30px rgba(16,28,44,.08); }
.yd-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--yd-ink); }
.yd-form input, .yd-form select, .yd-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--yd-line); border-radius: 4px; font-size: 15px; margin-bottom: 16px;
}
.yd-form input:focus, .yd-form textarea:focus, .yd-form select:focus { outline: none; border-color: var(--yd-navy); }
.yd-form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
.yd-form-grid .full { grid-column: 1 / -1; }
.yd-msg-ok { background: rgba(46,125,91,.08); color: #2E7D5B; border: 1px solid rgba(46,125,91,.25); padding: 12px 16px; border-radius: 4px; margin-bottom: 18px; }

/* ============ 联系信息 ============ */
.yd-info-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--yd-line); }
.yd-info-item .icon { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 4px; background: rgba(20,48,74,.06); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.yd-info-item b { display: block; margin-bottom: 2px; }
.yd-info-item span { color: var(--yd-muted); font-size: 15px; }

/* ============ 时间轴 / 价值观 ============ */
.yd-timeline { padding-left: 26px; border-left: 1px solid var(--yd-line); }
.yd-timeline-item { position: relative; padding-bottom: 30px; }
.yd-timeline-item::before { content: ""; position: absolute; left: -32px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--yd-gold); }
.yd-timeline-item b { font-family: var(--yd-font-display); font-size: 20px; color: var(--yd-navy); display: block; }
.yd-timeline-item p { color: var(--yd-muted); margin: 2px 0 0; }
.yd-value { border-top: 1px solid var(--yd-line); padding: 24px 4px; }
.yd-value b { font-family: var(--yd-font-display); font-size: 19px; display: block; }
.yd-value span { color: var(--yd-muted); font-size: 15px; }

.yd-quote { border-left: 3px solid var(--yd-gold); background: var(--yd-bg-soft); padding: 18px 24px; font-family: var(--yd-font-display); font-size: 17px; margin-top: 26px; }

.yd-split-media img { width: 100%; border-radius: 4px; box-shadow: 0 22px 60px rgba(16,28,44,.16); }

/* ============ CTA ============ */
.yd-cta { position: relative; text-align: center; color: #fff; padding: 92px 24px; }
.yd-cta-bg { position: absolute; inset: 0; background-color: #0C2036; background-size: cover; background-position: center; }
.yd-cta::after { content: ""; position: absolute; inset: 0; background: rgba(12,32,54,.9); }
.yd-cta .yd-container { position: relative; z-index: 2; }
.yd-cta h2 { font-family: var(--yd-font-display); color: #fff; font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 14px; }

/* ============ 页面头图 ============ */
.yd-page-head { background: var(--yd-navy-deep); color: #fff; text-align: center; padding: 78px 24px; }
.yd-page-head h1 { font-family: var(--yd-font-display); color: #fff; font-size: clamp(30px, 4vw, 42px); letter-spacing: .1em; margin: 0; }
.yd-page-head .crumb { font-size: 13px; color: rgba(255,255,255,.55); letter-spacing: .2em; margin-top: 12px; text-transform: uppercase; }

@media (max-width: 900px) {
  .yd-grid-3, .yd-grid-4, .yd-grid-2 { grid-template-columns: 1fr; }
  .yd-stats { grid-template-columns: repeat(2, 1fr); }
  .yd-stat { border-left: none; border-top: 1px solid var(--yd-line); }
  .yd-form-grid { grid-template-columns: 1fr; }
}
