/* ==========================================================================
   首页三块：置顶推荐 / 广告位 / 联系方式
   数据源：/pinned-promo/pinned-promo.json（改数据不改代码）
   ========================================================================== */
.pp-block {
  margin: 20px 0;
  padding: 18px 22px;
  border-radius: 10px;
  background: var(--white, #fff);
  box-shadow: 1px 1px 3px var(--mask, rgba(0, 0, 0, .3));
  border: 1px solid rgba(0, 0, 0, .04);
  box-sizing: border-box;
}

/* 顶部标题行：左侧琥珀色方块 + 标题，右侧小字 */
.pp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pp-head-title {
  display: flex;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--toolbarFont, #333);
  line-height: 24px;
}
.pp-head-title .pp-icon {
  margin-right: 7px;
  flex: 0 0 auto;
}
.pp-head-sub {
  font-size: 12px;
  color: #9b9b9b;
  letter-spacing: .5px;
  white-space: nowrap;
  padding-left: 10px;
}

/* 卡片位：桌面横排，列数由 --pp-cols 控制 */
.pp-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-columns: repeat(var(--pp-cols, 3), minmax(0, 1fr));
  gap: 12px;
}
.pp-card {
  border-radius: 10px;
  padding: 14px 16px;
  min-height: 88px;
  box-sizing: border-box;
}

/* 有内容：米黄色推广位 */
.pp-card.is-fill {
  display: block;
  background: linear-gradient(180deg, #FFFCF3, #FDF5E3);
  border: 1px solid #F6E7C6;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
a.pp-card.is-fill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .35);
}
.pp-label {
  font-size: 12px;
  line-height: 18px;
  color: #C8901F;
  margin-bottom: 8px;
}
.pp-text {
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  color: #2f2f2f;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pp-banner {
  height: 64px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 8px;
}

/* 空位：虚线占位卡 */
.pp-card.is-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed #dcdcdc;
  background: transparent;
  color: #9b9b9b;
  font-size: 13px;
  line-height: 20px;
}
.pp-empty-2 {
  margin-top: 2px;
}

/* 联系方式 */
.pp-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.pp-c-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--favoriteBg, #f7f9fe);
  border: 1px solid #eef0f4;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}
.pp-c-icon {
  width: 22px;
  height: 22px;
  margin-right: 10px;
  flex: 0 0 auto;
  border-radius: 5px;
  object-fit: cover;
}
.pp-c-emoji {
  font-size: 18px;
  line-height: 22px;
  text-align: center;
}
.pp-c-body {
  min-width: 0;
  flex: 1 1 auto;
}
.pp-c-name {
  font-size: 13px;
  font-weight: 600;
  color: #2f2f2f;
}
.pp-c-value {
  font-size: 12px;
  line-height: 18px;
  color: var(--greyFont, #797979);
  word-break: break-all;
}
.pp-c-qr {
  width: 64px;
  height: 64px;
  margin-left: 10px;
  border-radius: 6px;
  flex: 0 0 auto;
}

@media screen and (max-width: 768px) {
  .pp-block {
    margin: 16px 0;
    padding: 14px;
  }
  .pp-head {
    margin-bottom: 10px;
  }
  .pp-head-title {
    font-size: 16px;
  }
  .pp-slots {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .pp-card {
    min-height: 64px;
    padding: 12px 14px;
  }
  .pp-card.is-empty {
    min-height: 56px;
    flex-direction: row;
    gap: 6px;
    flex-wrap: wrap;
  }
  .pp-empty-2 {
    margin-top: 0;
  }
  .pp-contacts {
    grid-template-columns: minmax(0, 1fr);
  }
  .pp-c-qr {
    width: 56px;
    height: 56px;
  }
}
