/* 优信战略合作伙伴 · 多行左右对向滚动 */
.brand-marquee {
  --bm-pad: 16px;
  margin: 28px 0 0;
  padding: 0 0 18px;
  background:
    radial-gradient(ellipse 70% 80% at 88% 8%, rgba(56, 140, 255, 0.38), transparent 55%),
    radial-gradient(ellipse 45% 55% at 8% 18%, rgba(20, 80, 180, 0.28), transparent 50%),
    linear-gradient(180deg, #0a1a3a 0%, #12284f 26%, #f4f6f9 26%, #fff 100%);
  border-top: 1px solid #0d2248;
  overflow: hidden;
}

.brand-marquee .bm-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px var(--bm-pad) 14px;
}

.brand-marquee .bm-title-art {
  display: block;
  width: min(760px, 94vw);
  height: auto;
  max-height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(212, 175, 55, 0.28));
  pointer-events: none;
  user-select: none;
  image-rendering: -webkit-optimize-contrast;
}

.brand-marquee .bm-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 8px;
  mask-image: linear-gradient(90deg, transparent, #000 2.5%, #000 97.5%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2.5%, #000 97.5%, transparent);
}

.brand-marquee .bm-row {
  overflow: hidden;
}

.brand-marquee .bm-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation-duration: var(--bm-dur, 56s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.brand-marquee .bm-dir-left .bm-track {
  animation-name: bm-scroll-left;
}

.brand-marquee .bm-dir-right .bm-track {
  animation-name: bm-scroll-right;
}

.brand-marquee .bm-group {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 0 6px;
}

.brand-marquee .bm-item {
  flex: 0 0 auto;
  width: 168px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(10, 26, 58, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.brand-marquee .bm-item:hover {
  transform: translateY(-2px);
  border-color: #c9d6ea;
  box-shadow: 0 8px 18px rgba(10, 26, 58, 0.14);
}

.brand-marquee .bm-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  background: #fff;
}

@keyframes bm-scroll-left {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes bm-scroll-right {
  from {
    transform: translate3d(-50%, 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-marquee .bm-track {
    animation: none !important;
  }
  .brand-marquee .bm-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .brand-marquee .bm-stack {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/* 手机：仍 4 行，卡片略小、速度略快 */
body.yx-home .brand-marquee {
  margin: 16px 0 0;
  background:
    radial-gradient(ellipse 70% 80% at 88% 8%, rgba(56, 140, 255, 0.38), transparent 55%),
    radial-gradient(ellipse 45% 55% at 8% 18%, rgba(20, 80, 180, 0.28), transparent 50%),
    linear-gradient(180deg, #0a1a3a 0%, #12284f 22%, #f4f6f9 22%, #fff 100%);
}

body.yx-home .brand-marquee .bm-banner {
  padding: 14px 12px 10px;
}

body.yx-home .brand-marquee .bm-title-art {
  width: min(520px, 94vw);
  max-height: 64px;
}

body.yx-home .brand-marquee .bm-stack {
  gap: 8px;
}

body.yx-home .brand-marquee .bm-item {
  width: 132px;
  height: 60px;
  padding: 6px 8px;
  border-radius: 8px;
}

body.yx-home .brand-marquee .bm-group {
  gap: 8px;
}
