/* ============================================================
   social.css —— 發文互動牆 + 商品評論（配合 Soft Store 淺色主題）
   Claude 追加；載入順序放最後，覆蓋不到別人的 skin。
   ============================================================ */

/* ---------- 動態牆 / 貼文列 ---------- */
.wall { margin-top: var(--sp-6); }
.wall__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.post-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.post-list--feed { max-width: 760px; }

.post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-card);
}
.post__top { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.post__author { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); }
.post__author:hover { color: var(--accent); }
.post__ava { width: 40px; height: 40px; flex: none; }
.post__kind { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: var(--r-pill); }
.post__kind--teaser { background: color-mix(in srgb, var(--accent-2) 18%, transparent); color: var(--accent-2); }
.post__kind--post { background: var(--surface-2); color: var(--text-soft); }
.post__time { margin-left: auto; font-size: 12px; color: var(--text-dim); }
.post__text { font-size: 15px; color: var(--text); line-height: 1.6; white-space: pre-wrap; }

/* 新品預告卡 */
.post-teaser {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4);
  margin-top: var(--sp-3); padding: 12px; border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent), var(--surface-2);
}
.post-teaser:hover { border-color: var(--accent); }
.post-teaser__art {
  width: 112px;
  height: 112px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.post-teaser__meta { min-width: 0; }
.post-teaser__k { font-size: 11px; font-weight: 800; color: var(--accent-2); }
.post-teaser__n { font-size: 16px; font-weight: 800; color: var(--text); margin-top: 4px; }
.post-teaser__go { font-size: 13px; font-weight: 700; color: var(--accent); flex: none; }

/* 貼文動作 + 留言 */
.post__actions { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line-soft); }
.post-like { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--text-soft); padding: 4px 8px; border-radius: var(--r-pill); }
.post-like:hover { color: var(--badge-hot); background: color-mix(in srgb, var(--badge-hot) 8%, transparent); }
.post-like.on { color: var(--badge-hot); }
.post-like.on .post-like__ico { transform: scale(1.15); }
.post-like__ico { transition: transform .12s ease; }
.post__cmtcount { font-size: 13px; color: var(--text-dim); }
.post__comments { margin-top: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.cmt { font-size: 14px; }
.cmt b { color: var(--text); font-weight: 800; margin-right: 6px; }
.cmt__t { font-size: 11px; color: var(--text-dim); }
.cmt__text { color: var(--text-soft); }
.cmt-form { display: flex; gap: var(--sp-2); margin-top: 4px; }
.cmt-form__in {
  flex: 1; background: #fbfcfe; border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 9px 14px; font-size: 14px; color: var(--text); outline: none;
}
.cmt-form__in:focus { border-color: var(--accent); box-shadow: var(--ring-cyan); }

/* ---------- 商品評論 ---------- */
.reviews { margin-top: var(--sp-6); }
.review-summary {
  display: grid; grid-template-columns: 160px 1fr; gap: var(--sp-5); align-items: center;
  padding: var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-card); margin-bottom: var(--sp-4);
}
.review-summary__score { text-align: center; border-right: 1px solid var(--line-soft); }
.review-summary__avg { font-size: 40px; font-weight: 900; line-height: 1; color: var(--text); }
.review-summary__c { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.review-bars { display: flex; flex-direction: column; gap: 6px; }
.rbar { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.rbar__track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.rbar__fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-3)); }

/* 評論表單 / 門檻 */
.review-gate {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r-md);
  color: var(--text-soft); font-size: 14px; font-weight: 600; background: var(--surface-2);
  margin-bottom: var(--sp-4);
}
.review-form, .review-mine {
  padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow-card); margin-bottom: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.review-form__h, .review-mine__t { font-weight: 800; font-size: 14px; }
.rate-input { display: inline-flex; gap: 4px; }
.rate-star { font-size: 26px; line-height: 1; color: var(--line); transition: color .1s ease, transform .1s ease; }
.rate-star:hover { transform: scale(1.12); }
.rate-star.on { color: var(--badge-new); }
.review-form__text {
  background: #fbfcfe; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: 14px; color: var(--text); outline: none; resize: vertical;
}
.review-form__text:focus { border-color: var(--accent); box-shadow: var(--ring-cyan); }
.review-form .btn { align-self: flex-start; }

/* 評論列表 */
.review-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.review { padding: var(--sp-4); border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--surface); }
.review__top { display: flex; align-items: center; gap: 8px; }
.review__top b { font-weight: 800; }
.review__t { margin-left: auto; font-size: 12px; color: var(--text-dim); }
.review__stars { margin: 4px 0; }
.review__text { font-size: 14px; color: var(--text-soft); line-height: 1.55; }

/* ---------- 願望清單愛心 ---------- */
.card { position: relative; }
.wish-heart {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1; color: #fff;
  background: rgba(23, 33, 43, .42); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.35); transition: transform .12s ease, background .12s ease;
}
.wish-heart:hover { background: rgba(23, 33, 43, .62); transform: scale(1.08); }
.wish-heart.on { color: var(--badge-hot); background: #fff; border-color: var(--badge-hot); }
.wish-btn.on { border-color: var(--badge-hot); color: var(--badge-hot); }

/* ---------- 會員權限閘 ---------- */
.gate-box {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5); border: 1px dashed var(--line);
  border-radius: var(--r-md); background: var(--surface-2); margin-bottom: var(--sp-4);
}
.gate-box__lock { font-size: 24px; flex: none; }
.gate-box__main { flex: 1; }
.gate-box__t { font-weight: 800; font-size: 15px; }
.gate-box__d { font-size: 13px; color: var(--text-soft); margin-top: 2px; }
.gate-box .btn { flex: none; }

/* ---------- 委託牆 ---------- */
.cmn-form { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.cmn-form__h { font-weight: 800; font-size: 15px; }
.cmn-form input, .cmn-form textarea {
  background: #fbfcfe; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: 14px; color: var(--text); outline: none; resize: vertical;
}
.cmn-form input:focus, .cmn-form textarea:focus { border-color: var(--accent); box-shadow: var(--ring-cyan); }
.cmn-form .btn { align-self: flex-start; }
.cmn-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.cmn {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow-card);
}
.cmn__art {
  width: 116px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}
.cmn__body { min-width: 0; }
.cmn__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cmn__status { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: var(--r-pill); }
.cmn__status--open { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.cmn__status--done { background: var(--surface-2); color: var(--text-dim); }
.cmn__budget { font-size: 15px; font-weight: 900; color: var(--text); }
.cmn__title { font-size: 16px; font-weight: 800; }
.cmn__text { font-size: 14px; color: var(--text-soft); margin: 4px 0 10px; line-height: 1.55; }
.cmn__foot { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.cmn__by { font-size: 12px; color: var(--text-dim); }
.cmn__ap { font-size: 12px; color: var(--text-dim); }
.cmn__foot .btn { margin-left: auto; padding: 8px 16px; font-size: 13px; }

/* ---------- 評論加深：排序 + 每則動作 ---------- */
.review-listhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.review__actions { display: flex; align-items: center; gap: var(--sp-3); margin-top: 8px; }
.rev-helpful {
  font-size: 12px; font-weight: 700; color: var(--text-soft);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px 12px;
}
.rev-helpful:hover { border-color: var(--accent); color: var(--accent); }
.rev-helpful.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.rev-link { font-size: 12px; color: var(--text-dim); }
.rev-link:hover { color: var(--badge-hot); }

/* ---------- 留言刪除 ---------- */
.cmt__del { font-size: 11px; color: var(--text-dim); margin-left: 8px; }
.cmt__del:hover { color: var(--badge-hot); }

/* ---------- RWD ---------- */
@media (max-width: 560px) {
  .review-summary { grid-template-columns: 1fr; }
  .review-summary__score { border-right: none; border-bottom: 1px solid var(--line-soft); padding-bottom: var(--sp-3); }
  .post { padding: var(--sp-4); }
  .post-teaser { grid-template-columns: 76px minmax(0, 1fr); }
  .post-teaser__art { width: 76px; height: 76px; }
  .post-teaser__go { grid-column: 2; }
  .gate-box { flex-direction: column; align-items: flex-start; }
  .cmn__foot .btn { margin-left: 0; }
  .cmn {
    grid-template-columns: 1fr;
    padding: var(--sp-4);
  }
  .cmn__art {
    width: 100%;
    max-height: 220px;
  }
}

/* ---------- 2D / 3D 維度徽章 ---------- */
.badge--dim2d { background: rgba(91, 110, 225, .14); color: #4457c9; }
.badge--dim3d { background: rgba(124, 77, 255, .16); color: #6a3fd6; }
