/* 模块商店（服务端）—— 样式 */

.lsh { max-width: 1120px; margin: 0 auto; padding: 16px; color: var(--ls-text, #1f2937); }
.lsh * { box-sizing: border-box; }

/* ---------------------------------------------------------------- 头 */
.lsh-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; border-radius: 16px; margin-bottom: 16px;
  background: linear-gradient(135deg, #0f766e, #0ea5e9);
  color: #fff;
}
.lsh-hero-name { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.lsh-hero-sub { margin-top: 6px; font-size: 13px; opacity: .92; white-space: pre-wrap; }
.lsh-hero-side { display: flex; gap: 8px; flex: none; }

/* ---------------------------------------------------------------- 按钮 */
.lsh-btn {
  appearance: none; border: 0; cursor: pointer; font-size: 13px;
  padding: 9px 16px; border-radius: 10px; background: #0ea5e9; color: #fff;
  transition: .15s; line-height: 1;
}
.lsh-btn:hover { filter: brightness(1.06); }
.lsh-btn:disabled { opacity: .6; cursor: default; }
.lsh-btn.sm { padding: 7px 12px; font-size: 12px; }
.lsh-btn.ghost { background: rgba(255, 255, 255, .16); color: inherit; border: 1px solid rgba(255, 255, 255, .35); }
.lsh-panel .lsh-btn.ghost, .lsh-modal .lsh-btn.ghost, .lsh-drawer .lsh-btn.ghost {
  background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb;
}
.lsh-btn.ghost.danger { color: #dc2626; border-color: #fecaca; background: #fef2f2; }

/* ---------------------------------------------------------------- 页签 */
.lsh-tabs, .lsh-drawer-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.lsh-tab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 8px 14px; border-radius: 999px; font-size: 14px; color: #6b7280;
}
.lsh-tab.on { background: #e0f2fe; color: #0369a1; font-weight: 600; }

/* ---------------------------------------------------------------- 商品 */
.lsh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.lsh-card {
  border: 1px solid #e5e7eb; border-radius: 14px; overflow: hidden; background: #fff;
  display: flex; flex-direction: column; transition: .18s;
}
.lsh-card:hover { border-color: #bae6fd; box-shadow: 0 8px 24px rgba(2, 132, 199, .08); transform: translateY(-1px); }
.lsh-card-cover { width: 100%; height: 132px; object-fit: cover; display: block; background: #f8fafc; }
.lsh-card-cover-ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #0ea5e9, #6366f1);
}
.lsh-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lsh-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lsh-card-name { font-weight: 600; font-size: 15px; }
.lsh-ver { font-size: 11px; color: #6b7280; background: #f3f4f6; border-radius: 6px; padding: 2px 6px; }
.lsh-card-sum { font-size: 12.5px; color: #6b7280; line-height: 1.6; flex: 1; }
.lsh-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lsh-card-btns { display: flex; gap: 6px; }
.lsh-price { font-size: 17px; font-weight: 700; color: #e11d48; }
.lsh-price.free { color: #059669; }
.lsh-price-old { margin-left: 6px; font-size: 12px; color: #9ca3af; text-decoration: line-through; }
.lsh-empty { padding: 40px 0; text-align: center; color: #9ca3af; font-size: 13px; }

/* ---------------------------------------------------------------- 说明页 */
.lsh-howto { display: flex; flex-direction: column; gap: 12px; }
.lsh-howto-step { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.lsh-howto-step b {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: #0ea5e9; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.lsh-howto-step .t { font-weight: 600; font-size: 14px; }
.lsh-howto-step .d { margin-top: 4px; font-size: 12.5px; color: #6b7280; line-height: 1.7; }
.lsh-howto code { background: #f3f4f6; border-radius: 4px; padding: 1px 5px; font-size: 12px; }

/* ---------------------------------------------------------------- 弹层 */
.lsh-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 9998;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.lsh-mask.show { display: flex; }
.lsh-modal {
  width: min(560px, 100%); max-height: 86vh; overflow: auto; background: #fff;
  border-radius: 16px; box-shadow: 0 24px 60px rgba(2, 6, 23, .3);
}
.lsh-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid #f1f5f9; font-weight: 600;
}
.lsh-x { appearance: none; border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: #9ca3af; }
.lsh-modal-body { padding: 16px 18px; }
.lsh-modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 12px 18px; border-top: 1px solid #f1f5f9; background: #fafafa;
}
.lsh-modal-foot .lsh-price { margin-right: auto; }
.lsh-detail-meta { font-size: 12px; color: #6b7280; }
.lsh-detail-sum { margin: 8px 0; font-size: 14px; }
.lsh-detail-text { font-size: 13px; color: #4b5563; line-height: 1.8; }
.lsh-detail-link { margin-top: 10px; font-size: 13px; }
.lsh-detail-link a { color: #0284c7; }

/* ---------------------------------------------------------------- 表单 */
.lsh-field { display: block; margin-bottom: 12px; }
.lsh-field > span { display: block; font-size: 12.5px; color: #6b7280; margin-bottom: 5px; }
.lsh-field input[type=text], .lsh-field input:not([type]), .lsh-field textarea, .lsh-field input[type=file] {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 9px; padding: 9px 11px; font-size: 13px;
  background: #fff; color: #1f2937; outline: none;
}
.lsh-field input:focus, .lsh-field textarea:focus { border-color: #7dd3fc; box-shadow: 0 0 0 3px rgba(14, 165, 233, .12); }
.lsh-field.inline { display: flex; align-items: center; gap: 6px; }
.lsh-field.inline > span { margin: 0; }
.lsh-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lsh-hint { font-size: 12px; color: #9ca3af; line-height: 1.7; }
.lsh-order-line { display: flex; gap: 10px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed #f1f5f9; }
.lsh-order-line > span { color: #6b7280; flex: none; width: 72px; }
.lsh-pay { margin: 12px 0; border: 1px solid #fde68a; background: #fffbeb; border-radius: 12px; padding: 12px 14px; }
.lsh-pay-title { font-size: 12.5px; color: #92400e; font-weight: 600; margin-bottom: 6px; }
.lsh-pay-body { font-size: 13px; line-height: 1.8; }
.lsh-pay-contact { margin-top: 6px; font-size: 12px; color: #92400e; }

/* ---------------------------------------------------------------- 订单 */
.lsh-order-row, .lsh-admin-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid #f1f5f9;
}
.lsh-order-row-main { min-width: 0; }
.lsh-order-row-no, .lsh-admin-item-sub { font-size: 12px; color: #9ca3af; }
.lsh-order-row-side { display: flex; align-items: center; gap: 8px; flex: none; }

/* ---------------------------------------------------------------- 抽屉 */
.lsh-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(520px, 94vw); background: #fff;
  box-shadow: -12px 0 40px rgba(2, 6, 23, .18); z-index: 9999; transform: translateX(102%);
  transition: transform .22s ease; display: flex; flex-direction: column;
}
.lsh-drawer.show { transform: none; }
.lsh-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid #f1f5f9; font-weight: 600;
}
.lsh-drawer-tabs { padding: 12px 18px 0; margin-bottom: 0; }
.lsh-drawer-body { padding: 14px 18px; overflow: auto; flex: 1; }
.lsh-ov { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: #6b7280; margin-bottom: 12px; }
.lsh-ov b { color: #111827; font-size: 15px; }
.lsh-admin-item-main { min-width: 0; }
.lsh-admin-item-name { font-size: 13.5px; font-weight: 600; }
.lsh-admin-item-btns { display: flex; gap: 6px; flex: none; }
.lsh-ok { color: #059669; }
.lsh-warn { color: #d97706; }

/* ---------------------------------------------------------------- 提示 */
.lsh-toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  background: #111827; color: #fff; font-size: 13px; padding: 10px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 10000; max-width: 80vw;
}
.lsh-toast.show { opacity: .95; transform: translate(-50%, 0); }
.lsh-toast.bad { background: #b91c1c; }

@media (max-width: 720px) {
  .lsh-hero { flex-direction: column; align-items: flex-start; }
  .lsh-two { grid-template-columns: 1fr; }
}
