/* ============================================================
 * 现代产品卡片设计（2026-10-20）
 * 参考 dn23.com：真实感图片区 + 清晰信息层级
 * ============================================================ */

/* ================= 产品网格布局 ================= */

.tc-sc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

/* ================= 产品卡片主体 ================= */

.tc-scard {
  position: relative;
  background: white;
  border: 1px solid #e8e9eb;
  border-radius: 16px;
  overflow: hidden;
  transition: all 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tc-scard:hover {
  border-color: #165dff;
  box-shadow: 0 16px 40px rgba(22, 93, 255, 0.12);
  transform: translateY(-8px);
}

/* ================= 顶部图片区（渐变背景 + 装饰图案） ================= */

.tc-scard-bg {
  position: relative;
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 根据卡片序号使用不同的渐变色 */
.tc-scard:nth-child(1) .tc-scard-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tc-scard:nth-child(2) .tc-scard-bg {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.tc-scard:nth-child(3) .tc-scard-bg {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.tc-scard:nth-child(4) .tc-scard-bg {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.tc-scard:nth-child(5) .tc-scard-bg {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.tc-scard:nth-child(6) .tc-scard-bg {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

/* 循环使用渐变 */
.tc-scard:nth-child(n+7):nth-child(6n+1) .tc-scard-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tc-scard:nth-child(n+7):nth-child(6n+2) .tc-scard-bg {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 背景装饰图案 */
.tc-scard-bg::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  top: -50px;
  right: -50px;
  animation: float 6s ease-in-out infinite;
}

.tc-scard-bg::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -30px;
  left: -30px;
  animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10px, -10px) scale(1.05); }
}

/* 视频背景（如果有） */
.tc-scard-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  mix-blend-mode: overlay;
}

/* ================= 产品图标/插图（移除旧的圆形图标，改用现代设计） ================= */

.dn-card-art {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  font-size: 48px;
  color: white;
  opacity: 0.95;
  transition: all 350ms ease-out;
  z-index: 5;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.tc-scard:hover .dn-card-art {
  transform: translate(-50%, -50%) scale(1.15) rotate(-5deg);
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ================= 促销标签（热销/推荐） ================= */

.tc-scard-promo {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, #ff6b6b, #ff8e53);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ================= 卡片内容区 ================= */

.tc-scard-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: white;
}

/* ================= 产品标题 ================= */

.tc-scard-title {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
}

/* ================= 产品描述（新增） ================= */

.tc-scard-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* ================= 规格标签 ================= */

.tc-scard-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.tc-spec-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #f5f7fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
  color: #4b5563;
  font-weight: 500;
  transition: all 200ms ease-out;
}

/* 核心配置突出显示 */
.tc-spec-chip.is-core,
.tc-spec-chip.is-mem,
.tc-spec-chip.is-bw {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05));
  border-color: rgba(102, 126, 234, 0.3);
  color: #667eea;
  font-weight: 600;
}

.tc-scard:hover .tc-spec-chip {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.1));
  border-color: rgba(102, 126, 234, 0.4);
  transform: translateY(-1px);
}

/* ================= 额外说明 ================= */

.tc-scard-extra {
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
  line-height: 1.5;
}

/* ================= 分类标签 ================= */

.tc-scard-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  margin: 4px 0;
}

.tc-scard-tag {
  background: #f3f4f6;
  color: #6b7280;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
}

/* ================= 底部价格与按钮 ================= */

.tc-scard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #f0f1f4;
}

/* ================= 价格显示（橙色突出） ================= */

.tc-scard-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-weight: 800;
  color: #ff6b35;
  line-height: 1;
}

.tc-scard-price .cur {
  font-size: 16px;
  color: #ff6b35;
  font-weight: 700;
}

.tc-scard-price {
  font-size: 32px;
}

.tc-scard-price .unit {
  font-size: 14px;
  color: #9ca3af;
  font-weight: 500;
  margin-left: 2px;
}

/* ================= 选购按钮 ================= */

.tc-scard-btn {
  flex: 0 0 auto;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
  letter-spacing: 0.3px;
}

.tc-scard-btn:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a6fd8 0%, #6a3d92 100%);
}

.tc-scard-btn:active:not(.disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.tc-scard-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #d1d5db;
  box-shadow: none;
}

/* ================= 售罄状态 ================= */

.tc-scard.is-soldout {
  opacity: 0.65;
}

.tc-scard.is-soldout .tc-scard-bg {
  filter: grayscale(60%);
}

.tc-scard-soldout {
  margin-left: 8px;
  font-size: 11px;
}

/* ================= 响应式 ================= */

@media (max-width: 768px) {
  .tc-sc-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tc-scard-bg {
    height: 150px;
  }

  .dn-card-art {
    width: 80px;
    height: 80px;
    font-size: 36px;
  }

  .tc-scard-body {
    padding: 20px;
  }

  .tc-scard-title {
    font-size: 17px;
  }

  .tc-scard-price {
    font-size: 28px;
  }

  .tc-scard-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* ================= 深色模式 ================= */

@media (prefers-color-scheme: dark) {
  .tc-scard {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.08);
  }

  .tc-scard:hover {
    border-color: #667eea;
  }

  .tc-scard-body {
    background: #1f2937;
  }

  .tc-scard-title {
    color: #f9fafb;
  }

  .tc-spec-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
  }

  .tc-spec-chip.is-core,
  .tc-spec-chip.is-mem,
  .tc-spec-chip.is-bw {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    color: #a5b4fc;
  }

  .tc-scard-foot {
    border-top-color: rgba(255, 255, 255, 0.08);
  }

  .tc-scard-tag {
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
  }
}
