/* ============================================================
   首页样式 · 北京乐璟科技零售电商（2026-08-18 Bento 版式）
   结构：拼格主视觉 / 公告跑马灯 / 分类横向货架 / 渐变数据带 /
         热销货架 / 深色编号服务区 / 标签资讯卡
   ============================================================ */

/* ---- 通用区块基础（首页域） ---- */
.section { padding: 64px 0; }
.section-soft { background: var(--mh-bg-soft); }
.section-content { padding: 0 20px; max-width: 1400px; margin: 0 auto; }
.section-h2 {
  font-size: 30px;
  font-weight: 700;
  font-family: var(--mh-font-display);
  color: var(--mh-text-1);
  line-height: 1.3;
  position: relative;
  padding-left: 16px;
}
.section-h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 26px;
  background: var(--mh-gradient-warm);
  border-radius: 3px;
}
.section-sub { font-size: 14px; color: var(--mh-text-3); margin-top: 10px; }

/* ============ ① Bento 拼格主视觉 ============ */
.bento-hero { padding-top: 28px; }
.bento-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}
.bento-main {
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: var(--mh-gradient-banner);
  color: #fff;
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 480px;
}
/* 科技网格底纹 */
.bm-grid-deco {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 80% 20%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 20%, #000 0%, transparent 70%);
  pointer-events: none;
}
/* 右上光晕 */
.bm-glow {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.5) 0%, rgba(124,58,237,0) 68%);
  pointer-events: none;
}
.bm-eyebrow {
  display: inline-block;
  align-self: flex-start;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--mh-accent);
  padding: 7px 18px;
  border: 1px solid rgba(20,184,166,0.5);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(4px);
  border-radius: var(--mh-radius-pill);
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}
.bm-title {
  font-size: 58px;
  font-weight: 800;
  font-family: var(--mh-font-display);
  line-height: 1.16;
  letter-spacing: 2px;
  margin: 0 0 22px;
  position: relative;
  z-index: 2;
}
.bm-desc {
  font-size: 16px;
  line-height: 1.95;
  color: rgba(255,255,255,0.82);
  margin: 0 0 36px;
  position: relative;
  z-index: 2;
}
.bm-actions { display: flex; gap: 14px; position: relative; z-index: 2; }
.bm-btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 34px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--mh-radius-pill);
  transition: all var(--mh-dur) var(--mh-ease);
}
.bm-btn.solid {
  background: #fff;
  color: var(--mh-primary);
  box-shadow: 0 8px 22px rgba(20,23,58,0.35);
}
.bm-btn.solid:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20,23,58,0.42); }
.bm-btn.ghost {
  border: 1px solid rgba(255,255,255,0.45);
  color: #fff;
}
.bm-btn.ghost:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.7); }
.bm-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; position: relative; z-index: 2; }
.bm-chip {
  font-size: 12.5px;
  color: rgba(255,255,255,0.85);
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  border-radius: var(--mh-radius-pill);
}

/* 拼格卡片通用 */
.bento-card {
  position: relative;
  background: var(--mh-bg-card);
  border: 1px solid var(--mh-line);
  border-radius: 22px;
  overflow: hidden;
  transition: all var(--mh-dur) var(--mh-ease);
  display: flex;
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--mh-shadow-hover);
  border-color: var(--mh-accent-light);
}
/* 热销商品卡 */
.bc-product { flex-direction: column; }
.bc-product > img {
  width: 100%;
  height: calc(100% - 76px);
  min-height: 0;
  object-fit: cover;
  transition: transform 0.5s var(--mh-ease);
}
.bc-product:hover > img { transform: scale(1.05); }
.bc-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--mh-radius-pill);
}
.bc-tag.hot { background: var(--mh-promo); box-shadow: 0 4px 12px rgba(226,62,87,0.4); }
.bc-info {
  height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  border-top: 1px solid var(--mh-line);
}
.bc-info strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--mh-text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-info em { font-style: normal; font-size: 20px; font-weight: 700; color: var(--mh-promo); flex-shrink: 0; }
/* 服务入口卡 */
.bc-service {
  align-items: center;
  gap: 16px;
  padding: 24px 26px;
}
.bc-service-icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 16px;
  background: var(--mh-gradient-soft);
  border: 1px solid var(--mh-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--mh-primary);
}
.bc-service-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.bc-service-text strong { font-size: 17px; font-weight: 700; color: var(--mh-text-1); }
.bc-service-desc { font-size: 12.5px; color: var(--mh-text-3); }
.bc-arrow { font-size: 13px; font-weight: 600; color: var(--mh-primary); flex-shrink: 0; }

/* ============ ② 公告跑马灯 ============ */
.ticker-bar {
  margin-top: 22px;
  background: var(--mh-bg-card);
  border-top: 1px solid var(--mh-line);
  border-bottom: 1px solid var(--mh-line);
}
.ticker-inner { display: flex; align-items: center; gap: 18px; height: 56px; }
.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--mh-primary);
  background: var(--mh-accent-light);
  padding: 6px 14px;
  border-radius: var(--mh-radius-pill);
}
.ticker-view { flex: 1; overflow: hidden; position: relative; }
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  white-space: nowrap;
  width: max-content;
  animation: ticker-scroll 32s linear infinite;
}
.ticker-view:hover .ticker-track { animation-play-state: paused; }
.ticker-item { font-size: 13.5px; color: var(--mh-text-2); display: inline-flex; gap: 10px; align-items: center; }
.ticker-item .tk-date { font-size: 12px; color: var(--mh-text-4); }
.ticker-item:hover .tk-title { color: var(--mh-primary); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-more { flex-shrink: 0; font-size: 13px; color: var(--mh-text-3); }
.ticker-more:hover { color: var(--mh-primary); }

/* ============ ③ 分类货架 ============ */
.shelf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}
.shelf-nav { display: flex; gap: 10px; flex-shrink: 0; }
.shelf-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--mh-border);
  background: var(--mh-bg-card);
  color: var(--mh-text-2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--mh-dur) var(--mh-ease);
}
.shelf-arrow:hover {
  background: var(--mh-primary);
  border-color: var(--mh-primary);
  color: #fff;
}
/* 分类胶囊 */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  font-size: 13.5px;
  color: var(--mh-text-2);
  background: var(--mh-bg-card);
  border: 1px solid var(--mh-line);
  border-radius: var(--mh-radius-pill);
  cursor: pointer;
  transition: all var(--mh-dur) var(--mh-ease);
}
.cat-chip:hover { color: var(--mh-primary); border-color: var(--mh-primary); }
.cat-chip.active {
  background: var(--mh-gradient-warm);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(67,56,202,0.32);
}
.cat-chip .chip-count {
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: var(--mh-radius-pill);
  background: var(--mh-bg-section);
  color: var(--mh-text-3);
}
.cat-chip.active .chip-count { background: rgba(255,255,255,0.22); color: #fff; }

/* 横向滑动货架 */
.shelf-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 4px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--mh-border) transparent;
}
.shelf-rail::-webkit-scrollbar { height: 6px; }
.shelf-rail::-webkit-scrollbar-thumb { background: var(--mh-border); border-radius: 3px; }
.shelf-rail:empty::after {
  content: '该分类暂无商品';
  flex: 1;
  text-align: center;
  color: var(--mh-text-4);
  font-size: 14px;
  padding: 60px 0;
}
/* 货架商品卡 */
.rail-card {
  flex: 0 0 236px;
  scroll-snap-align: start;
  background: var(--mh-bg-card);
  border: 1px solid var(--mh-line);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--mh-dur) var(--mh-ease);
  display: flex;
  flex-direction: column;
}
.rail-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--mh-shadow-hover);
  border-color: var(--mh-accent-light);
}
.rail-card .rc-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--mh-bg-soft);
  overflow: hidden;
  position: relative;
}
.rail-card .rc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--mh-ease);
}
.rail-card:hover .rc-img img { transform: scale(1.06); }
.rc-cat-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(67,56,202,0.85);
  backdrop-filter: blur(3px);
  padding: 3px 10px;
  border-radius: var(--mh-radius-pill);
}
.rail-card .rc-info { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rail-card .rc-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--mh-text-1);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  transition: color var(--mh-dur) var(--mh-ease);
}
.rail-card:hover .rc-name { color: var(--mh-primary); }
.rail-card .rc-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.rail-card .rc-price { color: var(--mh-promo); font-size: 13px; font-weight: 600; }
.rail-card .rc-price b { font-size: 20px; font-weight: 700; }
.rail-card .rc-go {
  font-size: 12px;
  font-weight: 600;
  color: var(--mh-primary);
  background: var(--mh-bg-soft);
  border: 1px solid var(--mh-line);
  padding: 5px 13px;
  border-radius: var(--mh-radius-pill);
  transition: all var(--mh-dur) var(--mh-ease);
}
.rail-card:hover .rc-go {
  background: var(--mh-primary);
  color: #fff;
  border-color: var(--mh-primary);
}

/* ============ ④ 数据带 ============ */
.stats-band {
  background: var(--mh-gradient-banner);
  position: relative;
  overflow: hidden;
}
.stats-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
.stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-top: 52px;
  padding-bottom: 52px;
}
.stat-cell {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-cell + .stat-cell { border-left: 1px solid rgba(255,255,255,0.14); }
.stat-cell strong {
  font-size: 46px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-family: var(--mh-font-display);
}
.stat-cell strong i { font-style: normal; font-size: 17px; font-weight: 600; color: var(--mh-accent); margin-left: 4px; }
.stat-cell span { font-size: 13.5px; color: rgba(255,255,255,0.72); letter-spacing: 2px; }

/* ============ ⑤ 本周热销（倒计时） ============ */
.countdown { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.countdown .cd-label { font-size: 13px; color: var(--mh-text-3); margin-right: 8px; }
.countdown .cd-num {
  min-width: 38px;
  height: 38px;
  line-height: 38px;
  text-align: center;
  background: var(--mh-gradient-warm);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--mh-radius-md);
}
.countdown .cd-colon { font-size: 16px; font-weight: 600; color: var(--mh-text-2); }

/* ============ ⑥ 深色编号服务区 ============ */
.service-section { background: var(--mh-bg-dark); position: relative; overflow: hidden; }
.service-section::after {
  content: '';
  position: absolute;
  left: -140px;
  bottom: -180px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(67,56,202,0.42) 0%, rgba(67,56,202,0) 68%);
  pointer-events: none;
}
.service-head { margin-bottom: 40px; }
.service-head h2 {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--mh-font-display);
  color: #fff;
  margin: 0 0 12px;
  position: relative;
  padding-left: 16px;
}
.service-head h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 26px;
  background: var(--mh-accent);
  border-radius: 3px;
}
.service-head p { font-size: 14px; color: rgba(255,255,255,0.6); margin: 0; }
.service-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.service-card {
  padding: 30px 28px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--mh-dur) var(--mh-ease);
  background: rgba(255,255,255,0.02);
}
.service-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(20,184,166,0.5);
  transform: translateY(-5px);
}
.service-card .sc-num {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: rgba(255,255,255,0.16);
  font-family: var(--mh-font-display);
}
.service-card:hover .sc-num { color: rgba(20,184,166,0.5); }
.service-card h3 { font-size: 20px; font-weight: 700; margin: 0; }
.service-card p { font-size: 13.5px; line-height: 1.8; color: rgba(255,255,255,0.62); margin: 0; }
.service-card em {
  font-style: normal;
  align-self: flex-start;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--mh-accent);
  padding: 5px 14px;
  border: 1px solid rgba(20,184,166,0.4);
  border-radius: var(--mh-radius-pill);
}

/* ============ ⑦ 资讯标签卡 ============ */
.news-section { padding-top: 56px; }
.news-card {
  background: var(--mh-bg-card);
  border: 1px solid var(--mh-line);
  border-radius: 20px;
  overflow: hidden;
}
.news-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--mh-line);
}
.news-tab {
  padding: 8px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mh-text-2);
  background: var(--mh-bg-soft);
  border: 1px solid var(--mh-line);
  border-radius: var(--mh-radius-pill);
  cursor: pointer;
  transition: all var(--mh-dur) var(--mh-ease);
}
.news-tab:hover { color: var(--mh-primary); border-color: var(--mh-primary); }
.news-tab.active {
  background: var(--mh-gradient-warm);
  color: #fff;
  border-color: transparent;
}
.news-card-more { margin-left: auto; font-size: 13px; color: var(--mh-text-3); }
.news-card-more:hover { color: var(--mh-primary); }
.news-pane { padding: 6px 24px 18px; min-height: 240px; }
.news-pane .news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px dashed var(--mh-line);
  cursor: pointer;
}
.news-pane .news-item:last-child { border-bottom: none; }
.news-pane .news-item:hover .title { color: var(--mh-primary); }
.news-pane .news-item .fboxRow { display: flex; align-items: center; min-width: 0; }
.news-pane .news-item .number {
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--mh-text-4);
  border-radius: var(--mh-radius-sm);
  margin-right: 12px;
  flex-shrink: 0;
}
.news-pane .news-item:first-child .number,
.news-pane .news-item:nth-child(2) .number,
.news-pane .news-item:nth-child(3) .number { background: var(--mh-primary); }
.news-pane .news-item .title {
  font-size: 14px;
  color: var(--mh-text-2);
  transition: color var(--mh-dur) var(--mh-ease);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-pane .news-item .time { font-size: 12px; color: var(--mh-text-4); margin-left: 16px; flex-shrink: 0; }
.news-pane:empty::after {
  content: '暂无内容';
  display: block;
  text-align: center;
  color: var(--mh-text-4);
  padding: 70px 0;
  font-size: 14px;
}

/* ============ 响应式 ============ */
@media (max-width: 1200px) {
  .bento-grid { grid-template-columns: 1.4fr 1fr; }
  .bento-main { padding: 46px 40px; min-height: 440px; }
  .bm-title { font-size: 48px; }
  .rail-card { flex-basis: 216px; }
  .service-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .service-card { padding: 24px 20px; }
}
@media (max-width: 768px) {
  .section { padding: 44px 0; }
  .section-content { padding: 0 16px; }
  .section-h2 { font-size: 23px; }
  .section-sub { margin-top: 7px; font-size: 12.5px; }

  /* Bento 单列：主卡 + 双卡并排 */
  .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .bento-main { grid-row: auto; min-height: 0; padding: 36px 24px 32px; }
  .bm-title { font-size: 32px; letter-spacing: 1px; margin-bottom: 14px; }
  .bm-desc { font-size: 13px; line-height: 1.85; margin-bottom: 24px; }
  .bm-desc br { display: none; }
  .bm-eyebrow { font-size: 11px; letter-spacing: 1px; padding: 5px 13px; margin-bottom: 20px; }
  .bm-btn { padding: 11px 26px; font-size: 13.5px; }
  .bm-chips { margin-top: 26px; gap: 8px; }
  .bm-chip { font-size: 11.5px; padding: 5px 11px; }
  .bento-card + .bento-card { margin-top: 12px; }
  .bento-grid { gap: 12px; }
  .bc-product > img { height: 180px; }

  /* 跑马灯 */
  .ticker-more { display: none; }

  /* 货架：触屏原生滑动，隐藏箭头 */
  .shelf-nav { display: none; }
  .shelf-head { margin-bottom: 18px; }
  .cat-chips { gap: 8px; margin-bottom: 16px; }
  .cat-chip { padding: 7px 15px; font-size: 12.5px; }
  .rail-card { flex-basis: 172px; }
  .rail-card .rc-name { font-size: 13.5px; min-height: 39px; }
  .rail-card .rc-price b { font-size: 17px; }
  .rail-card .rc-go { padding: 4px 10px; font-size: 11px; }

  /* 数据带 2 列 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 0; padding: 40px 0; }
  .stat-cell:nth-child(3) { border-left: none; }
  .stat-cell strong { font-size: 34px; }
  .stat-cell span { font-size: 12px; letter-spacing: 1px; }

  /* 倒计时 */
  .countdown .cd-num { min-width: 31px; height: 31px; line-height: 31px; font-size: 13.5px; }

  /* 服务区单列 */
  .service-head h2 { font-size: 24px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 20px; }
  .service-card .sc-num { font-size: 30px; }
  .service-card h3 { font-size: 17px; width: calc(100% - 56px); }
  .service-card p { flex-basis: 100%; }
  .service-card em { margin-top: 0; }

  /* 资讯卡 */
  .news-tabs { padding: 14px 16px; }
  .news-tab { padding: 7px 16px; font-size: 13px; }
  .news-pane { padding: 4px 16px 14px; min-height: 0; }
  .news-pane .news-item .title { max-width: 210px; }
}
