/* ============================================================
   处理拉二手交易平台 — 公共组件样式
   头部导航、底部、商品卡片、分页等共享组件
   ============================================================ */

/* --- Shared Page Shell --- */
.page-body { background: #F4F4F4; min-height: 100vh; font-family: "Microsoft YaHei","微软雅黑",Arial,sans-serif; font-size: 14px; color: #333; }
.page-wrap { width: 1000px; margin: 0 auto; }

/* --- Shared Top Header --- */
.shared-header { background: #fff; border-bottom: 2px solid #CE2B2A; }
.shared-header .page-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.shared-logo { display: flex; align-items: center; }
.shared-logo img { height: 44px; }
.shared-logo .logo-txt { font-size: 22px; font-weight: bold; color: #CE2B2A; letter-spacing: 2px; margin-left: 6px; }
.shared-header-right { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.shared-header-right a { color: #333; padding: 6px 14px; border-radius: 3px; transition: all 0.15s; }
.shared-header-right a:hover { color: #CE2B2A; background: #fff8f8; }

/* --- Shared Footer --- */
.shared-footer { background: #fff; border-top: 2px solid #CE2B2A; padding: 35px 0; margin-top: 20px; }
.shared-footer-links { display: flex; justify-content: space-around; margin-bottom: 25px; }
.shared-footer dl { text-align: center; }
.shared-footer dt { font-size: 15px; font-weight: bold; color: #333; margin-bottom: 10px; }
.shared-footer dd { line-height: 28px; font-size: 13px; }
.shared-footer dd a { color: #666; }
.shared-footer dd a:hover { color: #CE2B2A; }
.shared-footer-copy { text-align: center; font-size: 12px; color: #999; line-height: 24px; }

/* --- Breadcrumb --- */
.breadcrumb { font-size: 13px; color: #999; padding: 12px 0; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #CE2B2A; }
.breadcrumb span { color: #333; }

/* --- Goods Card (shared) --- */
.gcard {
  display: block;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.gcard:hover { box-shadow: 0 0 9px rgba(109,57,2,0.54); }
.gcard-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f8f8f8;
  display: block;
}
.gcard-nopic {
  width: 100%;
  height: 180px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #ddd;
}
.gcard-body { padding: 8px 10px; }
.gcard-name {
  font-size: 14px;
  color: #333;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}
.gcard-price { font-size: 18px; font-weight: bold; color: #f1912c; }
.gcard-price .unit { font-size: 13px; font-weight: normal; }
.gcard-tag {
  display: inline-block;
  margin-top: 4px;
  background: #CE2B2A;
  color: #fff;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 11px;
}
.gcard-meta { font-size: 12px; color: #999; margin-top: 4px; }

/* --- Goods Grid --- */
.goods-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.goods-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }

/* --- Pagination --- */
.pager { text-align: center; padding: 20px 0; }
.pager a, .pager span {
  display: inline-block;
  min-width: 36px;
  height: 36px;
  line-height: 36px;
  margin: 0 3px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 3px;
  font-size: 14px;
  text-align: center;
  color: #333;
}
.pager span { color: #999; border-color: transparent; }
.pager a:hover { border-color: #CE2B2A; color: #CE2B2A; }
.pager a.active { background: #CE2B2A; color: #fff; border-color: #CE2B2A; }

/* --- Section Box --- */
.section-box { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 15px; }
.section-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  padding-bottom: 10px;
  border-bottom: 2px solid #CE2B2A;
  margin-bottom: 15px;
}

/* --- Loading --- */
.loading-wrap { text-align: center; padding: 60px 20px; color: #999; font-size: 14px; }
.empty-wrap { text-align: center; padding: 60px 20px; color: #bbb; }
.empty-wrap .icon { font-size: 60px; margin-bottom: 10px; }
.empty-wrap a { color: #CE2B2A; }

/* --- Form Elements --- */
.form-input {
  width: 100%;
  height: 42px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 14px;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-input:focus { border-color: #CE2B2A; box-shadow: 0 0 0 2px rgba(206,43,42,0.1); }

/* --- Buttons --- */
.btn-primary {
  display: inline-block;
  height: 40px;
  line-height: 40px;
  padding: 0 24px;
  border: 0;
  background: #CE2B2A;
  color: #fff;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  letter-spacing: 1px;
}
.btn-primary:hover { background: #b52322; }
.btn-outline {
  display: inline-block;
  height: 38px;
  line-height: 38px;
  padding: 0 20px;
  border: 1px solid #CE2B2A;
  background: #fff;
  color: #CE2B2A;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
}
.btn-outline:hover { background: #fff8f8; }

/* --- Toast --- */
.global-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 99999;
  display: none;
  pointer-events: none;
}
