/* 998 首页 · 对标 1688 移动端信息流布局 */

.jd-home-1688 {
  --a88-header-h: 88px;
  --a88-feed-sticky-top: var(--a88-header-h);
  background: #f4f4f4;
  padding-top: var(--a88-header-h);
}

.jd-home-1688 .jd-header {
  display: none !important;
}

/* ===== 顶栏 ===== */
.a88-home-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.a88-home-header__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 6px;
}

.a88-home-login {
  flex-shrink: 0;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 2px;
}

.a88-home-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  background: #f5f5f5 !important;
  border-radius: 18px !important;
  border: none !important;
}

.a88-home-search__icon {
  flex-shrink: 0;
  opacity: 0.45;
}

.a88-home-search__form {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
}

.a88-home-search .jd-search-placeholder-wrap {
  flex: 1;
  min-width: 0;
}

.a88-home-search .jd-search-input-real {
  width: 100%;
  font-size: 13px;
}

.a88-home-search__btn {
  flex-shrink: 0;
  border: none;
  background: var(--ice-primary, #4a9ff5);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 14px;
  line-height: 1.3;
  cursor: pointer;
}

.a88-home-cate,
.a88-home-msg {
  flex-shrink: 0;
  padding: 4px;
  text-decoration: none;
}

.a88-home-cate .jd-ico-menu {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z'/%3E%3C/svg%3E") !important;
}

.a88-home-msg .jd-ico-msg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z'/%3E%3C/svg%3E") !important;
}

.jd-home-1688 .jd-header-search .search-icon,
.jd-home-1688 .a88-home-search .search-icon {
  color: #999 !important;
}

.a88-home-loc {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px 8px;
  font-size: 11px;
  color: #999;
}

.a88-home-loc__city {
  color: #333;
  font-weight: 500;
}

.a88-home-loc__sep {
  color: #ddd;
}

/* ===== 金刚区 ===== */
.a88-shortcuts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: #fff;
  padding: 12px 8px 10px;
  margin-bottom: 8px;
}

.a88-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #333;
}

.a88-shortcut__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #f5f9ff;
  border-radius: 12px;
}

.a88-shortcut--hot .a88-shortcut__icon {
  background: #fff7e6;
}

.a88-shortcut__label {
  font-size: 11px;
  color: #333;
  white-space: nowrap;
}

.a88-shortcut--hot .a88-shortcut__label {
  color: #ff6a00;
  font-weight: 600;
}

/* ===== 信任条（单行文字链，1688 服务条风格）===== */
.a88-home-trust {
  display: flex;
  justify-content: space-around;
  background: #fff;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-top: 1px solid #f5f5f5;
}

.a88-home-trust span {
  font-size: 11px;
  color: #666;
  padding: 0 2px;
}

.a88-home-trust span::before {
  content: "✓ ";
  color: var(--ice-success, #52c41a);
  font-size: 10px;
}

.a88-shortcut--new .a88-shortcut__icon {
  background: #fff0f6;
}

/* 新人促销条 */
.a88-promo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 8px 8px;
  padding: 10px 12px;
  background: linear-gradient(90deg, #fff7e6, #fff);
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #ffe7ba;
}

.a88-promo__tag {
  flex-shrink: 0;
  background: var(--ice-accent, #ff8c00);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.a88-promo__text {
  flex: 1;
  font-size: 12px;
  color: #333;
}

.a88-promo__go {
  font-size: 12px;
  color: var(--ice-accent, #ff8c00);
  white-space: nowrap;
}

/* 今日爆款横滑 */
.a88-flash {
  background: #fff;
  margin: 0 8px 8px;
  border-radius: 8px;
  padding: 10px 0 12px;
}

.a88-flash__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px 8px;
}

.a88-flash__head h2 {
  margin: 0;
  font-size: 15px;
  color: #333;
}

.a88-flash__head a {
  font-size: 12px;
  color: #999;
  text-decoration: none;
}

.a88-flash__scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px;
}

.a88-flash__scroll::-webkit-scrollbar {
  display: none;
}

.a88-flash__item {
  flex: 0 0 88px;
  text-decoration: none;
  color: inherit;
}

.a88-flash__img {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}

.a88-flash__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.a88-flash__price {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ice-accent, #ff8c00);
  margin-top: 4px;
}

.a88-flash__price small {
  font-size: 10px;
}

.a88-flash__name {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 今日爆款：4 店仅商品图 */
.a88-flash--stores .a88-flash__stores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 10px;
}

.a88-flash__store {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.a88-flash__store-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-size: 10px;
  color: #666;
  line-height: 1.2;
  text-align: center;
}

.a88-flash__store-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.a88-flash__store-emoji {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #ff8c00);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.a88-flash__store-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.a88-flash__item--img-only {
  flex: none;
  width: 100%;
}

.a88-flash__item--img-only .a88-flash__img {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
}

.a88-flash--stores .a88-flash__price,
.a88-flash--stores .a88-flash__name {
  display: none !important;
}

/* ===== 轮播（压低高度，非京东大卡）===== */
.a88-banner {
  margin: 0 8px 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.a88-banner-swiper,
.a88-banner .swiper-container {
  height: 120px;
}

.a88-banner .swiper-slide img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.a88-banner .swiper-pagination-bullet-active {
  background: var(--ice-primary, #4a9ff5);
}

/* ===== 信息流 Tab + 品类条 ===== */
.a88-feed-head {
  position: sticky;
  top: var(--a88-feed-sticky-top);
  z-index: 90;
  background: #f4f4f4;
  padding: 0 0 8px;
}

.a88-feed-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  padding: 0 12px;
  border-bottom: 1px solid #f0f0f0;
}

.a88-feed-tab {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  font-size: 15px;
  color: #666;
  padding: 12px 16px 10px;
  cursor: pointer;
  position: relative;
  font-family: inherit;
}

.a88-feed-tab.is-active {
  color: #333;
  font-weight: 700;
}

.a88-feed-tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--ice-accent, #ff8c00);
  border-radius: 2px;
}

.a88-feed-cates {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 0;
  background: #f4f4f4;
}

.a88-feed-cates::-webkit-scrollbar {
  display: none;
}

.a88-feed-cates a {
  flex: 0 0 auto;
  padding: 5px 12px;
  font-size: 12px;
  color: #666;
  background: #fff;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid #eee;
}

.a88-feed-cates a.is-active {
  color: var(--ice-primary, #4a9ff5);
  border-color: #b3d4ff;
  background: #e8f4ff;
  font-weight: 600;
}

/* ===== 商品双列流 ===== */
.a88-feed-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  padding: 0 8px 8px !important;
  background: transparent !important;
}

.jd-home-1688 .jd-card--feed {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.jd-home-1688 .jd-card--feed .jd-card-feed-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.jd-home-1688 .jd-card--feed .jd-card-img {
  width: 100% !important;
  aspect-ratio: 1;
  background: #fafafa;
}

.jd-home-1688 .jd-card--feed .jd-card-img img {
  object-fit: cover;
}

.jd-home-1688 .jd-card--feed .jd-card-info {
  padding: 8px;
}

.jd-home-1688 .jd-card--feed .jd-card-title {
  font-size: 13px;
  line-height: 1.35;
  height: 2.7em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #333;
  margin-bottom: 4px;
}

.jd-home-1688 .jd-card--feed .jd-card-keywords {
  margin: 0 0 6px;
  min-height: 18px;
}

.jd-home-1688 .jd-card--feed .jd-card-kw--svc {
  color: #999;
  background: #f5f5f5;
  font-size: 10px;
}

.jd-home-1688 .jd-card--feed .jd-card-kw--hot {
  color: #ff6a00;
  background: #fff7e6;
  font-size: 10px;
}

.jd-home-1688 .jd-card--feed .jd-card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}

.jd-home-1688 .jd-card--feed .jd-card-price {
  flex: 1;
  min-width: 0;
}

.jd-home-1688 .jd-card--feed .jd-card-price .p {
  font-size: 16px;
  font-weight: 700;
  color: var(--ice-accent, #ff8c00) !important;
}

.jd-home-1688 .jd-card--feed .jd-card-price .p small {
  font-size: 11px;
}

.jd-home-1688 .jd-card--feed .jd-card-sales {
  flex-shrink: 0;
  font-size: 10px;
  color: #999;
}

.jd-home-1688 .jd-card--feed .jd-card-tag {
  font-size: 10px;
  padding: 2px 5px;
  top: 6px;
  left: 6px;
}

.jd-home-1688 .jd-card--feed .jd-card-btn-cart {
  display: none !important;
}

.jd-home-1688 .jd-card-add {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--ice-accent, #ff8c00);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(255, 140, 0, 0.35);
  font-family: inherit;
}

.jd-home-1688 .jd-card-add.is-inquiry {
  background: var(--ice-primary, #4a9ff5);
  font-size: 10px;
  width: auto;
  height: auto;
  padding: 4px 8px;
  border-radius: 12px;
}

.jd-home-1688 .jd-card--feed .jd-card-services,
.jd-home-1688 .jd-card--feed .jd-card-tier-hint,
.jd-home-1688 .jd-card--feed .original {
  display: none !important;
}

.jd-home-1688 .jd-loadmore {
  padding: 8px 12px 16px;
  text-align: center;
}

.jd-home-1688 .jd-loadmore-btn {
  width: 100%;
  max-width: 280px;
  padding: 10px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 20px;
  font-size: 13px;
  color: #666;
}

/* 搜索浮层顶距随首页头高 */
.jd-home-1688 .jd-search-overlay__panel {
  top: var(--a88-header-h);
}

.jd-home-1688 .jd-pull-indicator {
  top: var(--a88-header-h);
}

/* 隐藏首页不需要的京东模块残留 */
.jd-home-1688 .jd-m-seckill,
.jd-home-1688 .jd-m-act-posters,
.jd-home-1688 .jd-m-coupon,
.jd-home-1688 .jd-m-wholesale,
.jd-home-1688 .jd-m-brand-floor,
.jd-home-1688 .jd-trust-bar,
.jd-home-1688 .jd-func-nav,
.jd-home-1688 .jd-cate-nav-wrap,
.jd-home-1688 .jd-float-service {
  display: none !important;
}
