/* Babyin 訂購單 — 介面樣式 v1.0 / JS設計工坊 */

/* 購物車數量標記 */
.bi-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #d9534f;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
  z-index: 5;
}

/* 提示條 */
#bi-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(33, 37, 41, .94);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 15px;
  line-height: 1.4;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .25);
}
#bi-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#bi-toast a { color: #ffd166; text-decoration: underline; }

/* 會員頁改版說明 */
.bi-notice {
  background: #fff6f4;
  border: 1px solid #f3c7bd;
  border-left: 5px solid #d9534f;
  border-radius: 8px;
  padding: 18px 20px;
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.7;
  color: #3a2c28;
}

/* 頁尾署名（JS設計工坊，本站無 715 後台） */
.bi-credit {
  text-align: center;
  font-size: 12px;
  color: #a89b97;
  padding: 16px 12px 20px;
  border-top: 1px solid #f3ecea;
  margin-top: 26px;
  line-height: 1.7;
  background: #fff;
}
.bi-credit a { color: #a89b97; text-decoration: none; border-bottom: 1px dashed #ddd2ce; }
.bi-credit a:hover { color: #c9302c; border-bottom-color: #c9302c; }

/* ================= 訂購單頁面 ================= */
.bi-order-wrap { max-width: 1000px; margin: 0 auto; }
.bi-order-title {
  font-size: 26px; font-weight: 700; color: #8a1f1a;
  padding-bottom: 10px; border-bottom: 2px solid #f0d9d5; margin-bottom: 22px;
}
.bi-order-hint { font-size: 14px; color: #8b7f7c; margin-bottom: 18px; }

.bi-empty { text-align: center; padding: 50px 10px; color: #8b7f7c; }
.bi-empty .bi-empty-ic { font-size: 42px; color: #e0cfcb; margin-bottom: 12px; }

.bi-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 0; border-bottom: 1px solid #f1e6e4;
}
.bi-item-img {
  width: 88px; height: 88px; flex: 0 0 88px; border-radius: 8px;
  object-fit: cover; background: #f7f2f1; border: 1px solid #eee;
}
.bi-item-main { flex: 1 1 auto; min-width: 0; }
.bi-item-name { font-size: 16px; font-weight: 600; color: #2c2c2c; margin-bottom: 4px; line-height: 1.45; }
.bi-item-spec { font-size: 13px; color: #8b7f7c; line-height: 1.6; word-break: break-word; }
.bi-item-spec span { background: #f7f2f1; border-radius: 4px; padding: 1px 6px; margin-right: 4px; display: inline-block; }
.bi-item-price { font-size: 15px; color: #b5321f; font-weight: 700; margin-top: 6px; }
.bi-item-right { flex: 0 0 auto; text-align: right; }
.bi-item-sub { font-size: 15px; font-weight: 700; color: #b5321f; margin-top: 8px; }
.bi-del {
  border: 0; background: none; color: #b0a4a1; font-size: 13px;
  cursor: pointer; padding: 4px 0; text-decoration: underline;
}
.bi-del:hover { color: #d9534f; }

/* 數量加减 */
.bi-qty { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.bi-qty button {
  border: 0; background: #faf7f6; color: #6b5d59; width: 30px; height: 30px;
  font-size: 16px; line-height: 1; cursor: pointer;
}
.bi-qty button:hover { background: #f0e6e4; }
.bi-qty input {
  width: 44px; height: 30px; border: 0; border-left: 1px solid #eee;
  border-right: 1px solid #eee; text-align: center; font-size: 15px;
}

/* 合計 */
.bi-sum {
  display: flex; justify-content: flex-end; align-items: baseline;
  gap: 10px; padding: 18px 0 6px; font-size: 16px; color: #6b5d59;
}
.bi-sum b { font-size: 24px; color: #b5321f; }

/* 表單 */
.bi-form { background: #fdfafa; border: 1px solid #f1e6e4; border-radius: 12px; padding: 22px; margin-top: 18px; }
.bi-form h3 { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: #2c2c2c; }
.bi-form .bi-form-note { font-size: 13px; color: #8b7f7c; margin-bottom: 18px; }
.bi-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.bi-fg { flex: 1 1 260px; min-width: 0; }
.bi-fg.full { flex: 1 1 100%; }
.bi-fg label { display: block; font-size: 14px; color: #4a3f3c; margin-bottom: 6px; }
.bi-fg label .req { color: #d9534f; }
.bi-fg input, .bi-fg textarea, .bi-fg select {
  width: 100%; border: 1px solid #ddd6d4; border-radius: 8px;
  padding: 10px 12px; font-size: 15px; background: #fff; color: #2c2c2c;
  font-family: inherit;
}
.bi-fg input:focus, .bi-fg textarea:focus, .bi-fg select:focus {
  outline: none; border-color: #d9534f; box-shadow: 0 0 0 3px rgba(217, 83, 79, .12);
}
.bi-fg textarea { min-height: 84px; resize: vertical; }

/* 按鈕 */
.bi-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.bi-btn {
  flex: 1 1 220px; border: 0; border-radius: 999px; padding: 15px 20px;
  font-size: 17px; font-weight: 700; color: #fff; cursor: pointer;
  background: #c9302c; box-shadow: 0 4px 12px rgba(201, 48, 44, .22);
  transition: transform .12s ease, box-shadow .12s ease;
  font-family: inherit;
}
.bi-btn:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(201, 48, 44, .3); }
.bi-btn.line { background: #06c755; box-shadow: 0 4px 12px rgba(6, 199, 85, .25); }
.bi-btn.line:hover { box-shadow: 0 7px 18px rgba(6, 199, 85, .32); }
.bi-btn.ghost { background: #fff; color: #6b5d59; border: 1px solid #ddd6d4; box-shadow: none; font-weight: 600; }
.bi-btn.ghost:hover { background: #faf7f6; transform: none; box-shadow: none; }

.bi-tip {
  margin-top: 16px; font-size: 13px; color: #8b7f7c; line-height: 1.75;
  background: #fff; border: 1px dashed #e6dbd8; border-radius: 8px; padding: 14px 16px;
}
.bi-tip b { color: #6b5d59; }

/* 複製用隱藏區塊（給沒有剪貼簿 API 的舊瀏覽器） */
#bi-copybox {
  position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0;
}

@media (max-width: 575px) {
  .bi-item-img { width: 68px; height: 68px; flex-basis: 68px; }
  .bi-item-name { font-size: 15px; }
  .bi-sum b { font-size: 21px; }
  .bi-btn { flex: 1 1 100%; font-size: 16px; padding: 14px; }
  .bi-order-title { font-size: 22px; }
  .bi-form { padding: 16px; }
}

@media print {
  #bi-toast, .bi-actions, .bi-del, .bi-qty button, .navbar, .back-to-top, .floatingIcon { display: none !important; }
}
