/* NWS 官网联盟广告位样式（纯客户端注入，不影响 SSR/SEO 内容）
 * 版位容器：有 .side-col 的页面(.ad-side)在 PC 为右栏 sticky、移动端随 .side-col 自动堆叠到底部；
 * 无 .side-col 的页面(.ad-rail)为底部横排。 */

.ad-disclosure {
  font-size: 12px;
  color: #8a8a8a;
  margin: 0 0 8px;
  letter-spacing: .02em;
}

.ad-rail { padding: 14px 0; margin: 10px 0; }
.ad-side { margin-bottom: 18px; }

.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.ad-side .ad-grid { grid-template-columns: 1fr; }

.ad-card {
  display: flex;
  gap: 10px;
  text-decoration: none;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.ad-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
  transform: translateY(-1px);
}

.ad-card__media {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  background: #f5f5f5;
}
.ad-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-card__body {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ad-card__title {
  font-size: 13px;
  line-height: 1.35;
  color: #222;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.ad-card__price { color: #e4393c; font-weight: 700; }
.ad-card__plat {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
}
.ad-card__plat--tb { background: #ff5000; }
.ad-card__plat--jd { background: #e1251b; }
.ad-card__coupon {
  font-size: 11px;
  color: #b06a00;
  background: #fff7e6;
  border: 1px solid #ffe1a8;
  border-radius: 4px;
  padding: 1px 6px;
  align-self: flex-start;
}
.ad-card__cta {
  margin-top: auto;
  font-size: 12px;
  color: #1677ff;
  font-weight: 600;
}

@media (max-width: 980px) {
  .ad-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .ad-card__media { flex-basis: 72px; width: 72px; height: 72px; }
}

/* 站内商品位（与联盟广告共用 .side-col 右栏 / 底部 rail 机制） */
.goods-disclosure {
  font-size: 12px;
  color: #8a8a8a;
  margin: 0 0 8px;
  letter-spacing: .02em;
}
.goods-rail { padding: 14px 0; margin: 10px 0; }
.goods-side { margin-bottom: 18px; }
.goods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  justify-items: center;
}
.goods-side .goods-grid { grid-template-columns: 1fr; justify-items: stretch; }
.goods-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 220px;
  text-decoration: none;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.goods-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, .10);
  transform: translateY(-2px);
}
.goods-card__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f5f5f5;
}
.goods-side .goods-card__media { aspect-ratio: 4 / 3; }
.goods-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.goods-card__body {
  flex: 1;
  min-width: 0;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}
.goods-card__title {
  font-size: 14px;
  line-height: 1.4;
  color: #222;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.goods-card__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
}
.goods-card__price { color: #e4393c; font-weight: 700; }
.goods-card__tag { color: #1677ff; font-weight: 600; }
@media (max-width: 980px) {
  .goods-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* 淘口令复制提示 */
.goods-tkl-toast { position: fixed; left: 50%; bottom: 48px; transform: translateX(-50%); background: rgba(17,17,17,.88); color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 6px; z-index: 9999; }
