* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; color: #333; background: #f5f7fa; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 顶部栏 */
.top-bar { background: #0a2540; color: #fff; font-size: 13px; padding: 8px 0; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: #ccc; margin-left: 15px; }
.top-bar a:hover { color: #ff6b35; }

/* 主导航 */
.main-header { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 48px; height: 48px; background: linear-gradient(135deg, #0a2540, #1a4a7a); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #ff6b35; font-size: 24px; font-weight: bold; }
.logo-text h1 { font-size: 20px; color: #0a2540; }
.logo-text p { font-size: 11px; color: #888; letter-spacing: 1px; }

.search-box { flex: 1; max-width: 500px; margin: 0 30px; display: flex; }
.search-box input { flex: 1; padding: 10px 15px; border: 2px solid #0a2540; border-right: none; border-radius: 4px 0 0 4px; font-size: 14px; outline: none; }
.search-box button { padding: 10px 25px; background: #0a2540; color: #fff; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 14px; }
.search-box button:hover { background: #ff6b35; }

.header-right { display: flex; align-items: center; gap: 20px; }
.cart-link { position: relative; display: flex; align-items: center; gap: 5px; color: #0a2540; font-size: 14px; }
.cart-badge { position: absolute; top: -8px; right: -12px; background: #ff6b35; color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.user-link { font-size: 14px; color: #0a2540; }
.user-link:hover { color: #ff6b35; }

/* 导航菜单 */
.nav-menu { background: #0a2540; }
.nav-menu .container { display: flex; }
.nav-menu a { color: #fff; padding: 12px 25px; font-size: 15px; display: block; transition: all 0.2s; }
.nav-menu a:hover, .nav-menu a.active { background: #ff6b35; }

/* Banner */
.banner { background: linear-gradient(135deg, #0a2540 0%, #1a4a7a 50%, #0a2540 100%); color: #fff; padding: 60px 0; position: relative; overflow: hidden; }
.banner::before { content: ''; position: absolute; right: -100px; top: -50px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(255,107,53,0.2) 0%, transparent 70%); }
.banner-content { position: relative; z-index: 1; }
.banner h2 { font-size: 36px; margin-bottom: 15px; }
.banner p { font-size: 16px; opacity: 0.9; margin-bottom: 25px; }
.banner-btn { display: inline-block; padding: 12px 35px; background: #ff6b35; color: #fff; border-radius: 4px; font-size: 16px; font-weight: 500; }
.banner-btn:hover { background: #e55a2b; }

/* 分类快捷入口 */
.category-bar { background: #fff; padding: 25px 0; border-bottom: 1px solid #eee; }
.category-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 15px; }
.category-item { text-align: center; padding: 15px 10px; border-radius: 8px; transition: all 0.2s; cursor: pointer; }
.category-item:hover { background: #f0f4f8; transform: translateY(-2px); }
.category-icon { font-size: 32px; margin-bottom: 8px; }
.category-name { font-size: 14px; color: #333; }
.category-name-en { font-size: 10px; color: #999; }

/* 通用区块 */
.section { padding: 40px 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.section-title { font-size: 22px; color: #0a2540; position: relative; padding-left: 15px; }
.section-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 22px; background: #ff6b35; border-radius: 2px; }
.section-more { color: #888; font-size: 14px; }
.section-more:hover { color: #ff6b35; }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: all 0.2s; }
.product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-3px); }
.product-image { height: 200px; background: #f0f4f8; display: flex; align-items: center; justify-content: center; font-size: 60px; position: relative; }
.product-tag { position: absolute; top: 10px; left: 10px; padding: 3px 10px; font-size: 11px; border-radius: 3px; color: #fff; }
.tag-hot { background: #ff6b35; }
.tag-new { background: #00a870; }
.product-info { padding: 15px; }
.product-name { font-size: 14px; color: #333; margin-bottom: 8px; height: 40px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-name:hover { color: #ff6b35; }
.product-price { color: #ff6b35; font-size: 20px; font-weight: bold; margin-bottom: 8px; }
.product-price small { font-size: 13px; font-weight: normal; }
.product-meta { display: flex; justify-content: space-between; font-size: 12px; color: #999; }
.btn-add-cart { width: 100%; padding: 8px; background: #0a2540; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; margin-top: 10px; }
.btn-add-cart:hover { background: #ff6b35; }

/* 服务保障 */
.service-bar { background: #fff; padding: 30px 0; border-top: 1px solid #eee; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-item { display: flex; align-items: center; gap: 12px; }
.service-icon { font-size: 36px; }
.service-text h4 { font-size: 15px; color: #0a2540; margin-bottom: 3px; }
.service-text p { font-size: 12px; color: #888; }

/* 页脚 */
.footer { background: #0a2540; color: #aaa; padding: 50px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-about h3 { color: #fff; font-size: 18px; margin-bottom: 15px; }
.footer-about p { font-size: 13px; line-height: 1.8; margin-bottom: 10px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 15px; }
.footer-col a { display: block; color: #aaa; font-size: 13px; padding: 5px 0; }
.footer-col a:hover { color: #ff6b35; }
.footer-bottom { border-top: 1px solid #1a3a5c; padding-top: 20px; text-align: center; font-size: 12px; }

/* 面包屑 */
.breadcrumb { padding: 15px 0; font-size: 13px; color: #888; }
.breadcrumb a:hover { color: #ff6b35; }
.breadcrumb span { margin: 0 8px; }

/* 商品列表页 */
.list-layout { display: grid; grid-template-columns: 220px 1fr; gap: 25px; padding: 20px 0; }
.sidebar { background: #fff; border-radius: 8px; padding: 20px; height: fit-content; }
.sidebar h3 { font-size: 16px; color: #0a2540; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #ff6b35; }
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; padding: 6px 0; font-size: 13px; cursor: pointer; color: #555; }
.filter-group label:hover { color: #ff6b35; }
.filter-group input[type=radio] { margin-right: 8px; }
.price-input { display: flex; gap: 8px; align-items: center; }
.price-input input { width: 70px; padding: 5px; border: 1px solid #ddd; border-radius: 3px; }
.list-header { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 12px 20px; border-radius: 8px; margin-bottom: 15px; }
.sort-tabs { display: flex; gap: 20px; }
.sort-tabs a { font-size: 14px; color: #666; padding: 5px 0; }
.sort-tabs a.active { color: #ff6b35; border-bottom: 2px solid #ff6b35; }

/* 商品详情页 */
.detail-layout { display: grid; grid-template-columns: 400px 1fr; gap: 40px; padding: 30px 0; }
.detail-gallery { background: #fff; border-radius: 8px; padding: 20px; text-align: center; }
.detail-main-image { height: 350px; display: flex; align-items: center; justify-content: center; font-size: 120px; background: #f0f4f8; border-radius: 8px; margin-bottom: 15px; }
.detail-info h1 { font-size: 24px; color: #0a2540; margin-bottom: 15px; }
.detail-price-box { background: #fff5f0; padding: 20px; border-radius: 8px; margin-bottom: 20px; }
.detail-price { font-size: 32px; color: #ff6b35; font-weight: bold; }
.detail-price small { font-size: 14px; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; font-size: 14px; }
.detail-meta span { color: #888; }
.spec-group { margin-bottom: 15px; }
.spec-group label { display: block; font-size: 14px; color: #666; margin-bottom: 8px; }
.spec-options { display: flex; flex-wrap: wrap; gap: 10px; }
.spec-option { padding: 6px 15px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; font-size: 13px; background: #fff; }
.spec-option:hover, .spec-option.active { border-color: #ff6b35; color: #ff6b35; }
.quantity-group { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.quantity-btn { width: 32px; height: 32px; border: 1px solid #ddd; background: #fff; cursor: pointer; font-size: 16px; }
.quantity-input { width: 60px; height: 32px; text-align: center; border: 1px solid #ddd; }
.detail-buttons { display: flex; gap: 15px; }
.btn-primary { padding: 12px 40px; background: #ff6b35; color: #fff; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; }
.btn-primary:hover { background: #e55a2b; }
.btn-secondary { padding: 12px 40px; background: #0a2540; color: #fff; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; }
.btn-secondary:hover { background: #1a4a7a; }

.detail-tabs { background: #fff; border-radius: 8px; margin-top: 30px; }
.detail-tab-nav { display: flex; border-bottom: 1px solid #eee; }
.detail-tab-nav a { padding: 15px 30px; font-size: 15px; color: #666; border-bottom: 2px solid transparent; }
.detail-tab-nav a.active { color: #ff6b35; border-bottom-color: #ff6b35; }
.detail-tab-content { padding: 25px; }
.params-table { width: 100%; border-collapse: collapse; }
.params-table th, .params-table td { padding: 10px 15px; border: 1px solid #eee; text-align: left; font-size: 14px; }
.params-table th { background: #f8f9fa; width: 150px; color: #666; font-weight: normal; }

/* 购物车 */
.cart-page { padding: 30px 0; }
.cart-table { width: 100%; background: #fff; border-radius: 8px; overflow: hidden; }
.cart-table th { background: #f8f9fa; padding: 15px; text-align: left; font-size: 14px; color: #666; font-weight: normal; }
.cart-table td { padding: 15px; border-top: 1px solid #eee; font-size: 14px; }
.cart-product { display: flex; align-items: center; gap: 15px; }
.cart-product-img { width: 60px; height: 60px; background: #f0f4f8; display: flex; align-items: center; justify-content: center; font-size: 30px; border-radius: 4px; }
.cart-summary { background: #fff; padding: 20px; border-radius: 8px; margin-top: 20px; text-align: right; }
.cart-total { font-size: 18px; margin-bottom: 15px; }
.cart-total span { color: #ff6b35; font-size: 24px; font-weight: bold; }
.cart-empty { text-align: center; padding: 80px 0; background: #fff; border-radius: 8px; }
.cart-empty p { color: #999; margin-bottom: 20px; }

/* 表单通用 */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; color: #555; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #ff6b35; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.error-msg { color: #e53e3e; font-size: 13px; margin-bottom: 15px; padding: 10px; background: #fff5f5; border-radius: 4px; }
.success-msg { color: #00a870; font-size: 13px; margin-bottom: 15px; padding: 10px; background: #f0fff4; border-radius: 4px; }

/* 登录页 */
.auth-page { padding: 50px 0; min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.auth-box { background: #fff; padding: 40px; border-radius: 8px; width: 420px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.auth-box h2 { text-align: center; color: #0a2540; margin-bottom: 30px; }
.auth-tabs { display: flex; margin-bottom: 25px; border-bottom: 1px solid #eee; }
.auth-tabs a { flex: 1; text-align: center; padding: 12px; font-size: 15px; color: #666; border-bottom: 2px solid transparent; }
.auth-tabs a.active { color: #ff6b35; border-bottom-color: #ff6b35; }
.auth-btn { width: 100%; padding: 12px; background: #ff6b35; color: #fff; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; margin-top: 10px; }
.auth-btn:hover { background: #e55a2b; }

/* 用户中心 */
.user-layout { display: grid; grid-template-columns: 200px 1fr; gap: 25px; padding: 30px 0; }
.user-sidebar { background: #fff; border-radius: 8px; padding: 20px 0; height: fit-content; }
.user-sidebar h3 { padding: 0 20px 15px; font-size: 16px; color: #0a2540; border-bottom: 1px solid #eee; }
.user-sidebar a { display: block; padding: 12px 20px; font-size: 14px; color: #555; }
.user-sidebar a:hover, .user-sidebar a.active { background: #fff5f0; color: #ff6b35; border-left: 3px solid #ff6b35; }
.user-content { background: #fff; border-radius: 8px; padding: 25px; min-height: 400px; }
.user-content h2 { font-size: 18px; color: #0a2540; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 25px; }
.stat-card { background: #f8f9fa; padding: 20px; border-radius: 8px; text-align: center; }
.stat-card .num { font-size: 28px; color: #ff6b35; font-weight: bold; }
.stat-card .label { font-size: 13px; color: #888; margin-top: 5px; }

/* 订单 */
.order-item { border: 1px solid #eee; border-radius: 8px; margin-bottom: 15px; overflow: hidden; }
.order-header { background: #f8f9fa; padding: 12px 20px; display: flex; justify-content: space-between; font-size: 13px; color: #666; }
.order-body { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.order-products { flex: 1; }
.order-product-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.order-total { text-align: right; font-size: 14px; }
.order-total .amount { color: #ff6b35; font-size: 18px; font-weight: bold; }
.status-badge { padding: 3px 10px; border-radius: 3px; font-size: 12px; }
.status-pending { background: #fff3cd; color: #856404; }
.status-paid { background: #d1ecf1; color: #0c5460; }
.status-shipped { background: #cce5ff; color: #004085; }
.status-completed { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

/* 后台 */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidebar { background: #0a2540; color: #fff; padding: 20px 0; }
.admin-sidebar h2 { padding: 0 20px 20px; font-size: 16px; border-bottom: 1px solid #1a3a5c; }
.admin-sidebar a { display: block; padding: 12px 20px; color: #ccc; font-size: 14px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: #ff6b35; color: #fff; }
.admin-main { padding: 25px; background: #f5f7fa; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-header h1 { font-size: 22px; color: #0a2540; }
.admin-card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: #f8f9fa; padding: 12px; text-align: left; font-size: 13px; color: #666; }
.admin-table td { padding: 12px; border-top: 1px solid #eee; font-size: 13px; }
.admin-table .btn { padding: 4px 12px; border-radius: 3px; font-size: 12px; cursor: pointer; border: none; margin-right: 5px; }
.btn-edit { background: #007bff; color: #fff; }
.btn-delete { background: #dc3545; color: #fff; }
.btn-view { background: #28a745; color: #fff; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 20px; }
.admin-stat { background: #fff; padding: 20px; border-radius: 8px; }
.admin-stat .label { font-size: 13px; color: #888; }
.admin-stat .value { font-size: 28px; color: #0a2540; font-weight: bold; margin-top: 5px; }

/* 地址卡片 */
.address-card { border: 1px solid #eee; border-radius: 8px; padding: 15px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: flex-start; }
.address-card.default { border-color: #ff6b35; background: #fffafa; }
.address-info h4 { font-size: 15px; margin-bottom: 5px; }
.address-info p { font-size: 13px; color: #666; }
.address-actions button { margin-left: 8px; padding: 4px 12px; font-size: 12px; border: 1px solid #ddd; background: #fff; border-radius: 3px; cursor: pointer; }
.address-actions button:hover { border-color: #ff6b35; color: #ff6b35; }

/* 响应式 */
@media (max-width: 992px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .list-layout { grid-template-columns: 1fr; }
  .user-layout, .admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .search-box { display: none; }
  .stat-cards, .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
