/* ============================================
   拟物化风格样式表 - 精品商城前台
   ============================================ */

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

:root {
  --primary-color: #4a90d9;
  --primary-dark: #357abd;
  --primary-light: #6ba8e5;
  --danger-color: #e74c3c;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --text-light: #bdc3c7;
  --bg-light: #f5f6fa;
  --bg-white: #ffffff;
  --border-color: #dcdde1;
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.12);
  --shadow-dark: 0 12px 35px rgba(0, 0, 0, 0.18);
  --neumorphic-bg: #e0e5ec;
  --neumorphic-dark: #a3b1c6;
  --neumorphic-light: #ffffff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--text-primary);
  background: var(--bg-light);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* ============ 拟物化组件 ============ */

/* 拟物化容器效果 */
.neumorphic {
  background: var(--neumorphic-bg);
  box-shadow: 
    inset 4px 4px 8px rgba(163, 177, 198, 0.3),
    inset -4px -4px 8px rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
}

.neumorphic-raised {
  background: var(--neumorphic-bg);
  box-shadow: 
    4px 4px 8px rgba(163, 177, 198, 0.4),
    -4px -4px 8px rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.neumorphic-raised:hover {
  box-shadow: 
    6px 6px 12px rgba(163, 177, 198, 0.5),
    -6px -6px 12px rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

/* 拟物化按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: 
    5px 5px 10px rgba(53, 122, 189, 0.3),
    -2px -2px 6px rgba(255, 255, 255, 0.1),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(145deg, var(--primary-light), var(--primary-color));
  box-shadow: 
    6px 6px 12px rgba(53, 122, 189, 0.4),
    inset 2px 2px 4px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 
    2px 2px 5px rgba(53, 122, 189, 0.3),
    inset 3px 3px 6px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: var(--neumorphic-bg);
  color: var(--text-primary);
  box-shadow: 
    3px 3px 6px rgba(163, 177, 198, 0.4),
    -3px -3px 6px rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover {
  box-shadow: 
    inset 3px 3px 6px rgba(163, 177, 198, 0.3),
    inset -3px -3px 6px rgba(255, 255, 255, 0.5);
}

.btn-danger {
  background: linear-gradient(145deg, #e74c3c, #c0392b);
  color: white;
  box-shadow: 
    5px 5px 10px rgba(192, 57, 43, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: linear-gradient(145deg, #27ae60, #229954);
  color: white;
  box-shadow: 
    5px 5px 10px rgba(34, 153, 84, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.btn-lg {
  padding: 14px 36px;
  font-size: 16px;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

/* 拟物化输入框 */
.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-group input,
.input-group textarea,
.input-group select {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--neumorphic-bg);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: 
    inset 3px 3px 6px rgba(163, 177, 198, 0.3),
    inset -3px -3px 6px rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
  box-shadow: 
    inset 4px 4px 8px rgba(163, 177, 198, 0.4),
    inset -4px -4px 8px rgba(255, 255, 255, 0.6);
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}

/* 拟物化卡片 */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.06),
    0 2px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-4px);
}

.card-neumorphic {
  background: var(--neumorphic-bg);
  border-radius: var(--radius-lg);
  box-shadow: 
    6px 6px 15px rgba(163, 177, 198, 0.35),
    -6px -6px 15px rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card-neumorphic:hover {
  box-shadow: 
    8px 8px 20px rgba(163, 177, 198, 0.45),
    -8px -8px 20px rgba(255, 255, 255, 1);
  transform: translateY(-4px);
}

/* ============ 页面布局 ============ */

/* 顶部导航 */
.navbar {
  background: var(--bg-white);
  box-shadow: var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
}

.navbar-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 
    4px 4px 8px rgba(53, 122, 189, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.navbar-menu li a {
  display: block;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-menu li a:hover,
.navbar-menu li a.active {
  background: var(--neumorphic-bg);
  box-shadow: 
    3px 3px 6px rgba(163, 177, 198, 0.3),
    -3px -3px 6px rgba(255, 255, 255, 0.7);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--neumorphic-bg);
  border-radius: 30px;
  padding: 6px 6px 6px 18px;
  box-shadow: 
    inset 2px 2px 5px rgba(163, 177, 198, 0.25),
    inset -2px -2px 5px rgba(255, 255, 255, 0.5);
}

.search-box input {
  border: none;
  background: transparent;
  padding: 8px;
  width: 180px;
  color: var(--text-primary);
}

.search-box button {
  background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    3px 3px 6px rgba(53, 122, 189, 0.3);
  transition: all 0.3s ease;
}

.search-box button:hover {
  transform: scale(1.05);
}

.nav-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--neumorphic-bg);
  box-shadow: 
    3px 3px 6px rgba(163, 177, 198, 0.3),
    -3px -3px 6px rgba(255, 255, 255, 0.7);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.nav-icon:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.nav-icon .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger-color);
  color: white;
  font-size: 11px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(231, 76, 60, 0.4);
}

/* 主内容区 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  padding: 30px 0;
  min-height: calc(100vh - 200px);
}

/* ============ 首页组件 ============ */

/* Banner轮播 */
.banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  color: white;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.banner-content {
  position: relative;
  z-index: 1;
}

.banner h1 {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.banner p {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.banner .btn-primary {
  background: white;
  color: var(--primary-color);
  font-weight: bold;
  padding: 14px 40px;
  font-size: 16px;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.2),
    inset 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* 分类卡片 */
.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 40px;
}

.category-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  cursor: pointer;
  width: 150px;
  flex-shrink: 0;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
}

.category-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background: linear-gradient(145deg, var(--primary-light), var(--primary-color));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  box-shadow: 
    4px 4px 8px rgba(53, 122, 189, 0.25),
    inset 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.category-name {
  font-weight: 600;
  color: var(--text-primary);
}

/* 区块标题 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--neumorphic-bg);
}

.section-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
  border-radius: 2px;
}

.section-more {
  color: var(--text-secondary);
  font-size: 14px;
}

.section-more:hover {
  color: var(--primary-color);
}

/* 商品网格 */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-bottom: 40px;
}

.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  position: relative;
  width: 260px;
  flex-shrink: 0;
  cursor: pointer;
}

.product-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-4px);
}

.product-image {
  position: relative;
  width: 100%;
  height: 220px;
  background: var(--neumorphic-bg);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
}

.badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.badge-hot {
  background: linear-gradient(145deg, #ff6b6b, #ee5a52);
}

.badge-new {
  background: linear-gradient(145deg, #1dd1a1, #10ac84);
}

.badge-discount {
  background: linear-gradient(145deg, #feca57, #ff9f43);
}

.product-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.action-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.product-info {
  padding: 16px;
}

.product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 44px;
}

.product-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  height: 18px;
  overflow: hidden;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-current {
  color: var(--danger-color);
  font-size: 20px;
  font-weight: bold;
}

.price-lazy {
  visibility: hidden;
}

.price-lazy::before {
  display: none !important;
}

.price-ready {
  visibility: visible;
}

.price-current::before {
  content: '¥';
  font-size: 14px;
}

.price-original {
  color: var(--text-light);
  text-decoration: line-through;
  font-size: 13px;
}

.product-sales {
  color: var(--text-secondary);
  font-size: 12px;
}

.product-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--neumorphic-bg);
}

.add-to-cart {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
  color: white;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.add-to-cart:hover {
  background: linear-gradient(145deg, var(--primary-light), var(--primary-color));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(53, 122, 189, 0.3);
}

/* ============ 商品详情页 ============ */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-light);
  margin-bottom: 30px;
}

.product-gallery {
  position: sticky;
  top: 80px;
}

.main-image {
  width: 100%;
  height: 450px;
  background: var(--neumorphic-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-light);
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-list {
  display: flex;
  gap: 12px;
}

.thumbnail {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
}

.thumbnail.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.3);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info h1 {
  font-size: 26px;
  margin-bottom: 10px;
}

.product-detail-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.price-box {
  background: linear-gradient(145deg, #fff5f5, #ffe8e8);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.price-box .price-current {
  font-size: 32px;
}

.price-box .price-original {
  font-size: 18px;
}

.product-meta {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--neumorphic-bg);
  margin-bottom: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
}

.meta-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.purchase-options {
  margin-bottom: 24px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.quantity-selector label {
  font-weight: 600;
  color: var(--text-primary);
}

.quantity-controls {
  display: flex;
  align-items: center;
  background: var(--neumorphic-bg);
  border-radius: var(--radius-md);
  box-shadow: 
    inset 2px 2px 5px rgba(163, 177, 198, 0.25),
    inset -2px -2px 5px rgba(255, 255, 255, 0.5);
}

.qty-btn {
  width: 40px;
  height: 40px;
  background: transparent;
  color: var(--text-primary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.qty-btn:hover {
  background: rgba(74, 144, 217, 0.1);
}

.qty-input {
  width: 60px;
  height: 40px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.purchase-buttons {
  display: flex;
  gap: 16px;
}

.purchase-buttons .btn {
  flex: 1;
  padding: 14px 24px;
}

.product-detail-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-light);
  margin-bottom: 30px;
}

.detail-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--neumorphic-bg);
}

.detail-tab {
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.detail-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.detail-body {
  line-height: 1.8;
}

.detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 16px 0;
}

.detail-body h2, .detail-body h3 {
  margin: 20px 0 12px;
  color: var(--text-primary);
}

/* ============ 购物车页面 ============ */

.cart-page {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 30px;
}

.cart-items {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-light);
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--neumorphic-bg);
}

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

.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.cart-item-price {
  color: var(--danger-color);
  font-weight: bold;
  font-size: 16px;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  background: var(--neumorphic-bg);
  border-radius: var(--radius-md);
  box-shadow: 
    inset 2px 2px 5px rgba(163, 177, 198, 0.25),
    inset -2px -2px 5px rgba(255, 255, 255, 0.5);
}

.cart-item-total {
  font-weight: bold;
  color: var(--text-primary);
  font-size: 18px;
  min-width: 80px;
  text-align: right;
}

.cart-item-remove {
  color: var(--text-secondary);
  transition: color 0.3s ease;
  padding: 8px;
  border-radius: 50%;
}

.cart-item-remove:hover {
  color: var(--danger-color);
  background: rgba(231, 76, 60, 0.1);
}

.cart-summary {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-light);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.cart-summary h3 {
  font-size: 18px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--neumorphic-bg);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--neumorphic-bg);
}

.summary-row:last-of-type {
  border-bottom: none;
}

.summary-row.total {
  padding-top: 20px;
  margin-top: 16px;
  border-top: 2px solid var(--neumorphic-bg);
}

.summary-row.total span:last-child {
  color: var(--danger-color);
  font-size: 24px;
  font-weight: bold;
}

/* ============ 登录/注册页面 ============ */

.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 20px;
}

.auth-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-dark);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header .logo-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  box-shadow: 
    5px 5px 12px rgba(53, 122, 189, 0.35),
    inset 2px 2px 4px rgba(255, 255, 255, 0.3);
}

.auth-header h1 {
  font-size: 24px;
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--neumorphic-bg);
  box-shadow: 
    inset 3px 3px 6px rgba(163, 177, 198, 0.3),
    inset -3px -3px 6px rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.form-group input:focus {
  box-shadow: 
    inset 4px 4px 8px rgba(163, 177, 198, 0.4),
    inset -4px -4px 8px rgba(255, 255, 255, 0.6);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.forgot-link {
  color: var(--primary-color);
  font-size: 13px;
}

.forgot-link:hover {
  text-decoration: underline;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-footer a {
  color: var(--primary-color);
  font-weight: 600;
}

/* ============ 提示消息 ============ */

.alert {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease;
}

.alert-success {
  background: linear-gradient(145deg, #d4edda, #c3e6cb);
  color: #155724;
  box-shadow: 0 4px 12px rgba(21, 87, 36, 0.15);
}

.alert-error {
  background: linear-gradient(145deg, #f8d7da, #f5c6cb);
  color: #721c24;
  box-shadow: 0 4px 12px rgba(114, 28, 36, 0.15);
}

.alert-info {
  background: linear-gradient(145deg, #d1ecf1, #bee5eb);
  color: #0c5460;
  box-shadow: 0 4px 12px rgba(12, 84, 96, 0.15);
}

.alert-warning {
  background: linear-gradient(145deg, #fff3cd, #ffeeba);
  color: #856404;
  box-shadow: 0 4px 12px rgba(133, 100, 4, 0.15);
}

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

/* Toast提示 */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 14px 24px;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-medium);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
  font-weight: 500;
}

.toast-success {
  border-left: 4px solid var(--success-color);
  color: var(--success-color);
}

.toast-error {
  border-left: 4px solid var(--danger-color);
  color: var(--danger-color);
}

.toast-info {
  border-left: 4px solid var(--primary-color);
  color: var(--primary-color);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============ 页脚 ============ */

.footer {
  background: #2c3e50;
  color: white;
  padding: 50px 0 0;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 0 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer h4 {
  font-size: 16px;
  margin-bottom: 20px;
  color: white;
}

.footer p {
  color: #bdc3c7;
  line-height: 1.8;
  font-size: 14px;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul li a {
  color: #bdc3c7;
  transition: color 0.3s ease;
}

.footer ul li a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid #34495e;
  padding: 20px;
  text-align: center;
  color: #95a5a6;
  font-size: 13px;
}

/* ============ 响应式设计 ============ */

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 30px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--neumorphic-bg);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.3), -3px -3px 6px rgba(255, 255, 255, 0.7);
}

@media (max-width: 1024px) {
  .product-detail {
    grid-template-columns: 1fr;
  }

  .cart-page {
    grid-template-columns: 1fr;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .brand-text {
    display: none;
  }

  .navbar-menu {
    display: none;
  }

  .navbar-menu.active {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-light);
    z-index: 1001;
    gap: 4px;
  }

  .navbar-menu li a {
    padding: 12px 16px;
  }

  .navbar-right {
    gap: 8px;
  }

  .search-box {
    padding: 4px 4px 4px 12px;
  }

  .search-box input {
    width: 100px;
    padding: 6px;
    font-size: 13px;
  }

  .search-box button {
    width: 32px;
    height: 32px;
  }

  .nav-icon {
    width: 38px;
    height: 38px;
  }

  .banner {
    padding: 40px 24px;
  }

  .banner h1 {
    font-size: 28px;
  }

  .product-grid {
    gap: 16px;
    justify-content: center;
  }

  .product-card {
    width: 200px;
  }

  .product-image {
    height: 180px;
  }

  .category-grid {
    gap: 12px;
    justify-content: center;
  }

  .category-card {
    width: 120px;
  }

  .product-detail {
    padding: 20px;
  }

  .main-image {
    height: 300px;
  }

  .purchase-buttons {
    flex-direction: column;
  }

  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: 10px;
    padding: 14px 10px;
  }

  .cart-item-image {
    width: 80px;
    height: 80px;
    grid-row: 1 / -1;
    align-self: start;
  }

  .cart-item-info h3 {
    font-size: 14px;
    line-height: 1.3;
  }

  .cart-item-info p {
    font-size: 12px !important;
    margin: 2px 0 !important;
  }

  .cart-item-total {
    grid-column: 2;
    text-align: left;
    font-size: 15px;
    min-width: auto;
  }

  .cart-item-quantity {
    grid-column: 2;
    justify-self: start;
    transform: scale(0.9);
    transform-origin: left center;
  }

  .qty-btn {
    width: 30px;
    height: 30px;
  }

  .cart-item-remove {
    position: static;
    grid-column: 2;
    justify-self: end;
    align-self: end;
    margin-top: -32px;
    padding: 6px;
  }

  .cart-items {
    padding: 12px;
  }

  .cart-summary {
    position: static;
    padding: 16px;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .main-content {
    padding: 20px 0;
  }

  .checkout-grid > div,
  .profile-layout > div {
    padding: 20px !important;
    border-radius: 12px !important;
  }

  .checkout-grid h3 {
    font-size: 16px !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
  }

  .order-summary-sticky {
    position: static !important;
  }

  .profile-layout > div:first-child nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .profile-layout > div:first-child nav a {
    flex: 1;
    min-width: calc(50% - 4px);
    justify-content: center;
    text-align: center;
    padding: 10px !important;
    font-size: 13px !important;
    margin-bottom: 0 !important;
  }

  /* 通用：flex容器在移动端允许换行 */
  .main-content .container > div[style*="display:flex"] {
    flex-wrap: wrap;
  }

  /* 订单状态筛选标签 */
  div[style*="display:flex"][style*="gap:10px"] {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .navbar .container {
    padding: 10px 12px;
  }

  .navbar-brand .logo-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .search-box {
    padding: 3px 3px 3px 10px;
  }

  .search-box input {
    width: 70px;
    padding: 4px;
    font-size: 12px;
  }

  .search-box button {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .nav-icon {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .mobile-menu-toggle {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .main-content h1 {
    font-size: 20px !important;
    margin-bottom: 16px !important;
  }

  .product-grid {
    gap: 10px;
    justify-content: center;
  }

  .product-card {
    width: calc(50% - 5px);
    min-width: 0;
  }

  .product-image {
    height: 140px;
  }

  .product-info {
    padding: 12px;
  }

  .product-name {
    font-size: 13px;
    height: 36px;
  }

  .price-current {
    font-size: 16px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .checkout-grid > div,
  .profile-layout > div {
    padding: 16px !important;
    border-radius: 10px !important;
  }

  .checkout-grid input,
  .checkout-grid textarea {
    padding: 10px 12px !important;
    font-size: 14px !important;
  }

  .payment-method {
    padding: 12px 14px !important;
    gap: 10px !important;
  }

  .payment-icon-box {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
  }

  .payment-method-name {
    font-size: 14px !important;
  }

  .payment-method-desc {
    font-size: 11px !important;
  }

  .profile-layout > div:first-child {
    text-align: center;
  }

  .profile-layout > div:first-child nav a {
    min-width: calc(50% - 4px);
    font-size: 12px !important;
    padding: 8px !important;
  }

  #qrcodeArea > div {
    padding: 20px !important;
  }

  #qrcodeArea img {
    width: 160px !important;
    height: 160px !important;
  }
}
