/* 详情页：沿用 MirrorPeople 商城的布局和配色（暖米色底、深绿价格、粉色加料卡、紫色配送卡） */
body.warm { background: #f5f0ea; }
.pd { padding: 16px 14px 8px; }

.pd-head { display: grid; grid-template-columns: 124px 1fr; gap: 14px; align-items: start; }
.pd-img { position: relative; width: 124px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #ece5dc; padding: 0; }
.pd-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-cat { position: absolute; left: 0; top: 0; background: #d9534f; color: #fff; font-size: 12px; font-weight: 400; padding: 3px 9px; border-radius: 14px 0 12px 0; }
.pd-info { min-width: 0; }
.pd-name { margin: 2px 0 4px; font-size: 22px; font-weight: 900; line-height: 1.2; color: #1a1a1a; }
.pd-name .first { font-size: 36px; line-height: 1; }
.pd-name .badge { vertical-align: 6px; }
.pd-sales { font-size: 13px; color: #8a8f88; line-height: 1.5; }
.pd-price { margin-top: 8px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.pd-price #unit-price { font-size: 26px; font-weight: 800; color: #2d6a4f; font-variant-numeric: tabular-nums; }
.pd-spec { font-size: 13px; color: #b0a898; }
.pd-price .member-hint { margin-left: 0; }
.pd-member { font-size: 12px; color: #8f9b94; margin-top: 2px; }
.pd-member s { color: #b0a898; }
.pd-desc { margin: 12px 2px 0; font-size: 14px; color: #6b6158; line-height: 1.6; white-space: pre-line; }

.pd-qty { display: flex; align-items: center; gap: 10px; margin: 14px 2px 4px; font-size: 15px; color: #8a8076; }
.pd-qty button { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; padding: 0; border-radius: 10px; transition: background-color 160ms ease, transform 120ms ease; }
.pd-qty button svg { display: block; width: 22px; height: 22px; stroke-width: 2.5; pointer-events: none; }
.pd-qty .qty-dec { background: #d4ede0; color: #2d6a4f; }
.pd-qty .qty-inc { background: #52a275; color: #fff; }
.pd-qty button:disabled { opacity: .35; cursor: not-allowed; }
@media (hover:hover) and (pointer:fine) {
  .pd-qty .qty-dec:not(:disabled):hover { background: #b9ddc9; }
  .pd-qty .qty-inc:not(:disabled):hover { background: #245b42; }
}
.pd-qty #qty { min-width: 28px; text-align: center; font-size: 24px; font-weight: 800; color: #1a1a1a; }

.pd-card { background: #fff; border: 1px solid #ece5dc; border-radius: 14px; padding: 14px; margin-top: 12px; }
.card-title { font-size: 16px; font-weight: 700; color: #3a3228; margin-bottom: 10px; }
.card-title span { font-size: 12px; font-weight: 400; color: #b0a898; }

/* 配方编号按钮 */
.rchips { display: flex; flex-wrap: wrap; gap: 8px; }
.rchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px 6px 6px; border: 1.5px solid #e4dcd0; border-radius: 999px; background: #fff; font-size: 15px; color: #3a3228; }
.rchip i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: #eee7dd; color: #6b5d4d; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rchip.active { border-color: #2d6a4f; background: #f1f8f4; color: #2d6a4f; }
.rchip.active i { background: #2d6a4f; color: #fff; }
.rchip.diy { border-color: #c9b3e0; color: #7b52ab; }
.rchip.diy i { background: #b9a0d8; color: #fff; }

/* 配料折叠 */
.collapse-bar { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; padding: 0; }
.collapse-bar b { flex-shrink: 0; font-size: 13px; font-weight: 400; color: #b0a898; line-height: 1.6; }
.collapse-bar .names { flex: 1; min-width: 0; font-size: 13px; color: #b0a898; line-height: 1.6; }
.collapse-bar .arrow { flex-shrink: 0; color: #b0a898; font-size: 13px; transition: transform .2s; }
.collapse-bar .arrow.open { transform: rotate(180deg); }
.formula-body { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #ece5dc; }

/* 加糖（浅粉） */
.pd-card.sugar { background: #f7ece8; border-color: #e2c3b6; }
.sugar-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sugar-chip { padding: 9px 16px; border-radius: 10px; background: #fff; border: 1.5px solid #e2d6cd; font-size: 15px; color: #3a3228; }
.sugar-chip small { font-size: 12px; color: #b0a898; }
.sugar-chip.active { border-color: #2d6a4f; background: #f1f8f4; color: #2d6a4f; font-weight: 700; }
.pd-card.sugar .addon-row { background: rgba(255,255,255,.6); border-radius: 10px; padding: 6px 8px; }
.pd-card.sugar .stepper { background: #fff; }

@media (max-width: 600px) {
  .sugar-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .sugar-chip { min-width: 0; min-height: 44px; padding: 9px 4px; overflow-wrap: anywhere; }
  .sugar-chip small { white-space: nowrap; }
}

/* 配送（浅紫） */
.pd-card.delivery { background: #efeaf6; border-color: #cdbde3; }
.dv-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.dv-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; background: #faf8f5; border: 1.5px solid #e6e0d8; font-size: 14px; color: #3a3228; }
.dv-opt span { font-size: 22px; }
.dv-opt.active { border-color: #2d6a4f; background: #eef6f1; color: #2d6a4f; }
.dv-input { display: block; width: 100%; margin-top: 8px; padding: 12px 14px; font-size: 15px; border: 1.5px solid #e6e0d8; border-radius: 12px; background: #faf8f5; color: #1a1a1a; }
.dv-input:focus { outline: 0; border-color: #2d6a4f; background: #fff; }
select.dv-input { appearance: auto; font-size: 15px; }
select.dv-input.empty { color: #a39a90; }
.dv-row { display: flex; gap: 8px; }
.dv-row .dv-province { flex: 0 0 96px; padding-left: 10px; padding-right: 4px; }
.dv-row .dv-input:not(.dv-province) { flex: 1; min-width: 0; }

.dv-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.dv-pay button { padding: 10px; border-radius: 12px; background: #faf8f5; border: 1.5px solid #e6e0d8; font-size: 15px; font-weight: 600; color: #3a3228; text-align: center; }
.dv-pay button small { display: block; font-size: 11px; font-weight: 400; color: #8a8076; margin-top: 2px; }
.dv-pay button.active { border-color: #2d6a4f; background: #eef6f1; color: #2d6a4f; }
.dv-pay button:disabled { opacity: .45; }

/* 看大图 */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 12px; }

body.warm .sfooter { background: transparent; border-top-color: #e6ddd1; }

@media (min-width: 900px) {
  .pd { padding: 24px 20px; }
  .pd-head { grid-template-columns: 240px 1fr; gap: 24px; }
  .pd-img { width: 240px; }
  .pd-name { font-size: 28px; }
  .pd-name .first { font-size: 46px; }
}

/* 配送卡片底部说明：一行小灰字，不像输入框 */
.dv-text { margin: 10px 4px 2px; font-size: 13px; color: #6b6158; line-height: 1.6; }
.dv-foot { margin: 10px 4px 0; font-size: 12px; color: #9a8f84; line-height: 1.6; }
.dv-foot a { color: #2d6a4f; }

/* 备注：看起来像一行小字，点了才像输入框 */
.dv-quiet { display: block; width: 100%; margin-top: 6px; padding: 6px 4px; border: 0; border-bottom: 1px solid transparent; background: transparent; font-size: 13px; color: #3a3228; border-radius: 0; }
.dv-quiet::placeholder { color: #9a8f84; }
.dv-quiet:focus { outline: 0; border-bottom-color: #cdbde3; }
.dv-quiet + .dv-foot { margin-top: 2px; }

/* 自由搭配页 */
.rchip.diy.active { border-color: #9b7cc4; background: #f5f0fb; color: #6b3fa0; }
.rchip.diy.active i { background: #7b52ab; }
.pd-price #unit-price.pending { font-size: 18px; font-weight: 600; color: #9a8f84; }
.card-title.row-between span { font-size: 12px; font-weight: 400; color: #b0a898; }
.diy-weight { font-size: 15px; color: #3a3228; }
.diy-weight .stepper span { min-width: 64px; }

/* 自由搭配原料行的「加入 / 去掉」按钮 */
.diy-row { grid-template-columns: 56px 1fr 58px; }
.diy-row button { justify-self: end; padding: 7px 13px; border-radius: 8px; font-size: 14px; background: #52a275; color: #fff; }
.diy-row:not(.off) button { background: #f1ede8; color: #8a8076; }

.dv-opt:disabled { opacity: .35; }
/* 名称下面：适合人群（和产品介绍一样大小颜色）+ 已售（浅灰小字） */
.pd-sales { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.pd-target { font-size: 14px; color: #6b6158; }

.pd-price-main { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.pd-member-label { font-size: 12px; font-weight: 400; color: #2d6a4f; }
.pd-price > .pd-member { flex-basis: 100%; }
