/* 前台：賣貨便式精簡賣場 */
body.shop { background: #f4f4f4; padding-bottom: 90px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 0 20px; }
.topbar {
  position: sticky; top: 0; z-index: 40; background: #fff; display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; box-shadow: 0 1px 0 #e6e6e6;
}
.topbar-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; }
.topbar-title img { width: 34px; height: 34px; border-radius: 50%; object-fit: contain; background: var(--bun-soft); }
.topbar-title span { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-link { border: 0; background: none; color: var(--navy); font-weight: 700; font-size: 15px; padding: 8px; cursor: pointer; min-height: 44px; }
.cart-icon { position: relative; border: 0; background: none; color: var(--bun-deep); width: 44px; height: 44px; cursor: pointer; padding: 8px; }
.cart-icon svg { width: 28px; height: 28px; }
.cart-icon b { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; border-radius: 10px; background: var(--bun-deep); color: #fff; font-size: 12px; line-height: 20px; text-align: center; padding: 0 5px; }

.banner { display: block; width: 100%; border: 0; padding: 0; background: #e9f2e2; cursor: zoom-in; }
.banner img { width: 100%; max-height: 260px; object-fit: contain; margin: 0 auto; }

.store-info { background: #fff; padding: 12px 16px; margin-bottom: 8px; }
.deadline { font-weight: 800; color: var(--bad); font-size: 16px; }
.closed-line { background: var(--bad-soft); color: #8b2a20; border-radius: 10px; padding: 8px 10px; margin-top: 6px; font-weight: 700; }
.price-line { margin: 4px 0 0; font-size: 14.5px; }
.price-line b { color: var(--bun-deep); }
.store-info details { margin-top: 6px; }
.store-info summary { color: var(--navy); font-weight: 700; font-size: 14.5px; cursor: pointer; padding: 4px 0; min-height: 32px; }
.more-body p { margin: 6px 0; font-size: 14.5px; }
.more-body .chart-row { margin: 8px 0 0; }

.list-head { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 14px; font-weight: 800; }
.plist { background: #fff; }
.prow { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #eee; }
.prow-img { border: 0; padding: 0; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: #f3f0e8; cursor: zoom-in; }
.prow-img img { width: 100%; height: 100%; object-fit: cover; }
.prow-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prow-name { font-size: 16px; font-weight: 800; line-height: 1.3; }
.prow-name small { color: var(--sea); font-weight: 700; margin-right: 4px; }
.prow-price { color: var(--bun-deep); font-weight: 800; font-size: 17px; }
.prow-price small { color: var(--ink-soft); font-weight: 600; font-size: 12.5px; margin-left: 4px; }
.prow-spec { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-act { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.prow-picked { font-size: 13px; color: var(--ok); font-weight: 800; }
.btn-cart { background: #fff; color: var(--bun-deep); box-shadow: inset 0 0 0 1.5px var(--bun); min-height: 38px; padding: 6px 14px; font-size: 14.5px; }
.btn-cart.is-in { background: var(--bun); color: #fff; box-shadow: none; }

.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; box-shadow: 0 -2px 12px rgba(0,0,0,.12); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
.cartbar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.cartbar-sum { flex: 1; min-width: 0; line-height: 1.25; }
.cartbar-sum b { font-size: 20px; color: var(--bun-deep); }
.cartbar-sum span { display: block; font-size: 12.5px; color: var(--ink-soft); }
.cartbar .btn { min-width: 120px; }

.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: #fff; border-radius: 18px 18px 0 0;
  max-height: 86vh; display: flex; flex-direction: column; max-width: 720px; margin: 0 auto;
  animation: up .18s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; padding: 14px; border-bottom: 1px solid #eee; align-items: start; }
.sheet-head img { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; margin-top: -30px; box-shadow: 0 2px 8px rgba(0,0,0,.15); background: #fff; }
.sheet-name { font-weight: 800; font-size: 16.5px; }
.sheet-price { color: var(--bun-deep); font-weight: 800; }
.link-btn { border: 0; background: none; color: var(--navy); text-decoration: underline; padding: 2px 0; font-size: 14px; cursor: pointer; }
.sheet-close { border: 0; background: #f1f1f1; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.sheet-label { padding: 10px 14px 4px; font-size: 13.5px; color: var(--ink-soft); font-weight: 700; }
.sheet-sizes { overflow-y: auto; padding: 0 14px 8px; display: grid; gap: 6px; }
.srow { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: #f7f7f7; }
.srow.has { background: var(--bun-soft); }
.srow b { font-size: 16px; }
.srow .sp { color: var(--ink-soft); font-size: 14px; }
.sheet-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #eee; }
.sheet-foot span { flex: 1; font-weight: 700; color: var(--ink-soft); }
.sheet-foot .btn { min-width: 140px; }

.back-link { border: 0; background: none; color: var(--navy); font-weight: 700; font-size: 15px; padding: 12px 14px 6px; cursor: pointer; }
.panel { background: #fff; padding: 14px 16px; margin-bottom: 8px; }
.panel h2 { margin: 0 0 10px; font-size: 17px; }
.form-stack { display: grid; gap: 10px; }
.citem { display: grid; grid-template-columns: 60px 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eee; align-items: center; }
.citem img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.citem-name { font-weight: 800; }
.citem-sizes { font-size: 13.5px; color: var(--ink-soft); }
.citem-amt { text-align: right; font-weight: 800; }
.citem-amt .link-btn { display: block; margin-left: auto; font-weight: 600; }
.discount-tip { margin-top: 10px; font-size: 14px; font-weight: 700; border-radius: 10px; padding: 8px 10px; background: var(--bun-soft); color: #8a4d00; }
.discount-tip.is-on { background: var(--ok-soft); color: #1d6a3c; }
.sum-row { display: flex; justify-content: space-between; padding: 4px 0; }
.sum-row.big b { font-size: 24px; color: var(--bun-deep); }
.foot { text-align: center; margin: 16px 0; }
#successView, #queryResults { padding: 0; }
#successView .card, #queryResults .card, #queryResults .order-card { border-radius: 0; margin: 0 0 8px; box-shadow: none; border: 0; }
@media (min-width: 721px) { .panel, .plist, .store-info, #successView .card { border-radius: 14px; } .wrap { padding-top: 10px; } }

/* 付款區 */
.pay { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; display: grid; gap: 10px; }
.pay-amount { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pay-amount span { color: var(--ink-soft); font-size: 14px; }
.pay-amount b { font-size: 26px; color: var(--bun-deep); font-variant-numeric: tabular-nums; }
.pay-method { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.pay-method.is-best { border-color: #06c755; background: #f2fcf5; }
.pay-title { font-weight: 800; display: flex; align-items: center; gap: 8px; }
.pay-steps { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; font-size: 14.5px; }
.pay-steps li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.btn-line-green { background: #06c755; color: #fff; text-decoration: none; }
.btn-line-green:hover { background: #05a847; }
.pay-qr { border: 0; background: #fff; padding: 6px; border-radius: 10px; display: grid; justify-items: center; gap: 4px; cursor: zoom-in; width: fit-content; box-shadow: inset 0 0 0 1px var(--line); }
.pay-qr img { width: 180px; height: auto; }
.pay-qr span { font-size: 12.5px; color: var(--ink-soft); }
.pay-details { margin-top: 10px; }
.pay-details summary { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px; background: #06c755; color: #fff; font-weight: 800; cursor: pointer; list-style: none; }
.pay-details summary::-webkit-details-marker { display: none; }

.message-box { white-space: normal; }
.line-add-link { color: #06a046; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.line-add-link::after { content: "（點我加 LINE）"; font-weight: 700; font-size: 13px; text-decoration: none; display: inline-block; margin-left: 4px; }

.copy-order { border: 1.5px dashed var(--bun); border-radius: 12px; padding: 10px 12px; background: #fffaf1; display: grid; gap: 8px; }
.copy-order-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.copy-order-text { margin: 0; white-space: pre-wrap; word-break: break-word; font: 14.5px/1.6 inherit; font-family: inherit; user-select: all; -webkit-user-select: all; }
.replace-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-replace-bar { position: sticky; top: 60px; z-index: 30; background: var(--warn-soft); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14.5px; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
