:root {
  --qy-primary: #1677ff;
  --qy-primary-2: #5ac8fa;
  --qy-title: #101828;
  --qy-text: #475467;
  --qy-muted: #667085;
  --qy-line: rgba(16, 24, 40, 0.10);
  --qy-soft-line: rgba(16, 24, 40, 0.07);
  --qy-bg: #f5f8ff;
  --qy-white: #ffffff;
  --qy-glass: rgba(255, 255, 255, 0.74);
  --qy-glass-strong: rgba(255, 255, 255, 0.88);
  --qy-shadow-sm: 0 12px 34px rgba(16, 24, 40, 0.07);
  --qy-shadow-md: 0 28px 80px rgba(16, 24, 40, 0.14);
  --qy-container: 1200px;
  --qy-header-height: 76px;
  --qy-radius: 24px;
}

body {
  padding-top: var(--qy-header-height);
}

.qy-header,
.qy-header * {
  box-sizing: border-box;
}

.qy-header-scope {
  position: relative;
  z-index: 10000;
  font-family: "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", Arial, sans-serif;
}

.qy-header-scope a {
  color: inherit;
  text-decoration: none;
}

.qy-header-scope button,
.qy-header-scope input {
  font: inherit;
}

.qy-header-scope button {
  cursor: pointer;
}

.qy-header-scope svg {
  display: block;
}

.qy-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10000;
}

.qy-navbar {
  height: var(--qy-header-height);
  border-bottom: 1px solid rgba(255,255,255,.65);
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.68));
  box-shadow: 0 18px 46px rgba(16, 24, 40, .07);
  backdrop-filter: saturate(1.25) blur(22px);
  -webkit-backdrop-filter: saturate(1.25) blur(22px);
}

.qy-navbar__inner {
  height: var(--qy-header-height);
  display: flex;
  align-items: center;
  gap: 22px;
}

.qy-logo {
  width: 142px;
  min-width: 142px;
  display: inline-flex;
  align-items: center;
}

.qy-logo img {
  width: auto;
  max-width: 142px;
  height: 40px;
  object-fit: contain;
}

.qy-nav {
  flex: 1 1 auto;
  height: var(--qy-header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.qy-nav__item {
  height: var(--qy-header-height);
  display: flex;
  align-items: center;
}

.qy-nav__link {
  position: relative;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  color: rgba(16, 24, 40, .82);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.qy-nav__link:hover,
.qy-nav__item:hover > .qy-nav__link,
.qy-nav__item:focus-within > .qy-nav__link {
  color: var(--qy-primary);
  background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 0 0 1px rgba(22,119,255,.12), 0 10px 26px rgba(22,119,255,.10);
}

.qy-nav__arrow,
.qy-user-arrow {
  width: 15px;
  height: 15px;
  transition: transform .2s ease;
}

.qy-nav__item:hover .qy-nav__arrow,
.qy-nav__item:focus-within .qy-nav__arrow,
.qy-user-menu:hover .qy-user-arrow,
.qy-user-menu:focus-within .qy-user-arrow {
  transform: rotate(180deg);
}

.qy-dropdown {
  position: absolute;
  top: var(--qy-header-height);
  left: 0;
  width: 100%;
  padding: 14px 22px 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(.985);
  transform-origin: top center;
  transition: opacity .18s ease, visibility .18s ease, transform .22s ease;
}

.qy-nav__item:hover .qy-dropdown,
.qy-nav__item:focus-within .qy-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.qy-mega-panel {
  width: min(1180px, calc(100vw - 44px));
  min-height: 392px;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.66);
  border-radius: 0 0 30px 30px;
  background:
    radial-gradient(circle at 12% 8%, rgba(90,200,250,.18), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(22,119,255,.14), transparent 30%),
    rgba(255,255,255,.76);
  box-shadow: 0 30px 90px rgba(16,24,40,.16);
  backdrop-filter: blur(26px) saturate(1.2);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
}

.qy-mega-sidebar {
  position: relative;
  min-width: 0;
  padding: 24px 16px 22px;
  border-right: 1px solid rgba(16,24,40,.08);
  background: rgba(255,255,255,.42);
}

.qy-mega-sidebar h2 {
  margin: 0 0 18px;
  color: var(--qy-title);
  font-size: 26px;
  line-height: 1.18;
  font-weight: 850;
  letter-spacing: -.04em;
}

.qy-mega-nav {
  display: grid;
  gap: 8px;
  max-height: 314px;
  overflow-y: auto;
  padding-right: 4px;
}

.qy-mega-nav button,
.qy-product-tabs button {
  border: 0;
  background: transparent;
}

.qy-mega-nav button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 14px;
  color: rgba(16,24,40,.76);
  border-radius: 16px;
  font-size: 15px;
  font-weight: 750;
  text-align: left;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.qy-mega-nav button:hover,
.qy-mega-nav button.is-active {
  color: var(--qy-primary);
  background: rgba(255,255,255,.82);
  box-shadow: inset 0 0 0 1px rgba(22,119,255,.12), 0 12px 26px rgba(22,119,255,.08);
}

.qy-mega-main {
  min-width: 0;
  padding: 20px 24px 24px;
}

.qy-mega-top {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.qy-product-search {
  height: 42px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: rgba(16,24,40,.42);
  border: 1px solid rgba(16,24,40,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.qy-product-search svg {
  width: 18px;
  height: 18px;
}

.qy-product-search input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  color: var(--qy-title);
  background: transparent;
  font-size: 14px;
}

.qy-product-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.qy-product-tabs button {
  height: 38px;
  padding: 0 14px;
  color: rgba(16,24,40,.70);
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.qy-product-tabs button:hover,
.qy-product-tabs button.is-active {
  color: var(--qy-primary);
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 0 0 1px rgba(22,119,255,.14), 0 10px 22px rgba(22,119,255,.08);
}

.qy-mega-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.qy-product-panel {
  display: none;
}

.qy-product-panel.is-active {
  display: contents;
}

.qy-mega-card {
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 20px 22px;
  border: 1px solid rgba(16,24,40,.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.68));
  box-shadow: 0 14px 36px rgba(16,24,40,.065);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.qy-mega-card:hover {
  transform: translateY(-3px);
  border-color: rgba(22,119,255,.24);
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 54px rgba(22,119,255,.13);
}

.qy-mega-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--qy-primary);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(22,119,255,.11), rgba(90,200,250,.13));
}

.qy-mega-card__icon svg {
  width: 24px;
  height: 24px;
}

.qy-mega-card strong {
  display: block;
  color: var(--qy-title);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
}

.qy-mega-card p {
  display: -webkit-box;
  margin: 7px 0 0;
  color: var(--qy-muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qy-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
}

.qy-actions__login,
.qy-user-trigger {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.qy-actions__login {
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--qy-primary), var(--qy-primary-2));
  box-shadow: 0 14px 30px rgba(22,119,255,.22);
}

.qy-user-menu {
  position: relative;
  height: var(--qy-header-height);
  display: inline-flex;
  align-items: center;
}

.qy-user-trigger {
  gap: 8px;
  padding: 0 10px 0 6px;
  color: rgba(16,24,40,.78);
  background: rgba(255,255,255,.70);
  box-shadow: inset 0 0 0 1px rgba(16,24,40,.08);
}

.qy-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.qy-user-name {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qy-user-dropdown {
  position: absolute;
  top: 64px;
  right: 0;
  width: 210px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 20px;
  background: rgba(255,255,255,.86);
  box-shadow: var(--qy-shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, visibility .18s ease, transform .2s ease;
}

.qy-user-menu:hover .qy-user-dropdown,
.qy-user-menu:focus-within .qy-user-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.qy-user-dropdown a {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: rgba(16,24,40,.76);
  border-radius: 13px;
  font-size: 14px;
  font-weight: 750;
}

.qy-user-dropdown a:hover {
  color: var(--qy-primary);
  background: rgba(22,119,255,.08);
}

.qy-user-dropdown a.qy-user-logout {
  color: #d92d20;
}

.qy-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 1px rgba(16,24,40,.08);
}

.qy-menu-toggle span,
.qy-menu-toggle span::before,
.qy-menu-toggle span::after {
  display: block;
  width: 19px;
  height: 2px;
  background: var(--qy-title);
  border-radius: 999px;
  transition: .2s ease;
}

.qy-menu-toggle span {
  position: relative;
  margin: 0 auto;
}

.qy-menu-toggle span::before,
.qy-menu-toggle span::after {
  position: absolute;
  left: 0;
  content: "";
}

.qy-menu-toggle span::before { top: -7px; }
.qy-menu-toggle span::after { top: 7px; }
.qy-menu-toggle.is-active span { background: transparent; }
.qy-menu-toggle.is-active span::before { top: 0; transform: rotate(45deg); }
.qy-menu-toggle.is-active span::after { top: 0; transform: rotate(-45deg); }

.qy-mobile-menu {
  position: fixed;
  top: var(--qy-header-height);
  left: 0;
  right: 0;
  height: calc(100vh - var(--qy-header-height));
  display: none;
  grid-template-columns: 34% 66%;
  border-top: 1px solid rgba(16,24,40,.08);
  background: rgba(246,248,252,.94);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
}

.qy-mobile-menu.is-open {
  display: grid;
}

.qy-mobile-menu__left {
  height: 100%;
  padding: 12px 8px;
  border-right: 1px solid rgba(16,24,40,.08);
  overflow-y: auto;
}

.qy-mobile-menu__left button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
  padding: 0 12px;
  color: rgba(16,24,40,.68);
  border: 0;
  border-radius: 15px;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.qy-mobile-menu__left button.is-active {
  color: var(--qy-primary);
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 26px rgba(22,119,255,.10);
}

.qy-mobile-menu__right {
  height: 100%;
  overflow-y: auto;
}

.qy-mobile-panel {
  display: none;
  padding: 0 0 18px;
}

.qy-mobile-panel.is-active {
  display: block;
}

.qy-mobile-panel h3 {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 12px;
  padding: 18px 16px 14px;
  color: var(--qy-title);
  border-bottom: 1px solid rgba(16,24,40,.07);
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 19px;
  line-height: 1.2;
  font-weight: 850;
}

.qy-mobile-panel h4 {
  margin: 18px 14px 10px;
  color: var(--qy-primary);
  font-size: 13px;
  font-weight: 850;
}

.qy-mobile-panel a {
  display: block;
  margin: 0 12px 10px;
  padding: 14px;
  border: 1px solid rgba(16,24,40,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 12px 28px rgba(16,24,40,.055);
}

.qy-mobile-panel a strong {
  display: block;
  color: var(--qy-title);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 850;
}

.qy-mobile-panel a span {
  display: block;
  margin-top: 6px;
  color: var(--qy-muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1320px) {
  .qy-mega-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  :root { --qy-header-height: 68px; }
  body { padding-top: var(--qy-header-height); }
  .qy-navbar,
  .qy-navbar__inner { height: var(--qy-header-height); }
  .qy-nav { display: none; }
  .qy-menu-toggle { display: block; }
  .qy-logo { width: auto; min-width: 0; }
  .qy-logo img { height: 36px; max-width: 132px; }
}

@media (max-width: 760px) {
  :root { --qy-header-height: 64px; }
  .qy-navbar__inner { gap: 10px; }
  .qy-actions__login { height: 36px; padding: 0 13px; font-size: 13px; }
  .qy-mobile-menu { grid-template-columns: 32% 68%; }
  .qy-mobile-menu__left { padding: 10px 6px; }
  .qy-mobile-menu__left button { min-height: 44px; padding: 0 9px; border-radius: 13px; font-size: 13px; }
  .qy-mobile-panel h3 { padding: 16px 14px 12px; font-size: 18px; }
  .qy-mobile-panel h4 { margin: 16px 10px 8px; }
  .qy-mobile-panel a { margin: 0 10px 9px; padding: 12px; border-radius: 16px; }
}

@media (max-width: 420px) {
  .qy-actions__login { display: none; }
  .qy-mobile-menu { grid-template-columns: 36% 64%; }
}

/* 20260704 导航收敛：产品分类顺序完全跟随模板变量输出，不做前端重排；产品卡片只显示产品名称。 */
.qy-header-scope .qy-mega-panel {
  min-height: 318px;
  grid-template-columns: 238px minmax(0, 1fr);
}

.qy-header-scope .qy-mega-main {
  padding: 24px;
}

.qy-header-scope .qy-mega-top,
.qy-header-scope .qy-product-search,
.qy-header-scope .qy-product-tabs {
  display: none !important;
}

.qy-header-scope .qy-mega-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.qy-header-scope .qy-mega-card {
  min-height: 74px;
  align-items: center;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 16px;
  border-radius: 18px;
}

.qy-header-scope .qy-mega-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

.qy-header-scope .qy-mega-card__icon svg {
  width: 22px;
  height: 22px;
}

.qy-header-scope .qy-mega-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.qy-header-scope .qy-mega-card p,
.qy-header-scope .qy-mobile-panel a span {
  display: none !important;
}

@media (max-width: 1320px) {
  .qy-header-scope .qy-mega-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== 20260704 定向修复：导航点击/选中态文字统一蓝色 ===== */
.qy-header-scope .qy-mega-nav button.is-active,
.qy-header-scope .qy-mega-nav button:hover,
.qy-header-scope .qy-product-tabs button.is-active,
.qy-header-scope .qy-product-tabs button:hover,
.qy-header-scope .qy-mobile-menu__left button.is-active {
  color: var(--qy-primary) !important;
}

.qy-header-scope .qy-mega-nav button.is-active strong,
.qy-header-scope .qy-mega-nav button:hover strong,
.qy-header-scope .qy-product-tabs button.is-active strong,
.qy-header-scope .qy-product-tabs button:hover strong,
.qy-header-scope .qy-mobile-menu__left button.is-active strong {
  color: var(--qy-primary) !important;
}


/* 20260704：顶部产品卡片去掉前置图标，避免视觉拥挤 */
.qy-mega-card__icon { display: none !important; }
.qy-mega-card { grid-template-columns: minmax(0, 1fr) !important; }
.qy-mega-card strong { font-size: 16px; }

/* ===== 20260704 顶部导航产品卡片垂直居中 ===== */
.qy-header-scope .qy-mega-card {
  min-height: 84px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 18px 18px !important;
}

.qy-header-scope .qy-mega-card strong {
  width: 100%;
  text-align: center !important;
  line-height: 1.45 !important;
}

/* ===== 20260704 V5：顶部产品卡片压短、保持垂直居中 ===== */
.qy-header-scope .qy-mega-card-grid {
  gap: 12px !important;
}

.qy-header-scope .qy-mega-card {
  min-height: 62px !important;
  height: auto !important;
  padding: 12px 14px !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(16,24,40,.055) !important;
}

.qy-header-scope .qy-mega-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 16px 34px rgba(22,119,255,.11) !important;
}

.qy-header-scope .qy-mega-card strong {
  font-size: 15px !important;
  line-height: 1.35 !important;
}

@media (max-width: 760px) {
  .qy-header-scope .qy-mega-card {
    min-height: 52px !important;
    padding: 11px 12px !important;
    border-radius: 14px !important;
  }
}

/* ===== 20260704 V6：修正卡片“太宽/太矮”——收窄横向宽度，恢复高度 ===== */
.qy-header-scope .qy-mega-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 210px)) !important;
  justify-content: start !important;
  align-items: stretch !important;
  gap: 14px !important;
}

.qy-header-scope .qy-mega-card {
  width: 100% !important;
  max-width: 210px !important;
  min-height: 86px !important;
  padding: 18px 16px !important;
  border-radius: 18px !important;
}

.qy-header-scope .qy-mega-card strong {
  font-size: 16px !important;
  line-height: 1.45 !important;
  white-space: normal !important;
}

@media (max-width: 980px) {
  .qy-header-scope .qy-mega-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .qy-header-scope .qy-mega-card {
    max-width: none !important;
  }
}

@media (max-width: 760px) {
  .qy-header-scope .qy-mega-card {
    min-height: 76px !important;
    padding: 16px 14px !important;
  }
}
