:root {
  --theme-color-primary: #656DE6;
  --theme-color-primary-dark: #3943df;
  --theme-color-primary-light: #9197ed;
  --category-active-color: #FFD54F;
}

/* 默认隐藏移动端导航，避免PC显示 */
.product-full-height .product-mobile-nav { display: none; }
.product-full-height.mobile-nav .ub-menu.simple { display: none; }
.product-full-height.mobile-nav .product-mobile-nav { display: block; }
.product-full-height.mobile-nav .product-mobile-nav .mobile-cat-row { white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0.25rem 0.5rem; background: #fff; }
.product-full-height.mobile-nav .product-mobile-nav .chip { display: inline-flex; align-items: center; padding: 0.375rem 0.75rem; margin-right: 0.5rem; border: 1px solid #e5e7eb; border-radius: 999px; color: #374151; background: #fff; }
.product-full-height.mobile-nav .product-mobile-nav .chip.active,
.product-full-height.mobile-nav .product-mobile-nav .chip.selected { color: var(--theme-color-primary); border-color: var(--theme-color-primary); background: rgba(101,109,230,0.08); }
.product-full-height.mobile-nav .product-mobile-nav .chip .ub-menu-toggle { display: none; }
.product-full-height.mobile-nav .product-mobile-nav .mobile-subcat-wrap { padding: 0.25rem 0.5rem; }
.product-full-height.mobile-nav .product-mobile-nav .mobile-subcat-row { display: none; white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.product-full-height.mobile-nav .product-mobile-nav .mobile-subcat-row.active { display: block; }

.product-full-height .ub-menu-item { position: relative; }
.product-full-height .ub-menu-item .title { display: block; width: 100%; padding: 0.375rem 1.25rem 0.375rem 0.5rem; }
.product-full-height .ub-menu-item .title:hover { padding: 0.375rem 1.25rem 0.375rem 0.5rem; }
.product-full-height .ub-menu-toggle { cursor: pointer; position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); width: 0.9rem; height: 0.9rem; background: transparent; line-height: 0; display: flex; align-items: center; justify-content: center; z-index: 2; }
.product-full-height .ub-submenu { display: none; }
.product-full-height .ub-submenu.expanded { display: block; }
/* 移除默认锚点的箭头，使用自定义箭头 */
.product-full-height .ub-menu.simple .title::after { content: none !important; }
.product-full-height .ub-menu.simple .title::before { content: none !important; }
/* 自定义箭头样式：折叠为右箭头，展开为下箭头 */
.product-full-height .ub-menu-toggle::before { content:""; display:block; width:0; height:0; border-top:4px solid transparent; border-bottom:4px solid transparent; border-left:7px solid #9ca3af; transition: transform .2s ease, border-left-color .2s ease; }
.product-full-height .ub-menu-toggle[aria-expanded="true"]::before { transform: rotate(90deg); border-left-color: var(--theme-color-primary); }
/* 整行选中样式 */
.product-full-height .ub-menu-item.selected { background: transparent; }
.product-full-height .ub-menu-item.selected .title { color: #fff; }
.product-full-height .ub-menu-item.selected .ub-menu-toggle::before { border-left-color: var(--theme-color-primary); }
/* 选中分类去除背景（含子分类） */
.product-full-height .ub-menu.simple .title,
.product-full-height .ub-submenu .title { background: transparent !important; }
.product-full-height .ub-menu.simple .title:hover,
.product-full-height .ub-submenu .title:hover { background: transparent !important; }
.product-full-height .ub-menu.simple .title.active,
.product-full-height .ub-submenu .title.active { background: transparent !important; color: var(--category-active-color); }
.product-full-height .ub-menu.simple .title,
.product-full-height .ub-submenu .title { color: #fff; }
.product-full-height .ub-menu.simple .title,
.product-full-height .ub-submenu .title { color: #fff; }
/* 展开/收起箭头（保留图标，去掉竖线分隔） */
.product-full-height .ub-menu-toggle::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid rgba(255,255,255,0.9);
  transition: transform .2s ease, border-left-color .2s ease;
}
.product-full-height .ub-menu-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
  border-left-color: #fff;
}
/* 去掉可能的右侧分隔线 */
.product-full-height .ub-menu.simple .title { border-right: none !important; }
.product-full-height .ub-submenu .title { border-right: none !important; }

@media (min-width: 768px) {
  .sticky-page.has-product-list > .tw-flex-grow { overflow: hidden; }
  .product-full-height { height: calc(100vh - var(--header-h, 0px) - var(--footer-h, 0px)); }
  .product-full-height > .row { height: 100%; align-items: stretch; }
  .product-full-height .product-sidebar,
  .product-full-height .product-content { height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; }
}

/* Sticky footer layout: header/top, scrollable middle, fixed footer at bottom */
.sticky-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.sticky-page > .tw-flex-grow { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; min-height: 0; }

/* 产品列表与推荐图片统一使用裁剪显示 */
.product-full-height .ub-list-items .item-p .cover { background-size: cover !important; background-position: center; background-repeat: no-repeat; }

@media (min-width: 768px) {
  .product-full-height .ub-list-items .product-grid-5 > [class*="col-"] {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

/* 移动端样式由 .mobile-nav 类控制，断点不强制切换 */
@media (min-width: 768px) {
  /* 让左侧分类容器透明以显示渐变（分类列背景自身不再设置渐变） */
  .product-full-height .ub-menu.simple.margin-bottom { background: transparent; }
  /* 产品页头部容器去除左侧内边距，使 Logo 与下方分类左对齐 */
  .product-left-gradient .ub-header-b .ub-container { padding-left: 0; }
  /* 全站头部容器左对齐，Logo贴左 */
  .ub-header-b .ub-container { padding-left: 0; }
  .ub-header-b.has-product-list { border-bottom: none !important; }
  .ub-header-b.has-product-list .logo { background: linear-gradient(to bottom, rgb(229, 99, 109), rgb(88, 105, 211)); background-size: 100% var(--gradient-height, 100%); background-position: 0 0; background-repeat: no-repeat; flex: 0 0 var(--sidebar-w, 16.66666667%); max-width: var(--sidebar-w, 16.66666667%); }
  .ub-header-b.has-product-list .logo { position: relative; }
  .ub-header-b.has-product-list .logo::after { content:""; position:absolute; left:0; top:0; right:0; bottom:0; background: linear-gradient(to bottom, rgb(229, 99, 109), rgb(88, 105, 211)); background-size: 100% var(--gradient-height, 100%); background-position: 0 0; background-repeat: no-repeat; opacity:0.35; pointer-events:none; }
  .sticky-page.has-product-list::before { content:""; position:absolute; left: var(--gradient-left, 0); top: 0; width: var(--sidebar-w, 16.66666667%); height: var(--gradient-height, 0); background: linear-gradient(to bottom, rgb(229, 99, 109), rgb(88, 105, 211)); background-size: 100% 100%; background-position: 0 0; background-repeat: no-repeat; pointer-events:none; z-index: 0; }
}
.ub-footer-link { position: relative; z-index: 1; }
.sticky-page:not(.has-product-list) .ub-footer-link { display: none !important; }
/* 左侧分类所有菜单容器透明，确保列背景渐变可见 */
.product-full-height .product-sidebar .ub-menu.simple,
.product-full-height .product-sidebar .ub-submenu,
.product-full-height .product-sidebar .ub-submenu.expanded { background: transparent !important; }
/* 分类容器边框不需要圆角，仅限左侧分类区域 */
.product-full-height .product-sidebar .tw-rounded { border-radius: 0 !important; }
.product-full-height .product-sidebar .ub-menu.simple.margin-bottom { border-radius: 0 !important; }
  /* 头部布局：Logo占两列宽，与下方左侧分类对齐 */
  .ub-header-b .ub-container { display: flex; align-items: center; }
  .ub-header-b .logo { flex: 0 0 16.666%; max-width: 16.666%; }
  .ub-header-b .logo img { display:block; height:48px; max-width:100%; object-fit:contain; }
  .ub-header-b .nav { flex: 1 1 auto; }
  .ub-header-b .menu { margin-left: auto; }
}




:root {
  --theme-color-primary: #656DE6;
  --theme-color-primary-dark: #3943df;
  --theme-color-primary-light: #9197ed;
}

/* 默认隐藏移动端导航，避免PC显示 */
.product-full-height .product-mobile-nav { display: none; }
.product-full-height.mobile-nav .ub-menu.simple { display: none; }
.product-full-height.mobile-nav .product-mobile-nav { display: block; }
.product-full-height.mobile-nav .product-mobile-nav .mobile-cat-row { white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0.25rem 0.5rem; background: #fff; }
.product-full-height.mobile-nav .product-mobile-nav .chip { display: inline-flex; align-items: center; padding: 0.375rem 0.75rem; margin-right: 0.5rem; border: 1px solid #e5e7eb; border-radius: 999px; color: #374151; background: #fff; }
.product-full-height.mobile-nav .product-mobile-nav .chip.active,
.product-full-height.mobile-nav .product-mobile-nav .chip.selected { color: var(--theme-color-primary); border-color: var(--theme-color-primary); background: rgba(101,109,230,0.08); }
.product-full-height.mobile-nav .product-mobile-nav .chip .ub-menu-toggle { display: none; }
.product-full-height.mobile-nav .product-mobile-nav .mobile-subcat-wrap { padding: 0.25rem 0.5rem; }
.product-full-height.mobile-nav .product-mobile-nav .mobile-subcat-row { display: none; white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.product-full-height.mobile-nav .product-mobile-nav .mobile-subcat-row.active { display: block; }

.product-full-height .ub-menu-item { position: relative; }
.product-full-height .ub-menu-item .title { display: block; width: 100%; padding: 0.375rem 1.25rem 0.375rem 0.5rem; }
.product-full-height .ub-menu-item .title:hover { padding: 0.375rem 1.25rem 0.375rem 0.5rem; }
.product-full-height .ub-menu-toggle { cursor: pointer; position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); width: 0.9rem; height: 0.9rem; background: transparent; line-height: 0; display: flex; align-items: center; justify-content: center; z-index: 2; }
.product-full-height .ub-submenu { display: none; }
.product-full-height .ub-submenu.expanded { display: block; }
/* 移除默认锚点的箭头，使用自定义箭头 */
.product-full-height .ub-menu.simple .title::after { content: none !important; }
.product-full-height .ub-menu.simple .title::before { content: none !important; }
/* 自定义箭头样式：折叠为右箭头，展开为下箭头 */
.product-full-height .ub-menu-toggle::before { content:""; display:block; width:0; height:0; border-top:4px solid transparent; border-bottom:4px solid transparent; border-left:7px solid #9ca3af; transition: transform .2s ease, border-left-color .2s ease; }
.product-full-height .ub-menu-toggle[aria-expanded="true"]::before { transform: rotate(90deg); border-left-color: var(--theme-color-primary); }
/* 整行选中样式 */
.product-full-height .ub-menu-item.selected { background: transparent; }
.product-full-height .ub-menu-item.selected .title { color: var(--category-active-color); }
.product-full-height .ub-menu-item.selected .ub-menu-toggle::before { border-left-color: var(--category-active-color); }
/* 选中分类去除背景（含子分类） */
.product-full-height .ub-menu.simple .title,
.product-full-height .ub-submenu .title { background: transparent !important; }
.product-full-height .ub-menu.simple .title:hover,
.product-full-height .ub-submenu .title:hover { background: transparent !important; }
.product-full-height .ub-menu.simple .title.active,
.product-full-height .ub-submenu .title.active { background: transparent !important; color: var(--category-active-color); }
/* 默认未选中分类与子分类文字为白色，确保在渐变上可读 */
.product-full-height .ub-menu.simple .title,
.product-full-height .ub-submenu .title { color: #fff; }
/* 展开/收起箭头（保留图标，去掉竖线分隔） */
.product-full-height .ub-menu-toggle::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid rgba(255,255,255,0.9);
  transition: transform .2s ease, border-left-color .2s ease;
}
.product-full-height .ub-menu-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
  border-left-color: #fff;
}
/* 去掉可能的右侧分隔线 */
.product-full-height .ub-menu.simple .title { border-right: none !important; }
.product-full-height .ub-submenu .title { border-right: none !important; }

@media (min-width: 768px) {
  .sticky-page.has-product-list > .tw-flex-grow { overflow: hidden; }
  .product-full-height { height: calc(100vh - var(--header-h, 0px) - var(--footer-h, 0px)); }
  .product-full-height > .row { height: 100%; align-items: stretch; }
  .product-full-height .product-sidebar,
  .product-full-height .product-content { height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; }
}

/* Sticky footer layout: header/top, scrollable middle, fixed footer at bottom */
.sticky-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.sticky-page > .tw-flex-grow { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; min-height: 0; }

/* 产品列表与推荐图片统一使用裁剪显示 */
.product-full-height .ub-list-items .item-p .cover { background-size: cover !important; background-position: center; background-repeat: no-repeat; }

/* 移动端样式由 .mobile-nav 类控制，断点不强制切换 */
@media (min-width: 768px) {
  /* 让左侧分类容器透明以显示渐变（分类列背景自身不再设置渐变） */
  .product-full-height .ub-menu.simple.margin-bottom { background: transparent; }
  /* 产品页头部容器去除左侧内边距，使 Logo 与下方分类左对齐 */
  .product-left-gradient .ub-header-b .ub-container { padding-left: 0; }
  /* 全站头部容器左对齐，Logo贴左 */
  .ub-header-b .ub-container { padding-left: 0; }
  .ub-header-b.has-product-list { border-bottom: none !important; }
  .ub-header-b.has-product-list .logo { background: linear-gradient(to bottom, rgb(229, 99, 109), rgb(88, 105, 211)); background-size: 100% var(--gradient-height, 100%); background-position: 0 0; background-repeat: no-repeat; flex: 0 0 var(--sidebar-w, 16.66666667%); max-width: var(--sidebar-w, 16.66666667%); }
  .ub-header-b.has-product-list .logo { position: relative; }
  .ub-header-b.has-product-list .logo::after { content:""; position:absolute; left:0; top:0; right:0; bottom:0; background: linear-gradient(to bottom, rgb(229, 99, 109), rgb(88, 105, 211)); background-size: 100% var(--gradient-height, 100%); background-position: 0 0; background-repeat: no-repeat; opacity:0.35; pointer-events:none; }
  .sticky-page.has-product-list::before { content:""; position:absolute; left: var(--gradient-left, 0); top: 0; width: var(--sidebar-w, 16.66666667%); height: var(--gradient-height, 0); background: linear-gradient(to bottom, rgb(229, 99, 109), rgb(88, 105, 211)); background-size: 100% 100%; background-position: 0 0; background-repeat: no-repeat; pointer-events:none; z-index: 0; }
}
/* 左侧分类所有菜单容器透明，确保列背景渐变可见 */
.product-full-height .product-sidebar .ub-menu.simple,
.product-full-height .product-sidebar .ub-submenu,
.product-full-height .product-sidebar .ub-submenu.expanded { background: transparent !important; }
  /* 头部布局：Logo占两列宽，与下方左侧分类对齐 */
  .ub-header-b .ub-container { display: flex; align-items: center; }
  .ub-header-b .logo { flex: 0 0 16.666%; max-width: 16.666%; }
  .ub-header-b .logo img { display:block; height:48px; max-width:100%; object-fit:contain; }
  .ub-header-b .nav { flex: 1 1 auto; }
  .ub-header-b .menu { margin-left: auto; }
}

.product-full-height .product-content .tw-rounded { margin: 0.375rem 0; background: #fff; padding: 0.375rem 0; }
.product-full-height .ub-list-items .row > [class*="col-"] { margin-bottom: 0.5rem; }
.product-full-height .ub-list-items .item-p { padding: 0.375rem; background: #fff; border-radius: 0.5rem; box-shadow: 0 2px 10px rgba(0,0,0,0.06); transition: transform .2s ease, box-shadow .2s ease; }
.product-full-height .ub-list-items .item-p:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.10); }
.product-full-height .ub-list-items .item-p .cover { width: 100% !important; margin: 0 !important; border-radius: 0.5rem; }
.product-full-height .ub-list-items .item-p .title { display: block; height: 1.2rem !important; margin: 0.2rem 0; line-height: 1.2; text-align: center; color: #333; padding: 0 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
