/* ============================================================
   十元茶摊 H5 前台样式 v1.0
   暖茶色系 · 移动端优先
   ============================================================ */
:root {
  --tea: #8b5a2b;        /* 茶褐主色 */
  --tea-dark: #5c3a1e;
  --amber: #f59e0b;      /* 露营灯暖光 */
  --amber-light: #fbbf24;
  --cream: #faf6ef;      /* 米白背景 */
  --card: #ffffff;
  --ink: #2b241c;        /* 深棕文字 */
  --gray: #8a8178;
  --line: #eee5d8;
  --green: #059669;
  --red: #dc2626;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }

/* ---- SVG 图标 ---- */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex-shrink: 0; object-fit: contain; border-radius: 8px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  padding-bottom: 62px; /* 底部导航占位 */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; font-size: 15px; }

/* ---- 顶部 ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar .logo { font-size: 18px; font-weight: 800; color: var(--tea-dark); }
.topbar .logo b { color: var(--amber); }
.topbar .phone { font-size: 13px; color: var(--tea); background: #f5ead9; padding: 5px 10px; border-radius: 20px; }

/* ---- 轮播 ---- */
.banner { position: relative; overflow: hidden; margin: 12px 12px 0; border-radius: var(--radius); }
.banner .track { display: flex; transition: transform .35s ease; }
.banner .slide {
  min-width: 100%; height: 170px; position: relative;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; color: #fff; text-align: center;
}
.banner .slide h2 { font-size: 24px; letter-spacing: 2px; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.banner .slide p { font-size: 13px; opacity: .92; margin-top: 6px; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.banner .slide.bg1 { background: linear-gradient(135deg, #b45309, #d97706 55%, #f59e0b); }
.banner .slide.bg2 { background: linear-gradient(135deg, #1f2937, #374151 55%, #4b5563); }
.banner .slide.bg3 { background: linear-gradient(135deg, #14532d, #166534 55%, #15803d); }
.banner .slide .em { font-size: 40px; margin-bottom: 6px; }
.banner .slide .em .ic { border-radius: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.section-title .ic { width: 22px; height: 22px; border-radius: 7px; }
.banner .dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; }
.banner .dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.5); transition: all .3s; }
.banner .dots i.on { width: 18px; background: #fff; }

/* ---- 卡片与区块 ---- */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin: 12px 12px 0; box-shadow: 0 2px 10px rgba(139,90,43,.06); }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 18px 12px 4px; }
.section-title h3 { font-size: 17px; color: var(--tea-dark); }
.section-title .more { font-size: 13px; color: var(--gray); }
.section-title .more::after { content: "›"; margin-left: 2px; }

/* ---- 公告 ---- */
.notice { display: flex; align-items: flex-start; gap: 10px; background: #fdf3e3; border: 1px dashed #f0c987; }
.notice .tag { flex-shrink: 0; background: var(--amber); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 4px; margin-top: 3px; }
.notice .txt { font-size: 13px; color: #7c5a25; }
.notice .txt b { color: var(--tea-dark); }

/* ---- 茶品网格 ---- */
.tea-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.tea-item { text-align: center; padding: 12px 6px; border-radius: 12px; background: var(--cream); border: 1px solid var(--line); }
.tea-item .ico { font-size: 32px; line-height: 1.2; }
.tea-item .nm { font-size: 14px; font-weight: 700; margin-top: 6px; }
.tea-item .ds { font-size: 11px; color: var(--gray); margin-top: 2px; min-height: 30px; }
.tea-item .rc { display: inline-block; font-size: 10px; color: var(--amber); background: #fdf0d8; padding: 1px 6px; border-radius: 8px; margin-top: 4px; }

/* ---- 摊位卡片 ---- */
.stall-card { display: flex; gap: 12px; }
.stall-card .l { flex-shrink: 0; width: 84px; height: 84px; border-radius: 12px; background: linear-gradient(135deg, #f6e7c9, #e7c894); display: flex; align-items: center; justify-content: center; font-size: 36px; }
.stall-card .r { flex: 1; min-width: 0; }
.stall-card .nm { font-size: 16px; font-weight: 800; }
.stall-card .meta { font-size: 12px; color: var(--gray); margin-top: 4px; line-height: 1.8; }
.stall-card .meta i { font-style: normal; color: var(--tea); }
.stall-card .tags { margin-top: 6px; }
.stall-card .tag { display: inline-block; font-size: 11px; color: var(--tea); background: #f5ead9; border-radius: 8px; padding: 1px 8px; margin: 0 4px 4px 0; }
.stall-card .price { color: var(--red); font-weight: 800; font-size: 15px; }
.stall-card .price small { font-size: 11px; color: var(--gray); font-weight: 400; }

/* ---- 按钮 ---- */
.btn {
  display: block; text-align: center; padding: 12px; border-radius: 12px;
  font-size: 15px; font-weight: 700; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--amber), #d97706); color: #fff;
}
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--cream); color: var(--tea); border: 1px solid #e8cfa8; }
.btn.sm { display: inline-block; padding: 7px 16px; font-size: 13px; border-radius: 10px; }
.btn.green { background: linear-gradient(135deg, #10b981, #059669); }
.btn.danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
.btn:disabled { opacity: .6; }

/* ---- 表单 ---- */
.form { margin-top: 4px; }
.form .field { margin-bottom: 14px; }
.form label { display: block; font-size: 13px; color: var(--gray); margin-bottom: 6px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #e2d5c2; border-radius: 10px; background: #fff; outline: none;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245,158,11,.12); }
.form textarea { min-height: 90px; resize: vertical; }

/* ---- 列表页条 ---- */
.list-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.list-row:last-child { border-bottom: none; }
.list-row .lb { display: flex; align-items: center; gap: 10px; }
.list-row .lb .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--cream); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.list-row .rt { color: var(--gray); font-size: 14px; }

/* ---- 状态徽章 ---- */
.badge { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 10px; font-weight: 600; }
.badge.warn { background: #fdf0d8; color: #b45309; }
.badge.ok { background: #d1fae5; color: #047857; }
.badge.done { background: #e0e7ff; color: #4338ca; }
.badge.off { background: #fee2e2; color: #b91c1c; }

/* ---- 底部导航 ---- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { flex: 1; text-align: center; font-size: 11px; color: var(--gray); padding: 3px 0; }
.tabbar a .ic { font-size: 24px; display: block; transition: transform .15s; }
.tabbar a.on .ic { transform: scale(1.12); box-shadow: 0 3px 10px rgba(139,90,43,.25); }
.tabbar a.on { color: var(--tea); font-weight: 700; }

/* ---- 登录页 ---- */
.auth-wrap { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; padding: 30px 24px; }
.auth-logo { text-align: center; margin-bottom: 30px; }
.auth-logo .cup { font-size: 56px; }
.auth-logo h1 { font-size: 26px; color: var(--tea-dark); margin-top: 8px; }
.auth-logo p { color: var(--gray); font-size: 13px; margin-top: 4px; }
.auth-tabs { display: flex; background: #efe4d2; border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-tabs a { flex: 1; text-align: center; padding: 9px; border-radius: 9px; font-size: 14px; color: var(--gray); }
.auth-tabs a.on { background: #fff; color: var(--tea-dark); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* ---- 我的页 ---- */
.me-head { background: linear-gradient(135deg, #5c3a1e, #8b5a2b); color: #fff; padding: 28px 20px 22px; border-radius: 0 0 24px 24px; }
.me-head .ava { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.me-head .nm { font-size: 19px; font-weight: 800; margin-top: 10px; }
.me-head .mb { font-size: 13px; opacity: .85; margin-top: 2px; }
.me-cards { margin-top: -20px; position: relative; z-index: 2; }
.me-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.me-grid .cell { background: var(--card); border-radius: 12px; padding: 16px 6px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.me-grid .cell .n { font-size: 22px; font-weight: 800; color: var(--tea); }
.me-grid .cell .t { font-size: 12px; color: var(--gray); margin-top: 2px; }

/* ---- 详情弹层/空态 ---- */
.empty { text-align: center; padding: 50px 20px; color: var(--gray); }
.empty .ic { font-size: 48px; margin-bottom: 10px; }
.fab { position: fixed; right: 16px; bottom: 78px; z-index: 55; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--amber), #d97706); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 6px 20px rgba(217,119,6,.4); }

/* ---- 提示 ---- */
.toast { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); background: rgba(43,36,28,.92); color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 14px; z-index: 99; display: none; max-width: 78%; text-align: center; }
.toast.show { display: block; animation: fade .25s; }
@keyframes fade { from { opacity: 0; transform: translate(-50%, -48%); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* ---- 详情页通用 ---- */
.page-head { position: sticky; top: 0; z-index: 50; background: rgba(250,246,239,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.page-head .back { font-size: 20px; }
.page-head .t { font-size: 16px; font-weight: 700; }
.big-title { font-size: 22px; font-weight: 800; color: var(--tea-dark); }
.desc { font-size: 14px; color: #57534e; margin-top: 8px; }
.phone-line { display: flex; align-items: center; justify-content: space-between; background: #fdf3e3; border-radius: 12px; padding: 12px 16px; }
