/* 咖啡花植生活馆 · 用户端 H5（对齐参考站视觉规范）
   主色 #2E8B57 / 点缀粉 #F7A8C0 / 浅绿 #EAF4EE / 墨色 #222B25 / 灰绿 #7A877D
   UI 规范换算（750rpx 设计稿 → 375px 视口，1rpx≈0.5px）：
   卡片圆角 24rpx=12px / 按钮圆角 44rpx=22px 高 88rpx=44px / 输入框 16rpx=8px
   顶部导航 88rpx=44px / 底部 tabBar 100rpx=50px / 左右边距 32rpx=16px / 卡片间距 24rpx=12px */
:root {
    --brand: #2E8B57; --accent: #F7A8C0; --light: #EAF4EE; --pink-bg: #FDEEF3;
    --ink: #222B25; --ink-deep: #243F2E; --muted: #7A877D; --faint: #9AA79D;
    --line: #EEF0EB; --bg: #F7F8F5; --card: #FFFFFF;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
    background: #E9EDE6; color: var(--ink); font-size: 14px; line-height: 1.55;
    min-width: 375px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
/* 固定 375px 画布（等同于小程序 750rpx 设计宽度）：内容宽度不随窗口变化，宽屏居中、窄屏横向滚动 */
.app {
    width: 375px; min-width: 375px; max-width: 375px; margin: 0 auto; min-height: 100vh;
    padding: 0 0 70px; background: var(--bg); box-shadow: 0 0 24px rgba(34, 43, 37, .06);
}

/* ---- 顶部导航：白底、居中标题、左侧细箭头 ---- */
.topbar {
    position: sticky; top: 0; z-index: 20; height: 44px; padding: 0 16px; background: var(--card);
    display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line);
}
.topbar strong { font-size: 16px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.topbar .back { border: 0; background: transparent; color: var(--ink); font-size: 22px; padding: 0; line-height: 1; width: 32px; text-align: left; flex: none; }
.topbar .mini { border: 0; background: transparent; color: var(--muted); font-size: 12px; }

/* ---- 版块与卡片：无描边 + 绿调柔和阴影 ---- */
.section { padding: 12px 16px 0; }
.section-title { font-size: 16px; font-weight: 700; margin: 4px 0 10px; display: flex; justify-content: space-between; align-items: baseline; color: var(--ink); }
.section-title span { font-size: 12px; font-weight: 400; color: var(--muted); }
.card {
    background: var(--card); border: 0; border-radius: 12px;
    padding: 14px; margin-bottom: 12px; box-shadow: 0 3px 12px rgba(46, 139, 87, .06);
}
.card.flat { box-shadow: none; background: var(--bg); }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }

/* ---- 品牌头：页面顶部名称 + slogan + 演示环境标签 ---- */
.brand-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 16px 4px; }
.brand-head .bh-name { display: block; font-size: 18px; font-weight: 700; color: var(--ink-deep); }
.brand-head .bh-slogan { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---- 纯 CSS 艺术横幅（咖啡杯 + 花叶，不复制任何品牌素材） ---- */
.art {
    position: relative; width: calc(100% - 32px); margin: 12px 16px 0; height: 160px;
    border-radius: 12px; overflow: hidden;
    background: linear-gradient(135deg, #EAF4EE 0%, #F7F8F5 55%, #FDEEF3 100%);
}
.art .glow { position: absolute; width: 160px; height: 160px; border-radius: 50%; right: -30px; top: -40px; background: rgba(247, 168, 192, .28); }
.art .leaf { position: absolute; width: 65px; height: 31px; border-radius: 0 100% 0 100%; background: rgba(46, 139, 87, .30); }
.art .leaf-a { left: 22px; bottom: 48px; transform: rotate(-28deg); }
.art .leaf-b { left: 55px; bottom: 29px; transform: rotate(18deg); background: rgba(46, 139, 87, .18); }
.art .leaf-c { right: 75px; top: 20px; transform: rotate(48deg); background: rgba(46, 139, 87, .14); }
.art .cup { position: absolute; right: 45px; bottom: 35px; width: 65px; height: 65px; }
.art .cup-body { position: absolute; left: 0; bottom: 0; width: 55px; height: 48px; border-radius: 6px 6px 22px 22px; background: #fff; box-shadow: 0 4px 12px rgba(34, 43, 37, .10); }
.art .cup-body::after { content: ''; position: absolute; left: 0; top: 0; width: 55px; height: 11px; border-radius: 50%; background: rgba(46, 139, 87, .22); }
.art .cup-handle { position: absolute; right: 0; bottom: 15px; width: 22px; height: 28px; border: 5px solid #fff; border-left: none; border-radius: 0 20px 20px 0; }
.art .steam { position: absolute; width: 4px; height: 20px; border-radius: 4px; background: rgba(46, 139, 87, .18); top: -9px; }
.art .steam-a { left: 17px; }
.art .steam-b { left: 34px; height: 14px; }
.art .bud { position: absolute; left: 39px; bottom: 75px; width: 28px; height: 28px; border-radius: 50% 0 50% 50%; transform: rotate(-25deg); background: var(--accent); opacity: .85; }
.art .art-caption { position: absolute; left: 16px; top: 18px; display: flex; flex-direction: column; }
.art .art-title { font-size: 18px; font-weight: 700; color: var(--ink-deep); max-width: 190px; }
.art .art-sub { margin-top: 5px; font-size: 12px; color: #58705E; max-width: 190px; }
.art .placeholder { position: absolute; right: 10px; bottom: 8px; font-size: 10px; color: #8A9B8E; background: rgba(255, 255, 255, .72); padding: 2px 7px; border-radius: 8px; }
.art.slim { height: 90px; margin: 0; width: 100%; border-radius: 0; }
.art.slim .art-caption { display: none; }
/* 照片横幅：实拍图铺满，底部压暗渐变保证白色文字可读 */
.art-photo img.banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.art-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .24) 0%, rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, .46) 100%); }
.art-photo .art-caption { top: auto; bottom: 14px; z-index: 1; }
.art-photo .art-title { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.art-photo .art-sub { color: rgba(255, 255, 255, .92); text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }

/* ---- 搜索卡片：卡内左占位右绿色胶囊 ---- */
.search-card {
    background: var(--card); border-radius: 999px; margin: 12px 16px 0; padding: 6px 6px 6px 18px;
    display: flex; align-items: center; justify-content: space-between; box-shadow: 0 3px 12px rgba(46, 139, 87, .06);
    color: var(--muted); font-size: 13px; border: 0; width: calc(100% - 32px);
}
.search-card input { flex: 1; border: 0; background: transparent; outline: none; font-size: 13px; color: var(--ink); min-width: 0; }
.search-card .search-btn { color: #fff; padding: 9px 22px; border-radius: 999px; font-size: 13px; background: var(--brand); border: 0; flex: none; }

/* ---- 快捷入口：圆形图标 chips ---- */
.shortcuts { display: flex; flex-wrap: wrap; }
.shortcut { width: 25%; display: flex; flex-direction: column; align-items: center; padding: 8px 0; cursor: pointer; }
.shortcut-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; background: var(--light); color: var(--brand); }
.shortcut-icon svg { width: 30px; height: 30px; display: block; }
.shortcut-icon.pink { background: var(--pink-bg); color: #9B506C; }
/* 后台上传的自定义图标：铺满整个圆形，不留白边 */
.shortcut-icon.has-img { background: var(--bg); overflow: hidden; }
.shortcut-icon img.shortcut-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.shortcut-label { font-size: 12px; margin-top: 6px; color: #45554A; }

/* ---- 分类九宫：演示图标（内置 SVG 或后台上传图片）+ 名称 + 品类小字 ---- */
.cat-grid { display: flex; flex-wrap: wrap; }
.cat-item { width: 25%; display: flex; flex-direction: column; align-items: center; padding: 10px 0; cursor: pointer; }
.cat-dot { width: 34px; height: 34px; border-radius: 12px; margin-bottom: 6px; background: var(--light); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cat-dot svg { width: 24px; height: 24px; display: block; }
.cat-dot img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.cat-dot.has-img { background: var(--bg); }
.cat-name { font-size: 12px; color: var(--ink); text-align: center; }
.cat-kind { font-size: 10px; color: var(--faint); margin-top: 1px; }

/* ---- 热词 / 通用胶囊 ---- */
.hotwords { display: flex; flex-wrap: wrap; }
.hotword { font-size: 12px; padding: 4px 12px; border-radius: 999px; margin: 0 8px 6px 0; background: var(--light); color: var(--brand); cursor: pointer; }

/* ---- 活动行 / 提示条 ---- */
.activity-row { display: flex; align-items: center; margin-bottom: 8px; font-size: 13px; }
.activity-row .activity-name { flex: 1; margin: 0 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice { background: var(--pink-bg); color: #A45270; border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.6; margin: 0 16px 12px; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.6; }

.grid { display: grid; gap: 12px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

/* ---- 兼容旧 quick / cat-chip（次要页面沿用，统一无描边） ---- */
.quick { background: var(--light); border: 0; border-radius: 12px; padding: 12px 4px; text-align: center; font-size: 12px; cursor: pointer; }
.quick b { display: block; font-size: 18px; color: var(--brand); margin-bottom: 4px; font-weight: 700; }
.cat-chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 9px 10px; text-align: center; font-size: 12px; color: #45554A; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.cat-chip.on { border-color: var(--brand); color: var(--brand); font-weight: 700; background: var(--light); }
.cat-chip .chip-ico { width: 16px; height: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.cat-chip .chip-ico svg { width: 16px; height: 16px; display: block; }
.cat-chip img.chip-ico { object-fit: cover; border-radius: 4px; }

/* ---- 商品占位图 / 商品卡 ---- */
.ph {
    background: var(--light); display: grid; place-items: center;
    color: var(--brand); font-size: 28px; overflow: hidden; border-radius: 8px;
}
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 商品卡：参考站同款整行卡片 —— 顶部艺术位 + 白底角标 + 名称 + 价格 */
.pcard { background: var(--card); border: 0; border-radius: 12px; overflow: hidden; position: relative; box-shadow: 0 3px 12px rgba(46, 139, 87, .06); cursor: pointer; }
.pcard .ph { aspect-ratio: 16 / 9; border-radius: 0; background: linear-gradient(135deg, #EAF4EE 0%, #F7F8F5 55%, #FDEEF3 100%); position: relative; }
.pcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .kind-chip { position: absolute; left: 8px; top: 8px; font-size: 10px; color: var(--brand); background: rgba(255, 255, 255, .86); padding: 2px 7px; border-radius: 8px; z-index: 2; }
.pcard .pb { padding: 10px 12px 12px; }
.pcard .pn { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .ps { font-size: 11px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .row-between { margin-top: 8px; }
.pcard .enter { font-size: 11px; color: var(--brand); }

.price { color: var(--brand); font-size: 18px; font-weight: 700; }
.price small { font-size: 12px; font-weight: 400; }
.muted { color: var(--muted); font-size: 12px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--light); color: var(--brand); }
.tag.pink { background: var(--pink-bg); color: #A45270; }
.tag.gray { background: #F1F2EF; color: var(--muted); }

/* ---- 按钮：胶囊、实底绿 / 描边幽灵 ---- */
.btn {
    display: block; width: 100%; height: 44px; border: 0; border-radius: 22px;
    background: var(--brand); color: #fff; font-weight: 600; letter-spacing: .5px;
}
.btn:active { opacity: .85; }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.gray { background: #EEF1EE; color: var(--muted); border: 0; }
.btn.small { width: auto; height: 30px; padding: 0 16px; border-radius: 15px; font-size: 12px; font-weight: 500; display: inline-block; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.field { margin-top: 10px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
/* 统一输入框：覆盖带 type 与不带 type 的文本类输入（登录账号、收货人、验证码等均未写 type）。
   用 :where() 让基础规则保持零优先级，不覆盖 .search-card 等局部样式 */
:where(input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=search],
input[type=password], input[type=number], input[type=date], select, textarea) {
    width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 8px;
    background: var(--bg); color: var(--ink); outline: none;
    font-size: 14px; -webkit-appearance: none; appearance: none;
}
textarea { height: auto; min-height: 70px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 1.5px var(--brand); }
input::placeholder, textarea::placeholder { color: var(--faint); }
/* 行内输入（验证码 + 获取验证码按钮等）：输入框占满剩余宽度，按钮与输入框等高 */
.row > input:not([type]), .row > input[type=text], .row > input[type=tel], .row > input[type=number] { flex: 1; min-width: 0; width: auto; }
.row > .btn.small { height: 44px; padding: 0 18px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); }

.spec-group { margin-top: 12px; }
.spec-group h4 { margin: 0 0 8px; font-size: 14px; }
.spec-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-opt { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12px; color: #45554A; }
.spec-opt.on { border-color: var(--brand); color: var(--brand); background: var(--light); font-weight: 700; }

.list-item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.thumb {
    width: 54px; height: 54px; border-radius: 8px; flex: none; overflow: hidden;
    background: linear-gradient(135deg, #EAF4EE, #FDEEF3); display: grid; place-items: center; color: var(--brand);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.kv { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.kv b { font-weight: 600; }
.kv.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.kv.total b { color: var(--brand); font-size: 18px; }

.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; line-height: 1; color: var(--brand); }

/* ---- 底部 tabBar：固定 375px、白底、文字式、选中变绿加粗 ---- */
.tabbar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 375px; height: 50px;
    background: var(--card); border-top: 1px solid var(--line); display: flex; z-index: 30;
}
.tabbar button { flex: 1; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.tabbar button.on { color: var(--brand); font-weight: 700; }

.loading, .empty, .error-state { padding: 36px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.error-state { color: #C04F6C; }
.empty b { display: block; font-size: 30px; color: #B9C4BB; margin-bottom: 6px; }

.toast {
    position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 50;
    background: rgba(34, 43, 37, .9); color: #fff; padding: 9px 18px; border-radius: 20px; font-size: 13px; max-width: 90%;
}
.divider { height: 8px; background: var(--bg); margin: 4px -16px; }

/* ---- 活动横幅（后台可配图） ---- */
.banner {
    position: relative; overflow: hidden;
    margin: 12px 16px 0; padding: 16px; border-radius: 12px; color: #fff;
    background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 62%, white), var(--brand));
}
.banner.pink { background: linear-gradient(120deg, #F9DCE5, var(--accent)); color: #6B3144; }
.banner h3 { margin: 0; font-size: 16px; }
.banner.has-img { min-height: 128px; display: flex; align-items: flex-end; }
.banner.has-img .banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .5)); }
.banner.has-img h3 { position: relative; z-index: 1; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }

.ticket-code {
    font-size: 24px; font-weight: 800; letter-spacing: 2px; text-align: center;
    padding: 18px 0; color: var(--brand); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.status-line { border-left: 2px solid var(--line); padding-left: 12px; margin-left: 4px; }
.status-line div { padding: 4px 0; font-size: 12px; color: var(--muted); }
.checkline { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); margin-top: 10px; }
.checkline input { width: 16px; height: 16px; margin-top: 3px; flex: none; }
.footnote { padding: 12px 16px 24px; font-size: 12px; color: var(--muted); text-align: center; }
.searchbar { display: flex; gap: 8px; padding: 12px 16px 0; }
.searchbar input { flex: 1; }
.searchbar button { width: 64px; flex: none; height: 44px; border: 0; border-radius: 22px; background: var(--brand); color: #fff; }

/* 旧 hero 兼容（登录页等未改造处仍可用） */
.hero {
    margin: 12px 16px 0; padding: 22px 18px; border-radius: 12px; color: var(--ink-deep);
    background: linear-gradient(135deg, #EAF4EE 0%, #F7F8F5 55%, #FDEEF3 100%);
    position: relative; overflow: hidden;
}
.hero h1 { font-size: 18px; font-weight: 700; margin: 0; position: relative; }
.hero p { font-size: 12px; margin: 6px 0 0; color: #58705E; position: relative; }
