/* ============================================================
   KINGRAYS — Home page styles
   ============================================================ */

/* ---------------- Hero Slider ---------------- */
.hero {
  position: relative;
  /* 容器比例固定为 2.535:1，与三张轮播图（1080×426）完全一致，
     保证 object-fit:cover 下图片不被上下/左右裁切 */
  aspect-ratio: 2.535 / 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #1a1a1a;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  visibility: hidden;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 静态展示，不做 Ken Burns 缩放动画 */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* 浅色图：去掉深色遮罩，仅左侧留极轻微的亮度渐变，保证深色文字可读，
     不再把浅色底压黑 */
  background: linear-gradient(90deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.06) 45%, rgba(255,255,255,0) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  color: #fff;
  width: 100%;
  /* 文字左右边距与 .wrap 统一为 116px */
  padding: 90px 116px;
}

@media (max-width: 640px) {
  .hero-inner { padding: 64px 20px; }
}

/* 文字更靠左：标题/副标题/按钮整体向左对齐 */
.hero-text {
  padding-left: 0;
}

/* 文字静态显示（无 fade-up 动画） */
.hero-text > * {
  opacity: 1;
  transform: none;
}

/* 红色小标题（kicker）：YOUR GLOBAL SOURCING PARTNER */
.hero-kicker {
  font-family: var(--font-head);
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
  transition-delay: .05s;
}

/* 大标题：Connecting Global Markets with Quality Products（深色，Title Case，浅底） */
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.015em;
  color: #1a1a1a;
  margin-bottom: 30px;
  max-width: 780px;
  transition-delay: .16s;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  transition-delay: .4s;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: rgba(0,0,0,.18);
  transition: background .3s ease, width .3s ease;
}

.hero-dot.is-active {
  background: var(--red);
  width: 48px;
}

.btn-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  padding: 14px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.btn-light:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }

.btn-light .ic { width: 16px; height: 16px; }

/* Hero 的 Read More 按钮：红色实心背景、白字（对标参考站） */
.hero .btn-light {
  background: var(--red);
  color: #fff;
  padding: 12px 30px;
  font-size: 14px;
  letter-spacing: .01em;
}

.hero .btn-light:hover { background: var(--red-deep); }

/* ---------------- Categories ---------------- */
.categories {
  padding: 48px 0 64px;
  background: #fff;
}

/* 滚动触发的「从上往下折叠展开」动画 */
.reveal-down {
  opacity: 0;
  transform: translateY(-48px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}

.reveal-down.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 分类 Tab 导航（居中） */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .2s ease;
}

.cat-tab .ic { width: 20px; height: 20px; stroke-width: 1.7; }

.cat-tab:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-2px);
}

.cat-tab.is-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 8px 22px rgba(248,92,44,.28);
}

/* 产品展示面板 */
.cat-panel {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .45s ease, transform .45s ease;
}

.cat-panel.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cat-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

/* 单个代表产品卡片：横向布局（文字左 + 图右），对标参考站 banner 卡片 */
.cat-product {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

/* 竖向卡片布局（Audio & Video / Computer / Mobile / Bracket 等分类）：
   - 单张卡片统一宽度 = min(内容区 1/3, 460px)，3 个与 4 个产品分类卡片同尺寸；
   - 3 个产品分类：is-fill → space-between，3 张卡左右对齐内容区边界；
   - 4 个产品分类：默认 center，4 张卡居中、间距一致。 */
.cat-products.is-grid3 {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

/* 3 个产品：左右对齐上方标签栏（选项栏）按钮组的左右边界 */
.cat-products.is-grid3.is-fill {
  max-width: var(--tabs-width, 100%);
  margin: 0 auto;
  justify-content: space-between;
}

.cat-products.is-grid3 .cat-product {
  flex: 0 0 auto;
  /* 卡片统一宽度 = 标签栏宽度的 1/3（--tabs-width 由 JS 测量标签栏按钮组宽度）。
     3 个产品和 4 个产品分类用同一宽度；3 个左右对齐标签栏，4 个居中。 */
  width: calc((var(--tabs-width, 100%) - 48px) / 3);
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  border: none;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 2px 16px rgba(18,18,18,.06);
  overflow: hidden;
}

/* 文字区在卡片顶部、左对齐 */
.cat-products.is-grid3 .cat-product-body {
  order: 1;
  padding: 26px 28px 10px;
  align-items: flex-start;
  text-align: left;
  gap: 6px;
}

.cat-products.is-grid3 .cat-product-name {
  font-size: 24px;
  line-height: 1.2;
  /* 固定两行高度，保证不同长度名称的卡片标题区等高，按钮与产品图上下对齐 */
  min-height: 2.4em;
}

/* Learn more 按钮在 grid3 下缩小 */
.cat-products.is-grid3 .cat-product-more {
  padding: 6px 8px;
  font-size: 10px;
  border-radius: 6px;
}

/* 产品图区在下方，白底与卡片融为一体，无分隔线。
   图区高度 = 卡片宽度 + 40px（向下增加，卡片随之加长） */
.cat-products.is-grid3 .cat-product-media {
  order: 2;
  flex: 0 0 auto;
  width: 100%;
  height: 0;
  padding-bottom: calc(100% + 40px);
  border-radius: 0;
  border-bottom: none;
  background: #fff;
}

.cat-products.is-grid3 .cat-product-img {
  padding: 0 18px 18px;
}

.cat-product:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: 0 18px 44px rgba(18,18,18,.1);
}

/* 文字区（左侧） */
.cat-product-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.cat-product-name {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -.01em;
  /* 两行截断 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Learn more 实心红按钮，对标参考站 */
.cat-product-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  padding: 11px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: background .25s ease, transform .2s ease;
}

.cat-product:hover .cat-product-more {
  background: var(--red-deep);
  transform: translateY(-1px);
}

.cat-product-more .ic { width: 16px; height: 16px; }

/* 产品图容器（右侧）：悬停时背景产品图做位移动画 */
.cat-product-media {
  position: relative;
  flex: 0 0 34%;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.cat-product-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform .55s cubic-bezier(.22,.61,.36,1);
}

/* 悬停时产品图位移（上移 + 微放大，模拟"前景抬起"） */
.cat-product:hover .cat-product-img {
  transform: translateY(-12px) scale(1.06);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 12px;
}

.section-head h2 {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.section-head p {
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.65;
}

/* ---------------- 分类区标题（居中 + 红标签 + 大标题 + 红分隔线） ---------------- */
.section-head-cats {
  position: relative;
  max-width: 100%;
  margin: 0 auto 32px;
  padding: 12px 0 4px;
  text-align: center;
}

.section-head-cats .section-kicker {
  display: inline-block;
  font-size: 15px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 16px;
}

.section-head-cats h2 {
  font-family: var(--font-head);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin-bottom: 22px;
  color: var(--ink);
}

/* 标题下方红色短分隔线（居中） */
.section-divider {
  display: block;
  width: 140px;
  height: 3px;
  margin: 0 auto;
  background: var(--red);
  border-radius: 2px;
}


/* ---------------- Flat-lay 图片 banner（产品分类与 Who We Are 之间的过渡图） ---------------- */
.flatlay {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* 图片不裁剪：按原图比例完整显示 */
.flatlay img {
  width: 100%;
  height: auto;
  display: block;
}

/* 文字叠加层：整体对准图片正中心（水平 + 垂直都居中），覆盖在图片上 */
.flatlay-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 116px;
  z-index: 1;
}

/* 横向白色渐变遮罩：覆盖整层，左右透明、中间亮白，
   让黑色标题文字无论压在深色还是浅色物体上都保持清晰可读 */
.flatlay-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.6) 22%,
    rgba(255,255,255,.92) 50%,
    rgba(255,255,255,.6) 78%,
    rgba(255,255,255,0) 100%
  );
  z-index: -1;
  pointer-events: none;
}

.flatlay-title {
  position: relative;
  font-family: var(--font-head);
  font-size: clamp(18px, 2.3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
  color: #000;
  white-space: nowrap;
  margin-bottom: 16px;
}

.flatlay-sub {
  position: relative;
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 500;
  color: #000;
  max-width: 720px;
  margin-bottom: 28px;
  line-height: 1.6;
}
.flatlay-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}

.flatlay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
  white-space: nowrap;
}

.flatlay-btn-red {
  background: var(--red);
  color: #fff;
}

.flatlay-btn-red:hover {
  background: var(--red-deep);
  box-shadow: 0 8px 20px rgba(248, 92, 44, .28);
  transform: translateY(-2px);
}

.flatlay-btn-outline {
  background: #fff;
  color: var(--ink-2);
  border: 1.5px solid #bdbdbd;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.flatlay-btn-outline:hover {
  color: var(--red);
  border-color: var(--red);
  transform: translateY(-2px);
}

.flatlay-brand {
  position: relative;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #222;
}

@media (max-width: 860px) {
  .flatlay-overlay { padding: 28px 24px; }
  .flatlay-actions { margin-bottom: 22px; }
}

@media (max-width: 640px) {
  .flatlay-overlay { padding: 20px 16px; }
  .flatlay-title { font-size: 20px; }
  .flatlay-sub { font-size: 13px; margin-bottom: 18px; }
  .flatlay-btn { padding: 10px 20px; font-size: 13px; }
}

/* ---------------- Who We Are（两栏：左文字 + 右图片/徽章/统计） ---------------- */
.about {
  padding: 96px 0;
  background: #fff;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: stretch;
}

/* 左右滑入动画初始态 */
.about-reveal-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1);
}

.about-reveal-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1);
}

.about.is-visible .about-reveal-left,
.about.is-visible .about-reveal-right {
  opacity: 1;
  transform: translateX(0);
}

.about-body .section-kicker { margin-bottom: 12px; }

/* 左侧文字栏：flex 纵向，文字区填满图片高度，Read More 贴底对齐统计数字。
   左右内边距增大，让文字内容向中间靠拢（图片大小保持不变） */
.about-body {
  display: flex;
  flex-direction: column;
  padding: 0 72px;
}

/* 最后一段文字撑满剩余空间，让文字区上下撑到与图片等高 */
.about-body p:last-of-type {
  flex-grow: 1;
}

.about-body h2 {
  font-family: var(--font-head);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  margin-bottom: 18px;
}

.about-body p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.about-readmore {
  margin-top: 16px;
  align-self: flex-start;
  background: var(--red);
  color: #fff;
}

.about-readmore:hover { background: var(--red-deep); }

/* 图片区 */
.about-media {
  position: relative;
}

.about-media img {
  width: 100%;
  border-radius: 16px;
  display: block;
  box-shadow: 0 20px 48px rgba(18,18,18,.12);
}

/* 圆形徽章（叠在图片右上角） */
.about-badge {
  position: absolute;
  top: -28px;
  right: -20px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 34px rgba(248,92,44,.38);
}

.about-badge-num {
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}

.about-badge-lbl {
  font-size: 12px;
  opacity: .92;
  margin-top: 6px;
  text-align: center;
  line-height: 1.3;
}

/* 底部统计数字 */
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.about-stat {
  text-align: center;
}

.about-stat-num {
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}

.about-stat-lbl {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 8px;
  line-height: 1.4;
}

/* ---------------- Innovation banner ---------------- */
.innovation {
  position: relative;
  padding: 100px 0;
  background: #0b1220;
  overflow: hidden;
  /* 让容器宽高比匹配背景图 3.22:1（1774×551），使 cover 完整展示地图、上下不再裁切 */
  aspect-ratio: 3.22 / 1;
  display: flex;
  align-items: center;
}

.innovation-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* cover 铺满容器，消除 contain 造成的左右黑边；地图为深蓝底，铺满后与背景自然融合 */
  object-fit: cover;
  object-position: center;
}

/* 深色遮罩：压暗背景，突出左侧文字 */
.innovation-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,18,32,.78) 0%, rgba(11,18,32,.35) 50%, rgba(11,18,32,.2) 100%);
}

.innovation-inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
}

.innovation-content {
  max-width: 560px;
  text-align: left;
}

.innovation h2 {
  font-family: var(--font-head);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin-bottom: 18px;
}

.innovation p {
  color: rgba(255,255,255,.82);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 30px;
}

.innovation .btn-light { background: var(--red); color: #fff; }
.innovation .btn-light:hover { background: var(--red-deep); }

/* ---------------- Why Choose Us ---------------- */
.why {
  padding: 80px 0;
  background: #fff;
}

.why-head {
  margin-bottom: 36px;
}

.why-head .section-kicker {
  font-size: 14px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 14px;
}

.why-head h2 {
  font-family: var(--font-head);
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 18px;
  white-space: nowrap;
}

.why-rule {
  display: inline-block;
  width: 230px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

.why-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.why-tab {
  position: relative;
  border: 1px solid var(--line);
  background: #f5f4f2;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}

.why-tab:hover {
  border-color: var(--red);
  color: var(--red);
}

.why-tab.is-active {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  font-weight: 600;
}

.why-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--red);
}

.why-panels {
  position: relative;
  max-width: 1150px;
  margin: 0 auto;
}

/* 图片区：固定宽度 + 固定高度，图片 contain 完整展示（不裁剪、不拉伸）。
   关键：让「图片右边缘」对准「内容区中心 - gap/2」，使间距中心（gap 中点）
   精确落在页面正中。
   - .why-panel 设 position:relative，作为 media 绝对定位的包含块
   - .why-media 用 absolute + left:calc(50% - 664px)，50% 相对 panel 宽
   - .why-body 用 margin-left:calc(50% + 24px)，排在图片右侧（gap=48px）
   664px = 图片宽 640px + gap/2 24px；24px = gap/2。 */
.why-panel {
  display: none;
  position: relative;
  min-height: 366px;
}

.why-panel.is-active {
  display: block;
}

.why-media {
  position: absolute;
  left: calc(50% - 664px);
  top: 0;
  width: 640px;
  height: 366px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.why-media img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.why-body {
  margin-left: calc(50% + 24px);
  max-width: 460px;
}

.why-body h3 {
  font-family: var(--font-head);
  font-size: clamp(24px, 2.5vw, 30px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 16px;
  white-space: nowrap;
}

.why-body .why-rule {
  width: 90px;
  height: 1px;
  margin-bottom: 20px;
}

.why-body p {
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.6;
}

/* ---------------- Certifications ---------------- */
.certs {
  padding: 88px 0;
  background: #fff;
}

.certs-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 240px;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 20px;
  scroll-snap-type: x mandatory;
}

.cert-card {
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  padding: 16px;
}

.cert-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(18,18,18,.1); }

.cert-card img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 6px;
}

.certs-scroll::-webkit-scrollbar { height: 8px; }
.certs-scroll::-webkit-scrollbar-track { background: #f2f0ee; border-radius: 4px; }
.certs-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* ---------------- CTA ---------------- */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--red);
  /* 高度按背景图宽高比自适应（1320:365 ≈ 3.616:1），保证图片完整展示不裁切 */
  aspect-ratio: 3.616 / 1;
  width: 100%;
  color: #fff;
  text-align: center;
}

/* 背景图铺满容器（cover），比例与容器一致时不裁切、不留缝 */
.cta-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 橙色透明蒙版：加深让背景工厂图不清楚，但保留橙色基调，衬托白色文字 */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 114, 0, .9);
  z-index: 1;
}

.cta-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 三栏 CTA（图标 + 标题 + 副标题 + 按钮），白色图标 + 白色文字 */
.cta-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  width: 100%;
}

.cta-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cta-ic {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 18px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.2));
}

.cta-col h4 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: 8px;
  text-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.cta-col p {
  font-size: 14px;
  color: #fff;
  opacity: .95;
  line-height: 1.5;
  margin-bottom: 5px;
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.cta-col .cta-col-sub {
  font-size: 13px;
  color: #fff;
  opacity: .85;
  margin-bottom: 16px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
  transition: transform .2s;
}

.cta-btn span { font-size: 16px; }
.cta-btn:hover { transform: translateX(3px); }

/* 首页 footer（.footer-home）：清除上边距，让 CTA 与 footer 无缝相接；
   上下 padding 增大，使 footer 高度约为 CTA 的 6.5/3.5 ≈ 1.86 倍 */
.footer-home { margin-top: 0; }
/* Footer spacing is shared across all pages in style.css. */

/* ---------------- Responsive ---------------- */
/* WHY 区块的居中布局需要内容区 ≥ 1328px（图片 640 + gap 48 + 文字 460 且偏移不溢出），
   内容区 = 视口 - 232px，故视口 ≥ 1560px 时保持居中布局；低于此改为上下堆叠。 */
@media (max-width: 1560px) {
  .why-panel { position: static; min-height: 0; }
  .why-media { position: static; left: auto; width: 100%; max-width: 640px; }
  .why-body { margin-left: 0; max-width: none; margin-top: 24px; }
}

@media (max-width: 960px) {
  .cat-products { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-media { max-width: 560px; }
}

@media (max-width: 640px) {
  .cat-tabs { gap: 8px; }
  .cat-tab { padding: 9px 16px; font-size: 13.5px; }
  .cat-products { grid-template-columns: 1fr; gap: 16px; }
  .cat-product { padding: 18px 20px; gap: 14px; }
  .cat-product-name { font-size: 19px; }
  .cat-product-media { flex-basis: 40%; }
  .hero { min-height: 520px; }
  .hero-inner { padding: 64px 20px; }
  .about-badge { width: 100px; height: 100px; top: -16px; right: -8px; }
  .about-badge-num { font-size: 30px; }
  .about-stats { grid-template-columns: 1fr; gap: 16px; }
  .innovation-content { text-align: left; }
  .innovation-inner { justify-content: flex-start; }
  .certs-scroll { grid-auto-columns: 180px; }
  /* 移动端取消 3.22:1 比例，改用固定高度避免文字溢出 */
  .innovation { aspect-ratio: auto; min-height: 480px; }
  /* 移动端标题允许换行，避免溢出 */
  .why-head h2 { white-space: normal; }
}

/* Horizontal image transitions with per-slide text entrances. */
.hero-slide { opacity: 1; transition: none; visibility: hidden; display: flex; align-items: center; }
.hero-slide.is-active, .hero-slide.is-leaving { visibility: visible; }
.hero-slide.is-active { z-index: 1; }
.hero-slide.is-leaving { z-index: 0; }
.hero-slide .hero-inner { flex-shrink: 0; }
/* Only the incoming slide may show copy during a transition. */
.hero-slide:not(.is-active) .hero-inner { visibility: hidden; opacity: 0; }
@keyframes home-hero-fade-up {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-slide.is-active .hero-text { animation: home-hero-fade-up 1s ease both; }
}
