/* 现代化设计系统 */
:root {
  /* 主色调 */
  --primary-50: #fef2f2;
  --primary-100: #fee2e2;
  --primary-500: #ef4444;
  --primary-600: #dc2626;
  --primary-700: #b91c1c;
  
  /* 中性色 */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* 语义色 */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* 边框半径 */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* 动画 */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-50);
  min-height: 100vh;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 头部区域 - 现代化设计 */
.header {
  background: linear-gradient(135deg, #ff6b7a 0%, #ff8e9e 25%, #ff6b7a 50%, #ff4757 75%, #ff3838 100%);
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.header::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><pattern id="header-pattern" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.08)"/><circle cx="50" cy="50" r="1.5" fill="rgba(255,255,255,0.12)"/></pattern></defs><rect width="200" height="200" fill="url(%23header-pattern)"/></svg>');
  animation: headerPatternFloat 8s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.6;
}

@keyframes headerPatternFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-10px, -5px) rotate(1deg); }
  66% { transform: translate(5px, -10px) rotate(-0.5deg); }
}

.header-content {
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
  position: relative;
  z-index: 2;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  border-radius: 0 0 50px 50px;
  backdrop-filter: blur(1px);
}

.header-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
  animation: headerIconFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.3));
  position: relative;
}

.header-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: headerIconGlow 3s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes headerIconFloat {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-12px) scale(1.05);
  }
}

@keyframes headerIconGlow {
  0% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

.header-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.header-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 20%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.6) 80%, transparent 100%);
  border-radius: 2px;
  animation: headerTitleUnderline 2s ease-in-out infinite;
}

@keyframes headerTitleUnderline {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleX(0.8); }
  50% { opacity: 1; transform: translateX(-50%) scaleX(1); }
}

.header-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  font-weight: 500;
  margin-bottom: 2.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.01em;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}


/* 主内容区域 */
.main {
  flex: 1;
  padding: 2rem 0 8rem 0; /* 增加底部边距，避免被固定底部遮挡 */
}

/* 加载骨架屏 - 优雅设计 */
.loading-skeleton {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.skeleton-card {
  background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: skeletonPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.skeleton-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 122, 0.05), transparent);
  animation: skeletonShimmer 2s ease-in-out infinite;
}

@keyframes skeletonPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(0.98);
  }
}

@keyframes skeletonShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.skeleton-card::after {
  content: '';
  display: block;
  width: 100%;
  height: 4rem;
  background: linear-gradient(135deg, rgba(255, 107, 122, 0.1) 0%, rgba(255, 142, 158, 0.1) 100%);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  position: relative;
}

.skeleton-card::after {
  height: 1rem;
  width: 60%;
  margin: 0.5rem auto 0;
}

/* 产品网格 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* 产品卡片 - 现代化设计 */
.product-card {
  background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(10px);
}

.product-card:focus {
  outline: 2px solid rgba(255, 107, 122, 0.5);
  outline-offset: 2px;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff6b7a, #ff8e9e, #ff6b7a);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.product-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 107, 122, 0.05) 0%, rgba(255, 142, 158, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-xl);
}

.product-card:hover {
  border-color: rgba(255, 107, 122, 0.3);
  box-shadow:
    0 12px 40px rgba(255, 107, 122, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-6px) scale(1.02);
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card:hover::after {
  opacity: 1;
}

.product-card:active {
  transform: translateY(-3px) scale(1.01);
  transition: transform 0.1s ease;
}

/* 产品卡片呼吸效果 */
@keyframes productCardBreathe {
  0%, 100% {
    box-shadow:
      0 4px 20px rgba(0, 0, 0, 0.08),
      0 2px 8px rgba(0, 0, 0, 0.04);
  }
  50% {
    box-shadow:
      0 6px 25px rgba(255, 107, 122, 0.1),
      0 3px 12px rgba(0, 0, 0, 0.06);
  }
}

.product-card {
  animation: productCardBreathe 4s ease-in-out infinite;
}

@media (max-width: 768px) {
  .product-card.expanded {
    grid-column: 1 / -1;
    transform: none;
    box-shadow: var(--shadow-xl);
  }
  
  .product-card.expanded:hover {
    transform: none;
  }
}

/* 产品头部 */
.product-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-slow);
  margin-bottom: 0.5rem;
}

.product-card.expanded .product-header {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-logo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-lg);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.product-card:hover .product-logo {
  box-shadow:
    0 6px 20px rgba(255, 107, 122, 0.2),
    0 3px 10px rgba(0, 0, 0, 0.08);
  transform: scale(1.08) rotate(2deg);
  border-color: rgba(255, 107, 122, 0.3);
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 3.5rem;
}

.product-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
  line-height: 1.4;
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-price-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.min-price {
  color: #ff4757;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.min-price::before {
  content: '¥';
  font-size: 0.875rem;
  margin-right: 1px;
  color: #ff4757;
}

/* 展开标题 */
.expanded-title {
  display: none;
  text-align: center;
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card.expanded .expanded-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.expanded-title-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.expanded-title-text {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 产品详情 */
.product-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card.expanded .product-details {
  max-height: 100vh;
}

.detail-item {
  border-top: 1px solid var(--gray-100);
  padding: 1.25rem 0;
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-item:first-child {
  border-top: none;
  padding-top: 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.detail-name {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--gray-800);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.detail-name-text {
  color: var(--gray-800);
}

.detail-name-price {
  color: var(--primary-600);
  font-weight: 700;
  font-size: 1.25rem;
  white-space: nowrap;
}

.detail-name-price::before {
  content: '¥';
  font-size: 1rem;
  margin-right: 2px;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .detail-name {
    font-size: 1rem;
    gap: 0.75rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .detail-name-text {
    flex: 1;
    font-size: 0.9375rem;
  }
  
  .detail-name-price {
    font-size: 1.125rem;
    flex-shrink: 0;
  }
}

/* 隐藏原来的价格显示 */
.detail-price {
  display: none;
}

.detail-desc {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
  line-height: 1.6;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border-left: 3px solid var(--primary-200);
}

/* 购买按钮 - 现代化设计 */
.buy-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  z-index: 5;
}

.buy-btn {
  flex: 1;
  min-width: 120px;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

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

.buy-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

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

.buy-btn:hover::after {
  width: 300px;
  height: 300px;
}

.buy-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.buy-btn-taobao {
  background: linear-gradient(135deg, #ff6500 0%, #ff8c00 50%, #ffab00 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 6px 20px rgba(255, 101, 0, 0.3),
    0 3px 10px rgba(255, 101, 0, 0.2);
}

.buy-btn-taobao:hover {
  background: linear-gradient(135deg, #ff5500 0%, #ff7a00 50%, #ff9900 100%);
  box-shadow:
    0 8px 30px rgba(255, 101, 0, 0.4),
    0 4px 15px rgba(255, 101, 0, 0.3);
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.4);
}

.buy-btn-jd {
  background: linear-gradient(135deg, #e3393c 0%, #ff4757 50%, #ff6b7a 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 6px 20px rgba(227, 57, 60, 0.3),
    0 3px 10px rgba(227, 57, 60, 0.2);
}

.buy-btn-jd:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #ff3742 50%, #ff5a6b 100%);
  box-shadow:
    0 8px 30px rgba(227, 57, 60, 0.4),
    0 4px 15px rgba(227, 57, 60, 0.3);
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.4);
}

/* 购买按钮样式保持简洁 */

/* 收起提示 */
.collapse-hint {
  display: none;
  text-align: center;
  padding: 1rem;
  margin-top: 1rem;
  color: var(--gray-500);
  font-size: 0.875rem;
  border-top: 1px solid var(--gray-200);
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius);
}

.product-card.expanded .collapse-hint {
  display: block;
}

.collapse-hint::before {
  content: '👆 ';
}

.collapse-hint:hover {
  color: var(--primary-600);
  background: var(--gray-50);
}

/* 空状态 - 优雅设计 */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-500);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.5) 0%, rgba(249, 250, 251, 0.3) 100%);
  border-radius: var(--radius-xl);
  border: 2px dashed rgba(255, 107, 122, 0.2);
  margin: 2rem auto;
  max-width: 500px;
  position: relative;
  overflow: hidden;
}

.empty-state::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 107, 122, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.empty-icon {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
  animation: emptyIconFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(255, 107, 122, 0.2));
}

@keyframes emptyIconFloat {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.05);
  }
}

.empty-state h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #374151 0%, #6b7280 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.empty-state p {
  font-size: 1rem;
  color: var(--gray-500);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

/* Toast 提示 - 精致居中设计 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.9) 100%);
  color: #374151;
  padding: 1.5rem 2rem;
  border-radius: 16px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 8px 32px rgba(255, 107, 122, 0.1);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 9999;
  text-align: center;
  font-weight: 500;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  max-width: 320px;
  min-width: 280px;
  line-height: 1.5;
  font-size: 0.9375rem;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.2),
    0 12px 40px rgba(255, 107, 122, 0.15);
}

/* Toast 内容样式 */
.toast-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toast-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  animation: toastIconPulse 2s ease-in-out infinite;
}

@keyframes toastIconPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.toast-text {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.4;
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

/* 移动端优化 */
@media (max-width: 1024px) {
  .container {
    padding: 0 0.75rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .header {
    min-height: 160px;
  }

  .header-content {
    padding: 2.5rem 1rem 2rem;
    border-radius: 0 0 40px 40px;
  }

  .header-icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
  }

  .header-title {
    font-size: 2.5rem;
    margin-bottom: 0.875rem;
  }

  .header-title::after {
    width: 100px;
    height: 3px;
    bottom: -6px;
  }

  .main {
    padding: 1.5rem 0 7rem 0;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .loading-skeleton {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .product-card {
    padding: 1rem;
  }

  .expanded-title {
    padding: 0.75rem 0 0.5rem;
  }

  .collapse-hint {
    padding: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
  }

  .product-logo {
    width: 3rem;
    height: 3rem;
  }

  .product-info {
    min-height: 3rem;
  }

  .product-title {
    font-size: 1.0625rem;
  }

  .min-price {
    font-size: 1.125rem;
  }

  .detail-price {
    font-size: 1.25rem;
  }

  .detail-header {
    margin-bottom: 0.5rem;
  }

  .detail-item {
    padding: 0.75rem 0;
    margin-top: 0.5rem;
  }

  .detail-item:first-child {
    padding-top: 0;
  }

  .detail-desc {
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  .detail-desc {
    padding: 0.625rem;
    font-size: 0.8125rem;
  }

  .buy-buttons {
    gap: 0.5rem;
    margin-top: 0.75rem;
  }

  .buy-btn {
    min-width: auto;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .expanded-title-text {
    font-size: 1.125rem;
  }

  .expanded-title-logo {
    width: 2.25rem;
    height: 2.25rem;
  }

  /* Toast 移动端优化 */
  .toast {
    max-width: calc(100vw - 3rem);
    min-width: 260px;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
  }

  .toast-content {
    gap: 0.5rem;
  }

  .toast-icon {
    font-size: 1.25rem;
  }

  .toast-text {
    font-size: 0.875rem;
  }
}

/* 红包浮窗 - 现代化设计 */
.red-packet-float {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #ff4757 0%, #ff3838 50%, #ff2350 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 8px 32px rgba(255, 71, 87, 0.4),
    0 4px 16px rgba(255, 71, 87, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid rgba(255, 255, 255, 0.3);
  animation: redPacketFloat 3s ease-in-out infinite, redPacketPulse 2.5s ease-in-out infinite;
}

.red-packet-float::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ff6b7a, #ff8e9e, #ff6b7a);
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: redPacketGlow 2s ease-in-out infinite alternate;
}

.red-packet-float:hover {
  transform: translateY(-50%) scale(1.15);
  box-shadow:
    0 12px 40px rgba(255, 71, 87, 0.5),
    0 6px 20px rgba(255, 71, 87, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

.red-packet-float:hover::before {
  opacity: 1;
}

.red-packet-float:active {
  transform: translateY(-50%) scale(1.05);
  transition: transform 0.1s ease;
}

.red-packet-icon {
  font-size: 32px;
  animation: redPacketBounce 2.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
  position: relative;
  z-index: 2;
}

/* 红包浮窗装饰点 */
.red-packet-float::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: redPacketSparkle 1.5s ease-in-out infinite;
}

@keyframes redPacketFloat {
  0%, 100% {
    transform: translateY(-50%) translateX(0px);
  }
  25% {
    transform: translateY(-50%) translateX(-2px);
  }
  75% {
    transform: translateY(-50%) translateX(2px);
  }
}

@keyframes redPacketPulse {
  0% {
    box-shadow:
      0 8px 32px rgba(255, 71, 87, 0.4),
      0 4px 16px rgba(255, 71, 87, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 0 0 rgba(255, 71, 87, 0.7);
  }
  50% {
    box-shadow:
      0 8px 32px rgba(255, 71, 87, 0.4),
      0 4px 16px rgba(255, 71, 87, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 0 15px rgba(255, 71, 87, 0);
  }
  100% {
    box-shadow:
      0 8px 32px rgba(255, 71, 87, 0.4),
      0 4px 16px rgba(255, 71, 87, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 0 0 rgba(255, 71, 87, 0);
  }
}

@keyframes redPacketBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-3px);
  }
  60% {
    transform: translateY(-2px);
  }
}

@keyframes redPacketGlow {
  0% { opacity: 0.3; }
  100% { opacity: 0.8; }
}

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

/* 红包弹窗 - 现代化卡片设计 */
.red-packet-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.1);
}

.red-packet-modal.show {
  opacity: 1;
  visibility: visible;
  backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.3);
}

.red-packet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 71, 87, 0.1) 0%, rgba(0, 0, 0, 0.3) 70%);
  backdrop-filter: blur(20px);
}

.red-packet-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
  border-radius: 24px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.3),
    0 10px 30px rgba(255, 71, 87, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
  width: 90%;
  max-width: 380px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.red-packet-modal.show .red-packet-content {
  transform: translate(-50%, -50%) scale(1);
}

.red-packet-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff4757, #ff6b7a, #ff8e9e, #ff6b7a, #ff4757);
  background-size: 200% 100%;
  animation: redPacketShimmer 2s ease-in-out infinite;
}

@keyframes redPacketShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.red-packet-header {
  background: linear-gradient(135deg, #ff4757 0%, #ff3838 50%, #ff2350 100%);
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.red-packet-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  animation: redPacketHeaderGlow 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes redPacketHeaderGlow {
  0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.3; }
  50% { transform: rotate(180deg) scale(1.1); opacity: 0.6; }
}

.red-packet-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.red-packet-title::after {
  content: '✨';
  animation: redPacketTitleSparkle 2s ease-in-out infinite;
  margin-left: 0.5rem;
}

@keyframes redPacketTitleSparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.2) rotate(15deg); opacity: 0.8; }
}

.red-packet-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: bold;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 3;
}

.red-packet-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.red-packet-close:active {
  transform: scale(0.95);
}

.red-packet-platforms {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.red-packet-platform {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 2px solid rgba(255, 71, 87, 0.1);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.05) 0%, rgba(255, 255, 255, 0.5) 100%);
  position: relative;
  overflow: hidden;
}

.red-packet-platform::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 71, 87, 0.1), transparent);
  transition: left 0.5s ease;
}

.red-packet-platform:hover {
  border-color: rgba(255, 71, 87, 0.3);
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.1) 0%, rgba(255, 255, 255, 0.8) 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.15);
}

.red-packet-platform:hover::before {
  left: 100%;
}

.red-packet-platform:active {
  transform: translateY(-1px);
}

.platform-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.red-packet-platform:hover .platform-icon {
  transform: scale(1.1) rotate(5deg);
}

.platform-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.platform-name {
  font-weight: 700;
  font-size: 1.125rem;
  color: #1f2937;
  line-height: 1.3;
}

.platform-desc {
  font-size: 0.875rem;
  color: #6b7280;
  opacity: 0.8;
}

.platform-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9375rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

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

.platform-btn-taobao {
  background: linear-gradient(135deg, #ff6500 0%, #ff8c00 100%);
  color: white;
}

.platform-btn-jd {
  background: linear-gradient(135deg, #e3393c 0%, #ff4757 100%);
  color: white;
}

.platform-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

/* 移动端优化 */
@media (max-width: 768px) {
  .red-packet-float {
    right: 15px;
    width: 58px;
    height: 58px;
  }

  .red-packet-icon {
    font-size: 28px;
  }

  .red-packet-content {
    width: 85%;
    max-width: none;
    min-width: 300px;
  }

  .red-packet-header {
    padding: 1.75rem 1.25rem 1.25rem;
  }

  .red-packet-title {
    font-size: 1.375rem;
  }

  .red-packet-platforms {
    padding: 1.25rem;
    gap: 0.875rem;
  }

  .red-packet-platform {
    padding: 1rem;
    gap: 0.875rem;
  }

  .platform-icon {
    font-size: 2.25rem;
  }

  .platform-name {
    font-size: 1rem;
  }

  .platform-btn {
    padding: 0.6875rem 1.25rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .red-packet-float {
    right: 12px;
    width: 52px;
    height: 52px;
  }

  .red-packet-icon {
    font-size: 24px;
  }

  .red-packet-content {
    width: 95%;
    border-radius: 20px;
  }

  .red-packet-header {
    padding: 1.5rem 1rem 1rem;
  }

  .red-packet-title {
    font-size: 1.25rem;
  }

  .red-packet-platforms {
    padding: 1rem;
    gap: 0.75rem;
  }

  .red-packet-platform {
    padding: 0.875rem;
    gap: 0.75rem;
  }

  .platform-icon {
    font-size: 2rem;
  }

  .platform-name {
    font-size: 0.9375rem;
  }

  .platform-btn {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
  }
}

/* 底部精致优惠券模块 */
.bottom-coupons {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.95) 100%);
  border-top: 2px solid rgba(255, 107, 122, 0.3);
  padding: 1.25rem 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  box-shadow:
    0 -8px 32px rgba(0, 0, 0, 0.12),
    0 -4px 16px rgba(255, 107, 122, 0.08);
  transform: translateY(100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-coupons::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6b7a, #ff8e9e, #ff6b7a);
  opacity: 0.8;
}

.bottom-coupons.show {
  transform: translateY(0);
  box-shadow:
    0 -12px 40px rgba(255, 107, 122, 0.15),
    0 -6px 20px rgba(0, 0, 0, 0.1);
}

.coupons-section {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.coupons-tip {
  color: #1f2937;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.025em;
  position: relative;
}

.coupons-tip::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 107, 122, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

.coupon-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.coupon-btn {
  padding: 0.875rem 2.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 130px;
  backdrop-filter: blur(10px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.05);
}

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

.coupon-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

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

.coupon-btn:hover::after {
  width: 300px;
  height: 300px;
}

.coupon-taobao {
  background: linear-gradient(135deg, #ff6500 0%, #ff8c00 50%, #ffab00 100%);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.coupon-taobao:hover {
  background: linear-gradient(135deg, #ff5500 0%, #ff7a00 50%, #ff9900 100%);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 25px rgba(255, 101, 0, 0.4),
    0 4px 12px rgba(255, 101, 0, 0.2);
}

.coupon-jd {
  background: linear-gradient(135deg, #e3393c 0%, #ff4757 50%, #ff6b7a 100%);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.coupon-jd:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #ff3742 50%, #ff5a6b 100%);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 25px rgba(227, 57, 60, 0.4),
    0 4px 12px rgba(227, 57, 60, 0.2);
}

/* 移动端优化 */
@media (max-width: 768px) {
  .bottom-coupons {
    padding: 1rem 0;
    border-top-width: 1px;
  }

  .coupons-tip {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    padding: 0 1rem;
    line-height: 1.4;
  }

  .coupons-tip::before {
    width: 140%;
    height: 140%;
  }

  .coupon-buttons {
    gap: 0.875rem;
  }

  .coupon-btn {
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
    min-width: 110px;
  }
}

@media (max-width: 480px) {
  .header {
    min-height: 140px;
  }

  .header-content {
    padding: 2rem 0.75rem 1.75rem;
    border-radius: 0 0 30px 30px;
  }

  .header-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
  }

  .header-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  .header-title::after {
    width: 80px;
    height: 3px;
    bottom: -5px;
  }

  .header-subtitle {
    font-size: 1rem;
    margin-bottom: 1.75rem;
    line-height: 1.4;
    padding: 0 0.5rem;
  }

  .container {
    padding: 0 0.5rem;
  }

  .product-card {
    padding: 1rem;
  }

  .buy-buttons {
    gap: 0.5rem;
  }

  .buy-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  /* 红包浮窗小屏适配 */
  .red-packet-float {
    right: 12px;
    width: 52px;
    height: 52px;
  }

  .red-packet-icon {
    font-size: 24px;
  }

  .red-packet-content {
    width: 95%;
    border-radius: 20px;
  }

  .red-packet-header {
    padding: 1.5rem 1rem 1rem;
  }

  .red-packet-title {
    font-size: 1.25rem;
  }

  .red-packet-platforms {
    padding: 1rem;
    gap: 0.75rem;
  }

  .red-packet-platform {
    padding: 0.875rem;
    gap: 0.75rem;
  }

  .platform-icon {
    font-size: 2rem;
  }

  .platform-name {
    font-size: 0.9375rem;
  }

  .platform-btn {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
  }

  /* 底部优惠券小屏优化 */
  .bottom-coupons {
    padding: 0.875rem 0;
  }

  .coupons-tip {
    font-size: 0.875rem;
    margin-bottom: 0.875rem;
    padding: 0 0.75rem;
    line-height: 1.3;
  }

  .coupons-tip::before {
    width: 160%;
    height: 160%;
  }

  .coupon-buttons {
    gap: 0.75rem;
  }

  .coupon-btn {
    padding: 0.6875rem 1.25rem;
    font-size: 0.8125rem;
    min-width: 95px;
  }
}
