/* ============================================================
   域链仓·集市店铺  v5 定稿补丁样式
   版本：v=0904a2　日期：2026-09-04
   覆盖内容：
     ① 顶部 5 张主题轮番图（替换原视频/旧轮播）
     ② 左侧分类树第三段「🏪 全部店铺」
     ③ 底部 8 项监管备案
     ④ 全站去黑色（背景改纯白）
   ⚠ 本文件放在最后引入，用于覆盖 styles.css 中的旧深色样式
   ============================================================ */

/* ========== ① 顶部 5 张主题轮番图 ========== */

/* 去掉原 hero 的深紫黑底（王总：不要黑色） */
.portal-hero {
  background: #ffffff !important;
  color: #1e293b !important;
}
.hero-bg {
  background: #f4f8ff !important;
}
@media (max-width: 768px) {
  .portal-hero { background: #ffffff !important; }
}

/* 单张轮番：背景缓慢放大，文字保持稳定 */
.hero-slide.s5-slide {
  animation: none !important;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.s5-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: hero-zoom 20s linear infinite alternate;
  will-change: transform;
}
/* 左侧压深色渐变，保证白字始终可读 */
.s5-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8,12,24,.62) 0%, rgba(8,12,24,.34) 45%, rgba(8,12,24,.06) 100%);
  pointer-events: none;
}
.s5-inner {
  position: relative;
  z-index: 2;
  padding: 0 clamp(20px, 5vw, 68px);
  max-width: min(620px, 62%);
  text-align: left;
  color: #fff;
}
.s5-tag {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 12px;
  font-size: clamp(10px, 1.5vw, 12px);
  font-weight: 700;
  letter-spacing: .4px;
  color: #fff;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.s5-title {
  margin: 0;
  font-size: clamp(22px, 3.6vw, 40px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -.5px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .35);
}
.s5-sub {
  margin: 10px 0 0;
  font-size: clamp(11px, 1.5vw, 15px);
  font-weight: 500;
  line-height: 1.75;
  color: rgba(255, 255, 255, .94);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.s5-cta {
  display: inline-block;
  margin-top: 16px;
  padding: 9px 22px;
  font-size: clamp(12px, 1.5vw, 14px);
  font-weight: 800;
  color: #1e293b;
  background: #fff;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: transform .2s ease, box-shadow .2s ease;
}
.s5-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
}
/* 手机端：文案靠下、更紧凑 */
@media (max-width: 768px) {
  .s5-inner {
    max-width: 88%;
    padding: 0 18px;
    align-self: flex-end;
    padding-bottom: 34px;
  }
  .s5-mask {
    background: linear-gradient(180deg, rgba(8,12,24,.10) 0%, rgba(8,12,24,.30) 45%, rgba(8,12,24,.70) 100%);
  }
  .s5-sub { display: none; }
  .s5-cta { margin-top: 10px; padding: 7px 16px; }
}

/* ========== ② 左侧分类树第三段「🏪 全部店铺」 ========== */
/* 分类树 sticky 跟随视口，内部可滚动查看全部 30+ 项，右侧主区不被拖长 */
.portal-cat-tree {
  position: sticky !important;
  top: 120px !important;            /* topbar 56 + 标签条 ~64 */
  align-self: start !important;
  max-height: calc(100vh - 160px) !important;   /* 视口高减去顶部+底部 */
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.portal-cat-tree::-webkit-scrollbar { width: 6px !important; }
.portal-cat-tree::-webkit-scrollbar-thumb { background: #cbd5e1 !important; border-radius: 3px !important; }
.portal-cat-tree::-webkit-scrollbar-track { background: transparent !important; }
.cat-league-divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--border, #e2e8f0);
}
/* 全部店铺视图项（成长榜单/金牌/新入驻/品牌/绿色农业） */
.cat-item.cat-view {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-item.cat-view.active {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4338ca;
  font-weight: 700;
}
/* 服务入口（平台协调 / 联系客服） */
.cat-item.cat-svc {
  color: var(--text-2, #64748b);
  font-size: 12px;
}
.cat-item.cat-svc:hover {
  background: var(--bg, #f4f8ff);
  color: var(--text, #1e293b);
}

/* ========== ③ 底部 8 项监管备案 ========== */
.compliance-v5 {
  /* 骨架样式已在 portal.html 内联，这里只管内部布局 */
  line-height: 1.9;
}
.cpv5-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: 960px;
  margin: 0 auto;
}
.cpv5-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}
.cpv5-item .cpv5-ico {
  font-size: 12px;
  line-height: 1;
}
.cpv5-item .cpv5-label {
  color: #94a3b8;
}
.cpv5-item .cpv5-value {
  color: #64748b;
  font-weight: 600;
  letter-spacing: .2px;
}
.cpv5-item .cpv5-value.link {
  color: #64748b;
  text-decoration: none;
  border-bottom: 1px dotted #cbd5e1;
}
.cpv5-item .cpv5-value.link:hover {
  color: #2563eb;
  border-bottom-color: #2563eb;
}
.cpv5-copy {
  margin-top: 12px;
  font-size: 11px;
  color: #b6c2d1;
}
/* 手机端：每行自动折行，不溢出 */
@media (max-width: 768px) {
  .cpv5-item {
    font-size: 10px;
    line-height: 1.7;
    text-align: center;
  }
  .cpv5-copy { font-size: 10px; padding: 0 8px; }
}

/* ========== ④ 会场直通车 + 限时秒杀 + 全部好店标题 ========== */
/* ⚠ 2026-09-04 王总反馈：这三个模块必须跟下方 .portal-body 左右对齐，不要留白。
   portal-body 的边界：贴左 + 右 14px；所以 sticky-zone 同样贴左 + 右 14px，不居中 */
.sticky-zone {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px 14px 0 0;
  box-sizing: border-box;
}
.zone-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 10px;
  flex-wrap: wrap;
}
.zone-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -.3px;
}
.zone-sub {
  font-size: 12px;
  color: #64748b;
}
.zone-more {
  margin-left: auto;
  font-size: 12px;
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
}
.zone-more:hover { color: #4338ca; }

/* 会场直通车：横滑 8 卡，撑满可用宽度 */
.hall-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  padding-bottom: 4px;
  width: 100%;
}
.hall-rail::-webkit-scrollbar { height: 4px; }
.hall-rail::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
.hall-card {
  position: relative;
  flex: 1 1 0;
  min-width: 130px;
  max-width: 200px;
  height: 96px;
  border-radius: 12px;
  padding: 10px 12px;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.hall-card::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 80px; height: 80px;
  background: rgba(255,255,255,.18);
  border-radius: 50%;
}
.hall-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.hall-ico {
  font-size: 26px;
  line-height: 1;
}
.hall-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.2px;
}
.hall-meta {
  font-size: 11px;
  opacity: .9;
}
.hall-cta {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,.22);
  padding: 3px 8px;
  border-radius: 999px;
  align-self: flex-start;
  border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* 限时秒杀 */
.flash-timer {
  margin-left: auto;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}
.flash-timer b {
  display: inline-block;
  padding: 2px 6px;
  background: #ef4444;
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  margin: 0 1px;
  font-weight: 800;
  min-width: 24px;
  text-align: center;
}
.flash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.flash-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.flash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239,68,68,.12);
}
.flash-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flash-ico {
  font-size: 56px;
  line-height: 1;
}
.flash-badge {
  position: absolute;
  left: 6px; top: 6px;
  padding: 2px 8px;
  background: linear-gradient(135deg,#ef4444,#fb7185);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
}
.flash-body { padding: 8px 10px 10px; }
.flash-name {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 31px;
}
.flash-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
}
.flash-price {
  color: #ef4444;
  font-size: 11px;
  font-weight: 600;
}
.flash-price b {
  font-size: 18px;
  font-weight: 900;
}
.flash-original {
  color: #94a3b8;
  font-size: 11px;
  text-decoration: line-through;
}
.flash-progress {
  position: relative;
  height: 14px;
  margin-top: 6px;
  background: #fee2e2;
  border-radius: 7px;
  overflow: hidden;
}
.flash-progress-bar {
  height: 100%;
  background: linear-gradient(90deg,#ef4444,#fb7185);
  border-radius: 7px;
  transition: width .5s ease;
}
.flash-progress-txt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}

/* 全部好店标题 */
.all-shops-head .zone-head { padding: 14px 0 8px; border-top: 1px dashed #e2e8f0; margin-top: 4px; }

/* 平板端 (≤900px)：跟 .portal-body padding 一致（0 12px 20px） */
@media (max-width: 900px) {
  .sticky-zone { padding: 14px 12px 0 0; }
}
/* 手机端 (≤768px)：跟 .portal-body padding 一致（0 12px 20px） */
@media (max-width: 768px) {
  .sticky-zone { padding: 12px 12px 0 0; }
  .hall-card { flex: 0 0 130px; min-width: 130px; max-width: 130px; height: 84px; }
  .hall-ico { font-size: 22px; }
  .hall-name { font-size: 13px; }
  .hall-meta, .hall-cta { font-size: 10px; }
  .flash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flash-ico { font-size: 44px; }
}
