/*
 * 棘之悦商城 - 全局视觉
 * 沙棘暖金：亚麻底、陶土主色、琥珀点缀
 */

:root {
  --brand-50: #fbf6f0;
  --brand-100: #f4e6d6;
  --brand-200: #e8ccb0;
  --brand-300: #d7a57a;
  --brand-400: #c47b4a;
  --brand-500: #b35a32;
  --brand-600: #9a4628;
  --brand-700: #7c3622;
  --brand-800: #5c281c;
  --brand-900: #3d1b14;
  --accent-500: #c9a227;
  --accent-600: #a98416;
  --danger-500: #c94a4a;
  --ink-800: #2a1d16;
  --ink-600: #5c463a;
  --linen: #f4ebe1;
  --paper: #fffaf4;
  --line: rgba(155, 86, 48, 0.12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  color: var(--ink-800);
  background-color: var(--linen);
  background-image:
    radial-gradient(900px 380px at 80% -120px, rgba(201,162,39,0.16), transparent 58%),
    radial-gradient(720px 320px at -10% 8%, rgba(179,90,50,0.10), transparent 55%),
    linear-gradient(180deg, #f8f0e6 0%, #f3e8dc 160px, #f1e4d6 100%);
  overscroll-behavior-y: none;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.pb-safe { padding-bottom: calc(10px + var(--safe-bottom)); }
.pt-safe { padding-top: var(--safe-top); }

.page-with-tabbar { padding-bottom: calc(92px + var(--safe-bottom)); }
.page-with-tabbar.has-settle-bar { padding-bottom: calc(156px + var(--safe-bottom)); }

.tabbar {
  position: fixed; left: 14px; right: 14px;
  bottom: calc(10px + var(--safe-bottom));
  z-index: 50;
  background: rgba(255,250,244,0.94);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(61, 27, 20, 0.14);
  padding: 6px 4px 8px;
}
.tabbar-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; flex: 1; padding: 6px 0 2px; color: #b39a8c;
  transition: color .2s, transform .2s; position: relative;
}
.tabbar-item svg { width: 22px; height: 22px; transition: transform .25s; }
.tabbar-item.active { color: var(--brand-600); }
.tabbar-item.active svg { transform: translateY(-1px) scale(1.06); }
.tabbar-item .tabbar-label { font-size: 11px; font-weight: 500; }
.tabbar-icon-wrap { position: relative; display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; }
.tabbar-badge {
  position: absolute; top: -5px; right: -11px; z-index: 1;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger-500); color: #fff;
  font-size: 10px; line-height: 16px; text-align: center; font-weight: 600;
  box-shadow: 0 0 0 1.5px #fff;
  pointer-events: none;
}
.tabbar-badge.hidden { display: none; }

.settle-above-tabbar {
  bottom: calc(78px + var(--safe-bottom)) !important;
  z-index: 45;
}

.card-shadow { box-shadow: 0 10px 28px rgba(61, 27, 20, 0.07); }
.paper-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(61, 27, 20, 0.06);
}

@keyframes fadeSlideUp { from { opacity:0; transform: translateY(10px);} to { opacity:1; transform:translateY(0);} }
.anim-in { animation: fadeSlideUp .35s ease both; }

#toast-root { position: fixed; top: 46%; left: 50%; transform: translate(-50%,-50%); z-index: 999; display:flex; flex-direction:column; align-items:center; gap:8px; pointer-events:none; }
.toast-item { background: rgba(42,29,22,0.92); color:#fff; font-size:13.5px; padding:10px 18px; border-radius: 14px; max-width: 78vw; text-align:center; animation: toastPop .18s ease both; }
@keyframes toastPop { from { opacity:0; transform: scale(.9);} to { opacity:1; transform: scale(1);} }

#loading-root { position: fixed; inset:0; z-index:998; display:none; align-items:center; justify-content:center; background: rgba(244,235,225,0.45); backdrop-filter: blur(3px); }
#loading-root.show { display:flex; }
.spinner { width:34px; height:34px; border-radius:50%; border:3px solid var(--brand-100); border-top-color: var(--brand-500); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg,#ead9c8 25%,#f7efe6 37%,#ead9c8 63%); background-size: 400% 100%; animation: skeletonMove 1.4s ease infinite; border-radius:10px; }
@keyframes skeletonMove { 0%{background-position:100% 50%;} 100%{background-position:0 50%;} }

.modal-mask {
  position: fixed; inset:0; background: rgba(28,19,15,0.48); z-index:996;
  opacity:0; visibility:hidden; pointer-events:none;
  transition: opacity .2s, visibility .2s;
}
.modal-mask.show { opacity:1; visibility:visible; pointer-events:auto; }
.modal-panel {
  position: fixed; left:50%; bottom:0; transform: translate(-50%, 100%);
  width:100%; max-width:520px; background: var(--paper); border-radius:24px 24px 0 0;
  z-index:997; transition: transform .28s cubic-bezier(.32,.72,0,1);
  padding-bottom: var(--safe-bottom); pointer-events:none;
}
.modal-panel.show { transform: translate(-50%, 0); pointer-events:auto; }
.modal-panel.center { left:50%; top:50%; bottom:auto; transform: translate(-50%,-40%) scale(.92); border-radius:20px; opacity:0; pointer-events:none; }
.modal-panel.center.show { transform: translate(-50%,-50%) scale(1); opacity:1; pointer-events:auto; }

.btn-press {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  transition: transform .12s ease, opacity .12s ease;
}
.btn-press:active { transform: scale(.96); opacity:.9; }

.btn-main {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  min-height: 48px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
}
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-height: 44px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.progress-shine::after {
  content:''; position:absolute; inset:0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  background-size: 200% 100%; animation: shineMove 2.2s ease infinite;
}
@keyframes shineMove { 0%{background-position: 120% 0;} 100%{background-position: -20% 0;} }

.seat-placeholder { border: 1.5px dashed #e8cfc0; background: #fdf8f4; }
.seat-placeholder.is-action { cursor: pointer; transition: background .15s, border-color .15s, transform .12s; }
.seat-placeholder.is-action:active { transform: scale(.96); }
.seat-placeholder.is-action:hover { background: #f8e8dc; border-color: var(--brand-400); }

.proxy-sheet {
  height: min(92vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.proxy-sheet .proxy-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.prod-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border: 1.5px solid #f0e4d8; border-radius: 12px; background: #fff;
  transition: border-color .15s, background .15s;
}
.prod-pick.is-on { border-color: var(--brand-500); background: #fdf6f1; }
.prod-qty {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid #efd0b8; border-radius: 999px; overflow: hidden; background: #fff;
}
.prod-qty button {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  color: var(--brand-600); font-size: 16px; line-height: 1;
}
.prod-qty span { min-width: 22px; text-align: center; font-size: 13px; color: #3d2a22; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand-mark img { width: 28px; height: 28px; border-radius: 8px; }
.brand-word {
  font-weight: 700;
  letter-spacing: 0.18em;
}

/* 首页顶栏 / 专区 / 商品卡 */
.app-topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248, 240, 230, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.home-search {
  display: flex; align-items: center;
  height: 36px; padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,250,244,0.86);
  border: 1px solid var(--line);
}
.zone-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 12px; padding: 0 2px;
}
.zone-head .zh-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--ink-800);
}
.zone-head .zh-title::before {
  content: '';
  width: 4px; height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent-500), var(--brand-500));
}
.zone-head .zh-sub { font-size: 11.5px; color: #9a8173; margin-top: 3px; margin-left: 12px; }
.prod-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(61, 27, 20, 0.06);
}
.prod-card .pc-cover { position: relative; aspect-ratio: 1 / 1; display: block; background: #f3e6d8; }
.prod-card .pc-cover img { width: 100%; height: 100%; object-fit: cover; }
.prod-card .pc-tag {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  color: #fff; font-weight: 600; letter-spacing: 0.04em;
}
.prod-card .pc-tag.gold { background: linear-gradient(90deg, #c9a227, #a98416); }
.prod-card .pc-tag.brand { background: linear-gradient(90deg, #b35a32, #7c3622); }
.price-now { color: var(--brand-600); font-weight: 800; letter-spacing: -0.02em; }
.announce-bar {
  display: flex; align-items: center;
  height: 42px; padding: 0 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* 登录页 */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(680px 280px at 50% -40px, rgba(201,162,39,0.22), transparent 60%),
    linear-gradient(180deg, #5c281c 0%, #7c3622 28%, #f4ebe1 28%);
}
.auth-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(61, 27, 20, 0.12);
}

/* 个人中心头图 */
.me-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(420px 180px at 90% 0%, rgba(201,162,39,0.28), transparent 60%),
    linear-gradient(135deg, #5c281c 0%, #9a4628 58%, #c47b4a 100%);
}
.me-hero::after {
  content: '';
  position: absolute; inset: auto -20px -40px auto;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,250,244,0.08);
}

.page-nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(248,240,230,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
