/* 商家后台（shop.html）页面样式 · 配色沿用 styles.css 的米白 + 朱红 + 黄铜金 */
.shop-main { max-width: 1320px; margin: 0 auto; padding: 26px 28px 80px; }
.shop-loading { color: var(--muted); text-align: center; padding: 60px 0; }

/* 店铺信息头 */
.shop-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.shop-ident { display: flex; align-items: center; gap: 14px; min-width: 0; }
.shop-logo {
  width: 56px; height: 56px; border-radius: 14px; flex: 0 0 auto;
  background: linear-gradient(135deg, #e8c36a, #b78236);
  color: #1a1206; font-weight: 800; font-size: 22px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.shop-logo img { width: 100%; height: 100%; object-fit: cover; }
.shop-ident h1 { margin: 0; font-size: 21px; color: var(--ink); }
.shop-ident p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.shop-topnav { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-tab {
  padding: 8px 16px; border-radius: 999px; font-size: 14px;
  color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line);
  transition: all .2s;
}
.shop-tab:hover { border-color: var(--gold-2); color: var(--red-500); }
.shop-tab.active { background: var(--red-500); border-color: var(--red-500); color: #fff; }

/* 区块头 + 统计 */
.shop-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.shop-section-head h2 { margin: 0; font-size: 20px; color: var(--ink); }
.shop-section-head p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.mstat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.mstat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.mstat b { display: block; font-size: 24px; color: var(--red-500); line-height: 1.2; }
.mstat span { font-size: 12.5px; color: var(--muted); }

/* 商品列表 */
.mprod-list { display: flex; flex-direction: column; gap: 12px; }
.mprod-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; box-shadow: 0 4px 14px rgba(122, 20, 16, .05);
}
.mprod-thumb {
  width: 104px; height: 104px; flex: 0 0 auto;
  border-radius: 10px; overflow: hidden; background: var(--paper-2);
}
.mprod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mprod-main { flex: 1; min-width: 0; }
.mprod-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mprod-title h3 { margin: 0; font-size: 17px; color: var(--ink); }
.mstat-badge { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.mstat-badge.on { color: #1c6b3c; background: rgba(28, 107, 60, .1); border: 1px solid rgba(28, 107, 60, .25); }
.mstat-badge.off { color: var(--muted); background: rgba(0, 0, 0, .05); border: 1px solid var(--line); }
.mprod-meta { margin: 7px 0 0; font-size: 13px; color: var(--ink-2); }
.mprod-meta em { font-style: normal; color: var(--red-500); font-weight: 700; }
.mprod-desc {
  margin: 7px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mprod-actions { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.mbtn {
  padding: 7px 14px; border-radius: 8px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-family: inherit; transition: all .18s; white-space: nowrap;
}
.mbtn:hover { border-color: var(--gold-2); color: var(--red-500); }
.mbtn.primary { background: var(--red-500); border-color: var(--red-500); color: #fff; }
.mbtn.primary:hover { background: var(--red-400); color: #fff; }
.mbtn:disabled { opacity: .55; cursor: default; }

/* 空态 / 提示 */
.shop-empty {
  background: #fff; border: 2px dashed var(--line); border-radius: 12px;
  padding: 56px 20px; text-align: center; color: var(--muted); font-size: 14px;
}
.shop-notice {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 46px 26px; text-align: center; box-shadow: var(--shadow);
}
.shop-notice .shop-notice-icon {
  width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%;
  background: rgba(214, 166, 75, .16); color: var(--gold-2);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.shop-notice h2 { margin: 0 0 8px; font-size: 19px; color: var(--ink); }
.shop-notice p { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.shop-notice .shop-notice-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 商品编辑弹窗（深色，沿用 auth-modal 视觉） */
.auth-modal.prod-wide { width: 600px; max-height: 88vh; overflow-y: auto; }
.prod-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prod-images { display: flex; flex-direction: column; gap: 10px; }
.prod-img-row { display: flex; align-items: center; gap: 10px; }
.prod-img-thumb {
  width: 54px; height: 54px; flex: 0 0 auto; border-radius: 10px;
  border: 1px dashed rgba(207, 224, 255, .35);
  background: rgba(255, 255, 255, .06);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: rgba(207, 224, 255, .5); overflow: hidden;
}
.prod-img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-img-row .auth-field { flex: 1; min-width: 0; }
.prod-img-btn {
  flex: 0 0 auto; padding: 9px 12px; border-radius: 8px;
  background: rgba(207, 224, 255, .14); color: #cfe0ff;
  border: 1px solid rgba(207, 224, 255, .4);
  font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.prod-img-btn:hover { background: rgba(207, 224, 255, .24); }
.prod-img-btn:disabled { opacity: .55; cursor: default; }
.prod-tip { margin: 12px 0 0; min-height: 16px; font-size: 12px; color: #ffd2cc; }

@media (max-width: 720px) {
  .shop-main { padding: 18px 16px 60px; }
  .mstat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .mprod-item { flex-wrap: wrap; }
  .mprod-thumb { width: 78px; height: 78px; }
  .mprod-actions { flex-direction: row; width: 100%; }
  .mprod-actions .mbtn { flex: 1; }
  .prod-row2 { grid-template-columns: 1fr; }
  .auth-modal.prod-wide { width: 100%; padding: 26px 18px 20px; }
}

/* ============================================================
   购物车 / 结算 / 收银台 / 订单
   ============================================================ */
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; margin-left: 5px; padding: 0 4px;
  border-radius: 999px; background: var(--red-500); color: #fff;
  font-size: 11px; font-weight: 700; font-style: normal; line-height: 1;
}
.tab-badge[hidden] { display: none; }
.shop-tab.active .tab-badge { background: #fff; color: var(--red-500); }

/* 购物车 */
.cart-group {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px 4px; margin-bottom: 14px; box-shadow: 0 4px 14px rgba(122, 20, 16, .05);
}
.cart-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0 10px; border-bottom: 1px dashed var(--line);
}
.cart-shop { font-size: 14px; font-weight: 700; color: var(--ink); }
.cart-shop::before {
  content: '店'; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-right: 6px; border-radius: 6px;
  background: rgba(214, 166, 75, .2); color: var(--gold-2); font-size: 11px;
}
.cart-group-count { font-size: 12.5px; color: var(--muted); }
.cart-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.cart-row:last-child { border-bottom: 0; }
.cart-row.is-dead { opacity: .6; }
.cart-check input { width: 17px; height: 17px; accent-color: var(--red-500); cursor: pointer; }
.cart-thumb { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--paper-2); flex: 0 0 auto; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-main { flex: 1; min-width: 0; }
.cart-name { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.cart-name:hover { color: var(--red-500); }
.cart-meta { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.cart-warn { margin-left: 8px; color: var(--red-500); font-size: 12px; }
.cart-qty {
  display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper-2);
}
.cart-qty button {
  width: 30px; height: 30px; border: 0; background: transparent;
  color: var(--ink-2); font-size: 16px; cursor: pointer; font-family: inherit;
}
.cart-qty button:hover { background: rgba(226, 58, 46, .1); color: var(--red-500); }
.cart-qty span { min-width: 34px; text-align: center; font-size: 14px; }
.cart-line { flex: 0 0 88px; text-align: right; font-size: 15px; font-weight: 700; color: var(--red-500); }
.cart-del {
  flex: 0 0 auto; background: transparent; border: 0; color: var(--muted);
  font-size: 12.5px; cursor: pointer; font-family: inherit; padding: 4px;
}
.cart-del:hover { color: var(--red-500); }
.cart-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; box-shadow: var(--shadow); position: sticky; bottom: 14px;
}
.cart-bar-left { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.cart-bar-right { display: flex; align-items: center; gap: 16px; }
.cart-bar-total { font-size: 14px; color: var(--ink-2); }
.cart-bar-total b { font-size: 22px; color: var(--red-500); }
.cart-bar .solid-btn:disabled { opacity: .5; cursor: default; }

/* 结算 */
.checkout-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; align-items: start; }
.checkout-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; box-shadow: 0 4px 14px rgba(122, 20, 16, .05);
}
.checkout-card h3 {
  margin: 0 0 14px; font-size: 16px; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.co-shop { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.co-label { display: block; font-size: 12.5px; color: var(--muted); margin: 12px 0 6px; }
.co-input {
  width: 100%; padding: 11px 13px; font-size: 14px; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 9px;
  outline: none; font-family: inherit; transition: border-color .2s;
}
.co-input:focus { border-color: var(--gold-2); background: #fff; }
.co-tip { min-height: 18px; margin: 10px 0 0; font-size: 12.5px; color: var(--red-500); }
.co-submit { width: 100%; justify-content: center; margin-top: 6px; padding: 12px 0; }
.co-submit:disabled { opacity: .6; cursor: default; transform: none; }
.co-items { display: flex; flex-direction: column; gap: 10px; }
.co-item { display: flex; align-items: center; gap: 12px; }
.co-item img { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; background: var(--paper-2); }
.co-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.co-item-main b { font-size: 14px; color: var(--ink); }
.co-item-main span { font-size: 12.5px; color: var(--muted); }
.co-item em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--red-500); }
.co-total {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-size: 14px; color: var(--ink-2);
}
.co-total b { font-size: 22px; color: var(--red-500); }

/* 收银台（仿支付宝） */
.pay-shell {
  max-width: 520px; margin: 0 auto; background: #fff; border-radius: 16px;
  overflow: hidden; box-shadow: 0 18px 44px rgba(22, 49, 95, .18);
  border: 1px solid rgba(22, 119, 255, .16);
}
.pay-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 22px; background: linear-gradient(135deg, #1677ff, #0d5fd6);
  color: #fff;
}
.pay-brand { font-size: 19px; font-weight: 800; letter-spacing: 2px; }
.pay-env { font-size: 12px; opacity: .85; }
.pay-body { padding: 26px 24px 28px; text-align: center; }
.pay-amount { margin: 6px 0 2px; font-size: 44px; font-weight: 800; color: #1f1410; line-height: 1.1; }
.pay-amount i { font-style: normal; font-size: 22px; margin-right: 4px; }
.pay-order { margin: 0 0 20px; font-size: 12.5px; color: var(--muted); }
.pay-info { text-align: left; border-top: 1px solid #eef2f8; }
.pay-info > div {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid #eef2f8; font-size: 13.5px;
}
.pay-info span { flex: 0 0 68px; color: #8a97ad; }
.pay-info b { flex: 1; color: #1f1410; font-weight: 600; line-height: 1.6; }
.pay-btn {
  width: 100%; margin-top: 22px; padding: 14px 0;
  background: #1677ff; color: #fff; border: 0; border-radius: 10px;
  font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit;
  box-shadow: 0 8px 20px rgba(22, 119, 255, .28);
  transition: background .2s, transform .15s;
}
.pay-btn:hover { background: #0f6ae8; transform: translateY(-1px); }
.pay-btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.pay-cancel {
  width: 100%; margin-top: 10px; padding: 10px 0;
  background: transparent; border: 0; color: #7b8aa3;
  font-size: 13.5px; cursor: pointer; font-family: inherit;
}
.pay-tip { margin: 10px 0 0; font-size: 11.5px; color: #a2adc0; }

/* 支付成功 */
.paid-shell {
  max-width: 520px; margin: 20px auto 0; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 40px 28px 34px; text-align: center;
  box-shadow: var(--shadow);
}
.paid-mark {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%;
  background: rgba(34, 160, 96, .12); color: #22a060;
  font-size: 32px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.paid-shell h2 { margin: 0 0 10px; font-size: 21px; color: var(--ink); }
.paid-amount { margin: 0 0 8px; font-size: 34px; font-weight: 800; color: var(--red-500); }
.paid-line { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.paid-tip { margin: 8px 0 22px; font-size: 13px; color: var(--ink-2); }
.paid-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 订单卡片 */
.order-list { display: flex; flex-direction: column; gap: 14px; }
.order-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: 0 4px 14px rgba(122, 20, 16, .05);
}
.order-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; background: var(--paper-2); border-bottom: 1px solid var(--line);
}
.order-no { font-size: 12.5px; color: var(--muted); letter-spacing: .3px; }
.order-status { font-size: 12.5px; font-weight: 700; padding: 3px 11px; border-radius: 999px; }
.order-status.s-wait { color: #b3771a; background: rgba(214, 166, 75, .18); }
.order-status.s-paid { color: #1c5aa8; background: rgba(28, 90, 168, .12); }
.order-status.s-ship { color: #6a3fb0; background: rgba(106, 63, 176, .12); }
.order-status.s-done { color: #1c6b3c; background: rgba(28, 107, 60, .12); }
.order-items { padding: 6px 18px; }
.ord-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ord-item:last-child { border-bottom: 0; }
.ord-item img { width: 54px; height: 54px; border-radius: 9px; object-fit: cover; background: var(--paper-2); }
.ord-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ord-item-main b { font-size: 14px; color: var(--ink); font-weight: 600; }
.ord-item-main span { font-size: 12.5px; color: var(--muted); }
.ord-item em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--red-500); }
.order-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 18px 14px; border-top: 1px solid var(--line);
}
.order-addr { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.order-tail { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.order-total { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.order-total b { font-size: 18px; color: var(--red-500); }
.order-actions { display: flex; gap: 8px; align-items: center; }
.ord-hint { font-size: 12.5px; color: var(--muted); }
.m-subtabs { margin-bottom: 16px; }

/* 订单里的「去评价」（只在已完成订单出现） */
.ord-review {
  flex: 0 0 auto; font-size: 12.5px; padding: 3px 12px; border-radius: 999px;
  border: 1px solid var(--red-400); color: var(--red-500); white-space: nowrap;
  transition: all .2s;
}
.ord-review:hover { background: var(--red-500); color: #fff; }
.ord-review.is-done { border-color: var(--line); color: var(--muted); }

/* 商家后台 · 商品建议 */
.sug-manage-list { display: flex; flex-direction: column; gap: 12px; }
.sug-manage {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; box-shadow: 0 4px 14px rgba(122, 20, 16, .05);
}
.sug-manage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sug-product {
  display: inline-block; margin-bottom: 6px; padding: 1px 9px;
  font-size: 12px; color: var(--indigo);
  background: rgba(28, 58, 110, .08); border: 1px solid rgba(28, 58, 110, .18);
  border-radius: 999px;
}
.sug-manage-head h3 { margin: 0; font-size: 16px; color: var(--ink); }
.sug-votes { font-size: 13px; font-weight: 700; color: var(--red-500); white-space: nowrap; }
.sug-manage-body { margin: 8px 0 0; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); white-space: pre-wrap; }
.sug-manage-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 8px; font-size: 12px; color: var(--muted);
}
.sug-manage-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.sug-manage-controls select,
.sug-manage-controls input {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--paper-2); font: inherit; font-size: 13px; color: var(--ink); outline: none;
}
.sug-manage-controls select:focus,
.sug-manage-controls input:focus { border-color: var(--gold-2); background: #fff; }
.sug-manage-controls input { flex: 1; min-width: 200px; }

@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .cart-row { flex-wrap: wrap; }
  .cart-thumb { width: 60px; height: 60px; }
  .cart-line { flex: 0 0 auto; margin-left: auto; }
  .cart-bar { position: static; }
  .pay-amount { font-size: 36px; }
  .order-bottom { flex-direction: column; align-items: flex-start; }
  .order-tail { margin-left: 0; width: 100%; justify-content: space-between; }
}
