/* ══════════════════════════════════════
   前台页面公共样式（order/custom/track/success 共用）
   ══════════════════════════════════════ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #faf6f0 0%, #f5efe6 40%, #efe7d8 100%);
  min-height: 100vh;
  color: #3d2b1f;
}

/* ── 导航栏 ── */
nav {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(107, 76, 59, 0.08);
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .logo {
  font-size: 17px;
  font-weight: 600;
  color: #6b4c3b;
  letter-spacing: 0.5px;
}

nav .logo .fas {
  margin-right: 6px;
  color: #bfa575;
}

nav a {
  text-decoration: none;
  color: #8b7355;
  font-size: 13px;
  transition: color 0.2s;
}

nav a:hover {
  color: #6b4c3b;
}

/* ── 容器与卡片 ── */
.container {
  max-width: 640px;
  margin: 40px auto;
  padding: 0 16px;
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(107, 76, 59, 0.06), 0 4px 16px rgba(107, 76, 59, 0.04);
  padding: 40px;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #bfa575, transparent);
  border-radius: 0 0 2px 2px;
}

.card h1 {
  font-size: 22px;
  color: #4a3728;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.card h1 .fas {
  margin-right: 8px;
  color: #bfa575;
}

.card .desc {
  color: #9e8b7a;
  font-size: 13px;
  margin-bottom: 32px;
}

/* ── 表单网格（order/custom） ── */
.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid label {
  display: block;
  margin-bottom: 6px;
  color: #6b5848;
  font-size: 13px;
  font-weight: 500;
}

.form-grid label .fas {
  margin-right: 4px;
  color: #bfa575;
  font-size: 12px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(107, 76, 59, 0.15);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  background: #fdfbf7;
  transition: all 0.2s;
  font-family: inherit;
  color: #4a3728;
}

.form-grid input::placeholder,
.form-grid select::placeholder,
.form-grid textarea::placeholder {
  color: #b8a89a;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: #bfa575;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(191, 165, 117, 0.1);
}

/* ── 表单组（track） ── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #6b5848;
  font-size: 13px;
  font-weight: 500;
}

.form-group label .fas {
  margin-right: 4px;
  color: #bfa575;
  font-size: 12px;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(107, 76, 59, 0.15);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  background: #fdfbf7;
  transition: all 0.2s;
  color: #4a3728;
}

.form-group input::placeholder {
  color: #b8a89a;
}

.form-group input:focus {
  border-color: #bfa575;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(191, 165, 117, 0.1);
}

/* ── 提交按钮 ── */
.btn-submit {
  width: 100%;
  background: #6b4c3b;
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
  letter-spacing: 1px;
}

.btn-submit:hover {
  background: #5a3e2f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 76, 59, 0.2);
}

.btn-submit .fas {
  margin-right: 6px;
}

/* ── 错误提示 ── */
.error-banner {
  background: #fef6ee;
  border: 1px solid #e8c9a8;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #8b5a2b;
  text-align: center;
}

.error-msg {
  background: #fef0f0;
  color: #b34d4d;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 16px;
  border: 1px solid #f0c8c8;
}

/* ── 微信盒子 ── */
.wechat-box {
  background: linear-gradient(135deg, #fdf8f0 0%, #faf3e6 100%);
  border: 1px solid rgba(191, 165, 117, 0.3);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  position: relative;
}

.wechat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: #bfa575;
  border-radius: 0 0 2px 2px;
}

.wechat-box .qr-img {
  width: 120px;
  height: 120px;
  border-radius: 6px;
  margin: 10px auto;
  display: block;
  background: #fff;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(107, 76, 59, 0.08);
}

.wechat-box .tip {
  font-size: 13px;
  color: #6b4c3b;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.wechat-box .tip .fas,
.wechat-box .tip .fab {
  margin-right: 4px;
  color: #bfa575;
}

.wechat-box .sub {
  font-size: 11px;
  color: #9e8b7a;
  margin-top: 2px;
}

/* ── 复制按钮 ── */
.wechat-box .copy-btn {
  background: #fff;
  border: 1px solid rgba(107, 76, 59, 0.2);
  color: #6b4c3b;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.wechat-box .copy-btn .fas {
  margin-right: 4px;
}

.wechat-box .copy-btn:hover {
  background: #faf6f0;
  border-color: #bfa575;
}

.wechat-box .copy-btn.wechat-btn {
  background: #07C160;
  border-color: #07C160;
  color: #fff;
}

.wechat-box .copy-btn.wechat-btn:hover {
  background: #06ad56;
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.3);
}

/* ── 复制提示气泡 ── */
.copy-toast {
  display: none;
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(74, 55, 40, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 999;
}

.copy-toast .fas {
  margin-right: 4px;
  color: #bfa575;
}

.copy-toast.show {
  display: block;
}

/* ── 查询结果（track） ── */
.result {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(107, 76, 59, 0.1);
}

.result .status {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
}

.status-pending {
  background: #fef6ee;
  color: #b87530;
}

.status-processing {
  background: #eef3fa;
  color: #3a6fa8;
}

.status-completed {
  background: #eef5ee;
  color: #4a8b4a;
}

.result .detail-row {
  display: flex;
  padding: 7px 0;
  font-size: 14px;
}

.result .detail-row .label {
  width: 80px;
  color: #9e8b7a;
  flex-shrink: 0;
}

.result .detail-row .value {
  color: #4a3728;
}

/* ── 成功页 ── */
.success-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #e8f0e8 0%, #dce8dc 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 32px;
  color: #4a8b4a;
}

.ref-number {
  text-align: center;
  background: #fdf8f0;
  border: 1px solid rgba(191, 165, 117, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.ref-number .hint {
  font-size: 13px;
  color: #9e8b7a;
  margin-bottom: 6px;
}

.ref-number .code {
  font-size: 26px;
  font-weight: 600;
  color: #6b4c3b;
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
}

/* ── 操作按钮区 ── */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.actions a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.actions .btn-home {
  background: #fff;
  color: #6b4c3b;
  border: 1px solid rgba(107, 76, 59, 0.2);
}

.actions .btn-home:hover {
  background: #faf6f0;
  border-color: #bfa575;
}

.actions .btn-track {
  background: #6b4c3b;
  color: #fff;
}

.actions .btn-track:hover {
  background: #5a3e2f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 76, 59, 0.2);
}

.actions .btn-track.disabled {
  background: #ccc;
  color: #999;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

.no-phone-tip {
  text-align: center;
  color: #b87530;
  font-size: 12px;
  margin-top: 8px;
}

/* ── 详情列表（success/track） ── */
.detail-list {
  border-top: 1px solid rgba(107, 76, 59, 0.1);
  padding-top: 20px;
}

.detail-row {
  display: flex;
  padding: 8px 0;
  font-size: 14px;
}

.detail-row .label {
  width: 80px;
  color: #9e8b7a;
  flex-shrink: 0;
}

.detail-row .value {
  color: #4a3728;
}

/* ── 产品分类卡片选择 ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}

.category-card {
  cursor: pointer;
  border: 1px solid rgba(107, 76, 59, 0.12);
  border-radius: 6px;
  padding: 14px 6px;
  text-align: center;
  transition: all 0.2s;
  background: #fdfbf7;
  user-select: none;
}

.category-card:hover {
  border-color: rgba(191, 165, 117, 0.5);
  background: #faf6f0;
}

.category-card.active {
  border-color: #bfa575;
  background: #fdf8f0;
  box-shadow: 0 2px 8px rgba(191, 165, 117, 0.12);
  position: relative;
}

.category-card.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: #bfa575;
  border-radius: 0 0 2px 2px;
}

.category-card .cat-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 4px;
}

.category-card .cat-name {
  font-size: 13px;
  font-weight: 500;
  color: #4a3728;
}

.category-card .cat-sub {
  font-size: 11px;
  color: #9e8b7a;
  margin-top: 2px;
}

.category-card input {
  display: none;
}

/* ── 移动端适配 ── */
@media (max-width: 480px) {
  nav {
    padding: 0 16px;
  }

  .container {
    margin: 20px auto;
  }

  .card {
    padding: 28px 20px;
  }

  .card::before {
    left: 20px;
    right: 20px;
  }

  .form-grid .row {
    grid-template-columns: 1fr;
  }

  .addr-row {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── 双表单切换布局 ── */
body {
  background: linear-gradient(135deg, #fdf8f4 0%, #faf6f0 50%, #f5ede3 100%);
  min-height: 100vh;
}

.dual-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
}

.dual-header {
  text-align: center;
  margin-bottom: 24px;
}

.dual-header h1 {
  font-size: 26px;
  color: #3b2b1f;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.dual-header .sub-title {
  color: #8b6f55;
  font-size: 13px;
  margin-bottom: 20px;
}

.dual-header .guide-text {
  display: inline-block;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(191, 165, 117, 0.3);
  color: #6b4c3b;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  position: relative;
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(191, 165, 117, 0.1);
}

.dual-header .guide-text::before {
  content: '\f0eb';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 8px;
  color: #bfa575;
}

.dual-header .guide-text strong {
  color: #6b4c3b;
  font-weight: 600;
}

/* 选项卡式 tab */
.tab-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.tab-option {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(191, 165, 117, 0.2);
  border-radius: 10px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(191, 165, 117, 0.08);
}

.tab-option:hover {
  border-color: rgba(191, 165, 117, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(191, 165, 117, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

.tab-option.active {
  border-color: #bfa575;
  background: linear-gradient(180deg, rgba(253, 248, 244, 0.95) 0%, rgba(255, 255, 255, 0.95) 100%);
  box-shadow: 0 8px 24px rgba(191, 165, 117, 0.2);
}

.tab-option.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: #bfa575;
  border-radius: 2px 2px 0 0;
}

.tab-option .tab-title {
  font-size: 16px;
  font-weight: 600;
  color: #6b4c3b;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.tab-option.active .tab-title {
  color: #3b2b1f;
}

.tab-option .tab-desc {
  font-size: 12px;
  color: #8b6f55;
  line-height: 1.5;
}

.tab-option .tab-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  background: linear-gradient(135deg, #d4c5a0, #bfa575);
  color: #fff;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(191, 165, 117, 0.3);
}

.tab-option.active .tab-badge {
  background: linear-gradient(135deg, #bfa575, #8b6f55);
}

/* 内容卡片 */
.tab-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 1px solid rgba(191, 165, 117, 0.2);
  box-shadow: 0 4px 24px rgba(191, 165, 117, 0.1);
  overflow: hidden;
  position: relative;
}

.tab-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 60px;
  right: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #bfa575, transparent);
  border-radius: 0 0 2px 2px;
  z-index: 1;
}

.tab-content {
  padding: 32px;
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .dual-container {
    margin: 20px auto;
  }
  .dual-header h1 {
    font-size: 20px;
  }
  .dual-header .guide-text {
    font-size: 12px;
    padding: 8px 14px;
  }
  .tab-selector {
    gap: 10px;
    margin-bottom: 20px;
  }
  .tab-option {
    padding: 16px 10px;
  }
  .tab-option .tab-title {
    font-size: 14px;
  }
  .tab-option .tab-desc {
    font-size: 10px;
  }
  .tab-content {
    padding: 24px 20px;
  }
  .tab-card::before {
    left: 40px;
    right: 40px;
  }
}