/* ==========================================================
   点单端 · 第二款 UI：青源 club 风格（qy）
   1:1 复刻 https://q77444.qingyuanclub.com/ 的视觉：
     - 米黄暖底 + 顶部搜索胶囊 + 圆形头像
     - 大图公告卡（多行彩色文字）
     - 喇叭提示条
     - 两张黄色活动卡（投诉官邸 / 销量排行榜）
     - 粉色活动横幅
     - 分类图标行（选中带红色下划线）
     - 胶囊形分类筛选条 + 右侧菜单键
     - 商品网格
   主题色通过 --th / --th-light 等 CSS 变量与后台配色联动。
   ========================================================== */
.qy-theme {
  --qy-bg: #F7F1E4;
  --qy-bg2: #FBF6EC;
  --qy-card: #FFFFFF;
  --qy-yellow: #FFC83D;
  --qy-yellow2: #FFE07A;
  --qy-pink: #FFB3C6;
  --qy-red: #FF4D4F;
  --qy-text: #2B2B2B;
  --qy-text2: #6B6257;
  --qy-line: rgba(0, 0, 0, .07);
}

/* ---------- 整体容器 ---------- */
.qy-wrap {
  min-height: 100%;
  background: var(--qy-bg);
  color: var(--qy-text);
  padding-bottom: 20px;
}
.qy-top {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 6px;
  position: sticky; top: 0; z-index: 12;
  background: var(--qy-bg);
}
.qy-search {
  flex: 1; min-width: 0; height: 38px;
  display: flex; align-items: center; gap: 7px;
  background: #fff; border-radius: 20px;
  padding: 0 14px;
  box-shadow: 0 2px 8px rgba(120, 90, 40, .07);
  color: #B9B2A6; font-size: 13.5px;
  cursor: pointer;
}
.qy-search svg { width: 15px; height: 15px; flex: none; color: #FFA53D; }
.qy-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; flex: none; cursor: pointer;
  box-shadow: 0 2px 8px rgba(120, 90, 40, .12);
}

/* ---------- 大图公告卡 ---------- */
.qy-notice-card {
  margin: 4px 12px 8px;
  border-radius: 12px;
  overflow: hidden;
  background: #7FD3F7;
  padding: 10px 12px;
}
.qy-notice-card img { width: 100%; display: block; border-radius: 10px; }
.qy-notice-text {
  font-size: 13px; line-height: 1.55; font-weight: 700;
  color: #1F3A5F; text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}
.qy-notice-text .l1 { color: #E8342E; font-size: 16px; font-weight: 900; }
.qy-notice-text .l2 { color: #FFF; background: #E8342E; padding: 0 4px; border-radius: 3px; }
.qy-notice-text .l3 { color: #B932FF; }
.qy-notice-text .l4 { color: #1B7B2E; }
.qy-notice-text .l5 { color: #E8342E; }

/* ---------- 喇叭提示条 ---------- */
.qy-mp {
  margin: 0 12px 8px;
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 10px;
  padding: 9px 12px;
  box-shadow: 0 2px 8px rgba(120, 90, 40, .06);
}
.qy-mp-ic { width: 17px; height: 17px; flex: none; }
.qy-mp-box { flex: 1; min-width: 0; overflow: hidden; }
.qy-mp-inner {
  display: inline-flex; gap: 40px; white-space: nowrap;
  animation: qyMarquee 16s linear infinite;
  font-size: 12.5px; color: var(--qy-text2);
}
.qy-mp-inner span { display: inline-block; }
@keyframes qyMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- 黄色活动双卡 ---------- */
.qy-acts { display: flex; gap: 10px; margin: 0 12px 8px; }
.qy-act {
  flex: 1; min-width: 0; height: 74px;
  border-radius: 12px; overflow: hidden; position: relative;
  background: linear-gradient(120deg, var(--qy-yellow) 0%, var(--qy-yellow2) 100%);
  display: flex; align-items: center; padding: 0 8px;
  cursor: pointer;
}
.qy-act-txt {
  position: relative; z-index: 2;
  font-size: 16px; font-weight: 900; color: #2B2B2B; line-height: 1.15;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}
.qy-act-txt small { display: block; font-size: 11px; font-weight: 700; margin-top: 2px; }
.qy-act img { position: absolute; right: -4px; bottom: -4px; height: 68px; width: auto; z-index: 1; }

/* ---------- 粉色横幅 ---------- */
.qy-banner {
  margin: 0 12px 10px; border-radius: 12px; overflow: hidden;
  position: relative; cursor: pointer;
}
.qy-banner img { width: 100%; display: block; }
.qy-banner-fallback {
  height: 92px;
  background: linear-gradient(100deg, #FFD9E6 0%, #FFC0D4 45%, #FFE3EC 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 6px rgba(200, 60, 110, .45);
  letter-spacing: 2px;
}

/* ---------- 分类图标行 ---------- */
.qy-cats {
  display: flex; gap: 4px; overflow-x: auto;
  padding: 4px 12px 6px;
  scrollbar-width: none;
}
.qy-cats::-webkit-scrollbar { display: none; }
.qy-cat {
  flex: none; width: 62px; text-align: center; cursor: pointer;
}
.qy-cat-ic {
  width: 46px; height: 46px; margin: 0 auto 4px;
  border-radius: 12px; overflow: hidden;
  background: #2B2B2B;
  display: flex; align-items: center; justify-content: center;
}
.qy-cat-ic img { width: 100%; height: 100%; object-fit: cover; }
.qy-cat b { display: block; font-size: 11.5px; font-weight: 500; color: var(--qy-text); }
.qy-cat.on b { color: var(--qy-red); font-weight: 800; }
.qy-cat.on .qy-cat-ic { box-shadow: 0 0 0 2px var(--qy-red); }
.qy-cat-line {
  display: block; width: 18px; height: 3px; border-radius: 2px;
  background: transparent; margin: 3px auto 0;
}
.qy-cat.on .qy-cat-line { background: var(--qy-red); }

/* ---------- 胶囊分类筛选条 ---------- */
.qy-pills {
  display: flex; align-items: center; gap: 8px;
  padding: 2px 12px 8px;
  overflow-x: auto; scrollbar-width: none;
}
.qy-pills::-webkit-scrollbar { display: none; }
.qy-pill {
  flex: none; height: 30px; padding: 0 15px;
  border-radius: 16px; background: #fff;
  font-size: 13px; color: var(--qy-text);
  display: inline-flex; align-items: center;
  box-shadow: 0 1px 4px rgba(120, 90, 40, .07);
  cursor: pointer; white-space: nowrap;
}
.qy-pill.on { background: #2B2B2B; color: #fff; font-weight: 700; }
.qy-pill-menu {
  margin-left: auto; flex: none;
  position: sticky; right: 0;
  width: 32px; height: 30px; border-radius: 8px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(120, 90, 40, .07);
}
.qy-pill-menu svg { width: 17px; height: 17px; }

/* ---------- 商品网格（对标参考站 hlv2-pl__grid：2 列大卡） ---------- */
.qy-goods {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 9px; padding: 4px 12px 10px;
}
.qy-card {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 6px rgba(120, 90, 40, .07);
  cursor: pointer;
}
.qy-card-cover {
  width: 100%; aspect-ratio: 1 / 1;
  background: #EEE8DC center/cover no-repeat;
  position: relative;
}
.qy-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qy-card-bad {
  position: absolute; left: 0; bottom: 0;
  background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 9.5px; padding: 2px 6px; border-radius: 0 6px 0 0;
}
.qy-card-seckill {
  position: absolute; right: 0; top: 0;
  background: var(--qy-red); color: #fff;
  font-size: 9.5px; padding: 2px 6px; border-radius: 6px 0 0 0;
}
.qy-card-body { padding: 7px 8px 9px; }
.qy-card-name {
  font-size: 13px; color: var(--qy-text); line-height: 1.35; font-weight: 700;
  height: 35px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.qy-card-desc {
  font-size: 11px; color: var(--qy-text2); line-height: 1.45;
  margin-top: 3px; height: 31px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.qy-card-foot { display: flex; align-items: baseline; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.qy-card-price { color: var(--qy-red); font-weight: 900; font-size: 15px; }
.qy-card-price i { font-style: normal; font-size: 11px; }
.qy-card-price-old {
  color: #B5AEA3; font-size: 11px; text-decoration: line-through; font-weight: 500;
}
.qy-card-price-old i { font-style: normal; }
.qy-card-sold { margin-left: auto; font-size: 10px; color: #B5AEA3; }
.qy-empty { grid-column: 1 / -1; text-align: center; color: #B5AEA3; font-size: 13px; padding: 40px 0; }

/* ---------- 分类页 ---------- */
.qy-cate-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px 6px;
}
.qy-cate-bar .qy-search { height: 34px; }
.qy-cate-left {
  width: 88px; flex: none; align-self: stretch;
  background: #F1EADB; border-radius: 8px;
  overflow: hidden;
}
.qy-cate-left div {
  padding: 13px 4px; text-align: center; font-size: 12.5px;
  color: var(--qy-text2); cursor: pointer;
}
.qy-cate-left div.on { background: #fff; color: var(--th, #FF7A1A); font-weight: 800; }
.qy-cate-right { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.qy-cate-right .qy-pill { height: 28px; font-size: 12.5px; }

/* ---------- 我的页 ---------- */
.qy-mine {
  margin: 10px 12px; background: #fff; border-radius: 14px;
  padding: 16px 14px; box-shadow: 0 2px 10px rgba(120, 90, 40, .07);
}
.qy-mine-user { display: flex; align-items: center; gap: 12px; }
.qy-mine-ava {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  background: #EEE8DC; flex: none;
}
.qy-mine-name { font-size: 16px; font-weight: 800; }
.qy-mine-id { font-size: 11.5px; color: #B5AEA3; margin-top: 3px; }
.qy-mine-bal {
  margin-left: auto; text-align: right;
}
.qy-mine-bal b { color: var(--qy-red); font-size: 18px; font-weight: 900; }
.qy-mine-bal span { display: block; font-size: 11px; color: #B5AEA3; }
.qy-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px; margin-top: 14px;
}
.qy-grid-item { text-align: center; cursor: pointer; }
.qy-grid-item img { width: 26px; height: 26px; object-fit: contain; }
.qy-grid-item span { display: block; font-size: 11px; color: var(--qy-text2); margin-top: 4px; }

/* ---------- 消息页 ---------- */
.qy-msg {
  margin: 10px 12px; background: #fff; border-radius: 12px;
  box-shadow: 0 2px 10px rgba(120, 90, 40, .07); overflow: hidden;
}
.qy-msg-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--qy-line);
  cursor: pointer;
}
.qy-msg-row:last-child { border-bottom: none; }
.qy-msg-row img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.qy-msg-row b { font-size: 13.5px; }
.qy-msg-row span { display: block; font-size: 11.5px; color: #B5AEA3; margin-top: 2px; }
.qy-msg-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--qy-red); color: #fff;
  font-size: 11px; display: flex; align-items: center; justify-content: center;
}

/* ---------- 底部导航（青源风：玻璃拟态） ---------- */
body.qy-on #tabbar {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 -4px 20px rgba(120, 90, 40, .10);
}
body.qy-on #tabbar .tab { color: #9A948A; }
body.qy-on #tabbar .tab.on { color: var(--th, #FF7A1A); }
body.qy-on #tabbar .tab.on span { font-weight: 800; }
body.qy-on #tabbar .tabic { background-color: currentColor; }
