/**
 * 商城商品详情页样式（第20-1版）
 *
 * 视觉对齐用户后台 /Manage/shop/goods：松松蓝 #03b3ff + 桔黄 #f5a623 的
 * 青蓝淡彩底、圆角玻璃卡片、渐变标题与渐变主按钮。
 * 本文件只服务商城详情页，不覆盖商城已有的 main.css / account.css。
 */

/* 购买决策 FAQ：原生折叠，键盘与手机均可操作。 */
.mall-faq-intro { font-size: 12px; color: #64748b; line-height: 1.7; }
.mall-faq-accordion { display: grid; gap: 10px; }
.mall-faq-accordion details { padding: 12px 14px; border: 1px solid #e0f2fe; border-radius: 12px; background: #ffffffb3; }
.mall-faq-accordion details[open] { background: linear-gradient(135deg, #effaff, #fff8ed); border-color: #7dd3fc; }
.mall-faq-accordion summary { color: #334155; font-size: 13px; font-weight: 700; cursor: pointer; line-height: 1.6; }
.mall-faq-accordion p { margin: 10px 0 0; font-size: 12px; color: #64748b; line-height: 1.9; }
.mall-faq-accordion a { display: inline-block; margin-top: 10px; color: #0284c7; font-size: 12px; font-weight: 700; }

/* 前台付款与游客评论弹窗。 */
.mall-dialog { width: min(680px, 94vw); max-height: 90vh; overflow: auto; border: 0; border-radius: 20px; padding: 26px; color: #0f172a; box-shadow: 0 24px 80px #0f172a33; }
.mall-dialog::backdrop { background: #0f172a88; }
.mall-dialog header { display: flex; align-items: center; justify-content: space-between; }
.mall-dialog textarea, .mall-dialog input, .mall-dialog select { width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; }
.mall-comment-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.mall-comment-fields label { grid-column: 1 / -1; }
.mall-dialog .mall-buy-entry { width: 100%; border: 0; }
/* 评论框沿用媒体页的居中白色卡片、蓝色提示及可点选五星评分。 */
#mall-comment-dialog { width: min(780px, calc(100vw - 32px)); padding: 28px 30px 24px; border: 1px solid #1e90ff2e; }
#mall-comment-dialog::backdrop { background: #0f172a73; backdrop-filter: blur(3px); }
#mall-comment-dialog h3 { margin: 0; font-size: 20px; font-weight: 900; }
#mall-comment-dialog [data-close-mall-dialog] { border: 0; background: transparent; color: #64748b; font-size: 22px; cursor: pointer; }
#mall-comment-dialog .mall-ai-summary { margin: 14px 0; padding: 12px 16px; color: #0284c7; border-radius: 10px; }
#mall-comment-dialog textarea { min-height: 140px; resize: vertical; }
.mall-rating-control { display: flex; align-items: center; gap: 12px; }
.mall-comment-stars { display: inline-flex; gap: 4px; }
.mall-comment-stars button { border: 0; padding: 0 2px; background: transparent; color: #e2e8f0; font-size: 25px; cursor: pointer; }
.mall-comment-stars button.is-active { color: #f5a623; }
.mall-comment-stars button:hover { transform: scale(1.15); }
@media (max-width: 600px) {
  #mall-comment-dialog { padding: 20px 18px; }
  .mall-comment-fields { grid-template-columns: 1fr; }
}

/* 用户后台同款：全宽评论按钮、评分汇总、左头像昵称与右评论内容。 */
.mall-review-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; border: 0; border-radius: 13px; color: #fff; font-size: 14px; font-weight: 800; background: linear-gradient(110deg, #2563eb, #6366f1 52%, #8b5cf6); box-shadow: 0 10px 22px #4f46e53d; cursor: pointer; }
.mall-review-rating { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0; padding: 9px 10px; border: 1px solid #fde7b0; border-radius: 12px; background: #fff8eb; }
.mall-review-rating > span:last-child { font-size: 12px; color: #94a3b8; }
.mall-review-notice { color: #94a3b8; font-size: 12px; }
.mall-review-stars { color: #f5a623; font-size: 19px; letter-spacing: 3px; }
#mall-review-list { display: grid; gap: 14px; margin-top: 16px; }
.mall-review-item { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: start; gap: 18px; padding: 20px 22px; border: 1px solid #0ab5e433; border-radius: 18px; background: linear-gradient(135deg, #03b3ff09, #fbfeff 48%, #f7fcff); box-shadow: 0 4px 16px #0f172a0a; }
.mall-review-author { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; text-align: center; }
.mall-review-avatar { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 14px; color: #0284c7; background: #e0f2fe; font-size: 26px; font-weight: 700; box-shadow: 0 6px 16px #0f172a24; }
.mall-review-author strong { max-width: 100%; overflow-wrap: anywhere; color: #334155; font-size: 14px; }
.mall-review-author small, .mall-review-body time { color: #94a3b8; font-size: 11px; }
.mall-review-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mall-review-badge { padding: 2px 7px; border-radius: 999px; color: #4f46e5; background: #eef2ff; font-size: 12px; }
#mall-review-list p { margin: 12px 0; color: #475569; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .mall-review-item { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 16px 12px; }
  .mall-review-avatar { width: 48px; height: 48px; }
}
/* 固定底部快捷栏，账号弹窗层级更高，不影响登录与付款确认。 */
body:has(.mall-bottom-bar:not([hidden])) { padding-bottom: 104px; }
body:has(.mall-detail-page.is-bottom-hidden) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.mall-bottom-dock { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; }
.mall-bottom-bar { position: relative; padding: 14px 132px max(14px, env(safe-area-inset-bottom)) 20px; background: rgba(15, 23, 42, 0.22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid #fff9; }
.mall-bottom-bar[hidden] { display: none; }
.mall-bottom-toggle { position: absolute; right: 24px; bottom: calc(26px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid #ffffff99; border-radius: 8px; background: #fffffff0; color: #0369a1; font-size: 12px; cursor: pointer; box-shadow: 0 2px 10px #0f172a1f; }
/* 实心三角：展开时向下收起，收起后翻转向上恢复。 */
.mall-bottom-toggle-icon { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid currentColor; }
.mall-bottom-toggle.is-collapsed .mall-bottom-toggle-icon { transform: rotate(180deg); }
.mall-bottom-toggle:focus-visible { outline: 2px solid #03b3ff; outline-offset: 2px; }
.mall-bottom-toggle.is-collapsed { bottom: calc(12px + env(safe-area-inset-bottom)); }
.mall-bottom-inner { display: flex; align-items: center; justify-content: center; gap: 18px; }
.mall-bottom-action { min-height: 56px; padding: 0 28px; border: 0; border-radius: 18px; color: #fff; background: #03b3ff; font-size: 16px; font-weight: 800; cursor: pointer; }
.mall-bottom-action:first-child { min-width: 144px; }
.mall-bottom-summary { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 56px; padding: 12px 22px; border-radius: 18px; color: #fff; background: rgba(15, 23, 42, 0.56); }
.mall-bottom-summary span { font-size: 13px; font-weight: 700; }
.mall-bottom-summary strong { color: #ffc265; font-size: 28px; white-space: nowrap; }
@media (max-width: 600px) {
  .mall-bottom-bar { padding: 52px 10px max(14px, env(safe-area-inset-bottom)); }
  .mall-bottom-toggle { right: 12px; }
  .mall-bottom-toggle:not(.is-collapsed) { top: 10px; bottom: auto; }
  .mall-bottom-inner { gap: 8px; flex-wrap: wrap; }
  .mall-bottom-summary { order: -1; width: 100%; min-height: 40px; padding: 6px 12px; }
  .mall-bottom-summary strong { font-size: 22px; }
  .mall-bottom-action { flex: 1; min-height: 44px; padding: 0 12px; font-size: 14px; }
  body:has(.mall-bottom-bar:not([hidden])) { padding-bottom: 180px; }
}

/* 前台与会员端统一结算卡片；覆盖历史全局 header 黄色背景。 */
#mall-comment-dialog header, #mall-purchase-dialog header { background: transparent; position: static; height: auto; width: auto; }
#mall-comment-dialog h3 { background: transparent; }
.mall-review-cta { width: auto; margin-left: auto; padding: 0 24px; }
/* 商品标题与会员端保持相同的蓝色、浅蓝、桔色渐变。 */
.mall-detail-page .mall-goods-title { background: linear-gradient(90deg, #03b3ff, #65d8ff, #f5a623); background-clip: text; -webkit-background-clip: text; color: transparent; }
.mall-detail-page .mall-level-card { background: linear-gradient(135deg, #f0f9ff, #f5f3ff); color: #475569; }
.mall-detail-page .mall-level-card:nth-child(2) { background: linear-gradient(135deg, #fff9e9, #fff2e3); }
.mall-detail-page .mall-level-card:nth-child(3) { background: linear-gradient(135deg, #f5f0ff, #edf5ff); }
.mall-detail-page .mall-level-card.is-active { background: linear-gradient(135deg, #e0f5ff, #f3fbff); color: #0284c7; border-color: #03b3ff; box-shadow: 0 6px 18px #03b3ff1f; }
.mall-detail-page .mall-level-card.is-active em { color: #0284c7; background: #d9f3ff; }
.mall-order-contact { text-align: center; margin: 24px 0; }
.mall-order-contact img { display: block; width: 220px; max-width: 100%; height: auto; margin: 24px auto; }
.mall-order-contact p { margin: 18px 0; }
.mall-order-contact a { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: 12px; background: #03b3ff; color: #fff; font-weight: 700; }
[data-mall-purchase] { position: relative; overflow: hidden; }
[data-mall-purchase]::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; pointer-events: none; background: linear-gradient(90deg, transparent, #ffffff4d, transparent); animation: mall-purchase-shimmer 2s infinite; }
@keyframes mall-purchase-shimmer { from { left: -100%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { [data-mall-purchase]::before { animation: none; } }
#mall-purchase-dialog { width: min(620px, calc(100vw - 32px)); background: #fff; }
.mall-checkout-header { gap: 16px; margin-bottom: 20px; }
.mall-checkout-header h3 { margin: 0; font-size: 22px; font-weight: 800; }
.mall-checkout-header p, .mall-checkout-help { color: #64748b; font-size: 12px; line-height: 1.8; }
.mall-checkout-header button { flex-shrink: 0; align-self: flex-start; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1f5f9; color: #334155; font-size: 24px; cursor: pointer; }
.mall-checkout-product { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: linear-gradient(110deg, #edfaff, #fff8ed); }
.mall-checkout-product img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.mall-checkout-product strong { font-size: 16px; }
.mall-checkout-product p { margin: 6px 0 0; color: #64748b; font-size: 12px; }
.mall-checkout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.mall-checkout-grid > div { display: grid; gap: 12px; padding: 16px; background: #f7f9fc; border-radius: 18px; }
.mall-checkout-grid span { font-size: 12px; color: #94a3b8; }
.mall-checkout-grid strong { font-size: 25px; color: #f5a623; }
#mall-checkout-discount { color: #03b3ff; }
.mall-checkout-field { display: grid; gap: 10px; padding: 14px; margin: 14px 0; border-radius: 16px; background: #f7f9fc; font-size: 14px; }
.mall-checkout-field small { font-size: 12px; color: #64748b; }
.mall-checkout-custom { margin: 16px 0; color: #64748b; font-size: 12px; }
.mall-checkout-custom summary { cursor: pointer; }
#mall-purchase-dialog input:focus, #mall-purchase-dialog textarea:focus, #mall-comment-dialog textarea:focus { outline: 0; border-color: #03b3ff; box-shadow: 0 0 0 3px #03b3ff1a; }
#mall-confirm-purchase { margin-top: 12px; }
#mall-confirm-purchase:disabled { opacity: 0.5; cursor: not-allowed; }

.mall-pay-method:disabled { opacity: 0.5; cursor: not-allowed; }

.mall-detail-page {
  --mall-blue: #03b3ff;
  --mall-blue-deep: #0284c7;
  --mall-orange: #f5a623;
  --mall-ink: #0f172a;
  --mall-muted: #64748b;
  --mall-line: rgba(226, 232, 240, 0.7);
  min-height: calc(100vh - 100px);
  padding: 40px 0 60px;
  color: var(--mall-ink);
  background: transparent;
}

.mall-detail-page *,
.mall-detail-page *::before,
.mall-detail-page *::after {
  box-sizing: border-box;
}

/* 与新闻页使用相同的 .container 响应式宽度与左右留白。 */
.mall-detail-wrap {
  margin: 0 auto;
}

/* ==================== 面包屑 ==================== */

.mall-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  margin: 0 0 20px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  line-height: 24px;
}

.mall-detail-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: var(--mall-blue-deep);
  font-weight: 600;
  text-decoration: none;
}

.mall-detail-breadcrumb a:hover {
  color: #03b3ff;
}

.mall-detail-breadcrumb a:focus-visible {
  outline: 2px solid #03b3ff;
  outline-offset: 3px;
  border-radius: 4px;
}

.mall-breadcrumb-separator {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 18px;
}

.mall-detail-breadcrumb strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
  font-weight: 600;
}

@media (max-width: 600px) {
  .mall-detail-breadcrumb { gap: 7px; padding: 4px 0; font-size: 12px; }
}

/* ==================== 两栏布局 ==================== */

.mall-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.mall-detail-main,
.mall-detail-side {
  min-width: 0;
}

/* 卡片底座：白底 + 轻微蓝橙晕染，与后台卡片一致 */
.mall-card {
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 6% 0%, rgba(10, 181, 228, 0.1), transparent 34%),
    radial-gradient(circle at 94% 12%, rgba(245, 166, 35, 0.08), transparent 28%),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

/* ==================== 区域一：商品信息区 ==================== */

.mall-goods-hero {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
}

.mall-gallery {
  display: grid;
  gap: 14px;
}

.mall-gallery-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 340px;
  padding: 14px;
  border-radius: 26px;
  background: #f4f9ff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.mall-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mall-goods-summary {
  min-width: 0;
}

/* 标题块：左侧渐变竖条 + 标题 + 副标题 + 指标行 */
.mall-title-block {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.mall-title-bar {
  flex: 0 0 auto;
  width: 4px;
  height: 74px;
  border-radius: 999px;
  background: linear-gradient(180deg, #03b3ff, #65d8ff 58%, #f5a623);
  box-shadow: 0 12px 28px rgba(3, 179, 255, 0.24);
}

.mall-goods-title {
  margin: 0;
  background: linear-gradient(90deg, #03b3ff, #65d8ff, #f5a623);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 34px;
  font-weight: 950;
  line-height: 1.3;
}

.mall-goods-subtitle {
  margin: 8px 0 0;
  color: var(--mall-muted);
  font-size: 14px;
  line-height: 1.8;
}

.mall-metrics-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  color: var(--mall-muted);
  font-size: 13px;
}

.mall-metrics-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mall-metrics-row i {
  color: var(--mall-blue-deep);
}

/* 【评价】按钮：走商城已有的账号桥接（data-mall-account），不另起登录实现 */
.mall-review-entry {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--mall-blue-deep);
  border: 1px solid rgba(3, 179, 255, 0.24);
  border-radius: 999px;
  background: rgba(240, 249, 255, 0.72);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.mall-review-entry:hover {
  border-color: rgba(3, 179, 255, 0.5);
  background: rgba(224, 242, 254, 0.9);
}

/* 规格卡片（对应后台「单价商品」价格卡） */
.mall-spec-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.mall-spec-card {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  text-align: left;
  border: 1px solid rgba(226, 232, 240, 0.62);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(3, 179, 255, 0.14), rgba(245, 166, 35, 0.14));
  cursor: pointer;
  transition: all 0.3s ease;
}

.mall-spec-card.is-active {
  border-color: rgba(3, 179, 255, 0.42);
  background: linear-gradient(135deg, rgba(3, 179, 255, 0.28), rgba(245, 166, 35, 0.24));
  box-shadow: 0 14px 28px rgba(3, 179, 255, 0.1);
}

.mall-spec-card span {
  color: var(--mall-ink);
  font-size: 18px;
  font-weight: 950;
}

.mall-spec-card b {
  color: var(--mall-orange);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

/* 会员价档行 */
.mall-level-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mall-level-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 48px;
  padding: 0 12px;
  color: #475569;
  border: 1px solid var(--mall-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 14px;
  font-weight: 950;
  transition: all 0.3s ease;
}

.mall-level-card em {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: var(--mall-orange);
  border-radius: 999px;
  background: rgba(245, 166, 35, 0.1);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.mall-level-card.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--mall-blue);
  box-shadow: 0 12px 24px rgba(3, 179, 255, 0.18);
}

.mall-level-card.is-active em {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

/* 需求备注 */
.mall-requirement-card {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.52);
}

.mall-requirement-card > span {
  color: var(--mall-ink);
  font-size: 13px;
  font-weight: 950;
}

.mall-requirement-card textarea {
  width: 100%;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--mall-line);
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
}

.mall-requirement-card textarea:focus {
  border-color: rgba(3, 179, 255, 0.55);
  outline: none;
  box-shadow: 0 0 0 3px rgba(3, 179, 255, 0.12);
}

/* 未登录时才显示的主行动按钮；登录后由 account.js 改写文案并进入后台下单 */
.mall-buy-entry {
  display: inline-flex;
  height: 48px;
  margin-top: 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  color: #fff;
  border: 0;
  border-radius: 16px;
  background: var(--mall-blue);
  box-shadow: 0 18px 36px rgba(3, 179, 255, 0.24);
  cursor: pointer;
  font-size: 15px;
  font-weight: 950;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mall-buy-entry:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(3, 179, 255, 0.32);
}

/* ==================== 区域二：页签区 ==================== */

.mall-tabs-card {
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid rgba(3, 179, 255, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 6% 0%, rgba(10, 181, 228, 0.08), transparent 32%),
    radial-gradient(circle at 94% 12%, rgba(245, 166, 35, 0.06), transparent 28%),
    rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(3, 179, 255, 0.1);
}

.mall-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 6px 6px 0;
  border-bottom: 1px solid rgba(3, 179, 255, 0.1);
}

.mall-tab {
  position: relative;
  height: 58px;
  color: var(--mall-muted);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 950;
  transition: color 0.24s ease, background 0.24s ease;
}

.mall-tab::after {
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 3px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(90deg, #03b3ff, #65d8ff 58%, #f5a623);
  content: '';
  transform: translateX(-50%);
  transition: width 0.28s ease;
}

.mall-tab:hover {
  color: var(--mall-blue-deep);
  background: rgba(3, 179, 255, 0.06);
}

.mall-tab.is-active {
  color: var(--mall-blue);
  background: rgba(3, 179, 255, 0.04);
}

.mall-tab.is-active::after {
  width: 56px;
}

.mall-tab-panel {
  min-height: 260px;
  padding: 30px;
}

/* AI 一句话总结横幅 */
.mall-ai-summary {
  padding: 20px 22px;
  border: 1px solid rgba(3, 179, 255, 0.25);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(232, 248, 253, 0.95), rgba(255, 248, 232, 0.58));
  box-shadow: 0 16px 36px rgba(3, 179, 255, 0.08);
}

.mall-ai-summary strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mall-blue-deep);
  font-size: 13px;
  font-weight: 950;
}

.mall-ai-summary p {
  margin: 10px 0 0;
  color: var(--mall-ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.9;
}

.mall-rich-content {
  margin-top: 22px;
  color: #334155;
  font-size: 16px;
  line-height: 1.9;
}

.mall-rich-content img {
  max-width: 100%;
  height: auto;
}

/* 底部要点卡片 */
.mall-point-grid {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mall-point-card {
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.mall-point-card strong {
  color: var(--mall-ink);
  font-size: 14px;
  font-weight: 950;
}

.mall-point-card p {
  margin: 6px 0 0;
  color: var(--mall-muted);
  font-size: 13px;
  line-height: 1.8;
}

/* 购买记录表 */
.mall-record-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 14px;
}

.mall-record-table th {
  padding: 12px 16px;
  color: #475569;
  background: #f8fafc;
  font-weight: 950;
  text-align: left;
}

.mall-record-table th:first-child {
  border-radius: 14px 0 0 14px;
}

.mall-record-table th:last-child {
  border-radius: 0 14px 14px 0;
}

.mall-record-table td {
  padding: 14px 16px;
  color: #334155;
  border-bottom: 1px solid var(--mall-line);
}

.mall-record-table tr:hover td {
  background: rgba(240, 249, 255, 0.8);
}

.mall-record-empty {
  padding: 40px 20px;
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

/* 售后说明正文按原有条款排版，仅统一行距与字号 */
.mall-after-sale {
  color: #334155;
  font-size: 15px;
  line-height: 1.95;
}

.mall-after-sale h2 {
  margin: 0 0 16px;
  color: var(--mall-ink);
  font-size: 20px;
  font-weight: 950;
  text-align: center;
}

.mall-after-sale img {
  max-width: 100%;
  height: auto;
}

/* ==================== 区域三：右侧价格与支付栏 ==================== */

.mall-trade-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.mall-trade-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 120px;
  background:
    radial-gradient(circle at 22% 0%, rgba(3, 179, 255, 0.16), transparent 55%),
    linear-gradient(90deg, rgba(10, 181, 228, 0.12), rgba(245, 166, 35, 0.1));
  content: '';
  pointer-events: none;
}

.mall-trade-inner {
  position: relative;
  z-index: 1;
}

.mall-trade-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--mall-blue-deep);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-align: center;
}

.mall-reference-price {
  margin-bottom: 8px;
  color: var(--mall-orange);
  font-size: 46px;
  font-weight: 950;
  line-height: 1.08;
  text-align: center;
  text-shadow: 0 12px 30px rgba(245, 166, 35, 0.12);
}

.mall-price-note {
  display: block;
  margin-bottom: 16px;
  padding: 12px 14px;
  color: var(--mall-muted);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.85);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.6);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.7;
  text-align: center;
}

.mall-side-block {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.5);
}

/* 侧栏区块标题：说明文字较长时允许换行，避免挤压标题造成「积分抵 扣」这类断字 */
.mall-side-block-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
}

.mall-side-block-title strong {
  flex: 0 0 auto;
  color: var(--mall-ink);
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.mall-side-block-title span {
  flex: 1 1 auto;
  min-width: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.mall-side-block input[type='text'],
.mall-side-block input[type='number'] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--mall-line);
  border-radius: 14px;
  background: #fff;
  font-size: 14px;
}

.mall-side-block input:focus {
  border-color: rgba(3, 179, 255, 0.55);
  outline: none;
  box-shadow: 0 0 0 3px rgba(3, 179, 255, 0.12);
}

/* 并排的两个快捷入口：与下方支付方式列表留出间距，避免两块贴在一起 */
.mall-side-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

/* 半栏宽度内要容纳「进入后台下单」等六字文案，收紧字号与内边距并允许换行 */
.mall-side-actions .mall-buy-entry {
  width: 100%;
  height: auto;
  min-height: 44px;
  margin-top: 0;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.mall-side-actions .mall-buy-entry i {
  flex: none;
}

.mall-side-actions .mall-buy-entry span,
.mall-side-actions .mall-buy-entry {
  word-break: break-word;
}

.mall-pay-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.mall-pay-method {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--mall-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: all 0.3s ease;
}

.mall-pay-method:hover {
  transform: translateY(-1px);
}

.mall-pay-method span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mall-ink);
  font-size: 14px;
  font-weight: 950;
}

.mall-pay-method em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.mall-pay-method i {
  font-size: 18px;
}

.mall-pay-method[data-mall-pay='balance']:hover {
  border-color: rgba(245, 166, 35, 0.6);
  box-shadow: 0 10px 22px rgba(245, 166, 35, 0.12);
}

.mall-pay-method[data-mall-pay='balance'] i {
  color: var(--mall-orange);
}

.mall-pay-method[data-mall-pay='balance'].is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #f5a623, #ffb84d);
  box-shadow: 0 14px 28px rgba(245, 166, 35, 0.3);
}

.mall-pay-method[data-mall-pay='alipay'] i {
  color: #1677ff;
}

.mall-pay-method[data-mall-pay='alipay'].is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #1677ff, #4d9bff);
  box-shadow: 0 14px 28px rgba(22, 119, 255, 0.28);
}

.mall-pay-method[data-mall-pay='wechat'] i {
  color: #07c160;
}

.mall-pay-method[data-mall-pay='wechat'].is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #07c160, #3ddc84);
  box-shadow: 0 14px 28px rgba(7, 193, 96, 0.28);
}

.mall-pay-method.is-active span,
.mall-pay-method.is-active em,
.mall-pay-method.is-active i {
  color: #fff;
}

/* 常见问题解答：放在右侧栏底部，与后台布局一致 */
.mall-faq-card {
  margin-top: 20px;
  padding: 20px;
}

.mall-faq-card h3 {
  margin: 0 0 14px;
  color: var(--mall-ink);
  font-size: 16px;
  font-weight: 950;
}

.mall-faq-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mall-faq-list li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--mall-line);
}

.mall-faq-list li:last-child {
  border-bottom: 0;
}

.mall-faq-list a,
.mall-faq-list span {
  display: block;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
  text-decoration: none;
}

.mall-faq-list a:hover {
  color: var(--mall-blue-deep);
}

/* ==================== 响应式 ==================== */

@media (max-width: 1200px) {
  .mall-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .mall-goods-hero {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .mall-gallery-thumb {
    height: 280px;
  }
}

@media (max-width: 900px) {
  .mall-point-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  /* 窄屏下悬浮客服收窄到右边距 12px，页面右侧相应只留 64px */
  .mall-detail-page {
    padding: 16px 0 40px;
  }

  .mall-goods-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }

  .mall-gallery-thumb {
    height: 240px;
  }

  .mall-spec-board,
  .mall-level-panel,
  .mall-side-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .mall-goods-title {
    font-size: 27px;
  }

  .mall-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mall-tabs::-webkit-scrollbar {
    display: none;
  }

  .mall-tab {
    flex: 0 0 auto;
    min-width: 110px;
    padding: 0 14px;
  }

  .mall-tab-panel {
    padding: 20px 16px;
  }

  .mall-reference-price {
    font-size: 36px;
  }

  .mall-record-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
