/* ============================================
   天鸿智算 - 全局样式表
   主题色系：红色系
   ============================================ */

/* CSS 变量定义 - 红色主题 */
:root {
  /* 主色板 - 红色系 */
  --primary-50: #fef2f2;
  --primary-100: #fee2e2;
  --primary-200: #fecaca;
  --primary-300: #fca5a5;
  --primary-400: #f87171;
  --primary-500: #ef4444;
  --primary-600: #dc2626;
  --primary-700: #b91c1c;
  --primary-800: #991b1b;
  --primary-900: #7f1d1d;
  
  /* 辅助色 */
  --accent-red: #ff4d4f;
  --accent-hover: #ff7875;
  --hot-badge: #ff4d4f;
  --new-badge: #1890ff;
  --success: #52c41a;
  --warning: #faad14;
  
  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, #ff6b6b 0%, #dc2626 100%);
  --gradient-hero: linear-gradient(135deg, #fef2f2 0%, #fee2e2 50%, #fecaca 100%);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
  
  /* 文字颜色 */
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-white: #ffffff;
  --text-red: #dc2626;
  
  /* 背景色 */
  --bg-white: #ffffff;
  --bg-gray-50: #f9fafb;
  --bg-gray-100: #f3f4f6;
  --bg-red-50: #fef2f2;
  --bg-red-100: #fee2e2;
  
  /* 边框 */
  --border-gray: #e5e7eb;
  --border-red: #fecaca;
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-red: 0 4px 14px 0 rgba(220, 38, 38, 0.25);
  
  /* 间距 */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* 圆角 */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* 过渡 */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* 布局 */
  --header-height: 64px;
  --container-max: 1280px;
  --nav-dropdown-width: 100vw;
}

/* 重置样式 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* 容器 */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--space-lg);
}

/* 按钮组件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-white);
  box-shadow: var(--shadow-red);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-red);
  border: 1px solid var(--border-red);
}

.btn-secondary:hover {
  background: var(--bg-red-50);
  border-color: var(--primary-400);
}

.btn-outline {
  background: transparent;
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-white);
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
}

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-hot {
  background: var(--hot-badge);
  color: var(--text-white);
}

.badge-new {
  background: var(--new-badge);
  color: var(--text-white);
}

/* 卡片组件 */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-gray);
}

.card-body {
  padding: var(--space-lg);
}

.card-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-gray);
  background: var(--bg-gray-50);
}

/* 价格卡片 - 2行×4列布局（更紧凑） */
.price-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-gray);
  padding: 1rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.price-card:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-red);
  transform: translateY(-4px);
}

.price-card-featured {
  border-color: var(--primary-500);
  background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
  border-width: 2px;
}

.price-card-featured .price-card-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--gradient-primary);
  color: var(--text-white);
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-bottom-left-radius: var(--radius-lg);
  letter-spacing: 0.5px;
}

.price-card-custom {
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  border-style: dashed;
  border-color: var(--border-gray-dark);
}

/* 价格卡片内部组件（更紧凑） */
.price-card-header {
  margin-bottom: 0.75rem;
}

.price-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.price-card-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.price-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 2rem;
  white-space: nowrap;
}

.price-card-label-popular {
  background: rgba(239, 68, 68, 0.1);
  color: var(--primary-600);
}

.price-card-label-hot {
  background: rgba(255, 77, 79, 0.1);
  color: #ff4d4f;
}

.price-card-label-premium {
  background: rgba(156, 39, 176, 0.1);
  color: #9c27b0;
}

.price-card-label-budget {
  background: rgba(33, 150, 243, 0.1);
  color: #2196f3;
}

.price-card-label-professional {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.price-card-label-classic {
  background: rgba(255, 152, 0, 0.1);
  color: #ff9800;
}

.price-card-label-value {
  background: rgba(103, 58, 183, 0.1);
  color: #673ab7;
}

.price-card-label-custom {
  background: rgba(158, 158, 158, 0.1);
  color: #9e9e9e;
}

.price-card-price {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-gray);
}

.price-card-amount {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-red);
  line-height: 1;
  display: block;
}

.price-card-unit {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 0.25rem;
}

.price-card-features {
  flex: 1;
  margin-bottom: 0.75rem;
}

.price-card-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.price-card-check-icon {
  color: var(--primary-500);
  font-size: 0.75rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.btn-full {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  font-weight: 600;
  border-radius: var(--radius-md);
}

/* 标题样式 */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-align: center;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-red-50);
  color: var(--text-red);
  border: 1px solid var(--border-red);
}

/* 分隔线 */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gray), transparent);
  margin: var(--space-2xl) 0;
}

/* 网格布局 */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* 弹性布局 */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

/* 间距 */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.py-3xl { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }

/* 动画 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease forwards;
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-slideIn {
  animation: slideIn 0.4s ease forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* 延迟动画 */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-red { color: var(--text-red); }

.bg-white { background-color: var(--bg-white); }
.bg-gray-50 { background-color: var(--bg-gray-50); }
.bg-red-50 { background-color: var(--bg-red-50); }

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 响应式 */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .section-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .btn {
    width: 100%;
  }
}

/* 打印样式 */
@media print {
  .no-print {
    display: none !important;
  }
}

/* ============================================
   下拉菜单全局样式补充 - 宽屏全宽布局
   ============================================ */

/* 确保下拉菜单内容正确显示 */
.dropdown-content {
  display: block;
}

/* 下拉菜单面板 - 宽屏全宽 */
.dropdown-panel {
  box-sizing: border-box;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 菜单网格 - 宽屏多列布局 */
.menu-grid {
  width: 100%;
}

/* 产品网格 - 宽屏布局 */
.product-grid {
  width: 100%;
}

/* 下拉菜单Tab内容显示 */
.dropdown-tab-content {
  width: 100%;
}

.dropdown-tab-content.active {
  display: block !important;
}

/* 菜单项hover效果 */
.menu-item:hover {
  background: rgba(254, 242, 242, 0.5);
  border-radius: 4px;
}

/* 产品项hover效果 */
.product-item:hover {
  background: var(--bg-red-50);
  border-radius: var(--radius-lg);
}
