/* 商城前台 — 演示站风格布局 */

/* PC 端拉宽内容区，减少两侧留白 */
@media (min-width: 901px) {
  .store-page {
    --container-max: 1480px;
  }

  .store-page .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mall-header__main,
  .mall-topbar__inner,
  .mall-nav-row,
  .mall-nav {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mall-home-layout {
    --mall-side-w: 272px;
    grid-template-columns: 1fr;
    column-gap: 18px;
    row-gap: 10px;
  }

  .mall-hero {
    column-gap: 18px;
  }

  .mall-cat-row {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    column-gap: 18px;
  }

  .mall-search {
    max-width: none;
  }

  .mall-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
  }
}

@media (min-width: 1500px) {
  .store-page {
    --container-max: 1600px;
  }

  .mall-home-layout {
    --mall-side-w: 288px;
    grid-template-columns: 1fr;
    column-gap: 20px;
  }

  .mall-hero {
    column-gap: 20px;
  }

  .mall-cat-row {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    column-gap: 20px;
  }
}

/* 顶栏固定：滚动时始终贴在视口顶部（高度由 JS 写入 --mall-header-offset） */
body.store-page:not([data-store-layout='auth']) {
  padding-top: var(--mall-header-offset, 148px);
}

/* 页脚贴底：内容不足一屏时版权信息仍贴在视口底部 */
body.store-page:not([data-store-layout='auth']):not([data-store-layout='focus']):not([data-store-layout='off']):not([data-store-layout='false']) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body.store-page #storeFooter {
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
}

body.store-page #storeBottomNav {
  flex-shrink: 0;
}

body.store-page .mall-page,
body.store-page .mall-home,
body.store-page .policy-page {
  flex: 1 0 auto;
  width: 100%;
}

.mall-home-top-banner {
  width: 100%;
  line-height: 0;
  background: #f8fafc;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 201;
}

.mall-home-top-banner[hidden] {
  display: none !important;
  position: static;
}

.mall-home-top-banner__link,
.mall-home-top-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72px;
  object-fit: cover;
  object-position: center;
}

.mall-header:not(.mall-header--auth) {
  background: linear-gradient(180deg, var(--mall-home-top-color, #1d86ea) 0%, var(--mall-home-top-color-end, #1677df) 100%);
  border-bottom: 0;
  position: fixed;
  top: var(--home-top-banner-height, 0px);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(4, 72, 145, 0.25);
}

.mall-header--auth {
  position: relative;
  z-index: 200;
}

/* CRMEB 风格顶栏（白底三行，内容区 1200px） */
.mall-header.mall-header--crmeb:not(.mall-header--auth) {
  --crmeb-red: #e93323;
  --crmeb-red-hover: #d42d1f;
  --crmeb-header-w: 1200px;
  --crmeb-topbar-h: 30px;
  --crmeb-search-h: 42px;
  --crmeb-nav-h: 46px;
  background: #fff;
  box-shadow: none;
  border-bottom: 1px solid #eee;
}

.mall-header--crmeb .container {
  max-width: var(--crmeb-header-w);
  box-sizing: border-box;
}

.mall-header--crmeb .mall-topbar {
  background: #f5f5f5;
  border-bottom: 1px solid #ebebeb;
  color: #999;
  font-size: 12px;
  line-height: var(--crmeb-topbar-h);
}

.mall-header--crmeb .mall-topbar__inner {
  min-height: var(--crmeb-topbar-h);
}

.mall-header--crmeb .mall-topbar__left {
  gap: 18px;
  align-items: center;
}

.mall-header--crmeb .mall-topbar__select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mall-header--crmeb .mall-topbar__select-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 12px;
  font-weight: 400;
  line-height: var(--crmeb-topbar-h);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  white-space: nowrap;
}

.mall-header--crmeb .mall-topbar__select-btn:hover {
  color: var(--crmeb-red);
}

.mall-header--crmeb .mall-topbar__flag {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}

.mall-header--crmeb .mall-topbar__select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 148px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  z-index: 240;
  padding: 4px 0;
  border-radius: 2px;
}

.mall-header--crmeb .mall-topbar__select-menu[hidden] {
  display: none !important;
}

.mall-header--crmeb .mall-topbar__select-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.mall-header--crmeb .mall-topbar__select-item:hover,
.mall-header--crmeb .mall-topbar__select-item.is-active {
  background: #fafafa;
  color: var(--crmeb-red);
}

.mall-header--crmeb #mallCurrencySelect .mall-topbar__select-menu {
  min-width: 168px;
}

.mall-header--crmeb .mall-topbar__right {
  gap: 0;
}

.mall-header--crmeb .mall-topbar__link {
  color: #999;
  font-size: 12px;
  font-weight: 400;
  line-height: var(--crmeb-topbar-h);
  text-decoration: none;
  transition: color 0.15s ease;
}

.mall-header--crmeb .mall-topbar__link:hover {
  color: var(--crmeb-red);
  text-decoration: none;
}

.mall-header--crmeb .mall-topbar__link--icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mall-header--crmeb .mall-topbar__ico {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #b3b3b3;
}

.mall-header--crmeb .mall-topbar__link--icon:hover .mall-topbar__ico {
  color: var(--crmeb-red);
}

.mall-header--crmeb .mall-topbar__sep {
  display: inline-block;
  width: 1px;
  height: 10px;
  margin: 0 14px;
  background: #ddd;
  vertical-align: middle;
  flex-shrink: 0;
}

.mall-header--crmeb .mall-topbar__drop {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mall-header--crmeb .mall-topbar__caret {
  font-style: normal;
  font-size: 10px;
  margin-left: 3px;
  color: #bbb;
  transform: scale(0.85);
  display: inline-block;
}

.mall-header--crmeb .mall-topbar__select-btn:hover .mall-topbar__caret,
.mall-header--crmeb .mall-topbar__link--drop:hover .mall-topbar__caret {
  color: var(--crmeb-red);
}

.mall-header--crmeb .mall-topbar__drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  min-width: 110px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 220;
}

.mall-header--crmeb .mall-topbar__drop-menu a {
  display: block;
  padding: 9px 14px;
  color: #666;
  font-size: 12px;
  white-space: nowrap;
}

.mall-header--crmeb .mall-topbar__drop-menu a:hover {
  background: #fafafa;
  color: var(--crmeb-red);
}

.mall-header--crmeb .mall-topbar__drop:hover .mall-topbar__drop-menu,
.mall-header--crmeb .mall-topbar__drop:focus-within .mall-topbar__drop-menu {
  display: block;
}

.mall-header__mob-top {
  display: none;
}

.mall-logo-wrap--mob {
  display: none;
}

.mall-mob-locale {
  display: none;
}

.mall-header--crmeb .mall-header__main {
  grid-template-columns: 200px minmax(0, 1fr) auto;
  align-items: center;
  padding: 22px 0 18px;
  gap: 28px 36px;
}

.mall-logo-wrap {
  width: 200px;
  flex-shrink: 0;
}

.mall-header--crmeb .mall-logo {
  color: #282828;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: none;
}

.mall-header--crmeb .site-logo__img {
  height: 52px;
  max-width: 200px;
  object-fit: contain;
}

.mall-header--crmeb .mall-search--crmeb {
  max-width: none;
  width: 100%;
  margin: 0;
}

.mall-header--crmeb .mall-search__row {
  --mall-search-pill-r: 9999px;
  height: var(--crmeb-search-h);
  border: 1px solid var(--crmeb-red);
  border-radius: var(--mall-search-pill-r);
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}

.mall-header--crmeb .mall-search__cat {
  border-right-color: #e8e8e8;
  background: #fff;
  border-radius: var(--mall-search-pill-r) 0 0 var(--mall-search-pill-r);
}

.mall-header--crmeb .mall-search__select {
  min-width: 86px;
  padding-left: 18px;
  padding-right: 28px;
  font-size: 14px;
  color: #333;
  height: var(--crmeb-search-h);
  line-height: var(--crmeb-search-h);
  background: transparent;
}

.mall-header--crmeb .mall-search__input {
  height: var(--crmeb-search-h);
  line-height: var(--crmeb-search-h);
  font-size: 14px;
  color: #333;
  background: #fff;
}

.mall-header--crmeb .mall-search__input::placeholder {
  color: #bbb;
}

/* 右侧搜索钮与胶囊右端同高，形成圆弧 */
.mall-header--crmeb .mall-search__btn {
  width: var(--crmeb-search-h);
  min-width: var(--crmeb-search-h);
  height: var(--crmeb-search-h);
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: var(--crmeb-red);
  flex-shrink: 0;
}

.mall-header--crmeb .mall-search__btn:hover {
  background: var(--crmeb-red-hover);
}

.mall-header--crmeb .mall-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  height: var(--crmeb-search-h);
  border: 1px solid #dcdcdc;
  border-radius: 9999px;
  color: var(--crmeb-red);
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  background: #fff;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mall-header--crmeb .mall-cart-btn:hover {
  background: #fff8f7;
  border-color: var(--crmeb-red);
  color: var(--crmeb-red-hover);
}

.mall-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  height: var(--crmeb-search-h, 42px);
  border: 1px solid var(--crmeb-red, #e93323);
  border-radius: 9999px;
  color: var(--crmeb-red, #e93323);
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mall-cart-btn:hover {
  background: #fff8f7;
  border-color: var(--crmeb-red-hover, #d42d1f);
  color: var(--crmeb-red-hover, #d42d1f);
}

.mall-cart-btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mall-cart-btn__text {
  font-weight: 400;
}

.mall-nav-row {
  display: flex;
  align-items: stretch;
  border-top: none;
  padding: 0;
  min-height: var(--crmeb-nav-h, 46px);
  max-width: var(--crmeb-header-w, 1200px);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.mall-header--crmeb .mall-nav__leading {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
}

.mall-header--crmeb .mall-nav__cats {
  position: relative;
  flex-shrink: 0;
}

.mall-header--crmeb .mall-nav__cats-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--crmeb-nav-h);
  padding: 0;
  border: none;
  letter-spacing: 0.02em;
  font-size: 15px;
  text-decoration: none;
}

/* 首页 — 红色按钮 */
.mall-header--crmeb .mall-nav__home-btn {
  width: 136px;
  background: var(--crmeb-red);
  color: #fff;
  font-weight: 500;
}

.mall-header--crmeb .mall-nav__home-btn:hover,
.mall-header--crmeb .mall-nav__home-btn.is-active {
  background: var(--crmeb-red-hover);
  color: #fff;
}

/* 全部分类 — 与右侧导航文字样式一致，无红底 */
.mall-header--crmeb .mall-nav__cats .mall-nav__cats-btn {
  width: auto;
  min-width: 0;
  padding: 0 20px;
  background: transparent;
  color: #282828;
  font-weight: 400;
}

.mall-header--crmeb .mall-nav__cats .mall-nav__cats-btn:hover,
.mall-header--crmeb .mall-nav__cats .mall-nav__cats-btn.is-active {
  color: var(--crmeb-red);
  background: transparent;
}

.mall-header--crmeb .mall-nav__cats-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mall-header--crmeb .mall-nav {
  flex: 1;
  justify-content: flex-start;
  border-top: none;
  padding: 0 0 0 4px;
  margin: 0;
  min-height: var(--crmeb-nav-h);
  gap: 0;
  flex-wrap: nowrap;
}

.mall-header--crmeb .mall-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  height: var(--crmeb-nav-h);
  line-height: var(--crmeb-nav-h);
  border-radius: 0;
  font-size: 15px;
  font-weight: 400;
  color: #282828;
  white-space: nowrap;
  text-decoration: none;
}

.mall-header--crmeb .mall-nav__icon {
  display: none;
}

.mall-header--crmeb .mall-nav__text {
  display: inline;
}

.mall-header--crmeb .mall-nav__link:hover,
.mall-header--crmeb .mall-nav__link.is-active {
  color: var(--crmeb-red);
  background: transparent;
}

.mall-nav__cats .mall-nav__dropdown {
  top: 100%;
  left: 0;
  min-width: 136px;
}

.mall-nav__cats.is-open .mall-nav__dropdown,
.mall-nav__cats:hover .mall-nav__dropdown {
  display: block;
}

html.store-header-light .mall-header--crmeb .mall-logo,
html.store-header-light .mall-header--crmeb .mall-nav__link {
  font-size: inherit;
  font-weight: inherit;
}

/* 浅色顶栏：左侧语言/货币与右侧「我的账户」等链接完全一致 */
.store-header-light .mall-header--crmeb .mall-topbar,
.store-header-light .mall-header--crmeb .mall-topbar__link,
.store-header-light .mall-header--crmeb .mall-topbar__select-btn {
  color: #111827;
  font-size: 18px;
  font-weight: 600;
}

.store-header-light .mall-header--crmeb .mall-topbar__inner {
  min-height: 42px;
}

.store-header-light .mall-header--crmeb .mall-topbar__link,
.store-header-light .mall-header--crmeb .mall-topbar__select-btn {
  line-height: 42px;
}

.store-header-light .mall-header--crmeb .mall-topbar__flag {
  font-size: 18px;
}

.store-header-light .mall-header--crmeb .mall-topbar__caret {
  color: #6b7280;
  font-size: 11px;
}

.store-header-light .mall-header--crmeb .mall-topbar__link:hover,
.store-header-light .mall-header--crmeb .mall-topbar__select-btn:hover {
  color: #0f172a;
}

body.store-header-crmeb {
  padding-top: var(--mall-header-offset, 158px);
}

/* 用户中心手机页：无商城顶栏，禁止顶栏占位留白 */
@media (max-width: 768px) {
  body.store-page--user-center:not([data-store-layout='auth']) {
    padding-top: 0 !important;
  }
}

/* 顶栏为浅色（如白色）时 — 深色文字保证可读 */
.store-header-light .mall-header {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
}

.store-header-light .mall-topbar {
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  border-bottom: none;
}

.store-header-light .mall-topbar__inner {
  min-height: 42px;
}

.store-header-light .mall-topbar__item,
.store-header-light .mall-topbar__select,
.store-header-light .mall-topbar__link,
.store-header-light .mall-topbar__select-btn {
  color: #111827;
  font-size: 18px;
  font-weight: 600;
}

.store-header-light .mall-topbar__link:hover {
  color: #0f172a;
}

.store-header-light .mall-logo {
  color: #0f172a;
  font-size: 1.45rem;
  font-weight: 800;
  text-shadow: none;
}

.store-header-light .mall-icon-btn {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

.store-header-light .mall-icon-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.store-header-light .mall-icon-btn__label {
  font-size: 18px;
  font-weight: 700;
}

.store-header-light .mall-icon-btn__badge {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.store-header-light .mall-nav {
  border-top: none;
}

.store-header-light .mall-nav {
  min-height: 48px;
}

.store-header-light .mall-nav__link {
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.store-header-light .mall-nav__link:hover,
.store-header-light .mall-nav__link.is-active {
  color: #020617;
  font-size: 18px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.1);
}

.mall-topbar {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.92);
}

.mall-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}

.mall-topbar__sep {
  margin: 0 8px;
  opacity: 0.5;
}

.mall-topbar__left,
.mall-topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mall-topbar__select i {
  font-style: normal;
  margin-left: 2px;
  font-size: 10px;
}

.mall-topbar__link:hover {
  color: #fff;
  text-decoration: underline;
}

.mall-header__main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px 22px;
  padding: 12px 20px 10px;
}

.mall-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.mall-search {
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
}

.mall-search__row {
  display: flex;
  align-items: stretch;
  border: 1px solid #dce1e8;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  height: 38px;
  box-shadow: none;
}

.mall-search__cat {
  position: relative;
  flex-shrink: 0;
  border-right: 1px solid #e8ebf0;
  background: #fff;
}

.mall-search__cat::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -1px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #b0b8c4;
  pointer-events: none;
}

.mall-search__select {
  border: none;
  margin: 0;
  padding: 0 30px 0 14px;
  background: transparent;
  color: #1f2937;
  min-width: 78px;
  width: 100%;
  outline: none;
  font-size: 12px;
  line-height: 38px;
  height: 38px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.mall-search__input {
  flex: 1;
  border: none;
  padding: 0 14px;
  min-width: 0;
  outline: none;
  font-size: 12px;
  color: #111827;
  height: 38px;
  line-height: 38px;
  background: #fff;
}

.mall-search__input::placeholder {
  color: #a8b0bc;
  font-weight: 400;
}

.mall-search__btn {
  border: none;
  background: #e62e04;
  color: #fff;
  width: 48px;
  min-width: 48px;
  height: 38px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0 3px 3px 0;
  transition: background 0.15s ease;
}

.mall-search__btn:hover {
  background: #d42804;
}

.mall-search__btn-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.mall-header__icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mall-icon-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 6px 10px 6px 8px;
  border-radius: 2px;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  position: relative;
  white-space: nowrap;
}

.mall-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mall-icon-btn__wrap {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.mall-icon-btn__glyph {
  width: 22px;
  height: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mall-icon-btn__glyph svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mall-icon-btn__label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  padding-top: 1px;
}

.mall-icon-btn__badge {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.mall-icon-btn__badge.is-zero {
  display: none;
}

.mall-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  flex-wrap: wrap;
  min-height: 44px;
  align-items: center;
}

.mall-nav__link {
  padding: 8px 20px;
  border-radius: 0;
  font-size: 13px;
  color: #dbeafe;
  font-weight: 600;
}

.mall-nav__link:hover,
.mall-nav__link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.mall-nav__item--cats {
  position: relative;
}

.mall-nav__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  min-width: 220px;
  max-width: 280px;
  z-index: 400;
}

.mall-nav__item--cats.is-open .mall-nav__dropdown,
.mall-nav__item--cats:hover .mall-nav__dropdown {
  display: block;
}

.mall-nav__dropdown-inner {
  background: #fff;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  border: 1px solid #e5e7eb;
  border-top: 0;
  padding: 6px 0;
  max-height: 360px;
  overflow-y: auto;
}

.mall-nav__dropdown-all,
.mall-nav__dropdown-link {
  display: block;
  padding: 9px 16px;
  font-size: 12px;
  color: #374151;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mall-nav__dropdown-all {
  font-weight: 600;
  color: #111827;
  border-bottom: 1px solid #f0f2f5;
  margin-bottom: 4px;
}

.mall-nav__dropdown-link:hover,
.mall-nav__dropdown-all:hover {
  background: #f8fafc;
  color: #e62e04;
}

.mall-nav__dropdown-link--child {
  font-size: 11px;
  color: #6b7280;
}

.mall-nav__dropdown-empty {
  margin: 0;
  padding: 12px 16px;
  font-size: 12px;
  color: #9ca3af;
}

/* 首页主体 */
.store-page--home {
  background: #eef1f6;
}

.mall-home {
  padding: 16px 0 48px;
}

.mall-home-layout {
  --mall-side-w: 248px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 16px;
  row-gap: 10px;
  align-items: start;
}

/* 类别 + 轮播：轮播在流内决定高度，侧栏绝对定位铺满同高 */
.mall-hero {
  --mall-hero-gap: 16px;
  grid-column: 1;
  grid-row: 1;
  position: relative;
  min-width: 0;
  padding-left: calc(var(--mall-side-w) + var(--mall-hero-gap));
}

/* 左侧分类栏 — 与轮播框同高（top/bottom 锚定 mall-hero），列表内部滚动 */
.mall-side-cats {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--mall-side-w);
  background: #fff;
  border: 1px solid #e8ebf0;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 2;
}

.mall-side-cats__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: #f8d4d6;
  border-bottom: 1px solid #f0c4c8;
}

.mall-side-cats__head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

.mall-side-cats__more {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  white-space: nowrap;
}

.mall-side-cats__more:hover {
  color: #e62e04;
}

.mall-side-cats__list {
  list-style: none;
  margin: 0;
  padding: 6px 0 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.mall-side-cats__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  transition: background 0.12s ease, color 0.12s ease;
}

.mall-side-cats__link:hover {
  background: #f9fafb;
  color: #0f172a;
}

.mall-side-cats__thumb {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 2px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eceff3;
}

.mall-side-cats__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mall-side-cats__thumb.is-letter,
.mall-side-cats__thumb:empty {
  background: #fff5f5;
}

.mall-side-cats__letter {
  font-size: 14px;
  font-weight: 700;
  color: #e62e04;
}

.mall-side-cats__name {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.mall-side-cats__loading,
.mall-side-cats__empty {
  padding: 16px 14px;
  font-size: 12px;
  color: #9ca3af;
}

/* 轮播 */
.mall-banner-wrap {
  position: relative;
  margin: 0;
  min-width: 0;
  width: 100%;
}

.mall-banner {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: #f3ebe4;
  aspect-ratio: 2.35 / 1;
  min-height: 200px;
}

.mall-banner__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  display: block;
}

.mall-banner__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.mall-banner__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mall-banner__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  background: linear-gradient(135deg, #f7efe8 0%, #efe4dc 100%);
  color: #1f2937;
  font-size: 1.25rem;
}

.mall-banner__ph strong {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mall-banner__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #374151;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
}

.mall-banner__arrow:hover {
  background: #fff;
}

.mall-banner__arrow--prev {
  left: 12px;
}

.mall-banner__arrow--next {
  right: 12px;
}

@media (min-width: 769px) {
  .mall-banner__arrow {
    display: none;
    pointer-events: none;
  }
}

.mall-banner__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.mall-banner__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.mall-banner__dot.is-active {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* 底部分类宫格 — 与左侧类别框左缘齐平 */
.mall-cat-row {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 10px;
  margin: 0;
  min-width: 0;
  align-self: start;
}

.mall-home-bottom {
  grid-column: 1 / -1;
  grid-row: 3;
  min-width: 0;
}

.mall-home-bottom .mall-home-promo {
  margin-bottom: 20px;
}

.mall-home-bottom #homeFlash {
  margin-bottom: 24px;
}

.mall-home-bottom #homeFlash[hidden] {
  display: none !important;
  margin-bottom: 0;
}

.mall-cat-card {
  background: #fff;
  border: 1px solid #e8ebf0;
  border-radius: 4px;
  padding: 0;
  text-align: center;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.mall-cat-card:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.mall-cat-card__img {
  aspect-ratio: 1;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #f0f2f5;
}

.mall-cat-card__img img {
  width: auto;
  height: auto;
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
  object-position: center center;
}

.mall-cat-card__letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 22px;
  font-weight: 700;
  color: #e62e04;
}

.mall-cat-card__name {
  display: block;
  padding: 10px 6px 12px;
  font-size: 12px;
  line-height: 1.35;
  color: #374151;
}

.mall-cat-card--more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  background: #fff;
  border: 1px solid #e8ebf0;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  text-align: center;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.mall-cat-card--more:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.mall-cat-card--more .mall-cat-card__more-text {
  font-size: 22px;
  font-weight: 700;
  color: #e62e04;
  line-height: 1.2;
}

.mall-cat-card--more:hover .mall-cat-card__more-text {
  color: #c92603;
}

.mall-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mall-section-title {
  margin: 0;
  font-size: 1.25rem;
}

.mall-section-more {
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.mall-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.mall-product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}

.mall-product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.mall-product-card__img {
  aspect-ratio: 1;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mall-product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mall-product-card__ph {
  color: #9ca3af;
  font-size: 0.8125rem;
}

.mall-product-card__body {
  padding: 12px 14px 16px;
}

.mall-product-card__title {
  margin: 0 0 8px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.mall-product-card__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0;
}

.mall-product-card__price {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-primary);
}

.mall-product-card__price-old {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #9ca3af;
  text-decoration: line-through;
}

.mall-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px 16px;
}

.mall-footer {
  margin-top: 0;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.mall-footer--compact {
  margin-top: 0;
  padding: 20px 0 28px;
  text-align: center;
}

.mall-footer--compact .site-footer__copy {
  margin: 0;
}

.mall-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.mall-footer__col h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.mall-footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mall-footer__links a:hover {
  color: var(--color-primary);
}

.mall-footer__subscribe {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.mall-footer__subscribe input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.mall-footer__muted {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin: 0 0 8px;
}

/* 底部导航 */
.mall-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  background: #fff;
  border-top: 1px solid var(--color-border);
  padding-bottom: env(safe-area-inset-bottom, 0);
  align-items: stretch;
}

body.has-mall-bottom-nav {
  padding-bottom: calc(68px + env(safe-area-inset-bottom, 0));
}

.mall-bottom-nav__item {
  flex: 1 1 0;
  min-width: 0;
  max-width: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding: 6px 1px 8px;
  min-height: 54px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  position: relative;
  overflow: visible;
  text-align: center;
  text-decoration: none;
}

.mall-bottom-nav__item > span[data-i18n] {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-overflow: clip;
  font-size: clamp(0.6875rem, 2.8vw, 0.8125rem);
}

.mall-bottom-nav__item.is-active {
  color: var(--color-primary);
}

.mall-bottom-nav__icon {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  font-size: 1.125rem;
}

.mall-bottom-nav__icon-img {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.mall-bottom-nav__icon--single .mall-bottom-nav__icon-img {
  position: static;
}

.mall-bottom-nav__icon-img--on {
  display: none;
}

.mall-bottom-nav__item.is-active .mall-bottom-nav__icon-img:not(.mall-bottom-nav__icon-img--on) {
  display: none;
}

.mall-bottom-nav__item.is-active .mall-bottom-nav__icon-img--on {
  display: block;
}

.mall-bottom-nav__badge {
  position: absolute;
  top: 2px;
  right: 50%;
  margin-right: -18px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.625rem;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mall-bottom-nav__badge.is-zero {
  display: none;
}

@media (max-width: 1100px) {
  .mall-home-layout {
    --mall-side-w: 220px;
    grid-template-columns: 1fr;
  }

  .mall-cat-row {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mall-home-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .mall-hero {
    display: block;
    padding-left: 0;
  }

  .mall-side-cats {
    display: none;
  }

  .mall-hero,
  .mall-cat-row,
  .mall-home-bottom {
    grid-column: 1;
    grid-row: auto;
  }

  .mall-cat-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .mall-banner {
    min-height: 160px;
  }

  .mall-header__main {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .mall-logo,
  .mall-logo-wrap {
    grid-column: 1;
  }

  .mall-header--crmeb .mall-header__main {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    padding: 12px 14px 10px;
    gap: 10px 12px;
  }

  .mall-header--crmeb .mall-logo-wrap {
    width: auto;
    max-width: 140px;
  }

  .mall-header--crmeb .site-logo__img {
    height: 40px;
  }

  .mall-header--crmeb .mall-cart-btn {
    grid-column: 2;
    grid-row: 1;
    padding: 0 14px;
    height: 36px;
    font-size: 12px;
    border-radius: 9999px;
  }

  .mall-header--crmeb .mall-search--crmeb {
    grid-column: 1 / -1;
  }

  .mall-header--crmeb .mall-search__row {
    --crmeb-search-h: 36px;
    border-radius: 9999px;
  }

  .mall-header--crmeb .mall-search__btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .mall-header--crmeb .mall-nav-row {
    flex-wrap: nowrap;
    padding: 0 10px;
    max-width: none;
  }

  .mall-header--crmeb .mall-nav__home-btn {
    width: 108px;
    font-size: 14px;
  }

  .mall-header--crmeb .mall-nav__cats .mall-nav__cats-btn {
    padding: 0 14px;
    font-size: 14px;
  }

  .mall-header--crmeb .mall-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-left: 0;
  }

  .mall-header--crmeb .mall-nav__link {
    padding: 0 14px;
    font-size: 14px;
  }

  .mall-header--crmeb .mall-topbar__sep {
    margin: 0 10px;
  }

  .mall-search {
    grid-column: 1 / -1;
    max-width: none;
  }

  .mall-icon-btn__label {
    display: none;
  }

  .mall-icon-btn {
    padding: 6px;
  }

  .mall-search__cat {
    min-width: 68px;
  }

  .mall-search__select {
    min-width: 68px;
    padding-right: 26px;
  }

  .mall-search__btn {
    width: 44px;
    min-width: 44px;
  }
}

@media (max-width: 768px) {
  .mall-bottom-nav {
    display: flex;
  }

  .mall-cat-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .mall-topbar__left {
    display: none;
  }

  .mall-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

}
