/* ==========================================================================
   活动页样式（重构版，配置驱动）  activity-page.css
   作用域严格限定在 .actp 内，避免影响活动页以外的任何页面
   （旧 activity.css 仍被 affiliate.html 共用，保持原样不动）
   ========================================================================== */

.actp {
  --actp-blue: #0e52ff;
  --actp-blue-d: #0b3fd1;
  --actp-gold: #ffc107;
  --actp-ink: #191c3d;
  --actp-muted: #8a94a6;
  --actp-line: #ebf0fc;
  background: #fff;
  color: var(--actp-ink);
  font-size: 14px;
  line-height: 1.5;
}

.actp *,
.actp *::before,
.actp *::after { box-sizing: border-box; }

.actp-wrap { width: 1240px; max-width: 100%; margin: 0 auto; padding: 0 16px; }

/* ---------------- Hero ---------------- */
.actp-hero {
  position: relative;
  background: linear-gradient(135deg, #071a44 0%, #0b2f7d 55%, #0e52ff 100%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.actp-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-top: 60px;
  padding-bottom: 68px;
}
.actp-hero-copy { color: #fff; max-width: 660px; }
.actp-hero-title {
  margin: 0 0 20px;
  color: #fff;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
}
.actp-hero-desc {
  position: relative;
  margin: 0 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--actp-gold);
  border-radius: 1px;
  color: rgba(255, 255, 255, .92);
  font-size: 16px;
  line-height: 1.6;
}
.actp-hero-cards {
  flex: 0 0 330px;
  width: 330px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.actp-mk {
  display: block;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  text-decoration: none;
  transition: background .25s, transform .25s, border-color .25s;
}
.actp-mk:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .4); transform: translateY(-2px); }
.actp-mk-type {
  display: inline-block;
  margin-bottom: 8px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
}
.actp-mk-desc { margin: 0; color: #fff; font-size: 13px; line-height: 22px; }

/* ---------------- Highlights ---------------- */
.actp-hl {
  position: relative;
  z-index: 2;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 60, 140, .10);
}
.actp-hl-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.actp-hl-item { padding: 26px 20px; text-align: center; border-right: 1px solid var(--actp-line); }
.actp-hl-item:last-child { border-right: 0; }
.actp-hl-title { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--actp-ink); }
.actp-hl-off { margin-left: 4px; color: var(--actp-blue); font-weight: 700; }
.actp-hl-desc { margin: 0; color: var(--actp-muted); font-size: 12px; line-height: 1.7; }

/* ---------------- Products ---------------- */
.actp-prod { padding: 56px 0 76px; background: #f7f9fd; }
.actp-sec-head { margin-bottom: 36px; text-align: center; }
.actp-sec-title { display: inline-block; margin: 0; font-size: 28px; font-weight: 700; color: var(--actp-ink); }
.actp-sec-title::after { content: ""; display: block; width: 48px; height: 4px; margin: 12px auto 0; border-radius: 2px; background: var(--actp-blue); }

.actp-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.actp-card {
  width: calc((100% - 60px) / 4);
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--actp-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(20, 60, 140, .05);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.actp-card:hover { transform: translateY(-4px); border-color: #d9e5ff; box-shadow: 0 18px 38px rgba(20, 60, 140, .13); }
.actp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--actp-line);
}
.actp-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--actp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.actp-card-tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 3px;
  background: #eef4ff;
  color: var(--actp-blue);
  font-size: 12px;
}
.actp-card-specs { flex: 1; margin: 0 0 18px; padding: 0; list-style: none; }
.actp-card-specs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed #f0f3fa;
  font-size: 13px;
}
.actp-card-specs li:last-child { border-bottom: 0; }
.actp-card-specs li span { color: #9aa4b5; }
.actp-card-specs li b { display: flex; align-items: center; gap: 6px; color: var(--actp-ink); font-weight: 500; }
.actp-badge {
  padding: 0 6px;
  border: 1px solid #ff7200;
  border-radius: 3px;
  color: #ff7200;
  font-size: 12px;
  font-style: normal;
  line-height: 16px;
  font-weight: 400;
}
.actp-card-foot { margin-top: auto; }
.actp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px; margin-bottom: 14px; }
.actp-price-num { color: var(--actp-blue); font-size: 30px; font-weight: 700; line-height: 1; }
.actp-price-unit { margin-left: 2px; color: var(--actp-blue); font-size: 13px; font-weight: 600; }
.actp-price-sub { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 6px; }
.actp-avg { color: var(--actp-muted); font-size: 12px; }
.actp-orig { color: #b3bccb; font-size: 12px; }
.actp-buy {
  display: block;
  height: 42px;
  border-radius: 6px;
  background: var(--actp-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 42px;
  text-align: center;
  text-decoration: none;
  transition: background .2s;
}
.actp-buy:hover { background: var(--actp-gold); color: #fff; }
.actp-buy-disabled { background: #c9d3e6; cursor: not-allowed; }
.actp-empty { padding: 64px 0; text-align: center; color: #9aa4b5; }

/* ---------------- Responsive ---------------- */
@media screen and (max-width: 1240px) { .actp-wrap { width: 100%; } }

@media screen and (max-width: 992px) {
  .actp-hero-inner { flex-direction: column; align-items: flex-start; gap: 28px; padding-top: 44px; padding-bottom: 48px; }
  .actp-hero-cards { flex: 0 0 auto; width: 100%; }
  .actp-hl-inner { grid-template-columns: repeat(2, 1fr); }
  .actp-hl-item { border-right: 0; border-bottom: 1px solid var(--actp-line); }
  .actp-card { width: calc((100% - 40px) / 3); }
}

@media screen and (max-width: 768px) {
  .actp-hero-title { font-size: 26px; }
  .actp-hero-desc { font-size: 14px; }
  .actp-hl-inner { grid-template-columns: 1fr; }
  .actp-prod { padding: 36px 0 48px; }
  .actp-sec-title { font-size: 22px; }
  .actp-grid { gap: 14px; }
  .actp-card { width: calc((100% - 14px) / 2); }
  .actp-card { padding: 16px; }
  .actp-price-num { font-size: 26px; }
}

@media screen and (max-width: 520px) {
  .actp-card { width: 100%; }
}

/* ---------------- 站内购买弹窗 ---------------- */
.actp-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.actp-modal[hidden] { display: none; }
.actp-modal-mask { position: absolute; inset: 0; background: rgba(10, 18, 38, .58); backdrop-filter: blur(2px); }
.actp-modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 1100px;
  max-width: 100%;
  height: 88vh;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(8, 20, 50, .35);
  overflow: hidden;
}
.actp-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 14px 20px;
  border-bottom: 1px solid var(--actp-line);
  background: #f8fafd;
}
.actp-modal-title { flex: 1; font-size: 16px; font-weight: 600; color: var(--actp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actp-modal-newwin { flex: 0 0 auto; color: var(--actp-blue); font-size: 13px; text-decoration: none; }
.actp-modal-newwin:hover { text-decoration: underline; }
.actp-modal-close {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border: 0; border-radius: 8px;
  background: transparent; color: #8a94a6;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.actp-modal-close:hover { background: #eef2f9; color: #333; }
.actp-modal-body { position: relative; flex: 1; min-height: 0; }
.actp-modal-frame { width: 100%; height: 100%; border: 0; display: block; }
.actp-modal-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9aa4b5; font-size: 14px; background: #fff; }

@media screen and (max-width: 768px) {
  .actp-modal { padding: 0; }
  .actp-modal-box { width: 100%; height: 100%; border-radius: 0; }
}
