* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
}
:root {
  --main: #2c5282;
  --light: #edf2f7;
  --dark: #1a202c;
  --danger: #e53e3e;
  --success: #38a169;
  --gray: #718096;
}
body {
  color: var(--dark);
  background: #fff;
  line-height: 1.6;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  display: block;
}
.container {
  width: 92%;
  max-width: 1280px;
  margin: 0 auto;
}
/* 头部导航 */
header {
  background: var(--main);
  color: white;
  position: sticky;
  top: 0;
  z-index: 99;
}
.top-bar {
  padding: 8px 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}
.nav-menu {
  display: flex;
  gap: 28px;
}
.nav-menu a:hover {
  text-decoration: underline;
}
.header-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}
.icon-btn {
  cursor: pointer;
  font-size: 20px;
  position: relative;
}
.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  display: grid;
  place-items: center;
}
/* 侧边弹窗通用 */
.side-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 12px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}
.side-drawer.active {
  right: 0;
}
.drawer-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
}
.drawer-close {
  font-size: 24px;
  cursor: pointer;
}
.drawer-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}
.drawer-footer {
  padding: 20px;
  border-top: 1px solid #eee;
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  display: none;
}
.overlay.active {
  display: block;
}
/* 商品卡片 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
  margin: 40px 0;
}
.product-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  transition: 0.2s;
}
.product-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}
.card-img {
  height: 220px;
  object-fit: cover;
  width: 100%;
}
.card-body {
  padding: 16px;
}
.card-title {
  font-size: 16px;
  margin-bottom: 8px;
}
.card-price {
  font-size: 18px;
  font-weight: bold;
  color: var(--main);
  margin-bottom: 12px;
}
.card-actions {
  display: flex;
  gap: 10px;
}
.btn {
  padding: 8px 14px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
.btn-primary {
  background: var(--main);
  color: white;
}
.btn-outline {
  border: 1px solid var(--main);
  color: var(--main);
  background: transparent;
}
/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 50px 0;
}
.page-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #ddd;
  cursor: pointer;
}
.page-btn.active {
  background: var(--main);
  color: white;
  border-color: var(--main);
}
/* Banner首页轮播 */
.banner {
  height: 480px;
  background: url('../pictures/banner1.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  color: white;
  margin-bottom: 60px;
}
.banner-content {
  max-width: 500px;
}
.banner h2 {
  font-size: 42px;
  margin-bottom: 16px;
}
/* 底部footer */
footer {
  background: var(--dark);
  color: white;
  padding: 60px 0 30px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 {
  margin-bottom: 20px;
  font-size: 18px;
}
.footer-links li {
  margin-bottom: 10px;
  color: #a0aec0;
}
.footer-links a:hover {
  color: white;
}
.payment-img {
  width: 220px;
  margin-top: 12px;
}
.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #4a5568;
  color: #a0aec0;
}
/* 详情页样式 */
.detail-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin: 50px 0;
}
.detail-price {
  font-size: 28px;
  color: var(--main);
  margin: 16px 0;
}
.detail-desc {
  margin: 24px 0;
  color: var(--gray);
}
/* 页面通用区块 */
.page-title {
  font-size: 32px;
  margin: 40px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--light);
}
.page-content {
  margin-bottom: 60px;
  line-height: 1.8;
}
.contact-item {
  margin: 16px 0;
  font-size: 16px;
}
/* 购物车/收藏列表项 */
.drawer-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
.drawer-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}
.drawer-item-info h5 {
  margin-bottom: 4px;
}
.drawer-item-price {
  color: var(--main);
  font-weight: bold;
}
.empty-tip {
  text-align: center;
  color: var(--gray);
  padding: 40px 0;
}