/* ==========================================================================
   Header Products Mega Menu
   顶部导航 "产品" 入口的悬浮大菜单（仅 UI 占位，不接真实数据）
   样式风格：白色面板 + 糖糕云品牌绿，参考腾讯云结构化大菜单。
   ========================================================================== */

.cc-next-pm {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: stretch;
}

.cc-next-pm-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color .18s ease;
}

.cc-next-pm-trigger:hover,
.cc-next-pm-trigger:focus-visible,
.cc-next-pm-trigger[aria-expanded="true"] {
  color: var(--cc-brand);
  outline: none;
}

.cc-next-pm-chevron {
  width: 12px;
  height: 12px;
  color: currentColor;
  transition: transform .2s ease;
}

.cc-next-pm.is-open .cc-next-pm-chevron,
.cc-next-pm-trigger[aria-expanded="true"] .cc-next-pm-chevron {
  transform: rotate(180deg);
}

/* === 面板容器 === */
.cc-next-pm-panel {
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  z-index: 90;
  border-top: 1px solid rgba(15, 95, 71, .08);
  background: #fff;
  box-shadow: 0 28px 60px -36px rgba(15, 23, 42, .34);
  max-height: calc(100vh - 62px);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .18s ease, transform .2s ease, visibility 0s linear .2s;
}

.cc-next-pm:focus-within .cc-next-pm-panel,
.cc-next-pm.is-open .cc-next-pm-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity .18s ease, transform .2s ease, visibility 0s;
}

.cc-next-pm-inner {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 320px;
  width: min(1680px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 28px;
}

.cc-next-pm-close {
  position: absolute;
  top: 12px;
  right: 18px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.cc-next-pm-close:hover,
.cc-next-pm-close:focus-visible {
  background: #f1f5f9;
  color: #0f172a;
  outline: none;
}

.cc-next-pm-close svg {
  width: 14px;
  height: 14px;
}

/* === 左侧分类列 === */
.cc-next-pm-cats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 18px 0 4px;
  border-right: 1px solid #eef2f6;
}

.cc-next-pm-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 12px;
  color: #2c3a44;
  font-size: 13px;
  text-decoration: none;
  border-radius: 4px;
  transition: background .15s ease, color .15s ease;
}

.cc-next-pm-cat:hover,
.cc-next-pm-cat.is-active {
  background: #f3faf6;
  color: var(--cc-brand-dark);
}

.cc-next-pm-cat > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cc-next-pm-cat svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #9aa9b3;
  transition: transform .15s ease, color .15s ease;
}

.cc-next-pm-cat:hover svg {
  color: var(--cc-brand);
  transform: translateX(2px);
}

.cc-next-pm-cat-hot {
  padding: 1px 5px;
  border-radius: 2px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.4;
}

/* === 中间主体 === */
.cc-next-pm-main {
  min-width: 0;
  padding: 0 36px;
}

.cc-next-pm-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cc-next-pm-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 300px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e2e8ec;
  border-radius: 4px;
  background: #f5f7f9;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.cc-next-pm-search:focus-within {
  border-color: rgba(var(--cc-brand-rgb), .55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--cc-brand-rgb), .12);
}

.cc-next-pm-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f2a36;
  font-size: 12px;
}

.cc-next-pm-search input::placeholder {
  color: #9aa9b3;
}

.cc-next-pm-search input::-webkit-search-cancel-button,
.cc-next-pm-search input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.cc-next-pm-search svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #94a3b8;
}

.cc-next-pm-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cc-next-pm-tab {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 4px;
  background: #f5f7f9;
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.cc-next-pm-tab:hover,
.cc-next-pm-tab.is-active {
  background: var(--cc-brand-soft);
  color: var(--cc-brand-dark);
}

.cc-next-pm-title {
  margin: 26px 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.005em;
}

.cc-next-pm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
  align-items: stretch;
}

.cc-next-pm-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cc-next-pm-product {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 20px;
  align-items: center;
  min-height: 64px;
  padding: 14px 18px;
  border-radius: 6px;
  background: #f6faf8;
  text-decoration: none;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.cc-next-pm-product:hover {
  background: #ebf6ef;
  box-shadow: 0 6px 18px -14px rgba(15, 95, 71, .35);
}

.cc-next-pm-product.is-active {
  background: linear-gradient(135deg, #e0f3e7 0%, #effaf3 55%, #f6fbf8 100%);
  box-shadow: inset 3px 0 0 0 var(--cc-brand);
}

.cc-next-pm-product.is-active:hover {
  background: linear-gradient(135deg, #d6efde 0%, #e8f6ee 55%, #f1f9f4 100%);
  box-shadow: inset 3px 0 0 0 var(--cc-brand), 0 8px 22px -14px rgba(15, 95, 71, .4);
}

/* 纯文本行（04-10）：数字与产品名同行，矩形无背景，自然高度不参与平分 */
.cc-next-pm-product.is-plain {
  flex: 0 0 auto;
  display: block;
  min-height: 0;
  padding: 8px 4px;
  background: transparent;
  box-shadow: none;
}

.cc-next-pm-product.is-plain:hover {
  background: transparent;
  box-shadow: none;
}

.cc-next-pm-product.is-plain .cc-next-pm-no {
  display: inline;
  margin-right: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
  vertical-align: baseline;
  letter-spacing: 0;
}

.cc-next-pm-product.is-plain:hover .cc-next-pm-no {
  color: var(--cc-brand);
}

.cc-next-pm-product.is-plain .cc-next-pm-text {
  display: inline;
}

.cc-next-pm-product.is-plain strong {
  display: inline;
  vertical-align: baseline;
}

.cc-next-pm-product.is-plain em {
  display: -webkit-box;
  margin-top: 6px;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cc-next-pm-no {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--cc-brand);
  letter-spacing: -.01em;
  font-feature-settings: "tnum" 1;
  align-self: center;
}

.cc-next-pm-product.is-active .cc-next-pm-no {
  color: var(--cc-brand-dark);
}

.cc-next-pm-text {
  display: block;
  min-width: 0;
}

.cc-next-pm-product strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s ease;
}

.cc-next-pm-product:hover strong,
.cc-next-pm-product.is-active strong {
  color: var(--cc-brand-dark);
}

.cc-next-pm-product em {
  display: -webkit-box;
  margin-top: 4px;
  color: #6b7785;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cc-next-pm-latest {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 12px;
}

.cc-next-pm-latest a {
  color: #2c3a44;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s ease;
}

.cc-next-pm-latest a:hover {
  color: var(--cc-brand-dark);
}

/* === 右侧广告 + 动态 === */
.cc-next-pm-aside {
  padding-left: 24px;
  padding-right: 4px;
  border-left: 1px solid #eef2f6;
}

.cc-next-pm-banner {
  position: relative;
  display: block;
  height: 150px;
  padding: 22px 24px;
  border-radius: 4px;
  background: linear-gradient(135deg, #eef7ff 0%, #ffffff 45%, #e7f9f0 100%);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
}

.cc-next-pm-banner::before {
  content: "";
  position: absolute;
  right: -32px;
  top: -36px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(var(--cc-brand-rgb), .22);
  filter: blur(24px);
  z-index: -1;
}

.cc-next-pm-banner::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #67e8b5, #79c5ff);
  opacity: .7;
  transform: rotate(8deg);
  z-index: -1;
}

.cc-next-pm-banner strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.cc-next-pm-banner em {
  display: block;
  margin-top: 6px;
  color: #6b7785;
  font-size: 12px;
  font-style: normal;
}

.cc-next-pm-banner span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  color: var(--cc-brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.cc-next-pm-banner span svg {
  width: 12px;
  height: 12px;
  transition: transform .15s ease;
}

.cc-next-pm-banner:hover span svg {
  transform: translateX(3px);
}

.cc-next-pm-news {
  margin-top: 22px;
}

.cc-next-pm-news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cc-next-pm-news-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.cc-next-pm-news-head a {
  color: #6b7785;
  font-size: 12px;
  text-decoration: none;
  transition: color .15s ease;
}

.cc-next-pm-news-head a:hover {
  color: var(--cc-brand-dark);
}

.cc-next-pm-news ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cc-next-pm-news li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  min-width: 0;
}

.cc-next-pm-news .cc-next-pm-news-tag {
  flex-shrink: 0;
  color: #ef4444;
  font-weight: 600;
}

.cc-next-pm-news a {
  color: #2c3a44;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s ease;
}

.cc-next-pm-news a:hover {
  color: var(--cc-brand-dark);
}

/* === 响应式收敛 === */
@media (max-width: 1280px) {
  .cc-next-pm-inner {
    grid-template-columns: 200px minmax(0, 1fr) 280px;
  }

  .cc-next-pm-main {
    padding: 0 24px;
  }

  .cc-next-pm-search {
    width: 240px;
  }

  .cc-next-pm-tab {
    padding: 0 10px;
  }
}

@media (max-width: 992px) {
  /* PC 顶导在 992 以下被隐藏，大菜单同步隐藏 */
  .cc-next-pm-panel {
    display: none !important;
  }
}
