/* ===== 金猿电子官网 - 科技感深色主题 ===== */
:root {
  --bg: #0a0f1e;
  --bg-2: #0e1526;
  --bg-3: #121a30;
  --card: #131c33;
  --line: rgba(80, 120, 200, 0.22);
  --txt: #e8eefb;
  --txt-2: #9fb0cd;
  --accent: #00d4ff;
  --accent-2: #2f7bff;
  --grad: linear-gradient(135deg, #00d4ff 0%, #2f7bff 100%);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 15, 30, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 44px; width: auto; }
.brand .name { font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.brand .name span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand .sub { font-size: 11px; color: var(--txt-2); letter-spacing: 2px; }
/* 表头品牌名做长短两版：小屏放不下全称，切成「金猿电子」避免换行挤掉导航栏。
   brand.short 词条四个语言包里都有，不用额外维护。 */
.brand .name .short { display: none; }

.nav-links { display: flex; gap: 8px; list-style: none; }
.nav-links a {
  color: var(--txt-2); padding: 8px 16px; border-radius: 8px;
  font-size: 15px; transition: 0.25s;
}
.nav-links a:hover { color: var(--txt); background: rgba(0, 212, 255, 0.08); }
.nav-links a.active { color: #fff; background: var(--grad); font-weight: 600; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--txt); font-size: 20px; border-radius: 8px; padding: 4px 12px; cursor: pointer; }

/* 语言切换器 */
.lang-switch { margin-left: 10px; }
.lang-switch select {
  background: rgba(255,255,255,0.04);
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13.5px;
  cursor: pointer;
  outline: none;
  transition: 0.25s;
  min-width: 96px;
}
.lang-switch select:hover { border-color: var(--accent); color: var(--accent); }
.lang-switch select option { background: #0e1526; color: var(--txt); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 110px 0 90px;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(47, 123, 255, 0.25), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(0, 212, 255, 0.12), transparent),
    var(--bg-2);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(80, 130, 220, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 130, 220, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 100%);
}
.hero-inner { position: relative; text-align: center; }
.hero .tagline {
  display: inline-block; font-size: 13px; letter-spacing: 4px;
  color: var(--accent); border: 1px solid rgba(0, 212, 255, 0.35);
  padding: 5px 18px; border-radius: 999px; margin-bottom: 26px;
  background: rgba(0, 212, 255, 0.06);
}
.hero h1 {
  font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: 2px;
  line-height: 1.3;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.desc {
  max-width: 720px; margin: 24px auto 40px;
  font-size: 17px; color: var(--txt-2);
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 34px; border-radius: 10px;
  font-size: 15px; font-weight: 600; transition: 0.25s; border: none; cursor: pointer;
}
.btn-primary { background: var(--grad); color: #04101f; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 180, 255, 0.35); }
.btn-ghost { border: 1px solid var(--line); color: var(--txt); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 通用区块 ===== */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { text-align: center; margin-bottom: 48px; }
.sec-head .kicker { font-size: 13px; letter-spacing: 4px; color: var(--accent); text-transform: uppercase; }
.sec-head h2 { font-size: clamp(24px, 3.4vw, 34px); margin-top: 10px; letter-spacing: 1px; }
.sec-head p { color: var(--txt-2); margin-top: 12px; font-size: 15px; }

/* ===== 品牌卡片 ===== */
.brand-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.brand-card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 36px; transition: 0.3s;
}
.brand-card:hover { transform: translateY(-6px); border-color: rgba(0, 212, 255, 0.5); box-shadow: 0 16px 44px rgba(0, 120, 255, 0.18); }
.brand-card .badge {
  display: inline-block; font-size: 12px; letter-spacing: 2px;
  color: var(--accent); border: 1px solid rgba(0,212,255,.4); border-radius: 999px;
  padding: 3px 14px; margin-bottom: 18px;
}
.brand-card h3 { font-size: 24px; letter-spacing: 1px; }
.brand-card h3 small { font-size: 14px; color: var(--txt-2); font-weight: 400; margin-left: 10px; }
.brand-card p { color: var(--txt-2); font-size: 14.5px; margin: 16px 0 22px; }
.brand-card .link { font-size: 14px; font-weight: 600; }
.brand-card .glow {
  position: absolute; right: -60px; top: -60px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.16), transparent 70%);
}

/* ===== 优势 ===== */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: 0.3s;
}
.feat:hover { border-color: rgba(0, 212, 255, 0.45); transform: translateY(-4px); }
.feat .icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 212, 255, 0.1); font-size: 22px; margin-bottom: 18px;
  border: 1px solid rgba(0, 212, 255, 0.25);
}
.feat h3 { font-size: 17px; margin-bottom: 8px; }
.feat p { font-size: 13.5px; color: var(--txt-2); }

/* ===== 产品卡片 ===== */
/* ===== 产品筛选面板（品牌 × 电流 × 关键词） ===== */
.filter-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 16px;
}
.filter-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 0;
}
.filter-row + .filter-row { border-top: 1px dashed var(--line); }
.filter-label {
  font-size: 12.5px; color: var(--txt-2); width: 34px; flex: none;
  letter-spacing: 1px; font-weight: 600;
}
.filter-btn {
  padding: 7px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--txt-2); font-size: 13.5px; cursor: pointer; transition: 0.25s;
}
.filter-btn:hover { color: var(--txt); border-color: var(--accent); }
.filter-btn.active { background: var(--grad); color: #04101f; font-weight: 700; border-color: transparent; }
.filter-input {
  flex: 1; min-width: 200px; max-width: 340px;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--txt);
  border-radius: 999px; padding: 8px 16px; font-size: 13.5px; outline: none; transition: .25s;
}
.filter-input:focus { border-color: var(--accent); }
.filter-input::placeholder { color: var(--txt-2); opacity: .7; }
.filter-clear {
  background: transparent; border: 1px solid var(--line); color: var(--txt-2);
  border-radius: 999px; padding: 7px 16px; font-size: 13px; cursor: pointer; transition: .25s;
}
.filter-clear:hover { border-color: var(--accent); color: var(--accent); }
.filter-clear[hidden] { display: none !important; }
.result-line {
  font-size: 13px; color: var(--txt-2); margin: 0 0 24px; padding-left: 2px;
}
.no-result {
  text-align: center; padding: 64px 20px; color: var(--txt-2);
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
}
.no-result[hidden] { display: none !important; }
.no-result .nr-icon { font-size: 32px; margin-bottom: 12px; opacity: .6; }
.no-result p { font-size: 14px; margin-bottom: 18px; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  /* ⚠️ 这里不能用 overflow:hidden —— 会把产品卡里的「多份规格书」下拉菜单裁掉。
     圆角靠 .thumb 自己裁顶部两角，效果一样但不会挡住下拉。 */
  transition: 0.3s; display: flex; flex-direction: column;
  position: relative; /* 下拉需要抬层级，z-index 得有定位才生效 */
  scroll-margin-top: 100px; /* 从 AI 卡片深链跳转时，避免被吸顶导航挡住 */
}
/* 展开下拉 / 悬停时把整张卡抬到同级卡片之上，否则菜单会被后面的卡片盖住 */
.product-card:hover, .product-card:focus-within { z-index: 5; }
/* 被锚点命中时高亮一下，让用户一眼看到是哪一款 */
.product-card:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.35), 0 14px 40px rgba(0, 120, 255, 0.2);
  animation: card-flash 1.6s ease-out;
}
@keyframes card-flash {
  0%, 45% { background: rgba(0, 212, 255, 0.14); }
  100% { background: var(--card); }
}
.product-card:hover { transform: translateY(-6px); border-color: rgba(0, 212, 255, 0.5); box-shadow: 0 14px 40px rgba(0, 120, 255, 0.15); }
.product-card .thumb {
  background: #fff; height: 200px; display: flex; align-items: center; justify-content: center; padding: 14px;
  border-bottom: 1px solid var(--line);
  /* 卡片本身不再 overflow:hidden，改由缩略图自己裁出顶部圆角 */
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
.product-card .thumb img { max-height: 100%; max-width: 100%; object-fit: contain; }
.product-card .info { padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.product-card .b-tag {
  align-self: flex-start; font-size: 11px; letter-spacing: 1px; font-weight: 700;
  padding: 2px 10px; border-radius: 4px; margin-bottom: 10px;
}
.b-tag.amass { color: #2f7bff; background: rgba(47, 123, 255, 0.14); }
.b-tag.sed { color: #00d4ff; background: rgba(0, 212, 255, 0.12); }
.product-card h3 { font-size: 16.5px; letter-spacing: 0.5px; }
.product-card .spec { font-size: 13px; color: var(--txt-2); margin: 8px 0 16px; flex: 1; }
.product-card .actions { display: flex; gap: 10px; }
.product-card .actions a {
  flex: 1; text-align: center; font-size: 13px; font-weight: 600;
  padding: 9px 0; border-radius: 8px; transition: 0.25s;
}
.dl-btn { background: var(--grad); color: #04101f; }
.dl-btn:hover { box-shadow: 0 6px 18px rgba(0, 180, 255, 0.3); }
.ask-btn { border: 1px solid var(--line); color: var(--txt-2); }
.ask-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 多份规格书下拉（成套产品用） ===== */
/* AMASS 很多型号是公头/母头/端子成套卖的，一个型号对应好几份规格书，
   全平铺在卡片上会把卡片撑爆，所以收进下拉里，按资料类型分组 */
.dl-wrap { flex: 1; position: relative; }
.dl-wrap > .dl-btn {
  display: block; width: 100%; cursor: pointer; border: none;
  font-family: inherit; font-size: 13px; font-weight: 600; padding: 9px 0;
  border-radius: 8px; transition: 0.25s;
}
.dl-wrap > .dl-btn .caret { display: inline-block; margin-left: 4px; transition: transform .2s; }
.dl-wrap.open > .dl-btn .caret { transform: rotate(180deg); }
.dl-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .38);
  max-height: 260px; overflow-y: auto;
}
/* 作者样式 display:flex 会盖掉浏览器默认的 [hidden]{display:none}，必须显式 !important */
.dl-menu[hidden] { display: none !important; }
.dl-group-name {
  font-size: 11px; color: var(--txt-2); padding: 7px 10px 4px;
  letter-spacing: .5px; font-weight: 600;
}
.dl-menu a {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--txt); text-decoration: none;
  padding: 7px 10px; border-radius: 6px; line-height: 1.4;
}
.dl-menu a:hover { background: rgba(0, 212, 255, .1); color: var(--accent); }
.dl-menu a .ico { flex: none; opacity: .75; font-size: 12px; }
.dl-menu a .nm { flex: 1; }
.dl-menu a .sz { flex: none; font-size: 11px; color: var(--txt-2); }

/* ===== 页面标题带 ===== */
.page-banner {
  position: relative; overflow: hidden;
  padding: 70px 0 60px;
  background:
    radial-gradient(ellipse 55% 60% at 75% 30%, rgba(47, 123, 255, 0.22), transparent),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.page-banner h1 { font-size: clamp(26px, 4vw, 38px); letter-spacing: 2px; }
.page-banner p { color: var(--txt-2); margin-top: 10px; font-size: 15px; }

/* ===== 关于页 ===== */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 44px; align-items: start; }
.about-text h3 { font-size: 20px; margin: 28px 0 12px; color: var(--accent); }
.about-text p, .about-text li { color: var(--txt-2); font-size: 15px; }
.about-text ul { padding-left: 20px; }
.about-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.fact {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; text-align: center;
}
.fact .num { font-size: 30px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fact .lab { font-size: 13px; color: var(--txt-2); margin-top: 6px; }

.timeline { border-left: 2px solid var(--line); padding-left: 26px; margin-top: 8px; }
.tl-item { position: relative; padding-bottom: 26px; }
.tl-item::before {
  content: ""; position: absolute; left: -33px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--grad); box-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}
.tl-item h4 { font-size: 16px; }
.tl-item p { font-size: 13.5px; color: var(--txt-2); margin-top: 4px; }

/* ===== 联系页 ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
/* 基础联系方式卡占满整行，下面两张二维码卡（QQ / 企业微信）并排，避免单列错位 */
.contact-grid > .contact-card:first-child { grid-column: 1 / -1; }
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 32px;
}
.contact-card h3 { font-size: 20px; margin-bottom: 24px; }
.c-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.c-item:last-child { border-bottom: none; }
.c-item .ci {
  width: 44px; height: 44px; flex: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: rgba(0, 212, 255, 0.1); border: 1px solid rgba(0, 212, 255, 0.25);
}
.c-item .k { font-size: 12.5px; color: var(--txt-2); letter-spacing: 1px; }
.c-item .v { font-size: 16px; font-weight: 600; margin-top: 2px; word-break: break-all; }
.business-card { text-align: center; }
.business-card .big-phone { font-size: 30px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 1px; }

/* 二维码排版 */
.qr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 18px 0 10px; }
.qr-item { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-img { width: 180px; height: 180px; background: #fff; border-radius: 12px; padding: 10px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.qr-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.qr-cap { font-size: 13px; color: var(--txt-2); text-align: center; line-height: 1.6; }
.qr-btn { width: 70%; padding: 9px 0; font-size: 13.5px; }
@media (max-width: 640px) {
  .qr-row { grid-template-columns: 1fr; }
}

/* ===== 页脚 ===== */
.site-footer {
  background: #070b16; border-top: 1px solid var(--line);
  padding: 56px 0 26px; margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 40px; }
.footer-grid h4 { font-size: 15px; margin-bottom: 16px; letter-spacing: 1px; color: #fff; }
.footer-grid p, .footer-grid li { font-size: 13.5px; color: var(--txt-2); }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--txt-2); }
.footer-grid a:hover { color: var(--accent); }
.copyright {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  text-align: center; font-size: 12.5px; color: #6b7a97;
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-grid { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(10, 15, 30, 0.97); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 14px 6%;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .product-grid, .feat-grid, .footer-grid { grid-template-columns: 1fr; }
  .brand .sub { display: none; }
  /* 全称 10 个字会换行，切短名；同时收紧字号和 logo，给汉堡菜单和语言切换腾位置 */
  .brand .name .full { display: none; }
  .brand .name .short { display: inline; }
  .brand .name { font-size: 17px; letter-spacing: .5px; }
  .brand img { height: 38px; }
  .brand { gap: 9px; }
  .section { padding: 56px 0; }
  .hero { padding: 70px 0 60px; }
  .lang-switch { margin-left: auto; }
}
/* 超窄屏（iPhone SE 一类）：再压一档，保证 logo + 短名 + 汉堡 + 语言 挤在一行 */
@media (max-width: 380px) {
  .brand img { height: 32px; }
  .brand .name { font-size: 15.5px; }
  .brand .name .short { letter-spacing: 0; }
  .lang-switch select { min-width: 74px; padding: 6px 7px; font-size: 12.5px; }
}

/* ===== AI 浮窗 ===== */
#ai-launcher {
  position: fixed; right: 24px; bottom: 24px; z-index: 1000;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--grad); color: #04101f;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 36px rgba(0, 180, 255, 0.45);
  cursor: pointer; transition: transform 0.25s;
}
#ai-launcher:hover { transform: scale(1.08); }
#ai-launcher svg { color: #04101f; }

#ai-panel {
  position: fixed; right: 24px; bottom: 96px; z-index: 1001;
  width: 360px; max-width: calc(100vw - 32px);
  height: 540px; max-height: calc(100vh - 140px);
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; overflow: hidden;
  animation: aiPop 0.25s ease;
}
/* hidden 属性必须显式生效：作者样式 display:flex 会覆盖 UA 的 [hidden]{display:none} */
#ai-panel[hidden] { display: none !important; }
@keyframes aiPop { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
.ai-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(0,212,255,.12), transparent); }
.ai-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #04101f; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }
.ai-head-text { flex: 1; }
.ai-title { font-size: 15px; font-weight: 700; }
.ai-sub { font-size: 11.5px; color: var(--accent); letter-spacing: 0.5px; margin-top: 2px; }
.ai-close { background: none; border: none; color: var(--txt-2); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
.ai-close:hover { color: var(--accent); }
.ai-body { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { display: flex; }
.ai-msg.user { justify-content: flex-end; }
.ai-bubble { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; word-break: break-word; }
.ai-msg.ai .ai-bubble { background: rgba(0,212,255,.1); border: 1px solid rgba(0,212,255,.25); color: var(--txt); border-top-left-radius: 4px; }
.ai-msg.user .ai-bubble { background: var(--grad); color: #04101f; border-top-right-radius: 4px; font-weight: 500; }
.ai-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.ai-chip { font-size: 12px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--txt-2); cursor: pointer; transition: 0.2s; }
.ai-chip:hover { color: var(--accent); border-color: var(--accent); }
.ai-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--bg-2); }
.ai-input input { flex: 1; background: var(--bg-3); border: 1px solid var(--line); color: var(--txt); border-radius: 8px; padding: 9px 12px; font-size: 13.5px; outline: none; }
.ai-input input:focus { border-color: var(--accent); }
.ai-input button { background: var(--grad); color: #04101f; border: none; border-radius: 8px; padding: 0 18px; font-weight: 700; font-size: 13px; cursor: pointer; }
.ai-input button:hover { box-shadow: 0 6px 18px rgba(0,180,255,.3); }

/* AI 回答中自动带出的产品卡片 */
.ai-bubble.has-cards { max-width: 96%; }
.ai-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ai-card {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 8px 10px; border-radius: 10px;
  background: var(--bg-3); border: 1px solid var(--line);
  transition: 0.2s;
}
.ai-card:hover { border-color: var(--accent); background: rgba(0, 212, 255, 0.08); transform: translateX(2px); }
.ai-card img { width: 44px; height: 44px; object-fit: contain; flex: none; background: #fff; border-radius: 6px; padding: 2px; }
.ai-card-txt { min-width: 0; flex: 1; }
.ai-card-brand { font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 1px 6px; border-radius: 3px; }
.ai-card-brand.amass { color: #2f7bff; background: rgba(47, 123, 255, 0.14); }
.ai-card-brand.sed { color: #00d4ff; background: rgba(0, 212, 255, 0.12); }
.ai-card-name { font-size: 12.5px; font-weight: 600; color: var(--txt); margin-top: 4px; }
.ai-card-spec {
  font-size: 11px; color: var(--txt-2); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-card-go { flex: none; font-size: 14px; color: var(--accent); opacity: .7; }

/* 思考中占位 + 降级提示 */
.ai-typing { color: var(--txt-2); display: inline-flex; gap: 4px; align-items: center; }
.ai-typing::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: ai-dot 1s infinite steps(3); }
@keyframes ai-dot { 0% { opacity: .25; } 50% { opacity: 1; } 100% { opacity: .25; } }
.ai-note { display: block; margin-top: 6px; font-size: 11.5px; color: var(--txt-2); opacity: .8; }

@media (max-width: 640px) {
  #ai-panel { right: 12px; left: 12px; width: auto; bottom: 90px; height: 70vh; }
  #ai-launcher { right: 14px; bottom: 14px; }
}
