/**
 * 首页视觉 — 轻盈、有活力（仅 index / .store-page--home）
 */
.store-page--home {
  --home-bg: #f4f7fc;
  --home-surface: #ffffff;
  --home-text: #1e293b;
  --home-muted: #64748b;
  --home-accent: #ff4d2e;
  --home-accent-soft: rgba(255, 77, 46, 0.1);
  --home-radius: 14px;
  --home-radius-sm: 10px;
  --home-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --home-shadow-hover: 0 12px 32px rgba(15, 23, 42, 0.1);
  background: linear-gradient(180deg, #f8fafc 0%, var(--home-bg) 120px, #eef2f8 100%);
  font-size: 15px;
  line-height: 1.55;
  color: var(--home-text);
  -webkit-font-smoothing: antialiased;
}

.store-page--home .mall-home {
  padding: 20px 0 56px;
}

.store-page--home .mall-home-layout {
  row-gap: 18px;
  column-gap: 20px;
}

.store-page--home .mall-hero {
  --mall-hero-gap: 20px;
}

/* —— 顶栏（首页略收紧，更轻盈；CRMEB 顶栏保持标准样式） —— */
.store-page--home.store-header-light:not(.store-header-crmeb) .mall-topbar,
.store-page--home.store-header-light:not(.store-header-crmeb) .mall-topbar__item,
.store-page--home.store-header-light:not(.store-header-crmeb) .mall-topbar__select,
.store-page--home.store-header-light:not(.store-header-crmeb) .mall-topbar__link {
  font-size: 14px;
  font-weight: 500;
}

.store-page--home.store-header-light:not(.store-header-crmeb) .mall-icon-btn,
.store-page--home.store-header-light:not(.store-header-crmeb) .mall-icon-btn__label {
  font-size: 14px;
  font-weight: 600;
}

.store-page--home.store-header-light:not(.store-header-crmeb) .mall-nav__link {
  font-size: 16px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.store-page--home.store-header-light:not(.store-header-crmeb) .mall-nav__link:hover,
.store-page--home.store-header-light:not(.store-header-crmeb) .mall-nav__link.is-active {
  font-size: 16px;
  font-weight: 600;
  background: var(--home-accent-soft);
  color: var(--home-accent);
}

/* —— 左侧分类 —— */
.store-page--home .mall-side-cats {
  background: var(--home-surface);
  border: none;
  border-radius: var(--home-radius);
  box-shadow: var(--home-shadow);
}

.store-page--home .mall-side-cats__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.store-page--home .mall-side-cats__head {
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff0f3 0%, #ffe8ec 100%);
  border-bottom: none;
}

.store-page--home .mall-side-cats__head h3 {
  font-size: 16px;
  font-weight: 700;
  color: #be123c;
  letter-spacing: 0.02em;
}

.store-page--home .mall-side-cats__more {
  font-size: 13px;
  font-weight: 600;
  color: var(--home-accent);
}

.store-page--home .mall-side-cats__list {
  padding: 8px 8px 12px;
}

.store-page--home .mall-side-cats__link {
  padding: 10px 12px;
  border-radius: var(--home-radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--home-text);
}

.store-page--home .mall-side-cats__link:hover {
  background: #f8fafc;
  color: var(--home-accent);
}

.store-page--home .mall-side-cats__thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: #f1f5f9;
}

.store-page--home .mall-side-cats__name {
  font-size: 15px;
  font-weight: 500;
}

/* —— 轮播 —— */
.store-page--home .mall-banner-wrap {
  border-radius: var(--home-radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.store-page--home .mall-banner {
  border-radius: var(--home-radius);
  min-height: 220px;
}

.store-page--home .mall-banner__ph {
  font-size: 1.125rem;
  font-weight: 500;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fce7f3 100%);
}

.store-page--home .mall-banner__arrow {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.92);
}

.store-page--home .mall-banner__dot.is-active {
  width: 20px;
  border-radius: 999px;
  background: var(--home-accent);
}

/* —— 分类宫格 —— */
.store-page--home .mall-cat-row {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 10px;
}

.store-page--home .mall-cat-card {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.05);
}

.store-page--home .mall-cat-card__img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 0;
  padding: 12px 8px 6px;
  aspect-ratio: auto;
  border-bottom: none;
  background: transparent;
}

/* 正方形 logo + 圆角 */
.store-page--home .mall-cat-card__img img {
  display: block;
  width: 92px;
  height: 92px;
  max-width: 92px;
  max-height: 92px;
  border-radius: 14px;
  object-fit: cover;
  object-position: center center;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.store-page--home .mall-cat-card__img .mall-cat-card__letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 14px;
  font-size: 28px;
  font-weight: 700;
  color: #e62e04;
  background: linear-gradient(145deg, #fff7ed 0%, #fff1f2 100%);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.store-page--home .mall-cat-card__name {
  padding: 8px 6px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--home-text);
}

.store-page--home .mall-cat-card--more {
  border: none;
  min-height: 0;
  background: linear-gradient(145deg, #fff5f5 0%, #fff 100%);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.05);
}

.store-page--home .mall-cat-card--more .mall-cat-card__more-text {
  font-size: 15px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .store-page--home .mall-cat-row {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .store-page--home .mall-cat-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .store-page--home .mall-cat-card__img img,
  .store-page--home .mall-cat-card__img .mall-cat-card__letter {
    width: 72px;
    height: 72px;
    max-width: 72px;
    max-height: 72px;
    border-radius: 12px;
  }

  .store-page--home .mall-cat-card__img .mall-cat-card__letter {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  .store-page--home .mall-cat-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* —— 秒杀上方三图推广 —— */
.store-page--home .mall-home-promo {
  margin-bottom: 20px;
}

.store-page--home .mall-home-promo--mid {
  margin-top: 8px;
  margin-bottom: 28px;
}

.store-page--home .mall-home-promo--shop-street {
  margin-top: 4px;
  margin-bottom: 22px;
}

.store-page--home .mall-home-promo[hidden] {
  display: none !important;
  margin-bottom: 0;
}

.store-page--home .mall-home-promo__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.store-page--home .mall-home-promo__item {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-page--home a.mall-home-promo__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.store-page--home .mall-home-promo__item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center;
}

.store-page--home .mall-home-promo__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
}

@media (max-width: 768px) {
  .store-page--home .mall-home-promo__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .store-page--home .mall-home-promo__item img {
    aspect-ratio: 16 / 9;
  }
}

/* —— 区块标题 —— */
.store-page--home .mall-section-head {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.store-page--home .mall-section-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--home-text);
  position: relative;
  padding-left: 14px;
}

.store-page--home .mall-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--home-accent) 0%, #fb923c 100%);
}

.store-page--home .mall-section-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--home-accent);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--home-accent-soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.store-page--home .mall-section-more:hover {
  background: rgba(255, 77, 46, 0.18);
  color: #e63e1a;
}

/* —— 秒杀框（标题 + 商品在同一框内） —— */
.store-page--home .mall-flash-strip {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px 20px;
  margin-bottom: 28px;
  border-radius: var(--home-radius);
  background: linear-gradient(95deg, #fff1f2 0%, #fff7ed 45%, #fff 100%);
  border: 1px solid rgba(251, 113, 133, 0.2);
  box-shadow: var(--home-shadow);
}

.store-page--home .mall-flash-strip__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.store-page--home .mall-flash-strip__tag {
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border-radius: 6px;
  background: linear-gradient(90deg, #f43f5e, var(--home-accent));
  letter-spacing: 0.04em;
}

.store-page--home .mall-flash-strip__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--home-text);
}

.store-page--home .mall-flash-strip__cta {
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--home-accent), #fb7185);
  box-shadow: 0 4px 14px rgba(255, 77, 46, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-page--home .mall-flash-strip__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 77, 46, 0.45);
}

.store-page--home .mall-flash-strip__products {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.store-page--home .mall-flash-strip__empty {
  margin: 0;
  padding: 20px 12px;
  text-align: center;
  font-size: 14px;
  color: var(--home-muted);
  border-radius: var(--home-radius-sm);
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(251, 113, 133, 0.25);
}

.store-page--home .mall-flash-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px;
  border-radius: var(--home-radius-sm);
  background: #fff;
  border: 1px solid rgba(251, 113, 133, 0.12);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-page--home .mall-flash-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.store-page--home .mall-flash-item__img {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-page--home .mall-flash-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-page--home .mall-flash-item__ph {
  font-size: 12px;
  color: #94a3b8;
}

.store-page--home .mall-flash-item__body {
  padding-top: 8px;
  min-width: 0;
}

.store-page--home .mall-flash-item__title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--home-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-page--home .mall-flash-item__price {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--home-accent);
  line-height: 1.3;
}

.store-page--home .mall-flash-item__old {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--home-muted);
  text-decoration: line-through;
}

@media (max-width: 1100px) {
  .store-page--home .mall-flash-strip__products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .store-page--home .mall-flash-strip {
    padding: 14px 14px 16px;
  }

  .store-page--home .mall-flash-strip__products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .store-page--home .mall-flash-strip__head {
    flex-wrap: wrap;
  }
}

/* —— 商品卡片 —— */
.store-page--home .mall-home-bottom {
  padding-top: 8px;
}

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

/* 首页「精品」固定 5 列 × 2 行 */
.store-page--home .mall-home-section {
  margin-bottom: 28px;
}

.store-page--home .mall-product-grid--home-featured {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* 首页「新产品」固定两行 */
.store-page--home .mall-product-grid--home-new {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.store-page--home .mall-product-grid--home-bottom-cat {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.store-page--home .mall-home-section--bottom-cat {
  margin-top: 28px;
}

/* 首页店铺街 */
.store-page--home #homeShopStreetSection {
  margin-top: 32px;
}

.store-page--home .mall-shop-street-grid {
  display: grid;
  gap: 16px;
}

/* 店铺街：PC 固定 6 列 × 2 行 */
.store-page--home .mall-shop-street-grid--home {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.store-page--home .mall-shop-street-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px 18px;
  border-radius: var(--home-radius);
  background: var(--home-surface);
  box-shadow: var(--home-shadow);
  text-decoration: none;
  color: inherit;
}

.store-page--home .mall-shop-street-card__logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.store-page--home .mall-shop-street-card__logo--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(230, 46, 4, 0.12) 0%, rgba(230, 46, 4, 0.04) 100%);
  color: var(--color-primary);
  font-size: 1.75rem;
  font-weight: 800;
}

.store-page--home .mall-shop-street-card__name {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--home-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-page--home .mall-shop-street-card__meta {
  margin: 0;
  font-size: 12px;
  color: var(--home-muted);
}

.store-page--home .mall-shop-street-more {
  margin-top: 24px;
  text-align: center;
}

.store-page--home .mall-shop-street-more__link {
  display: inline-block;
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--home-accent);
  text-decoration: none;
  border-radius: 999px;
  background: var(--home-accent-soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.store-page--home .mall-shop-street-more__link:hover {
  background: rgba(255, 77, 46, 0.18);
  color: #e63e1a;
}

@media (max-width: 1200px) {
  .store-page--home .mall-product-grid--home-featured,
  .store-page--home .mall-product-grid--home-new,
  .store-page--home .mall-product-grid--home-bottom-cat {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .store-page--home .mall-shop-street-grid--home {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.store-page--home .mall-product-card {
  border: none;
  border-radius: var(--home-radius);
  box-shadow: var(--home-shadow);
}

.store-page--home .mall-product-card__img {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  aspect-ratio: 1;
}

.store-page--home .mall-product-card__body {
  padding: 14px 16px 18px;
}

.store-page--home .mall-product-card__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--home-text);
  min-height: auto;
  -webkit-line-clamp: 2;
}

.store-page--home .mall-product-card__price {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.store-page--home .mall-empty {
  padding: 48px 20px;
  font-size: 15px;
  color: var(--home-muted);
  background: var(--home-surface);
  border-radius: var(--home-radius);
  box-shadow: var(--home-shadow);
}

@media (max-width: 900px) {
  .store-page--home .mall-home {
    padding-top: 12px;
  }

  .store-page--home .mall-section-title {
    font-size: 1.2rem;
  }

  .store-page--home .mall-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  .store-page--home .mall-product-grid--home-featured,
  .store-page--home .mall-product-grid--home-new,
  .store-page--home .mall-product-grid--home-bottom-cat {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .store-page--home .mall-shop-street-grid--home {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .store-page--home .mall-product-grid--home-featured,
  .store-page--home .mall-product-grid--home-new,
  .store-page--home .mall-product-grid--home-bottom-cat {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-page--home .mall-shop-street-grid--home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* —— 店铺街下方：政策入口（网站设置 → 页面） —— */
.store-page--home .mall-policy-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
  background: var(--home-surface);
  border-radius: var(--home-radius);
  box-shadow: var(--home-shadow);
  overflow: hidden;
}

.store-page--home .mall-policy-strip__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 132px;
  padding: 24px 12px;
  text-decoration: none;
  color: var(--home-text);
  border-right: 1px solid #e8ecf1;
  transition: background 0.15s ease;
}

.store-page--home .mall-policy-strip__item:last-child {
  border-right: none;
}

.store-page--home .mall-policy-strip__item:hover {
  background: #fafbfc;
}

.store-page--home .mall-policy-strip__icon {
  width: 46px;
  height: 46px;
  color: var(--home-accent);
  flex-shrink: 0;
}

.store-page--home .mall-policy-strip__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.store-page--home .mall-policy-strip__label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

@media (max-width: 720px) {
  .store-page--home .mall-policy-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-page--home .mall-policy-strip__item {
    border-right: none;
    border-bottom: 1px solid #e8ecf1;
    min-height: 112px;
  }

  .store-page--home .mall-policy-strip__item:nth-child(odd) {
    border-right: 1px solid #e8ecf1;
  }

  .store-page--home .mall-policy-strip__item:nth-last-child(-n + 2) {
    border-bottom: none;
  }
}

/* —— 滚动性能优化 —— */
.store-page--home .mall-cat-row,
.store-page--home .mall-home-bottom,
.store-page--home #homeShopStreetSection,
.store-page--home .mall-policy-strip {
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

.store-page--home .mall-product-card,
.store-page--home .mall-shop-street-card,
.store-page--home .mall-cat-card {
  contain: layout style paint;
}

.store-page--home .mall-product-card__img img,
.store-page--home .mall-cat-card__img img {
  content-visibility: auto;
}

@media (hover: hover) and (pointer: fine) {
  .store-page--home .mall-banner__arrow {
    transition: background 0.15s ease;
  }

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

  .store-page--home .mall-cat-card,
  .store-page--home .mall-cat-card--more {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .store-page--home .mall-cat-card:hover,
  .store-page--home .mall-cat-card--more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  }

  .store-page--home .mall-product-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .store-page--home .mall-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--home-shadow-hover);
  }

  .store-page--home .mall-shop-street-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .store-page--home .mall-shop-street-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--home-shadow-hover);
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-page--home .mall-product-card,
  .store-page--home .mall-shop-street-card,
  .store-page--home .mall-cat-card,
  .store-page--home .mall-banner__arrow {
    transition: none !important;
  }
}
