/* ============================================================
   晴空小铺 · 电商模块专属样式（类名统一 shop- 前缀）
   全站已取消阴影：层次只靠 1px 细边线 + 半透明玻璃底
   ============================================================ */

/* —— 前台发布区：主图 / 基本信息 / 详情 三块玻璃卡片 —— */
.shop-publish { display: flex; flex-direction: column; gap: 14px; }
.shop-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(16px) saturate(170%);
}
.shop-card-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.shop-card-note { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shop-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.shop-field-wide { grid-column: 1 / -1; }
.shop-label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.shop-label em { margin-left: 6px; font-style: normal; font-size: 11.5px; font-weight: 400; color: var(--muted); }
/* 输入框：1px 细边线 + 玻璃底（前台发布区带上 .shop-publish，压过 style.css 里 .win-post 的暖色输入框规则） */
.shop-field input, .shop-field select, .shop-field textarea,
.shop-publish .shop-field input, .shop-publish .shop-field select, .shop-publish .shop-field textarea {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px;
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.shop-field textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.shop-field input:focus, .shop-field select:focus, .shop-field textarea:focus,
.shop-publish .shop-field input:focus, .shop-publish .shop-field select:focus, .shop-publish .shop-field textarea:focus {
  outline: none; border-color: var(--brand);
}

/* —— 商品主图：选图 / 预览 / 更换 / 移除 —— */
.shop-cover-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shop-cover-tip { font-size: 12.5px; color: var(--muted); }
.shop-btn {
  padding: 9px 16px; white-space: nowrap;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--surface); background: var(--brand);
  border: 1px solid var(--brand); border-radius: var(--r-sm);
  cursor: pointer;
}
.shop-btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.shop-btn-ghost { color: var(--brand-strong); background: rgba(255, 255, 255, .7); border-color: var(--brand-line); }
.shop-btn-ghost:hover { color: var(--surface); background: var(--brand); border-color: var(--brand); }
.shop-cover-preview { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.shop-cover-preview[hidden] { display: none; }
.shop-cover-preview img {
  width: 132px; height: 132px; object-fit: cover;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.shop-cover-ops { display: flex; gap: 8px; flex-wrap: wrap; }
/* 提交按钮：文案短、始终一行 */
.shop-submit { white-space: nowrap; }

/* —— 列表商品卡：主图 / 划线原价 / 折扣标签 —— */
.shop-has-cover .win-item-char { display: none; }
.shop-item-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shop-tag-wrap {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
}
.shop-tag-wrap .win-tag-price { position: static; top: auto; right: auto; }
.shop-tag-origin { font-size: 12px; color: rgba(255, 255, 255, .72); text-decoration: line-through; }
.shop-save-tag {
  align-self: flex-start;
  padding: 3px 9px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 700;
  color: var(--danger); background: rgba(255, 255, 255, .92);
  border: 1px solid var(--brand-line);
}

/* —— 详情页：价格区 / 可用优惠码 / 主图 —— */
.shop-price-box { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.shop-price-now { font-family: var(--mono); font-size: 30px; font-weight: 700; color: var(--brand-strong); }
.shop-price-origin { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.shop-coupon-line { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.shop-coupon-chip {
  padding: 4px 10px;
  font-size: 12.5px; color: var(--ink-soft);
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--brand-line); border-radius: var(--r-sm);
}
.shop-coupon-chip b { color: var(--brand-strong); letter-spacing: .5px; }
.shop-detail-cover {
  margin-bottom: 18px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.shop-detail-cover img { display: block; width: 100%; height: auto; }

/* —— 后台：价格列 / 优惠码页 —— */
.shop-admin-price { display: flex; align-items: baseline; gap: 8px; font-family: var(--mono); }
.shop-admin-price s { color: var(--muted); font-size: 12.5px; }
.shop-admin-price b { color: var(--danger); }
.shop-coupon-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.shop-coupon-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; grid-column: 1 / -1; }
.shop-hint { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.shop-code { font-family: var(--mono); font-weight: 700; letter-spacing: 1px; color: var(--brand-strong); }
.shop-alert { padding: 10px 14px; margin-bottom: 14px; font-size: 13px; border-radius: var(--r-sm); }
.shop-alert-ok { color: var(--ok); background: rgba(255, 255, 255, .6); border: 1px solid var(--line); }
.shop-alert-err { color: var(--danger); background: rgba(255, 255, 255, .6); border: 1px solid var(--line); }
.shop-state-off { color: var(--muted); }
.shop-state-on { color: var(--ok); }

/* —— 窄屏：不横向溢出，按钮不换行 —— */
@media (max-width: 620px) {
  .shop-grid, .shop-coupon-form { grid-template-columns: 1fr; }
  .shop-card { padding: 14px; }
  .shop-btn { flex: 0 0 auto; }
  .shop-cover-preview img { width: 100%; height: auto; max-height: 220px; }
}
