
/* ============================================
   产品列表页 v2.0 - 大厂风格重构
   ============================================ */

/* === 布局结构 === */
.cc-products-row {
  padding: 24px 32px;
}

.cc-products-main {
  flex: 1;
  min-width: 0;
}

/* === 主容器卡片 === */
.cc-products-card {
  background: #fff;
  border: 1px solid var(--cc-border);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(15,23,42,.04);
  min-height: calc(100vh - 200px);
  overflow: hidden;
}

/* === 顶部 Hero 区域 === */
.cc-products-hero {
  position: relative;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  padding: 32px 28px;
  overflow: hidden;
}

.cc-products-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
  pointer-events: none;
}

.cc-products-hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
  pointer-events: none;
}

.cc-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cc-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cc-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}

.cc-hero-text h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.cc-hero-text p {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  margin: 0;
  line-height: 1.5;
}

.cc-hero-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cc-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255,255,255,.95);
  color: var(--cc-blue);
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.cc-hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  color: var(--cc-blue);
  text-decoration: none;
}

.cc-hero-btn.cc-btn-ghost {
  background: rgba(255,255,255,.15);
  color: #fff;
  backdrop-filter: blur(8px);
}

.cc-hero-btn.cc-btn-ghost:hover {
  background: rgba(255,255,255,.25);
  color: #fff;
}

/* === 统计条 === */
.cc-stats-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 28px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid var(--cc-border);
}

.cc-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--cc-muted);
}

.cc-stat-item i {
  font-size: 16px;
  color: var(--cc-blue);
}

.cc-stat-value {
  font-weight: 700;
  color: var(--cc-text);
}

.cc-stat-divider {
  width: 1px;
  height: 16px;
  background: var(--cc-border);
}

/* === 产品网格区域 === */
.cc-products-body {
  padding: 28px;
}

.cc-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* === 产品卡片 - 全新设计 === */
.cc-product-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--cc-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.cc-product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(37,99,235,.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cc-product-card:hover {
  border-color: rgba(37,99,235,.3);
  box-shadow: 0 20px 40px rgba(37,99,235,.12);
  transform: translateY(-6px);
}

.cc-product-card:hover::before {
  opacity: 1;
}

/* 卡片头部 */
.cc-product-head {
  position: relative;
  padding: 20px 20px 16px;
  background: linear-gradient(135deg, #fafbff 0%, #fff 100%);
  border-bottom: 1px solid rgba(226,232,240,.6);
}

.cc-product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cc-badge-hot {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
}

.cc-badge-new {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.cc-badge-sale {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.cc-product-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--cc-text);
  margin: 0 0 8px;
  padding-right: 60px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cc-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cc-tag-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(37,99,235,.06);
  color: var(--cc-blue);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
}

.cc-tag-mini i {
  font-size: 12px;
}

/* 卡片内容 */
.cc-product-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cc-product-desc {
  font-size: 13px;
  color: var(--cc-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
  display: block;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
}

/* 库存状态 - 全新设计 */
.cc-stock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.cc-stock-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.cc-stock-available {
  background: linear-gradient(135deg, rgba(16,185,129,.1), rgba(16,185,129,.05));
  color: #059669;
  border: 1px solid rgba(16,185,129,.2);
}

.cc-stock-limited {
  background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(245,158,11,.05));
  color: #d97706;
  border: 1px solid rgba(245,158,11,.25);
}

.cc-stock-empty {
  background: linear-gradient(135deg, rgba(100,116,139,.1), rgba(100,116,139,.05));
  color: #64748b;
  border: 1px solid rgba(100,116,139,.2);
}

.cc-stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: stockPulse 2s infinite;
}

.cc-stock-limited .cc-stock-dot {
  animation: stockPulseWarn 1.5s infinite;
}

.cc-stock-empty .cc-stock-dot {
  animation: none;
  opacity: 0.5;
}

@keyframes stockPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

@keyframes stockPulseWarn {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.cc-stock-label {
  font-size: 11px;
  color: #94a3b8;
  padding: 3px 8px;
  background: #f1f5f9;
  border-radius: 6px;
}

/* 价格区域 - 大厂风格 */
.cc-price-section {
  margin-bottom: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #fef3f2 0%, #fff 100%);
  border-radius: 12px;
  border: 1px solid rgba(239,68,68,.08);
}

.cc-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.cc-currency {
  font-size: 16px;
  color: #dc2626;
  font-weight: 700;
}

.cc-price-value {
  font-size: 32px;
  font-weight: 800;
  color: #dc2626;
  line-height: 1;
  letter-spacing: -0.02em;
}

.cc-price-unit {
  font-size: 13px;
  color: var(--cc-muted);
  margin-left: 4px;
}

.cc-price-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.cc-price-original {
  font-size: 12px;
  color: #94a3b8;
  text-decoration: line-through;
}

.cc-price-discount {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: linear-gradient(135deg, #fef2f2, #fecaca);
  color: #dc2626;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.cc-price-trial {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  border-radius: 8px;
  font-size: 12px;
  color: #92400e;
  border: 1px solid rgba(245,158,11,.2);
}

.cc-price-trial i {
  color: #f59e0b;
}

.cc-price-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  color: var(--cc-muted);
  font-size: 14px;
}

.cc-price-login i {
  font-size: 18px;
}

/* 购买按钮 - 高级渐变 */
.cc-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(37,99,235,.3);
  position: relative;
  overflow: hidden;
}

.cc-buy-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transition: left 0.5s ease;
}

.cc-buy-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(37,99,235,.4);
  color: #fff;
  text-decoration: none;
}

.cc-buy-btn:hover::before {
  left: 100%;
}

.cc-buy-btn:active {
  transform: translateY(-1px);
}

.cc-buy-btn.cc-btn-disabled {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.cc-buy-btn.cc-btn-disabled::before {
  display: none;
}

/* 售罄状态 */
.cc-product-card.cc-sold-out {
  opacity: 0.75;
}

.cc-product-card.cc-sold-out .cc-product-head {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.cc-product-card.cc-sold-out .cc-product-name {
  padding-right: 120px;
}

.cc-product-card.cc-sold-out:hover {
  transform: none;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}

.cc-soldout-overlay {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: rgba(71,85,105,.92);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(4px);
  z-index: 2;
  pointer-events: none;
}

/* === 分页优化 === */
.cc-products-footer {
  padding: 24px 28px;
  border-top: 1px solid var(--cc-border);
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

.cc-products-footer .pagination {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.cc-products-footer .pagination li {
  list-style: none;
}

.cc-products-footer .pagination li a,
.cc-products-footer .pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  color: var(--cc-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cc-products-footer .pagination li a:hover {
  border-color: var(--cc-blue);
  color: var(--cc-blue);
  background: rgba(37,99,235,.04);
}

.cc-products-footer .pagination li.active a,
.cc-products-footer .pagination li.active span {
  background: linear-gradient(135deg, var(--cc-blue), var(--cc-blue-600));
  border-color: var(--cc-blue-600);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,.25);
}

/* === 空状态 === */
.cc-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
}

.cc-empty-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-empty-icon i {
  font-size: 48px;
  color: #94a3b8;
}

.cc-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--cc-text);
  margin: 0 0 8px;
}

.cc-empty-desc {
  font-size: 14px;
  color: var(--cc-muted);
  margin: 0 0 24px;
  max-width: 320px;
}

.cc-empty-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--cc-blue), var(--cc-blue-600));
  color: #fff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 8px 20px rgba(37,99,235,.25);
}

.cc-empty-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37,99,235,.35);
  color: #fff;
  text-decoration: none;
}

/* === 弹窗优化 === */
#chooseHowModal .modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 0 25px 80px rgba(15,23,42,.2);
  overflow: hidden;
}

#chooseHowModal .modal-header {
  border-bottom: 1px solid var(--cc-border);
  padding: 24px 28px;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

#chooseHowModal .modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--cc-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

#chooseHowModal .modal-body {
  padding: 28px;
}

#chooseHowModal .modal-footer {
  border-top: 1px solid var(--cc-border);
  padding: 20px 28px;
  background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
  gap: 12px;
}

.cc-guide-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 14px;
  margin-bottom: 20px;
}

.cc-guide-tip-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cc-blue), var(--cc-blue-600));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.cc-guide-tip-text {
  font-size: 14px;
  color: var(--cc-text);
  line-height: 1.6;
}

.cc-perf-card {
  background: #fff;
  border: 1px solid var(--cc-border);
  border-radius: 14px;
  padding: 20px;
}

.cc-perf-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--cc-text);
  margin-bottom: 12px;
}

.cc-perf-title i {
  color: #f59e0b;
}

.cc-perf-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--cc-muted);
  line-height: 1.6;
}

.cc-perf-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cc-perf-item::after {
  content: ">";
  color: #cbd5e1;
  margin-left: 4px;
}

.cc-perf-item:last-child::after {
  display: none;
}

/* === 动画效果 === */
.cc-product-card {
  animation: cardFadeIn 0.5s ease forwards;
  opacity: 0;
}

.cc-product-card:nth-child(1) { animation-delay: 0.05s; }
.cc-product-card:nth-child(2) { animation-delay: 0.1s; }
.cc-product-card:nth-child(3) { animation-delay: 0.15s; }
.cc-product-card:nth-child(4) { animation-delay: 0.2s; }
.cc-product-card:nth-child(5) { animation-delay: 0.25s; }
.cc-product-card:nth-child(6) { animation-delay: 0.3s; }
.cc-product-card:nth-child(7) { animation-delay: 0.35s; }
.cc-product-card:nth-child(8) { animation-delay: 0.4s; }
.cc-product-card:nth-child(9) { animation-delay: 0.45s; }

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === 响应式设计 === */
@media (max-width: 1400px) {
  .cc-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .cc-products-row {
    padding: 16px;
  }
  
  .cc-products-hero {
    padding: 24px 20px;
  }
  
  .cc-hero-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cc-hero-actions {
    width: 100%;
  }
  
  .cc-hero-btn {
    flex: 1;
    justify-content: center;
  }
  
  .cc-stats-bar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
  }
  
  .cc-products-body {
    padding: 20px;
  }
  
  .cc-products-grid {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .cc-products-grid {
    grid-template-columns: 1fr;
  }
  
  .cc-hero-text h2 {
    font-size: 18px;
  }
  
  .cc-hero-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .cc-price-value {
    font-size: 26px;
  }
  
  .cc-buy-btn {
    height: 48px;
    font-size: 15px;
  }
  
  .cc-stat-divider {
    display: none;
  }
  
  .cc-stats-bar {
    justify-content: space-between;
  }
}

/* === Footer 覆盖样式 === */
.cc-footer {
  margin: 32px 0 24px !important;
  padding: 0 !important;
  width: 100% !important;
}

.cc-footer-container {
  max-width: 100% !important;
  margin: 0 32px !important;
}

@media (max-width: 768px) {
  .cc-footer {
    margin: 24px 12px !important;
  }
  .cc-footer-container {
    margin: 0 !important;
  }
}
