/* ========================================================================
   家政好物线报站 - 样式（移动端 H5，最大宽度 480px）
   主题色：#D85A45 橙红
   ======================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary: #D85A45;
  --primary-light: #FFF4ED;
  --primary-lighter: #FFF8F3;
  --primary-border: #FFE0CC;
  --text: #222;
  --text-sub: #666;
  --text-mute: #999;
  --bg: #F7F7F8;
  --card: #FFFFFF;
  --border: #EEEEEE;
  --success: #5BA82A;
  --success-bg: #F0F9E8;
  --warning: #D4A02A;
  --warning-bg: #FFF7E0;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  background: var(--bg);
  min-height: 100vh;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  padding-bottom: 100px;
}

/* ---------- 顶部栏 ---------- */
.sticky-header { position: sticky; top: 0; z-index: 50; background: #fff; }

.topbar { background: #fff; padding: 0 16px; border-bottom: 1px solid var(--border); }
.topbar-inner { height: 48px; display: flex; align-items: center; justify-content: space-between; }
.topbar-inner.center { justify-content: center; }
.topbar-update { font-size: 12px; color: var(--text-mute); flex-shrink: 0; }
.topbar-title { font-size: 16px; font-weight: 600; color: var(--primary); white-space: nowrap; }

.refresh-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--primary); cursor: pointer; flex-shrink: 0;
  transition: transform .3s;
}
.refresh-btn:active { opacity: .6; }
.refresh-btn.spinning { animation: spin .6s linear; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.fixed-tip, .rank-tip {
  text-align: center; font-size: 12px; color: var(--primary);
  background: var(--primary-light); padding: 6px 16px; line-height: 1.4;
}

/* 教程引导条 */
.guide-bar {
  background: linear-gradient(135deg, #FFF5EE 0%, #FFECE0 100%);
  margin: 8px 12px; padding: 10px 14px; border-radius: 10px;
  display: flex; align-items: center; gap: 8px; border: 1px solid #FFD9C0;
}
.guide-bar-icon { font-size: 22px; flex-shrink: 0; }
.guide-bar-text { flex: 1; font-size: 13px; color: #8B4513; font-weight: 500; }
.guide-bar-btn {
  flex-shrink: 0; background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 600; padding: 5px 12px;
  border-radius: 14px; cursor: pointer; white-space: nowrap;
}
.guide-bar-btn:active { opacity: .8; }

/* 排序栏 */
.sort-bar {
  display: flex; align-items: center; gap: 8px;
  margin: 0 12px 8px; padding: 8px 12px;
  background: #fff; border-radius: 8px; font-size: 13px;
}
.sort-label { color: #999; flex-shrink: 0; }
.sort-opt {
  padding: 4px 12px; border-radius: 14px; cursor: pointer;
  color: #666; background: #F5F5F5; transition: all .15s;
}
.sort-opt:active { opacity: .8; }
.sort-active { background: var(--primary); color: #fff; font-weight: 600; }

/* 好物页搜索栏 */
.rank-search-bar { display: flex; align-items: center; padding: 6px 16px 10px; gap: 8px; }
.rank-search-bar input {
  flex: 1; height: 38px; background: #fff;
  border: 2px solid var(--primary); border-radius: 19px;
  padding: 0 14px; font-size: 13px; color: #333; outline: none;
  box-shadow: 0 2px 8px rgba(216, 90, 69, .12);
}
.rank-search-bar input::placeholder { color: #AAA; }
.rank-search-btn {
  height: 38px; padding: 0 18px; background: var(--primary); color: #fff;
  border-radius: 19px; font-size: 14px; font-weight: 600; cursor: pointer;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(216, 90, 69, .2);
}
.rank-search-btn:active { opacity: .8; }

/* ---------- 双层分类导航 ---------- */
.category-nav { position: relative; background: #fff; padding-right: 50px; }
.cat-row {
  display: flex; overflow-x: auto; padding: 8px 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-row.sub { padding-top: 0; border-top: 1px solid var(--border); }

.cat-tag {
  display: inline-flex; align-items: center; height: 28px;
  padding: 0 14px; margin-right: 8px; border-radius: 14px;
  font-size: 14px; color: var(--text-sub); white-space: nowrap;
  flex-shrink: 0; cursor: pointer; user-select: none; transition: all .15s;
}
.cat-tag.active { background: var(--primary); color: #fff; font-weight: 600; }
.cat-tag.small { height: 24px; padding: 0 12px; font-size: 13px; border-radius: 12px; }

.search-btn {
  position: absolute; top: 8px; right: 10px;
  width: 28px; height: 28px; border-radius: 14px;
  border: 1.5px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  background: #fff; z-index: 10; cursor: pointer;
}
.search-btn:active { background: var(--primary-light); }

.search-ico { position: relative; width: 16px; height: 16px; }
.search-ico::before {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 9px; height: 9px; border: 2px solid var(--primary);
  border-radius: 50%; box-sizing: border-box;
}
.search-ico::after {
  content: ''; position: absolute; top: 11px; left: 11px;
  width: 6px; height: 1.5px; background: var(--primary);
  transform: rotate(45deg); border-radius: 1px;
}

/* 搜索输入模式 */
.search-bar {
  display: flex; align-items: center; padding: 8px 10px;
  height: 44px; box-sizing: border-box; animation: slideIn .2s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

.search-input {
  flex: 1; height: 32px; background: #F5F5F5; border-radius: 16px;
  display: flex; align-items: center; padding: 0 32px 0 12px; position: relative;
}
.search-ico-sm { position: relative; width: 14px; height: 14px; margin-right: 8px; flex-shrink: 0; }
.search-ico-sm::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 8px; height: 8px; border: 1.5px solid var(--text-mute);
  border-radius: 50%; box-sizing: border-box;
}
.search-ico-sm::after {
  content: ''; position: absolute; top: 9px; left: 9px;
  width: 5px; height: 1.2px; background: var(--text-mute);
  transform: rotate(45deg); border-radius: 1px;
}
.search-input input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; color: var(--text); height: 32px; }
.search-input input::placeholder { color: var(--text-mute); }

.close-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 9px; background: #E0E0E0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
}
.close-btn:active { background: #E5E5E5; }
.close-btn::before, .close-btn::after {
  content: ''; position: absolute; width: 8px; height: 1.5px;
  background: var(--text-sub); border-radius: 1px;
}
.close-btn::before { transform: rotate(45deg); }
.close-btn::after { transform: rotate(-45deg); }

.search-go {
  margin-left: 8px; flex-shrink: 0; font-size: 13px; color: #fff; font-weight: 500;
  background: var(--primary); padding: 7px 16px; border-radius: 16px; cursor: pointer; line-height: 1;
}
.search-go:active { opacity: .85; }

/* ---------- 搜索结果提示 ---------- */
.notice {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--primary-light); border-radius: 6px;
  margin: 10px 10px 0; padding: 7px 10px; font-size: 13px; color: var(--primary);
}
.notice .more { color: var(--text-mute); font-size: 12px; cursor: pointer; }

/* ---------- 商品卡片 ---------- */
.product-card {
  position: relative; display: flex; background: var(--card);
  border-radius: 10px; padding: 12px; margin: 10px;
  cursor: pointer; transition: transform .12s;
}
.product-card:active { transform: scale(.99); background: #FAFAFA; }

.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 3px;
}
.badge-strategy { left: auto; right: 10px; background: var(--warning); }

.img-wrap {
  position: relative; width: 100px; height: 100px; flex-shrink: 0;
  border-radius: 6px; overflow: hidden; background: var(--primary-light);
}
.img-wrap .img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--primary); opacity: .5; font-size: 12px;
}

.info {
  flex: 1; margin-left: 12px; display: flex; flex-direction: column;
  min-width: 0; padding-right: 50px; position: relative;
}
.title {
  font-size: 15px; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.subtitle {
  margin-top: 4px; font-size: 12px; color: var(--text-mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.price-row { margin-top: 6px; display: flex; align-items: baseline; }
.price-label { font-size: 11px; color: var(--text-mute); margin-right: 4px; }
.price { font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1; }

.gift {
  margin-top: 6px; background: var(--primary-lighter);
  border: 1px solid var(--primary-border); border-radius: 4px;
  padding: 4px 6px; font-size: 11px; color: var(--primary);
  align-self: flex-start; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.tags { margin-top: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.tag { font-size: 10px; padding: 2px 5px; border-radius: 3px; background: #F0F0F0; color: var(--text-mute); }
.tag-success { background: var(--success-bg); color: var(--success); }
.tag-warning { background: var(--warning-bg); color: var(--warning); }
.tag-strategy { background: #FFF4ED; color: var(--primary); border: 1px solid #FFD9C6; }

.action {
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 14px; cursor: pointer; flex-shrink: 0;
}
.action:active { opacity: .85; }

.action-group {
  position: absolute; right: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 6px; z-index: 3;
}
.copy-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-mute); cursor: pointer; line-height: 1;
}
.copy-btn:active { opacity: .7; }

/* 加载状态 */
.loading, .finished { text-align: center; color: var(--text-mute); font-size: 13px; padding: 24px 0; }
.scroll-more { text-align: center; color: var(--text-mute); font-size: 12px; padding: 12px 0; }
.empty { text-align: center; color: var(--text-mute); font-size: 13px; padding: 50px 0; }

.loading-spinner {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 60vh; gap: 16px;
}
.loading-spinner p { font-size: 14px; color: #999; }
.spinner {
  width: 36px; height: 36px; border: 3px solid #F0F0F0;
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ---------- 排行页 ---------- */
.rank-page { padding: 8px 12px 80px; min-height: 100vh; }
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-bottom-hint {
  text-align: center; font-size: 15px; color: #555;
  padding: 24px 16px 12px; line-height: 1.7; cursor: pointer; font-weight: 500;
}
.rank-bottom-hint b { color: var(--primary); }
.rank-bottom-hint:active { color: var(--primary); }

.rank-search-notice {
  text-align: center; font-size: 12px; color: #AAA;
  padding: 8px 12px; background: #F5F5F5; margin: 0 0 8px; border-radius: 6px;
}
.rank-search-clear { color: var(--primary); cursor: pointer; padding: 2px 6px; }

.rank-card {
  display: flex; align-items: center; background: #fff;
  border-radius: 10px; padding: 10px; cursor: pointer; transition: box-shadow .15s;
}
.rank-card:active { box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }

.rank-num {
  width: 28px; height: 28px; border-radius: 6px; background: #F0F0F0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #666; flex-shrink: 0; margin-right: 10px;
}
.rank-1 { background: #FF3B30; color: #fff; }
.rank-2 { background: #FF6B35; color: #fff; }
.rank-3 { background: #FFB800; color: #fff; }

.rank-img-wrap {
  width: 86px; height: 86px; border-radius: 6px; overflow: hidden;
  background: #F5F5F5; flex-shrink: 0; margin-right: 10px; position: relative;
}
.rank-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-img-place {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; color: #CCC; font-size: 11px;
}
.rank-info {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  justify-content: space-between; height: 86px;
}
.rank-name {
  font-size: 14px; font-weight: 500; color: #333; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rank-bottom { display: flex; align-items: center; justify-content: space-between; }
.rank-price { font-size: 16px; font-weight: 700; color: var(--primary); }

.retry-btn { text-align: center; padding: 12px; margin-top: 16px; font-size: 14px; color: var(--primary); cursor: pointer; }

/* ---------- 底部 Tab ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; z-index: 50; padding-top: 4px;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .04);
}
.tab {
  flex: 1; text-align: center; padding: 6px 0 12px; cursor: pointer;
  color: #999; font-size: 12px; transition: color .15s; position: relative;
}
.tab-icon { font-size: 26px; display: block; line-height: 1.2; margin-bottom: 3px; transition: transform .15s; }
.tab.active { color: var(--primary); font-weight: 700; }
.tab.active .tab-icon { transform: translateY(-2px) scale(1.15); filter: drop-shadow(0 2px 3px rgba(216, 90, 69, .25)); }
.tab.active::after {
  content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 3px; background: var(--primary); border-radius: 0 0 3px 3px;
}

/* ---------- 外卖页 ---------- */
.takeout-page { padding: 0 12px 80px; min-height: 100vh; }
.takeout-tip {
  text-align: center; font-size: 12px; color: var(--primary);
  background: var(--primary-light); padding: 6px 16px; line-height: 1.4;
  margin: 0 -12px 10px;
}
.takeout-card { background: #fff; border-radius: 10px; padding: 14px; margin: 10px 0; }
.takeout-card-feature { background: linear-gradient(135deg, #FFF8F3 0%, #FFEFE5 100%); border: 1px solid #FFE0CC; }
.takeout-card-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 10px; }
.takeout-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; margin-top: 6px;
  background: #fff; border: 1px solid #FFE0CC; border-radius: 8px;
  text-decoration: none; color: #333; font-size: 13px; font-weight: 500; transition: all .15s;
}
.takeout-link:active { background: #FFF8F3; transform: scale(.98); }
.takeout-link-label { flex: 1; }
.takeout-link-arrow { color: var(--primary); font-size: 16px; font-weight: bold; }
.takeout-bottom-hint { text-align: center; font-size: 13px; color: #999; padding: 20px 16px 10px; line-height: 1.6; cursor: pointer; }
.takeout-bottom-hint:active { color: var(--primary); }

/* ---------- 我的页 ---------- */
.mine-page { padding: 0 12px 80px; min-height: 100vh; }
.mine-logo { text-align: center; padding: 20px 16px 12px; }
.mine-logo img { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 4px 12px rgba(216, 90, 69, .2); }
.mine-logo-text { font-size: 16px; font-weight: 700; color: var(--primary); margin-top: 8px; }

.menu { background: #fff; margin: 10px 0; border-radius: 10px; overflow: hidden; }
.menu-item {
  display: flex; align-items: center; padding: 14px 15px;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.mi-icon { font-size: 18px; margin-right: 10px; }
.mi-text { flex: 1; font-size: 15px; }
.mi-arrow { font-size: 15px; color: var(--text-mute); }

.contact-card {
  background: #fff; margin: 12px 0; padding: 20px 16px 16px;
  border-radius: 10px; text-align: center;
}
.contact-desc { font-size: 13px; color: #999; margin-bottom: 14px; }
.contact-qr {
  display: inline-block; padding: 8px; border-radius: 8px;
  background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.contact-qr img { width: 180px; height: 180px; display: block; }
.contact-tip { margin-top: 12px; font-size: 12px; color: #AAA; }

/* ---------- FAQ ---------- */
.faq-page { padding: 0 12px 40px; }
.faq-nav {
  background: var(--primary); display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 10px 12px; position: sticky; top: 0; z-index: 10;
}
.faq-list { background: #fff; border-radius: 10px; overflow: hidden; margin-top: 10px; }
.faq-item { border-bottom: 1px solid #F0F0F0; }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; cursor: pointer; font-size: 14px; font-weight: 500; color: #333;
}
.faq-q-text { flex: 1; }
.faq-arrow { font-size: 18px; color: #CCC; margin-left: 8px; transition: transform .2s; }
.faq-item.open .faq-arrow { transform: rotate(90deg); color: var(--primary); }
.faq-a { display: none; padding: 0 16px 16px; font-size: 13px; color: #666; line-height: 1.75; }
.faq-item.open .faq-a { display: block; }
.faq-a p { margin-bottom: 6px; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a b { color: var(--primary); }

/* ---------- 商品详情页 ---------- */
.detail-page { min-height: 100vh; padding-bottom: 70px; }
.detail-nav {
  background: var(--primary); display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 10px 12px; position: sticky; top: 0; z-index: 10;
}
.nav-back {
  justify-self: start; color: #fff; font-size: 14px; font-weight: 500;
  background: rgba(255, 255, 255, .22); padding: 6px 12px;
  border-radius: 16px; cursor: pointer; white-space: nowrap;
}
.nav-back:active { background: rgba(255, 255, 255, .35); }
.nav-title { color: #fff; font-size: 16px; font-weight: 600; text-align: center; justify-self: center; }

.detail-content { padding: 12px; }
.detail-img-wrap {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  background: #FFF4ED; border-radius: 8px; overflow: hidden;
  margin-bottom: 12px; display: flex; align-items: center; justify-content: center;
  cursor: zoom-in;
}
.detail-img-wrap .img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-placeholder-lg { color: var(--primary); opacity: .5; font-size: 14px; }
.detail-img-badge {
  position: absolute; top: 8px; left: 8px; background: var(--primary);
  color: #fff; font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 10px;
}

.detail-info-card { background: #fff; border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.detail-title { font-size: 17px; font-weight: 600; line-height: 1.4; }
.detail-subtitle { margin-top: 6px; font-size: 13px; color: var(--text-mute); }
.detail-price-row { margin-top: 10px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.detail-price { font-size: 26px; font-weight: 700; color: var(--primary); line-height: 1; }
.gift-chip { background: #FFF4ED; color: var(--primary); font-size: 11px; padding: 2px 6px; border-radius: 3px; }
.detail-tags { margin-top: 10px; display: flex; gap: 4px; flex-wrap: wrap; }

.section-title {
  display: flex; align-items: center; gap: 6px;
  margin: 12px 0 8px; font-size: 14px; font-weight: 500;
}
.section-bar { width: 4px; height: 14px; background: var(--primary); border-radius: 2px; }
.section-title .section-action {
  margin-left: auto; font-size: 12px; color: var(--primary);
  background: #FFF4ED; padding: 3px 8px; border-radius: 6px; cursor: pointer;
}

.addon-img-wrap { background: #fff; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.addon-img { width: 100%; display: block; cursor: zoom-in; object-fit: contain; }

.guide-card { background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.guide-line { font-size: 13px; line-height: 1.75; white-space: pre-wrap; word-break: break-all; }
.guide-line-empty { min-height: 7px; }
.guide-link { color: var(--primary); text-decoration: underline; word-break: break-all; cursor: pointer; }
.guide-link:active { opacity: .65; }

.copy-tip {
  margin: -4px 0 12px; padding: 8px 12px;
  background: var(--primary-light); border-radius: 8px;
  font-size: 12px; color: var(--primary); line-height: 1.5;
}

.tip-card { background: #FFF4ED; border-radius: 8px; padding: 10px 12px; margin-top: 12px; }
.tip-title { font-size: 12px; color: var(--primary); font-weight: 500; margin-bottom: 4px; }
.tip-text { font-size: 12px; color: #5C3A2E; line-height: 1.6; }

.detail-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff; border-top: 1px solid #F0F0F2;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 8px; z-index: 10;
}
.footer-btn {
  flex: 1; text-align: center; font-size: 14px; font-weight: 500;
  padding: 11px 0; border-radius: 22px; cursor: pointer;
}
.footer-btn:active { opacity: .85; }
.footer-btn-primary { background: var(--primary); color: #fff; }

/* ---------- 好物详情页 ---------- */
.rank-detail-page { min-height: 100vh; padding-bottom: 20px; }
.rank-detail-nav {
  background: var(--primary); padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
  position: sticky; top: 0; z-index: 10;
}
.rank-detail-nav .nav-back {
  font-size: 14px; padding: 4px 10px; border-radius: 14px;
  background: rgba(255, 255, 255, .2); flex-shrink: 0; justify-self: auto;
}
.rank-detail-nav .nav-title.center { flex: 1; margin-right: 64px; justify-self: auto; }

.rank-detail-fail { display: flex; flex-direction: column; align-items: center; padding: 60px 20px; text-align: center; }
.fail-icon { font-size: 48px; margin-bottom: 16px; }
.fail-title { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 8px; }
.fail-desc { font-size: 14px; color: #999; margin-bottom: 24px; line-height: 1.5; }
.fail-actions { display: flex; gap: 10px; }
.fail-btn { padding: 10px 24px; border-radius: 20px; font-size: 14px; font-weight: 500; cursor: pointer; background: #F5F5F5; color: #666; }
.fail-btn.primary { background: var(--primary); color: #fff; }
.fail-btn:active { opacity: .8; }

.rd-carousel-wrap { position: relative; background: #fff; }
.rd-carousel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
}
.rd-carousel::-webkit-scrollbar { display: none; }
.rd-carousel-item {
  flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center; background: #F5F5F5;
}
.rd-carousel-item img { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.rd-carousel-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0; background: #fff; }
.rd-dot { width: 6px; height: 6px; border-radius: 3px; background: #DDD; cursor: pointer; transition: all .2s; }
.rd-dot.active { width: 16px; background: var(--primary); }

.rd-info-card { background: #fff; border-radius: 10px; margin: 10px 12px; padding: 14px; }
.rd-title { font-size: 16px; font-weight: 600; color: #333; line-height: 1.5; }
.rd-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.rd-price-label { font-size: 13px; color: #999; }
.rd-price-val { font-size: 24px; font-weight: 700; color: var(--primary); }
.rd-shop-row, .rd-time-row { display: flex; gap: 8px; font-size: 13px; color: #666; margin-top: 6px; }
.rd-shop-label, .rd-time-label { color: #999; flex-shrink: 0; }

.rd-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rd-section-title span { font-size: 15px; font-weight: 600; color: #333; }
.rd-copy-btn {
  font-size: 12px; color: var(--primary); border: 1px solid var(--primary);
  border-radius: 12px; padding: 4px 12px; cursor: pointer;
}
.rd-copy-btn:active { opacity: .7; }
.rd-content-text { background: #FFF8F3; border-radius: 8px; padding: 12px; font-size: 13px; line-height: 1.6; }
.rd-content-line { word-break: break-all; }
.rd-content-empty { height: 8px; }

.rd-material-flow { display: flex; flex-direction: column; gap: 10px; }
.rd-material-img { border-radius: 6px; overflow: hidden; cursor: pointer; background: #F5F5F5; }
.rd-material-img img { width: 100%; display: block; }
.rd-material-fallback { padding: 40px 20px; text-align: center; color: #999; font-size: 13px; }
.rd-material-text { font-size: 14px; color: #333; line-height: 1.6; background: #FFF8F3; border-radius: 6px; padding: 10px 12px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.8);
  background: rgba(0, 0, 0, .75); color: #fff;
  font-size: 13px; padding: 10px 20px; border-radius: 6px;
  z-index: 9999; opacity: 0; transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------- 图片大图预览 ---------- */
.img-preview-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .92);
  z-index: 9998; display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; overflow: auto; -webkit-overflow-scrolling: touch;
}
.img-preview-img {
  max-width: 92vw; max-height: 92vh; object-fit: contain;
  transform-origin: center center; transition: transform .15s ease;
  cursor: zoom-in; user-select: none; -webkit-user-drag: none;
}

/* 分类加载状态 */
.cat-loading, .cat-error, .cat-empty { padding: 16px 20px; font-size: 13px; color: var(--text-mute); text-align: center; }
.cat-error { color: var(--primary); }
