/* ========================================
   鸿昇智能商城 - 全局样式
   ======================================== */

:root {
  --primary: #e4393c;
  --primary-dark: #c1272d;
  --primary-light: #fff0f0;
  --secondary: #ff6700;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --bg-white: #ffffff;
  --bg-light: #f5f5f5;
  --bg-gray: #eeeeee;
  --border-color: #e0e0e0;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 60px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background-color: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ========================================
   顶部通栏
   ======================================== */
.top-bar {
  background-color: #333;
  color: #ccc;
  font-size: 12px;
  height: 30px;
  line-height: 30px;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar a {
  color: #ccc;
  margin: 0 8px;
  font-size: 12px;
}

.top-bar a:hover {
  color: #fff;
}

.top-bar .sep {
  color: #555;
  margin: 0 4px;
}

/* ========================================
   头部导航
   ======================================== */
.header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  margin-right: 40px;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  margin-right: 10px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--primary);
}

/* 搜索栏 */
.search-bar {
  flex: 1;
  max-width: 500px;
  margin: 0 24px;
}

.search-bar .search-form {
  display: flex;
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 14px;
  font-size: 14px;
  background: var(--bg-white);
}

.search-bar button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.search-bar button:hover {
  background: var(--primary-dark);
}

/* 头部操作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.header-actions a {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 14px;
  white-space: nowrap;
}

.header-actions a:hover {
  color: var(--primary);
}

.cart-icon {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 主导航 */
.main-nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
}

.main-nav .container {
  display: flex;
  align-items: center;
  height: 42px;
}

.nav-category {
  background: var(--primary);
  color: #fff;
  padding: 0 20px;
  height: 42px;
  line-height: 42px;
  font-size: 15px;
  font-weight: 500;
  width: 200px;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.nav-links {
  display: flex;
  align-items: center;
  padding-left: 20px;
  gap: 30px;
}

.nav-links a {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ========================================
   轮播图/Banner
   ======================================== */
.banner-section {
  margin-bottom: 20px;
}

.banner-wrapper {
  display: flex;
  gap: 10px;
  height: 360px;
}

.banner-main {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.banner-slide {
  width: 100%;
  height: 100%;
  position: relative;
}

.banner-slide .slide-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-slide .slide-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  color: #fff;
}

.banner-slide .slide-content h2 {
  font-size: 28px;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.banner-slide .slide-content p {
  font-size: 16px;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.slide-bg-1 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.slide-bg-2 {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.slide-bg-3 {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.banner-side {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.banner-side-item {
  flex: 1;
  border-radius: var(--radius-md);
  padding: 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.banner-side-item:hover {
  transform: translateY(-2px);
}

.banner-side-item h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.banner-side-item p {
  font-size: 12px;
  opacity: 0.85;
}

.side-bg-1 {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.side-bg-2 {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* ========================================
   服务特色
   ======================================== */
.service-features {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-around;
  box-shadow: var(--shadow-sm);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.feature-icon.icon-1 { background: #e8f5e9; color: #4caf50; }
.feature-icon.icon-2 { background: #e3f2fd; color: #2196f3; }
.feature-icon.icon-3 { background: #fff3e0; color: #ff9800; }
.feature-icon.icon-4 { background: #fce4ec; color: #e91e63; }

.feature-text h4 {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.feature-text p {
  font-size: 12px;
  color: var(--text-light);
}

/* ========================================
   商品区块
   ======================================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  padding-left: 14px;
}

.section-header h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  background: var(--primary);
  border-radius: 2px;
}

.section-header .more-link {
  color: var(--text-light);
  font-size: 14px;
}

.section-header .more-link:hover {
  color: var(--primary);
}

/* 商品网格 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}

.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  background: #f8f8f8;
}

.product-img .img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #ddd;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.product-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

.product-info {
  padding: 12px;
}

.product-name {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 8px;
}

.product-price {
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
}

.product-price .symbol {
  font-size: 12px;
}

.product-price .original {
  color: var(--text-light);
  font-size: 12px;
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: normal;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-light);
}

/* ========================================
   分类区块
   ======================================== */
.category-section {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-card {
  text-align: center;
  padding: 20px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-light);
  cursor: pointer;
  transition: all 0.2s;
}

.category-card:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.category-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.category-card h4 {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.category-card p {
  font-size: 12px;
  color: var(--text-light);
}

/* ========================================
   页脚
   ======================================== */
.footer {
  background: #2c2c2c;
  color: #aaa;
  margin-top: 40px;
}

.footer-main {
  padding: 40px 0;
}

.footer-main .container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-col {
  min-width: 150px;
}

.footer-col h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #aaa;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-contact p {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.8;
}

.footer-contact .phone {
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding: 16px 0;
  text-align: center;
  font-size: 12px;
  color: #777;
}

.footer-bottom a {
  color: #999;
  margin: 0 6px;
}

.footer-bottom a:hover {
  color: #fff;
}

.footer-bottom .icp-info {
  margin-top: 6px;
  color: #666;
}

.footer-bottom .icp-info a {
  color: #888;
}

/* ========================================
   面包屑
   ======================================== */
.breadcrumb {
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 6px;
  color: #ccc;
}

/* ========================================
   页面主体布局
   ======================================== */
.page-content {
  padding: 20px 0;
  min-height: calc(100vh - 300px);
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

/* ========================================
   通用按钮
   ======================================== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--secondary);
  color: #fff;
}

.btn-secondary:hover {
  background: #e55d00;
  color: #fff;
}

.btn-lg {
  padding: 14px 40px;
  font-size: 16px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-block {
  display: block;
  width: 100%;
}

/* ========================================
   表单样式
   ======================================== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(228, 57, 60, 0.1);
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .banner-wrapper {
    flex-direction: column;
    height: auto;
  }
  
  .banner-main {
    height: 200px;
  }
  
  .banner-side {
    width: 100%;
    flex-direction: row;
  }
  
  .banner-side-item {
    padding: 12px;
  }
  
  .footer-main .container {
    flex-direction: column;
  }
  
  .search-bar {
    display: none;
  }
  
  .top-bar {
    display: none;
  }

  .login-wrapper { flex-direction: column; }
  .login-banner { display: none; }
  .products-layout { flex-direction: column; }
  .products-sidebar { width: 100%; }
  .detail-layout { flex-direction: column; }
  .detail-gallery { width: 100%; }
  .checkout-layout { flex-direction: column; }
  .checkout-sidebar { width: 100%; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .service-features {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .feature-item {
    width: 45%;
  }

  .contact-grid { grid-template-columns: 1fr; }
}

/* ========================================
   商品列表页
   ======================================== */
.products-layout {
  display: flex;
  gap: 20px;
}

.products-sidebar {
  width: 220px;
  flex-shrink: 0;
}

.sidebar-section {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.sidebar-section h3 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-section ul li {
  margin-bottom: 8px;
}

.sidebar-section ul li a {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-section ul li a:hover {
  color: var(--primary);
}

.sidebar-section .count {
  font-size: 12px;
  color: var(--text-light);
}

.products-main {
  flex: 1;
  min-width: 0;
}

.filter-bar {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.filter-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

.filter-btn {
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-white);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.sort-bar {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.sort-bar a {
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 0;
  border-bottom: 2px solid transparent;
}

.sort-bar a:hover, .sort-bar a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.pagination a {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.pagination a:hover, .pagination a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ========================================
   商品详情页
   ======================================== */
.detail-layout {
  display: flex;
  gap: 30px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.detail-gallery {
  width: 400px;
  flex-shrink: 0;
}

.detail-main-img {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  margin-bottom: 12px;
}

.detail-thumbs {
  display: flex;
  gap: 8px;
}

.detail-thumbs .thumb {
  width: 60px;
  height: 60px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  background: #f8f8f8;
}

.detail-thumbs .thumb.active, .detail-thumbs .thumb:hover {
  border-color: var(--primary);
}

.detail-info {
  flex: 1;
  min-width: 0;
}

.detail-info h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.detail-subtitle {
  font-size: 13px;
  color: var(--secondary);
  margin-bottom: 16px;
}

.detail-price-box {
  background: #fef0f0;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.detail-price {
  color: var(--primary);
  font-size: 28px;
  font-weight: 700;
}

.detail-price .symbol {
  font-size: 16px;
}

.detail-price .original {
  color: var(--text-light);
  font-size: 14px;
  text-decoration: line-through;
  margin-left: 10px;
  font-weight: normal;
}

.detail-promo {
  font-size: 12px;
  color: var(--secondary);
  margin-top: 8px;
}

.detail-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.detail-spec {
  margin-bottom: 20px;
}

.detail-spec dt {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.detail-spec dd {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.spec-btn {
  padding: 8px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.spec-btn:hover, .spec-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.quantity-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.quantity-box label {
  font-size: 13px;
  color: var(--text-light);
}

.quantity-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.quantity-ctrl button {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-light);
  font-size: 16px;
  cursor: pointer;
}

.quantity-ctrl input {
  width: 50px;
  height: 32px;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  font-size: 14px;
  outline: none;
}

.detail-actions {
  display: flex;
  gap: 12px;
}

.detail-tabs {
  margin-top: 24px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.detail-section {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

.review-empty {
  text-align: center;
  padding: 36px 20px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
}

.review-empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.6;
}

.detail-showcase {
  width: 100%;
  text-align: center;
  margin-top: 20px;
}

.detail-showcase img {
  max-width: 100%;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: block;
}

.tab-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.tab-header a {
  padding: 14px 24px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-header a:hover, .tab-header a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
  padding: 24px;
}

.tab-content.active {
  display: block;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--bg-light);
  font-size: 13px;
}

.spec-table tr td:first-child {
  width: 120px;
  color: var(--text-light);
  background: var(--bg-light);
}

.review-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--bg-light);
}

.review-item:last-child {
  border-bottom: none;
}

.review-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.review-name {
  font-size: 13px;
  color: var(--text-primary);
}

.review-stars {
  color: #f5a623;
  font-size: 12px;
}

.review-date {
  font-size: 12px;
  color: var(--text-light);
}

.review-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ========================================
   购物车页
   ======================================== */
.cart-header h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.cart-list {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.cart-list-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-light);
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--bg-light);
  gap: 12px;
}

.cart-item-check { width: 30px; }
.cart-item-img { width: 80px; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info a { font-size: 13px; color: var(--text-primary); }
.cart-item-price { width: 80px; color: var(--text-secondary); font-size: 13px; }

.cart-item-quantity {
  display: flex;
  align-items: center;
}

.cart-item-quantity button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  cursor: pointer;
  font-size: 14px;
}

.cart-item-quantity input {
  width: 40px;
  height: 28px;
  border: 1px solid var(--border-color);
  border-left: none;
  border-right: none;
  text-align: center;
  font-size: 13px;
  outline: none;
}

.cart-item-subtotal { width: 80px; color: var(--primary); font-weight: 600; font-size: 14px; }
.cart-item-action { width: 50px; text-align: center; }
.cart-item-action a { font-size: 12px; color: var(--text-light); }

.cart-footer {
  margin-top: 16px;
}

.cart-bar {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.cart-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.empty-icon {
  font-size: 60px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* ========================================
   结算页
   ======================================== */
.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.checkout-steps .step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
}

.checkout-steps .step.active {
  color: var(--primary);
  font-weight: 600;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.step.active .step-num {
  background: var(--primary);
  color: #fff;
}

.step-line {
  width: 60px;
  height: 1px;
  background: var(--border-color);
  margin: 0 12px;
}

.checkout-layout {
  display: flex;
  gap: 20px;
}

.checkout-main {
  flex: 1;
  min-width: 0;
}

.checkout-sidebar {
  width: 300px;
  flex-shrink: 0;
}

.checkout-section {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.checkout-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.checkout-section textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  resize: vertical;
  outline: none;
}

.address-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.address-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s;
}

.address-item.active, .address-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.addr-info strong {
  font-size: 14px;
}

.addr-info strong span {
  color: var(--text-light);
  font-weight: normal;
  margin-left: 10px;
}

.addr-info p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.addr-tag {
  font-size: 11px;
  padding: 2px 6px;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  flex-shrink: 0;
}

.payment-options {
  display: flex;
  gap: 12px;
}

.payment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.2s;
}

.payment-item.active, .payment-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.payment-item input[type="radio"] {
  accent-color: var(--primary);
}

.pay-icon {
  font-size: 20px;
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-light);
}

.checkout-item-img {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.checkout-item-info {
  flex: 1;
  font-size: 13px;
}

.checkout-item-price {
  color: var(--primary);
  font-weight: 600;
}

.order-summary {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 20px;
}

.order-summary h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.summary-row.total {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  margin-top: 8px;
  margin-bottom: 16px;
}

/* ========================================
   登录页
   ======================================== */
.login-wrapper {
  display: flex;
  gap: 0;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 480px;
}

.login-banner {
  width: 360px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
  color: #fff;
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-banner h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.login-banner p {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.login-banner ul {
  list-style: none;
}

.login-banner ul li {
  font-size: 14px;
  margin-bottom: 10px;
  opacity: 0.9;
}

.login-form-box {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.login-tabs a {
  padding-bottom: 12px;
  font-size: 16px;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.login-tabs a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.login-form input:focus {
  border-color: var(--primary);
}

.login-form .checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.login-extra {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-light);
}

.login-extra a {
  color: var(--primary);
}

.test-account {
  margin-top: 20px;
  padding: 14px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #8c6d1f;
  line-height: 1.8;
}

/* ========================================
   关于我们页
   ======================================== */
.about-page .about-section {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.about-page .about-section h2 {
  font-size: 20px;
  margin-bottom: 16px;
  padding-left: 14px;
  position: relative;
}

.about-page .about-section h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
}

.about-page .about-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 12px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.about-card {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.about-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.card-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.about-card h3 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.about-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-white);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item .year {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.timeline-item h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.timeline-item p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ========================================
   联系我们页
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.contact-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.contact-card h3 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.contact-info {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.contact-card p {
  font-size: 12px;
  color: var(--text-light);
}

.contact-section {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.contact-section h2 {
  font-size: 18px;
  margin-bottom: 16px;
  padding-left: 14px;
  position: relative;
}

.contact-section h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.contact-form .form-row {
  display: flex;
  gap: 16px;
}

.contact-form .form-row .form-group {
  flex: 1;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}

.map-placeholder {
  width: 100%;
  height: 200px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-inner {
  font-size: 16px;
  color: var(--text-light);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  padding: 14px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
}

.faq-item h4 {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ========================================
   法律页面（隐私政策/用户协议）
   ======================================== */
.legal-page {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.legal-page h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 8px;
}

.update-time {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.legal-content h2 {
  font-size: 16px;
  color: var(--text-primary);
  margin-top: 20px;
  margin-bottom: 10px;
}

.legal-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 8px;
}

.legal-content ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.legal-content ul li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 2;
}

/* ========================================
   通用 input/textarea
   ======================================== */
input[type="text"],
input[type="password"],
input[type="number"],
textarea {
  font-family: inherit;
  font-size: 14px;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}
