/* PC 商城全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { min-height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f5f5; color: #333; font-size: 14px;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-size: 14px; }

/* 顶部导航 */
.topbar { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 100; }
.topbar-inner {
  width: 1200px; margin: 0 auto; height: 64px;
  display: flex; align-items: center; gap: 30px;
}
.logo { font-size: 22px; font-weight: bold; color: #b8860b; white-space: nowrap; }
.nav { display: flex; gap: 24px; flex: 1; }
.nav a { color: #555; }
.nav a:hover, .nav a.active { color: #b8860b; }
.search { display: flex; }
.search input {
  width: 220px; height: 34px; border: 1px solid #ddd; border-left: none;
  padding: 0 10px; outline: none;
}
.search .icon-btn { width: 60px; height: 34px; background: #b8860b; color: #fff; }
.user-area { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.user-area .btn { color: #b8860b; border: 1px solid #b8860b; padding: 4px 14px; border-radius: 3px; }

/* 主体容器 */
.container { width: 1200px; margin: 20px auto; flex: 1 0 auto; }

/* 底部备案信息：所有 hash 页面共用，内容短时仍贴近窗口底部 */
.site-footer {
  flex: 0 0 auto; margin-top: 36px; padding: 24px 20px 26px;
  background: #111; color: #888; border-top: 1px solid #ddd;
  text-align: center; line-height: 2; font-size: 15px;
}
.site-footer .footer-line { white-space: normal; }
.footer-badge {
  display: inline-block; width: 24px; height: 24px; margin-right: 4px;
  object-fit: contain; vertical-align: -7px;
}

/* 轮播 */
.banner { position: relative; height: 360px; overflow: hidden; border-radius: 6px; }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner .dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.banner .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.6); }
.banner .dot.active { background: #b8860b; }

/* 分类 */
.cats { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.cat-item {
  background: #fff; padding: 14px 22px; border-radius: 6px;
  display: flex; align-items: center; gap: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.cat-item img { width: 44px; height: 44px; border-radius: 50%; }
.cat-item.active { outline: 2px solid #b8860b; }

/* 商品网格 */
.section-title { font-size: 18px; margin: 24px 0 14px; border-left: 4px solid #b8860b; padding-left: 10px; }
.goods-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.goods-card {
  background: #fff; border-radius: 6px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: all .2s;
}
.goods-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.goods-card .img { height: 260px; overflow: hidden; }
.goods-card .img img { width: 100%; height: 100%; object-fit: cover; }
.goods-card .info { padding: 12px; }
.goods-card .name { height: 40px; overflow: hidden; font-size: 14px; }
.goods-card .price { color: #e54d42; font-size: 18px; font-weight: bold; margin: 6px 0; }
.goods-card .price .old { color: #999; font-size: 12px; font-weight: normal; text-decoration: line-through; margin-left: 6px; }
.goods-card .extra { display: flex; justify-content: space-between; color: #999; font-size: 12px; }

/* 商品详情 */
.detail { display: flex; gap: 40px; background: #fff; padding: 30px; border-radius: 6px; }
.detail .img { width: 420px; height: 420px; }
.detail .img img { width: 100%; height: 100%; object-fit: cover; }
.detail .desc { flex: 1; }
.detail .desc h1 { font-size: 22px; margin-bottom: 12px; }
.detail .price-box { background: #fef0ef; padding: 14px; border-radius: 4px; margin: 12px 0; }
.detail .price { color: #e54d42; font-size: 28px; font-weight: bold; }
.detail .num { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.detail .num input { width: 70px; height: 34px; text-align: center; border: 1px solid #ddd; }
.detail .btns { display: flex; gap: 14px; margin-top: 20px; }
.btn-main { background: #b8860b; color: #fff; padding: 10px 36px; border-radius: 3px; font-size: 16px; }
.btn-ghost { border: 1px solid #b8860b; color: #b8860b; padding: 10px 36px; border-radius: 3px; font-size: 16px; }

/* 表格 / 列表 */
.table { width: 100%; background: #fff; border-collapse: collapse; }
.table th, .table td { border: 1px solid #eee; padding: 12px; text-align: center; }
.table th { background: #fafafa; }
.table .thumb { width: 70px; height: 70px; object-fit: cover; }

/* 购物车底部结算 */
.checkout-bar {
  background: #fff; padding: 14px 20px; margin-top: 16px;
  display: flex; align-items: center; gap: 20px; border-radius: 4px;
}
.checkout-bar .total { margin-left: auto; font-size: 16px; }
.checkout-bar .total b { color: #e54d42; font-size: 22px; }
.checkout-bar .go-btn { background: #e54d42; color: #fff; padding: 10px 40px; border-radius: 3px; font-size: 16px; }

/* 订单卡片 */
.order-card { background: #fff; border-radius: 6px; margin-bottom: 16px; overflow: hidden; }
.order-card .head {
  display: flex; justify-content: space-between; padding: 12px 18px;
  background: #fafafa; border-bottom: 1px solid #eee;
}
.order-card .goods { padding: 14px 18px; }
.order-card .goods-item { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.order-card .goods-item img { width: 60px; height: 60px; object-fit: cover; }
.order-card .foot {
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  padding: 12px 18px; border-top: 1px solid #eee;
}
.order-card .status { color: #b8860b; font-weight: bold; }

/* Tab 切换 */
.tabs { display: flex; gap: 4px; background: #fff; padding: 8px; border-radius: 6px; margin-bottom: 16px; }
.tabs .tab { padding: 8px 24px; border-radius: 4px; color: #555; }
.tabs .tab.active { background: #b8860b; color: #fff; }

/* 表单 */
.form-card { max-width: 480px; margin: 40px auto; background: #fff; padding: 30px; border-radius: 6px; }
.form-card h2 { margin-bottom: 20px; text-align: center; }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; margin-bottom: 6px; color: #666; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; height: 38px; border: 1px solid #ddd; border-radius: 3px; padding: 0 10px; outline: none;
}
.form-item textarea { height: 70px; padding: 8px 10px; }
.form-submit { width: 100%; background: #b8860b; color: #fff; height: 42px; border-radius: 3px; font-size: 16px; }
.form-item .code-row { display: flex; gap: 10px; }
.form-item .code-row input { flex: 1; }
.form-item .code-btn { width: 110px; background: #eee; border-radius: 3px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: none; align-items: center; justify-content: center; z-index: 999;
}
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 8px; padding: 30px; width: 380px; text-align: center; }
.modal h3 { margin-bottom: 16px; }
.modal .tip { color: #999; margin: 12px 0; font-size: 13px; }
.modal .close { margin-top: 16px; color: #b8860b; }

/* 空状态 */
.empty { text-align: center; color: #999; padding: 60px 0; }
.empty .big { font-size: 44px; margin-bottom: 12px; }

@media (max-width: 1240px) {
  .topbar-inner, .container { width: calc(100% - 32px); }
}
@media (max-width: 700px) {
  .site-footer { margin-top: 24px; padding: 20px 12px 22px; font-size: 12px; line-height: 1.9; }
  .site-footer .footer-line { overflow-wrap: anywhere; }
}

/* 地址列表 */
.addr-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.addr-card { background: #fff; padding: 16px; border-radius: 6px; border: 2px solid transparent; }
.addr-card.active { border-color: #b8860b; }
.addr-card .name { font-weight: bold; margin-bottom: 6px; }
.addr-card .mobile { color: #999; margin-left: 10px; }
.addr-card .tag { display: inline-block; background: #b8860b; color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 2px; margin-left: 8px; }
