/* ---------- 全域設定 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  font-family: "Noto Sans TC", "PingFang TC", sans-serif;
  margin: 0;
  background: #f5f7fb;
  color: #222;
  line-height: 1.5;
}

/* 主要容器 */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ---------- 網頁標題 ---------- */
h1, h2, h3 {
  font-weight: 700;
  margin: 0 0 .6em;
  color: #1a1a1a;
}
h1 { text-align: center; font-size: 2rem; }
h2 { font-size: 1.25rem; }

/* ================================================================= */
/* 版面主架構：70% 左欄（商品＋表單）／30% 右欄（摘要＋賣點）          */
/* ================================================================= */
.layout {
  display: flex;
  gap: 40px;                 /* 兩欄間距 */
  align-items: flex-start;
  margin-top: 32px;
}

/* 左欄 */
.main-area  { flex: 0 0 70%; max-width: 70%; }

/* 右欄 */
.aside-area { flex: 0 0 30%; max-width: 30%; }

/* 行動裝置改直排 */
@media (max-width: 959px) {
  .layout        { flex-direction: column; gap: 32px; }
  .main-area,
  .aside-area    { flex: 1 1 100%; max-width: 100%; }
}

/* ---------- 商品區 ---------- */
.products-section { margin-bottom: 48px; }

/* 卡片排列：三欄自動 RWD */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: 24px;
}

/* 商品卡片 */
.product-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 16px;
  text-align: center;
  transition: transform .2s;
}
.product-card:hover { transform: translateY(-4px); }

.product-card img {
  width: 100%; height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}
.product-card .price {
  font-weight: 700;
  color: #334bff;
  margin-bottom: 12px;
}

/* ---------- 加減數量 ---------- */
.quantity-control {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.quantity-control button {
  width: 32px; height: 32px;
  border-radius: 50%; border: none;
  background: #edf0ff; color: #334bff;
  font-size: 1.25rem; cursor: pointer;
  transition: background .2s;
}
.quantity-control button:hover { background: #d8deff; }
.quantity-control input {
  width: 40px; text-align: center;
  border: none; background: transparent;
  font-size: 1rem;
}

/* ---------- 訂單摘要 ---------- */
.order-summary {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 24px;
  margin-bottom: 24px;
}
.summary-content { display: grid; gap: 12px; }
.summary-item    { display: flex; justify-content: space-between; }
.summary-item.total span:last-child {
  font-size: 1.25rem; color: #334bff; font-weight: 700;
}

/* ---------- 賣點條列 ---------- */
.order-benefits {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 24px;
}
.benefit-list { list-style: none; padding: 0; margin: 0; }
.benefit-item {
  display: flex; align-items: center;
  gap: 16px; padding: 12px 0;
}
.benefit-item:not(:last-child) { border-bottom: 1px solid #e9e9e9; }
.benefit-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  font-size: 18px;
}
.benefit-icon.green  { background:#d4f8e8; color:#10b26c; }
.benefit-icon.blue   { background:#dfe8ff; color:#568bff; }
.benefit-icon.purple { background:#f5e9ff; color:#7a48ff; }

/* ---------- 收件表單 ---------- */
.customer-info {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 24px;
  margin-bottom: 64px;
}
.form-group { margin-bottom: 20px; }
label {
  display: block; margin-bottom: 4px; font-weight: 600;
}
input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid #e0e3eb;
  border-radius: 8px; font-size: 1rem;
  background: #fafbff;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: #334bff;
  box-shadow: 0 0 0 3px rgba(51,75,255,.15);
}
textarea { min-height: 80px; resize: vertical; }

/* 雙欄排版 (>=640px) */
@media (min-width: 640px) {
  .customer-info .form-group { display: flex; gap: 24px; }
  .customer-info .form-group > * { flex: 1 1 0; }
  .customer-info textarea { flex: 1 1 100%; }
}

/* ---------- 送出按鈕 ---------- */
.submit-btn {
  display: block; width: 100%;
  padding: 14px 0; margin-top: 8px;
  border: none; border-radius: 999px;
  font-size: 1rem; font-weight: 700; color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg,#334bff 0%, #7a7dff 100%);
  transition: opacity .2s, transform .1s;
}
.submit-btn:hover  { opacity: .9; }
.submit-btn:active { transform: scale(.98); }
