* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f6f4fb; color: #26232e; }
.hidden { display: none !important; }
#topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; background: #2b2440; color: #fff; position: sticky; top: 0; z-index: 20; }
.top-search { flex: 1 1 260px; max-width: 520px; display: flex; gap: 8px; margin: 0 8px; }
.top-search input { flex: 1; border: none; border-radius: 20px; padding: 8px 16px; }
.top-search button { border-radius: 20px; padding: 8px 20px; white-space: nowrap; }
body:not(.end-mall) .top-search { display: none; }
button.small, .small { padding: 5px 12px; font-size: 13px; }
button.big { padding: 11px 28px; font-size: 15px; border-radius: 10px; }
#topbar .brand { display: flex; align-items: baseline; gap: 10px; }
#topbar h1 { margin: 0; font-size: 19px; letter-spacing: 1px; }
.end-name { font-size: 12px; padding: 2px 9px; border-radius: 20px; background: #6c5ce7; }
.end-wh .end-name { background: #e67e22; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.toplink { color: #cfc8ee; text-decoration: none; font-size: 13px; }
.toplink:hover { color: #fff; }
.user-area { font-size: 13px; color: #ffd166; }
main { max-width: 1180px; margin: 0 auto; padding: 18px 14px 40px; }
footer { text-align: center; color: #8b869e; font-size: 12px; padding: 14px; }
button { background: #6c5ce7; color: #fff; border: none; border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 14px; }
button:hover { background: #5a4bd1; }
button.sub { background: #eceaf6; color: #3d3663; }
button.sub:hover { background: #dcd7f2; }
button.danger { background: #d63050; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid #d5d0e6; border-radius: 8px; font-size: 14px; background: #fff; }
label { display: block; font-size: 13px; color: #55506b; margin: 10px 0 4px; }
form { max-width: 520px; }
#tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
#tabs button { background: #eceaf6; color: #3d3663; }
#tabs button.active { background: #6c5ce7; color: #fff; }
.card { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 4px rgba(43,36,64,.07); margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.meta { color: #8b869e; font-size: 12px; }
.price { color: #d63050; font-weight: 700; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.pcard { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(43,36,64,.08); cursor: pointer; position: relative; }
.pcard:hover { box-shadow: 0 4px 14px rgba(43,36,64,.14); }
.pcard .pimg { position: relative; aspect-ratio: 1 / 1; background: #e9e5f5; overflow: hidden; }
.pcard .pimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .pinfo { padding: 8px 10px 10px; }
.pcard .ptitle { font-size: 13.5px; font-weight: 500; line-height: 1.4; min-height: 38px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.chip { display: inline-block; padding: 5px 14px; border-radius: 20px; background: #eceaf6; font-size: 13px; cursor: pointer; border: none; color: #3d3663; }
.chip.active { background: #6c5ce7; color: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px; border-bottom: 1px solid #eeeaf8; text-align: left; vertical-align: top; }
th { color: #55506b; font-weight: 600; white-space: nowrap; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; background: #eceaf6; color: #3d3663; font-size: 12px; white-space: nowrap; }
.badge.draft { background: #fff3d6; color: #8a6100; }
.pgrp { margin: 14px 0 4px; font-size: 14px; }
.badge.warn { background: #ffe3e8; color: #a31230; }
.badge.ok { background: #dff5e3; color: #177245; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 1px 4px rgba(43,36,64,.07); }
.stat .num { font-size: 22px; font-weight: 700; margin-top: 4px; }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.entry-card { background: #fff; border-radius: 12px; padding: 18px; text-decoration: none; color: #26232e; box-shadow: 0 1px 4px rgba(43,36,64,.08); display: block; }
.entry-card strong { display: block; font-size: 17px; margin-bottom: 6px; }
.entry-card span { color: #8b869e; font-size: 13px; }
#modal { position: fixed; inset: 0; background: rgba(24,18,44,.5); display: flex; align-items: flex-start; justify-content: center; padding: 30px 12px; z-index: 50; overflow-y: auto; }
.modal-box { background: #fff; border-radius: 14px; max-width: 760px; width: 100%; padding: 20px; position: relative; }
#modalClose { position: absolute; top: 8px; right: 10px; background: none; color: #555; font-size: 22px; padding: 2px 8px; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #26232e; color: #fff; padding: 10px 20px; border-radius: 24px; font-size: 14px; z-index: 99; max-width: 90vw; text-align: center; }
#toast.error { background: #c22545; }
.thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; background: #e9e5f5; }
.detail-img { width: 100%; max-height: 380px; object-fit: contain; background: #efeaf9; border-radius: 10px; }
.checkline { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.checkline input { width: auto; }

/* ===== 商城 Mercari 式版式（分区 / 大图卡 / 详情页） ===== */
.ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9a92b8; font-size: 13px; }
.prow { display: flex; align-items: baseline; gap: 6px; }
.pprice { font-size: 17px; font-weight: 800; color: #26232e; }
.pcny { color: #8b869e; font-size: 12px; }
.pmeta { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.cond { display: inline-block; background: #eceaf6; color: #5a4bd1; border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.pshop { color: #8b869e; font-size: 12px; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soldmask { position: absolute; inset: 0; background: rgba(24,18,44,.45); display: flex; align-items: center; justify-content: center; z-index: 2; }
.soldmask span { color: #fff; font-size: 19px; font-weight: 800; letter-spacing: 3px; border: 2px solid #fff; padding: 2px 12px; border-radius: 6px; transform: rotate(-8deg); }
.catbar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.catbar::-webkit-scrollbar { display: none; }
.catbar .chip { flex: 0 0 auto; }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 10px; }
.sec-head h3 { margin: 0; font-size: 17px; border-left: 4px solid #6c5ce7; padding-left: 9px; }
.sec-head .small { margin-left: auto; }
.hrow { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.hrow .pcard { flex: 0 0 158px; }
.empty { text-align: center; padding: 30px 16px; }
.empty p { margin: 4px 0; }
/* 详情页 */
.dtop { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.detail { display: grid; grid-template-columns: minmax(0, 540px) 1fr; gap: 22px; align-items: start; }
.dmain { position: relative; border-radius: 12px; overflow: hidden; background: #efeaf9; aspect-ratio: 1 / 1; }
.dmain img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dthumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.dthumb { padding: 0; background: #efeaf9; border: 2px solid transparent; border-radius: 8px; width: 64px; height: 64px; overflow: hidden; cursor: pointer; }
.dthumb.active { border-color: #6c5ce7; }
.dthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dtitle { font-size: 20px; margin: 2px 0 10px; line-height: 1.4; }
.dprice { font-size: 26px; font-weight: 800; }
.dprice .pcny { font-size: 13px; font-weight: 400; }
.dtrust { margin: 12px 0; background: #e9f7ee; color: #177245; border-radius: 8px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.dtable { max-width: 420px; }
.dtable th { width: 64px; }
.dseller { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid #eeeaf8; border-radius: 10px; padding: 10px 12px; margin: 14px 0 6px; }
.dseller-main { display: flex; flex-direction: column; gap: 1px; }
.dothers { margin-top: 8px; }
.dother { display: flex; align-items: center; gap: 8px; padding: 6px 0; text-decoration: none; color: #26232e; border-top: 1px dashed #eeeaf8; }
.dother img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: #e9e5f5; flex: 0 0 auto; }
.dother span { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dother b { font-size: 13px; }
.dbuyrow { margin-top: 14px; }
.dsec { margin-top: 16px; }
.flow4 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fstep { display: flex; gap: 8px; align-items: center; background: #f6f4fb; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.fnum { background: #6c5ce7; color: #fff; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.farrow { color: #8b869e; }
.dbar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid #e6e1f2; z-index: 40; box-shadow: 0 -2px 10px rgba(43,36,64,.08); }
.dbar-in { max-width: 1180px; margin: 0 auto; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dbar-price { font-size: 20px; font-weight: 800; }
.shophead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
}
@media (max-width: 720px) {
  .top-search { order: 3; flex-basis: 100%; max-width: none; margin: 4px 0 2px; }
  .dbar-price { font-size: 17px; }
}

/* ===== 出品表单：图片上传区 + 智能文案区（移动优先） ===== */
.cg-box { background: #f6f4fb; border: 1px solid #e6e1f2; border-radius: 10px; padding: 10px 12px 12px; margin-bottom: 8px; }
.cg-box h4 { margin: 2px 0 4px; font-size: 14px; }
.cg-box label { margin-top: 6px; }
.upload-btn { display: block; text-align: center; background: #6c5ce7; color: #fff; border-radius: 10px; padding: 13px 10px; font-size: 15px; font-weight: 600; cursor: pointer; margin: 8px 0 4px; }
.upload-btn:active { background: #5a4bd1; }
.imggrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0; }
.imgthumb { position: relative; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: #e9e5f5; }
.imgthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgthumb .cover-badge { position: absolute; left: 0; top: 0; background: #6c5ce7; color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 0 0 8px 0; z-index: 1; }
.imgthumb .it-actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; }
.imgthumb .it-actions button { flex: 1; border-radius: 0; padding: 5px 0; font-size: 11px; background: rgba(38,35,46,.75); }
.imgthumb .it-actions button:hover { background: rgba(38,35,46,.92); }
.urladd { display: flex; gap: 8px; align-items: center; }
.urladd input { flex: 1; min-width: 0; }
.urladd button { white-space: nowrap; }
@media (max-width: 640px) {
  /* 卖家中心等宽表改为卡片内横滚，避免整页横向溢出 */
  .card { overflow-x: auto; }
  table:not(.dtable) { min-width: 540px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  #modal { padding: 14px 8px; }
  .modal-box { padding: 14px; }
  .imggrid { grid-template-columns: repeat(3, 1fr); }
  form { max-width: none; }
}

/* ===== 首页设计升级（update04）：Hero / 卖点条 / 卖家招募横幅 ===== */
.hero { position: relative; border-radius: 16px; overflow: hidden; background: #2b2440 url('/assets/hero-goods.jpg') right center / cover no-repeat; margin-bottom: 16px; box-shadow: 0 6px 22px rgba(43,36,64,.22); }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(34,27,58,.93) 0%, rgba(34,27,58,.8) 36%, rgba(34,27,58,.28) 64%, rgba(34,27,58,0) 82%); }
.hero-art { display: none; }
.hero-body { position: relative; z-index: 1; padding: 42px 44px 36px; max-width: 610px; color: #fff; }
.hero-title { margin: 0 0 10px; font-size: 34px; font-weight: 800; letter-spacing: 1px; line-height: 1.25; }
.hero-sub { margin: 0 0 22px; font-size: 15px; color: #ddd6f7; line-height: 1.65; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-btn { display: inline-block; text-decoration: none; font-size: 15px; font-weight: 700; padding: 11px 28px; border-radius: 24px; }
.hero-btn.primary { background: #6c5ce7; color: #fff; box-shadow: 0 4px 14px rgba(108,92,231,.5); }
.hero-btn.primary:hover { background: #5a4bd1; }
.hero-btn.ghost { background: rgba(255,255,255,.13); color: #fff; border: 1px solid rgba(255,255,255,.55); }
.hero-btn.ghost:hover { background: rgba(255,255,255,.24); }
.hero-trust { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-trust span { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.24); color: #eeeaff; font-size: 12px; padding: 4px 11px; border-radius: 20px; white-space: nowrap; }
.sellpoints { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 2px 0 4px; }
.sp-card { display: flex; gap: 11px; background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 1px 4px rgba(43,36,64,.07); align-items: flex-start; }
.sp-ico { font-size: 21px; background: #f0edfb; border-radius: 10px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.sp-card h4 { margin: 1px 0 4px; font-size: 14.5px; }
.sp-card p { margin: 0; font-size: 12.5px; color: #8b869e; line-height: 1.55; }
.recruit { display: flex; align-items: center; justify-content: space-between; gap: 14px 18px; flex-wrap: wrap; background: linear-gradient(100deg, #6c5ce7, #8e6fe8 55%, #b06ee8); border-radius: 14px; padding: 20px 22px; margin: 20px 0 2px; color: #fff; box-shadow: 0 4px 16px rgba(108,92,231,.32); }
.recruit h3 { margin: 0 0 9px; font-size: 19px; letter-spacing: .5px; }
.recruit-points { display: flex; gap: 8px; flex-wrap: wrap; }
.recruit-points span { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.32); padding: 4px 11px; border-radius: 20px; font-size: 12.5px; white-space: nowrap; }
.recruit-btn { background: #fff; color: #5a4bd1; text-decoration: none; font-weight: 700; font-size: 14.5px; padding: 11px 22px; border-radius: 24px; white-space: nowrap; }
.recruit-btn:hover { background: #f0edfb; }
/* 分区标题装饰条统一为渐变竖条；商品卡 hover 浮起 */
.sec-head h3 { border-left: none; padding-left: 12px; position: relative; }
.sec-head h3::before { content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 5px; border-radius: 3px; background: linear-gradient(180deg, #6c5ce7, #b06ee8); }
.pcard { transition: box-shadow .18s ease, transform .18s ease; }
.pcard:hover { transform: translateY(-3px); }
@media (max-width: 860px) {
  .sellpoints { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .hero { background: linear-gradient(165deg, #3a2f63, #241d3f); }
  .hero::before { display: none; }
  .hero-art { display: block; width: 100%; height: auto; }
  .hero-body { padding: 20px 18px 22px; max-width: none; }
  .hero-title { font-size: 25px; }
  .hero-sub { font-size: 13.5px; margin-bottom: 16px; }
  .hero-ctas { margin-bottom: 16px; }
  .hero-btn { padding: 10px 22px; font-size: 14px; }
  .recruit { padding: 16px; margin-top: 16px; }
  .recruit h3 { font-size: 17px; }
  .recruit-btn { width: 100%; text-align: center; }
}
@media (max-width: 430px) {
  .sellpoints { gap: 9px; }
  .sp-card { flex-direction: column; gap: 7px; padding: 11px; }
  .sp-ico { width: 36px; height: 36px; font-size: 18px; }
}
