.micah-topbar {
  background: #000 !important;
  height: 50px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  z-index: 99999 !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
.micah-tb-logo-link {
  display: flex !important;
  align-items: center !important;
  text-decoration: none !important;
  height: 100% !important;
  cursor: pointer !important;
}
.micah-tb-logo-link:hover .micah-tb-logo-czm,
.micah-tb-logo-link:hover .micah-tb-logo-zh {
  opacity: .85 !important;
}
.micah-tb-center {
  display: flex !important;
  align-items: center !important;
  gap: 22px !important;
}
.micah-tb-logo-czm,
.micah-tb-logo-zh {
  height: 30px !important;
  width: auto !important;
  display: block !important;
  border: 0 !important;
}
.micah-tb-divider {
  width: 2px !important;
  height: 22px !important;
  background: #fff !important;
  display: block !important;
  flex: 0 0 auto !important;
}
.micah-tb-right {
  position: absolute !important;
  right: 24px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.micah-tb-lang {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 50px !important;
  height: 50px !important;
  text-decoration: none !important;
  line-height: 1 !important;
}
.micah-tb-lang-icon {
  height: 30px !important;
  width: 30px !important;
  display: block !important;
  border: 0 !important;
}
.micah-tb-account {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 50px !important;
  height: 50px !important;
  text-decoration: none !important;
  line-height: 0 !important;
}
.micah-tb-account-icon {
  height: 30px !important;
  width: auto !important;
  display: block !important;
  border: 0 !important;
}
.micah-tb-search {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 50px !important;
  height: 50px !important;
  text-decoration: none !important;
  line-height: 1 !important;
}
.micah-tb-search-icon {
  height: 30px !important;
  width: 30px !important;
  display: block !important;
  border: 0 !important;
}
.micah-tb-cart {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 50px !important;
  height: 50px !important;
  text-decoration: none !important;
  line-height: 1 !important;
}
.micah-tb-cart-icon {
  height: 30px !important;
  width: 30px !important;
  display: block !important;
  border: 0 !important;
}
.micah-tb-right a {
  position: relative !important;
}

/* ===== 隐藏主题自带桌面分类菜单（ps_mainmenu 的 tvallcategories + tvcms-horizontal-menu），改用我们自己的 .micah-menu ===== */
#header .tvheader-top .tvallcategories,
#header .tvheader-top .tvcms-horizontal-menu {
  display: none !important;
}
/* 隐藏主题原生右侧块（CNY / 语言 / 登录 / 购物车），避免与顶栏图标重复。
   注意：语言按钮来自这里，不是 ps_mainmenu；之前重写菜单 CSS 时误删了本规则，已恢复。 */
#header .tvheader-top-all-icon,
#header .tvheader-nav3-right-block {
  display: none !important;
}
/* 让 .tvheader-top 允许换行，使我们的菜单独占一行、铺满整行 */
#header .tvheader-top {
  height: 50px !important;
  min-height: 50px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-items: center !important;
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  flex-wrap: wrap !important;
}

/* ===== 自定义分类菜单 .micah-menu（黑底 / 全宽 / 15px 白字 / 居中） ===== */
.micah-menu {
  flex: 0 0 100% !important;
  width: 100% !important;
  background: #000 !important;
}
.micah-menu-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 50px !important;
}
.micah-menu-item {
  position: relative !important;
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
}
.micah-menu-link {
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 50px !important;
  height: 50px !important;
  padding: 0 18px !important;
  display: flex !important;
  align-items: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
.micah-menu-link:hover { color: #2fc283 !important; }
/* 有子分类的顶层项：文字右侧加向下小箭头（CSS 三角） */
.micah-menu-item--has > .micah-menu-link::after {
  content: "" !important;
  display: inline-block !important;
  margin-left: 6px !important;
  width: 0 !important;
  height: 0 !important;
  border-left: 4px solid transparent !important;
  border-right: 4px solid transparent !important;
  border-top: 5px solid #fff !important;
  vertical-align: middle !important;
}
.micah-menu-item--has:hover > .micah-menu-link::after {
  border-top-color: #2fc283 !important;
}
.micah-submenu {
  display: none !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  background: #000 !important;
  border-top: 3px solid #2fc283 !important;
  padding: 10px 14px !important;
  min-width: 220px !important;
  z-index: 1000 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35) !important;
}
.micah-menu-item:hover > .micah-submenu { display: block !important; }
.micah-submenu-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.micah-submenu-item { min-width: 200px !important; }
.micah-submenu-link {
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 7px 10px !important;
  display: block !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
.micah-submenu-link:hover { color: #2fc283 !important; }
.micah-submenu-l3 { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.micah-submenu-l3 li a {
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  padding: 5px 10px 5px 20px !important;
  display: block !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
.micah-submenu-l3 li a:hover { color: #2fc283 !important; }

/* ===== 移动端分类菜单（汉堡 + 下拉手风琴），仅手机显示 ===== */
.micah-mobile-menu {
  width: 100% !important;
  background: #000 !important;
}
.micah-mobile-panel { width: 100% !important; }
.micah-mobile-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  background: #000 !important;
  color: #fff !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border: 0 !important;
  list-style: none !important;
  outline: none !important;
}
.micah-mobile-toggle::-webkit-details-marker { display: none !important; }
.micah-burger { font-size: 20px !important; line-height: 1 !important; }
.micah-mobile-body {
  background: #000 !important;
  color: #fff !important;
  border-top: 2px solid #2fc283 !important;
  max-height: 75vh !important;
  overflow-y: auto !important;
}
.micah-mobile-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.micah-mobile-item { border-bottom: 1px solid #222 !important; }
.micah-mobile-link {
  display: block !important;
  padding: 13px 16px !important;
  color: #fff !important;
  font-size: 15px !important;
  text-decoration: none !important;
}
.micah-mobile-link:hover { color: #2fc283 !important; }
.micah-mobile-sub { list-style: none !important; margin: 0 !important; padding: 0 0 0 16px !important; }
.micah-mobile-sub a {
  display: block !important;
  padding: 10px 14px !important;
  color: #ddd !important;
  font-size: 14px !important;
  text-decoration: none !important;
}
.micah-mobile-sub a:hover { color: #2fc283 !important; }
.micah-mobile-sub2 { list-style: none !important; margin: 0 !important; padding: 0 0 0 16px !important; }
.micah-mobile-sub2 a { color: #bbb !important; font-size: 13px !important; }
/* 媒体查询兜底：桌面隐藏移动菜单、手机隐藏桌面菜单（不依赖 Bootstrap 工具类） */
@media (max-width: 767px) {
  .micah-menu { display: none !important; }
  /* 主题自带移动端汉堡 #menu-icon 已失效（ps_mainmenu 已卸载），隐藏，改用我们的 .micah-mobile-menu */
  #menu-icon,
  .tvmobile-view-menu { display: none !important; }
}
@media (min-width: 768px) {
  .micah-mobile-menu { display: none !important; }
}

/* ===== 滚动吸顶：只让“分类菜单”钉在顶部，顶栏随页面滚走 ===== */
/* 主题 theme.css 有 html,body{overflow-x:hidden!important}，会让 position:sticky 失效，
   故用 JS 在滚过顶栏后把 .micah-menu / .micah-mobile-menu 切到 position:fixed（相对视口），
   并给 #header 补 padding-bottom 占位，避免下方内容上移跳动。 */
.micah-menu.is-stuck,
.micah-mobile-menu.is-stuck {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 100000 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35) !important;
  will-change: transform !important;
}
/* 吸顶时菜单已被 JS 移到 body 下，这里只给 #header 补回菜单高度，防止下方内容上移跳动 */
body.menu-stuck #header {
  padding-bottom: 50px !important;
}
/* 滚动超过 150px：主题原生元素转黑底等（head 原生块已被隐藏，这里仅兜底） */
body.micah-scrolled #header .tvheader-top-info { display: none !important; }
body.micah-scrolled #header .tvcms-logo-search { display: none !important; }
body.micah-scrolled #header .tvheader-nav3-right-block { display: none !important; }

/* ===== 全站背景米白化（所有页面）：黑底换成米色 #d8d3c3，文字转深色（顶栏保留黑） ===== */
html,
body {
  background-color: #d8d3c3 !important;
}
body {
  color: #333 !important;
}
/* 主包裹层 / 区块背景透明，露出黑色画布（商品卡片、按钮等自带配色保留） */
body #wrapper,
body #content,
body .tvcms-full-layout,
body .tvcms-custom-theme,
body .tvcms-main,
body .container,
body .container-fluid,
body section,
body .tvcmsfooter,
body .tvcmsfooter-link {
  background-color: transparent !important;
}
/* 标题 / 正文 / 价格等翻深色，保证米白底可读 */
body h1, body h2, body h3,
body h4, body h5, body h6,
body .h1, body .h2, body .h3,
body .h4, body .h5, body .h6,
body p,
body .text-muted,
body .product-name, body .product-title,
body .product-description,
body .price, body .product-price,
body .regular-price,
body .section-title {
  color: #333 !important;
}

/* ===== 分类页等：主题配色/花纹包装层透明，露出黑底（去掉浅色 pattern 花纹块） ===== */
body .tvall-theme-content,
body [class*="tvtheme-background"],
body [class*="tvtheme-bgcolor"],
body [class*="tvtheme-color"],
body [class*="tvtheme-box"],
body [class*="tvtheme-pattern"] {
  background-color: transparent !important;
  background-image: none !important;
}

/* ===== 分类页左侧栏整体黑化：背景全透明露黑底，文字全白（分类树/品牌/筛选 全覆盖） ===== */
body #left-column,
body #left-column * {
  background-color: transparent !important;
}
body #left-column,
body #left-column a,
body #left-column .category-sub-link,
body #left-column .facet-title,
body #left-column .facet-label,
body #left-column *:not(input):not(select):not(textarea):not(button) {
  color: #333 !important;
}
body #left-column input[type="checkbox"],
body #left-column input[type="radio"] {
  accent-color: #2fc283 !important;
}
/* 隐藏左侧栏 品牌(manufacturer) 与 供应商(supplier) 两个筛选块 */
body #left-column .facet[data-type="manufacturer"],
body #left-column .facet[data-type="supplier"] {
  display: none !important;
}

/* ===== 分类/列表页：左侧保留分类导航，右侧商品每行 4 个，整体铺满全屏 ===== */
/* 列表页内容容器铺满整屏（去掉主题居中定宽） */
body.layout-left-column #wrapper .container {
  max-width: 100% !important;
  width: 100% !important;
}
/* 商品卡每行 4 个（桌面），平板 3、手机 2、超小 1，随屏幕缩放 */
body.layout-left-column .products.row > * {
  flex: 0 0 25% !important;
  max-width: 25% !important;
}
@media (max-width: 991px) {
  body.layout-left-column .products.row > * {
    flex: 0 0 33.3333% !important;
    max-width: 33.3333% !important;
  }
}
@media (max-width: 767px) {
  body.layout-left-column .products.row > * {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}
@media (max-width: 479px) {
  body.layout-left-column .products.row > * {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* ===== 商品卡片外框倒角 25px（覆盖主题默认 5px；外框自带 overflow:hidden，图片随外框一并裁切圆角） ===== */
.tvproduct-wrapper {
  border-radius: 25px !important;
}
/* 商品卡是白底：标题/描述/价格等文字改回深色，压过全站白字规则，避免白底白字看不见 */
.tvproduct-wrapper .tvproduct-title a,
.tvproduct-wrapper .product-title,
.tvproduct-wrapper .tvproduct-info-box .tvproduct-desc,
.tvproduct-wrapper .tvproduct-desc,
.tvproduct-wrapper .tvproduct-desc p,
.tvproduct-wrapper .tvproduct-price,
.tvproduct-wrapper .product-price,
.tvproduct-wrapper .price,
.tvproduct-wrapper .tvnew-price,
.tvproduct-wrapper .tvall-product-balance {
  color: #000 !important;
}
.tvproduct-wrapper .tvold-price {
  color: #999 !important;
}

/* ===== 全站其余模块页面黑化（cart/checkout/account/login/register/cms/contact/search/sitemap 等） =====
   商品卡(.tvproduct-wrapper) 保持白底不变；这里只黑化其它模块容器与文字 */
body .card,
body .card-block,
body .box,
body .block,
body .panel,
body .table,
body .table-striped > tbody > tr,
body .cart-summary,
body .cart-grid,
body .checkout-step,
body .account-block,
body .link-item,
body .login-form,
body .register-form,
body .contact-form,
body .cms-page,
body .rte,
body .sitemap,
body .address-form,
body .order-confirmation-table {
  background-color: transparent !important;
  color: #333 !important;
}
/* 表格斑马纹去浅底、白字、深边框 */
body .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: transparent !important;
}
body .table td,
body .table th {
  border-color: #ddd !important;
  color: #333 !important;
}
/* 表单控件（输入框/下拉/文本域）黑底白字 + 可见边框，保证登录/结算/购物车/联系表单可读 */
body .form-control,
body input.form-control,
body select.form-control,
body textarea.form-control {
  background-color: #fff !important;
  color: #333 !important;
  border-color: #ddd !important;
}
body .form-control::placeholder { color: #999 !important; }
/* alert 提示框白底深字（米白主题下可读） */
body .alert {
  background-color: #fff !important;
  color: #333 !important;
  border-color: #ddd !important;
}
/* 模块容器 / 表单控件统一 10px 圆角，去掉直角 */
body .card,
body .card-block,
body .box,
body .block,
body .panel,
body .table,
body .cart-summary,
body .cart-grid,
body .checkout-step,
body .account-block,
body .link-item,
body .login-form,
body .register-form,
body .contact-form,
body .cms-page,
body .rte,
body .sitemap,
body .address-form,
body .order-confirmation-table,
body .alert,
body .form-control,
body input.form-control,
body select.form-control,
body textarea.form-control {
  border-radius: 10px !important;
}
/* 隐藏页头上方面包屑导航（主页 / 分类 路径） */
.breadcrumb {
  display: none !important;
}
/* 去掉页头顶部条(.tvcmsheader-top) 的浅色底边与浅灰底，融入黑底，消除顶部残留白线 */
body .tvcmsheader-top {
  border-bottom: none !important;
  background-color: transparent !important;
}

/* ===== 页脚：填充黑色 + 文字转白（顶/底黑、中间米色，统一） ===== */
body #footer,
body #footer .tvcmscontainer-layout.tvfooter,
body #footer .tvcmscontainer-layout.tvfooter-link,
body #footer .tvcmsfooter,
body #footer .tvfooter,
body #footer .tvcmsfooter-link,
body #footer .tvfooter-content-box {
  background-color: #000 !important;
}
body #footer,
body #footer * {
  color: #fff !important;
}
body #footer a:hover {
  color: #2fc283 !important;
}
/* 删除页脚 APP 下载块（tvapp-logo-content-box），保留社交图标 */
body #footer .tvapp-logo-content-box {
  display: none !important;
}
