/* ===================================
   难忘云 - 现代冷白色主题
   白色背景 + 冷蓝色调 + 中高明亮度
   =================================== */
:root {
  --bg-body: #f8fafc;
  --bg-white: #ffffff;
  --bg-elevated: #ffffff;
  --bg-hover: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: rgba(2, 132, 199, 0.08);
  --primary-border: rgba(2, 132, 199, 0.2);
  --primary-glow: rgba(2, 132, 199, 0.3);

  --success: #10b981;
  --danger: #ef4444;
  --accent: #06b6d4;

  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 16px rgba(2, 132, 199, 0.2);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 导航 */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  box-shadow: var(--shadow-xs);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.nav-logo i {
  color: var(--primary);
  font-size: 1.4rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-btn:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-btn-primary {
  background: var(--primary);
  color: white;
}

.nav-btn-primary:hover {
  background: var(--primary-hover);
  color: white;
}

/* 页面标题 */
.page-header {
  padding: 120px 20px 40px;
  text-align: center;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.page-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* 分类选择器 */
.category-selector {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.category-selector .dropdown {
  position: relative;
  max-width: 300px;
  margin: 0 auto;
}

.selector-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.selector-toggle:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
}

.selector-toggle i:first-child {
  color: var(--primary);
}

.selector-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-top: 8px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
}

.selector-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.selector-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border-light);
}

.selector-item:last-child {
  border-bottom: none;
}

.selector-item:hover,
.selector-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* 产品卡片 */
.products-grid {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-header {
  background: var(--primary-light);
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
}

.product-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.product-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.product-stock.in-stock {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.product-stock.out-of-stock {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.product-content {
  padding: 20px;
}

.product-price {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 16px;
}

.price-unit {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: normal;
}

.product-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.product-btn:hover {
  background: var(--primary-hover);
}

.product-btn:disabled {
  background: var(--bg-hover);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* 空状态 */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.empty-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.empty-description {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

/* 悬浮按钮 */
.user-action-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.2s ease;
  z-index: 100;
  box-shadow: var(--shadow-primary);
}

.user-action-btn:hover {
  transform: scale(1.1);
}

/* 页脚 */
.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  padding: 40px 20px;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.footer-logo i {
  color: var(--primary);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .nav-btn span {
    display: none;
  }
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}