/* 戀戀百香果園 — 手機優先訂購頁樣式（溫暖果園風・無外部相依） */

:root {
  --bg-page: #fbf8f3;
  --bg-card: #ffffff;
  --bg-warm-tint: #fff7e8;
  --bg-plum-tint: #f8eff3;
  --bg-leaf-tint: #eaf5ee;

  --brand-plum: #6b2447;
  --brand-plum-dark: #4f1833;
  --brand-gold: #c97a16;
  --brand-gold-soft: #f5c96b;
  --brand-leaf: #2a6b45;

  --text-main: #2a201b;
  --text-sub: #65574f;
  --text-muted: #8a7b72;

  --border-soft: #e7ddd1;
  --border-strong: #d5c5b4;
  --danger-text: #a52424;
  --danger-bg: #fdeeee;

  --radius-card: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 2px 10px rgba(74, 42, 24, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
}

.app-shell {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--bg-page);
  padding-bottom: 96px;
}

/* 頂部品牌區 */
.hero-header {
  background: linear-gradient(155deg, var(--brand-plum) 0%, #873258 68%, #a2464f 100%);
  color: #ffffff;
  padding: 18px 18px 20px;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
}

.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.badge-mockup {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff6ea;
}

.badge-shipping {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-gold-soft);
  color: #3d2203;
}

.brand-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  margin: 4px 0 14px;
  font-size: 0.94rem;
  color: rgba(255, 248, 240, 0.92);
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.step-pill {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}

.step-pill.is-active {
  background: #ffffff;
  color: var(--brand-plum);
}

.step-arrow {
  opacity: 0.7;
}

/* 主要內容容器 */
.main-content {
  padding: 14px 14px 24px;
}

.notice-banner {
  background: var(--bg-warm-tint);
  border: 1px solid #f0d7a8;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: #5a3c12;
}

.notice-banner p {
  margin: 0;
}

.section-block {
  margin-bottom: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.section-head h2,
.confirm-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-plum-dark);
}

.text-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-sub);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
}

.text-btn:active {
  background: #f1e8dc;
}

/* 商品系列分組 */
.series-group {
  margin-bottom: 18px;
}

.series-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--bg-plum-tint);
  color: var(--brand-plum-dark);
  font-size: 0.98rem;
  font-weight: 800;
}

.series-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-plum);
}

/* 單一商品卡片 */
.product-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 14px;
  margin-bottom: 11px;
  box-shadow: var(--shadow-card);
}

.product-card.is-selected {
  border-color: var(--brand-plum);
  background: #fffdfb;
}

.product-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.product-title-area {
  flex: 1;
  min-width: 0;
}

.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.grade-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f3ece4;
  color: #4f3a2e;
}

.unit-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eef3ec;
  color: #2c5b3f;
}

.unit-badge.is-box-gift {
  background: #fff1d6;
  color: #8f4e05;
}

.product-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.product-price-col {
  text-align: right;
  white-space: nowrap;
}

.unit-price {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--brand-plum);
}

.unit-label {
  font-size: 0.82rem;
  color: var(--text-sub);
}

/* 多箱優惠標籤 */
.bundle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.bundle-chip {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--bg-warm-tint);
  border: 1px solid #f0d7a8;
  color: #724208;
}

.bundle-chip.is-none {
  background: #f5f2ee;
  border-color: #e4ddd5;
  color: var(--text-muted);
}

/* 數量調整列 */
.product-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--border-soft);
}

.line-subtotal-area {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
}

.line-subtotal-main {
  font-weight: 800;
  color: var(--brand-plum-dark);
  font-size: 0.98rem;
}

.line-subtotal-saving {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-leaf);
  background: var(--bg-leaf-tint);
  padding: 1px 6px;
  border-radius: 6px;
}

.line-subtotal-detail {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--text-sub);
}

.line-subtotal-idle {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f6f1ea;
  border-radius: 999px;
  padding: 4px;
}

.stepper-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: var(--brand-plum);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stepper-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.stepper-btn.is-plus {
  background: var(--brand-plum);
  color: #ffffff;
}

.stepper-qty {
  min-width: 30px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

/* 摘要與表單卡片 */
.summary-card,
.form-card,
.confirm-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.summary-count-badge {
  font-size: 0.84rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-plum-tint);
  color: var(--brand-plum);
}

.selected-items-list {
  margin-bottom: 12px;
}

.empty-hint {
  margin: 4px 0 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.selected-line-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f2ebe2;
  font-size: 0.92rem;
}

.selected-line-item:last-child {
  border-bottom: none;
}

.selected-line-name {
  font-weight: 700;
}

.selected-line-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--text-sub);
}

.selected-line-price {
  font-weight: 800;
  color: var(--brand-plum-dark);
  white-space: nowrap;
}

.price-rows {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1.5px solid var(--border-soft);
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.95rem;
}

.price-row dt {
  color: var(--text-sub);
}

.price-row dd {
  margin: 0;
  font-weight: 700;
}

.price-row.is-discount dd {
  color: var(--brand-leaf);
}

.free-text {
  color: var(--brand-leaf);
}

.price-row.is-total {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1.5px dashed var(--border-strong);
  font-size: 1.15rem;
}

.price-row.is-total dt {
  color: var(--text-main);
  font-weight: 800;
}

.price-row.is-total dd {
  color: var(--brand-plum);
  font-size: 1.32rem;
  font-weight: 900;
}

.assumption-note {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff9ec;
  border: 1px solid #f0d7a8;
  font-size: 0.82rem;
  color: #774a0c;
}

/* 表單控制項 */
.demo-fill-btn {
  background: var(--bg-warm-tint);
  border: 1.5px solid #e6b85c;
  color: #6b3d05;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 36px;
}

.form-helper {
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.form-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 16px;
}

.form-fieldset legend {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand-plum);
  margin-bottom: 10px;
  padding: 0;
}

.field-group {
  margin-bottom: 12px;
}

.field-group label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-main);
}

.req {
  color: var(--danger-text);
}

.field-group input[type="text"],
.field-group input[type="tel"],
.field-group textarea {
  width: 100%;
  padding: 12px 13px;
  font-size: 1rem;
  font-family: inherit;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
}

.field-group input:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--brand-plum);
  box-shadow: 0 0 0 3px rgba(107, 36, 71, 0.14);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: #f9f5ef;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-plum);
}

/* 付款 TODO 區塊 */
.todo-payment-box {
  background: #fffaf0;
  border: 2px dashed #d69324;
  border-radius: var(--radius-card);
  padding: 14px;
  margin: 16px 0;
}

.todo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.todo-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #d69324;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.todo-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #6f4104;
}

.todo-desc {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: #6b4e24;
}

.todo-placeholder-slot {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px dashed #d6b681;
  text-align: center;
  font-size: 0.86rem;
  color: #8a6e43;
}

/* 錯誤提示 */
.form-error-box {
  background: var(--danger-bg);
  border: 1.5px solid #e7a7a7;
  color: var(--danger-text);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* 主要與次要按鈕 */
.primary-cta-btn {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 14px;
  background: var(--brand-plum);
  color: #ffffff;
  font-size: 1.06rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  padding: 12px 18px;
  box-shadow: 0 4px 12px rgba(107, 36, 71, 0.25);
}

.primary-cta-btn:active {
  background: var(--brand-plum-dark);
}

.secondary-btn {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 10px 16px;
}

/* 頁尾園主功能示意 */
.owner-preview-footer {
  margin-top: 24px;
}

.owner-preview-card {
  border-radius: var(--radius-sm);
  background: #f3eee8;
  border: 1px solid var(--border-soft);
  padding: 13px;
  color: var(--text-sub);
}

.owner-preview-title {
  margin: 0 0 4px;
  font-size: 0.88rem;
  font-weight: 800;
}

.owner-preview-desc {
  margin: 0 0 10px;
  font-size: 0.82rem;
}

.owner-disabled-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  background: #ebe4dc;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: not-allowed;
}

/* 確認頁樣式 */
.confirm-banner {
  background: var(--bg-leaf-tint);
  border: 1.5px solid #b5d8c2;
  border-radius: var(--radius-card);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.confirm-banner h2 {
  margin: 0 0 4px;
  font-size: 1.18rem;
  color: #1f5235;
}

.confirm-banner p {
  margin: 0;
  font-size: 0.88rem;
  color: #2f5e43;
}

.confirm-items-list {
  margin-top: 10px;
}

.info-rows {
  margin: 10px 0 0;
}

.info-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f2ebe2;
  font-size: 0.94rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row dt {
  color: var(--text-sub);
  font-weight: 700;
}

.info-row dd {
  margin: 0;
  word-break: break-word;
}

.mock-submit-feedback {
  background: var(--bg-leaf-tint);
  border: 1.5px solid var(--brand-leaf);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin-bottom: 14px;
  color: #1f4f33;
  font-size: 0.92rem;
}

.mock-submit-feedback p {
  margin: 6px 0 0;
}

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

/* 底部固定試算條 */
.sticky-cart-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1.5px solid var(--border-soft);
  box-shadow: 0 -4px 16px rgba(42, 32, 27, 0.08);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 20;
}

.sticky-cart-info {
  display: flex;
  flex-direction: column;
}

.sticky-cart-meta {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.sticky-cart-total {
  font-size: 1.24rem;
  font-weight: 900;
  color: var(--brand-plum);
  line-height: 1.2;
}

.sticky-cart-btn {
  min-height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: var(--brand-plum);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}
