/* ==========================================================================
   style-v32-flash-deal-info — 活力橙主题 · 大圆角 · 柔和阴影
   v32 flash-deal info-flow H5 template
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #FF5722;
  --primary-deep: #E64A19;
  --primary-light: #FFB199;
  --primary-2: #FF9800;
  --bg: #FFF8F5;
  --bg-card: #FFFFFF;
  --bg-soft: #FFE9DD;
  --bg-soft-2: #FFF3EB;
  --line: #F0E8E0;
  --line-light: #FAF5F0;
  --text: #222222;
  --text-light: #888888;
  --text-muted: #B5B5B5;
  --warn: #FF3B30;
  --warn-deep: #D32F2F;
  --gold: #FFD600;
  --shadow: 0 2px 16px rgba(255, 87, 34, .10);
  --shadow-hover: 0 6px 24px rgba(255, 87, 34, .18);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, .06);
  --shadow-strong: 0 8px 32px rgba(255, 87, 34, .22);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 999px;
  --tab-h: 52px;
  --header-h: 52px;
  --content-pb: calc(80px + env(safe-area-inset-bottom));
  --tx-fast: .15s ease;
  --tx: .25s ease;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body { padding-bottom: var(--content-pb); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; outline: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* ---------- Top Search Bar (sticky, search only) ---------- */
.searchbar {
  position: sticky;
  top: 0;
  z-index: 99;
  background: var(--bg);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.searchbar input {
  flex: 1;
  height: 36px;
  border-radius: 18px;
  padding: 0 16px 0 38px;
  background: var(--bg-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>") no-repeat 14px center;
  background-size: 14px 14px;
  font-size: 13px;
  color: var(--text);
  border: none;
  transition: background var(--tx-fast);
}
.searchbar input::placeholder { color: var(--text-muted); }
.searchbar input:focus { background-color: #fff; box-shadow: inset 0 0 0 1.5px var(--primary); }
.searchbar button {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 87, 34, .35);
  transition: transform var(--tx-fast), box-shadow var(--tx-fast);
}
.searchbar button:active { transform: scale(.92); }
.searchbar .msg-link {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  background: var(--bg-soft);
  flex-shrink: 0;
}
.searchbar .msg-link .dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--warn);
  border-radius: 50%;
  border: 1.5px solid var(--bg);
}

/* ---------- Notice Strip ---------- */
.notice {
  background: linear-gradient(90deg, #FF5722, #FF9800);
  color: #fff;
  text-align: center;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}
.notice::before {
  content: "📣";
  font-size: 12px;
}
.notice-marquee {
  display: inline-block;
  animation: marquee 18s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(20%); }
  100% { transform: translateX(-100%); }
}

/* ---------- Flash Banner (限时秒杀) ---------- */
.flash-banner {
  background: linear-gradient(90deg, #FF3B30, #FF5722);
  color: #fff;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}
.flash-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .18) 50%, transparent 70%);
  animation: shine 2.6s linear infinite;
  pointer-events: none;
}
@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.flash-tag {
  background: var(--gold);
  color: #222;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.flash-banner .clock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
}
.flash-banner .clock span {
  background: #000;
  color: #fff;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  min-width: 22px;
  text-align: center;
}
.flash-banner .clock i {
  font-style: normal;
  color: #fff;
  font-weight: 800;
}

/* ---------- Banner / Hero ---------- */
.banner { padding: 8px 12px; }
.banner img {
  width: 100%;
  border-radius: var(--radius-lg);
  display: block;
  box-shadow: var(--shadow);
}
.banner-swiper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.banner-swiper .dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 2;
}
.banner-swiper .dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  transition: width var(--tx);
}
.banner-swiper .dots i.on { width: 18px; background: #fff; border-radius: 3px; }

/* ---------- Quick Categories (horizontal scroll) ---------- */
.quick-cats {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 14px 12px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.quick-cats::-webkit-scrollbar { display: none; }
.quick-cats a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 54px;
  text-decoration: none;
  color: var(--text);
  font-size: 11px;
  scroll-snap-align: start;
  flex-shrink: 0;
}
.quick-cats i {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform var(--tx-fast), background var(--tx-fast);
}
.quick-cats a:active i { transform: scale(.92); }
.quick-cats a.hot i {
  background: linear-gradient(135deg, #FFB199, var(--primary));
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 87, 34, .3);
}
.quick-cats a span { white-space: nowrap; }

/* ---------- Section Title ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px 8px;
}
.section-head h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-head h3::before {
  content: "";
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border-radius: 2px;
}
.section-head .more {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 2px;
}
.section-head .more::after {
  content: "›";
  font-size: 14px;
}

/* ---------- Info Flow (single column) ---------- */
.info-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 12px 12px;
}
.info-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform var(--tx-fast), box-shadow var(--tx);
  position: relative;
}
.info-card:active { transform: scale(.98); }
.info-card:hover { box-shadow: var(--shadow-hover); }

.info-img {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 70%;
  background: var(--bg-soft);
  overflow: hidden;
}
.info-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.info-card:hover .info-img img { transform: scale(1.04); }

.info-info { padding: 12px 14px 14px; }
.info-title {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.info-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.info-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  line-height: 1.5;
}
.info-tag.t-hot { background: rgba(255, 87, 34, .12); color: var(--primary); }
.info-tag.t-new { background: rgba(76, 175, 80, .12); color: #2E7D32; }
.info-tag.t-sale { background: rgba(255, 152, 0, .15); color: #E65100; }
.info-tag.t-free { background: rgba(33, 150, 243, .12); color: #1565C0; }

.info-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.info-price {
  color: var(--primary);
  font-size: 22px;
  font-weight: 800;
  font-family: -apple-system, "Helvetica Neue", sans-serif;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.info-price::before {
  content: "¥";
  font-size: 13px;
  font-weight: 700;
}
.info-orig {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: line-through;
  font-weight: 500;
}
.info-sold {
  font-size: 11px;
  color: var(--text-light);
  margin-left: auto;
}
.info-discount {
  background: var(--bg-soft);
  color: var(--primary-deep);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.info-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.info-meta .left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-meta .left .shop {
  display: flex;
  align-items: center;
  gap: 3px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.info-buy {
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(255, 87, 34, .35);
  transition: transform var(--tx-fast), box-shadow var(--tx-fast);
  letter-spacing: .5px;
}
.info-buy:active { transform: scale(.94); }

/* ---------- Card Badges (corner labels) ---------- */
.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #FF3B30, #FF5722);
  color: #fff;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(255, 59, 48, .4);
  letter-spacing: .5px;
}
.card-badge.b-new { background: linear-gradient(135deg, #00C853, #00E676); box-shadow: 0 2px 8px rgba(0, 200, 83, .35); }
.card-badge.b-hot { background: linear-gradient(135deg, #FF3B30, #FF5722); }
.card-badge.b-sale { background: linear-gradient(135deg, #FF6D00, #FF9100); box-shadow: 0 2px 8px rgba(255, 109, 0, .4); }
.card-badge.b-recommend { background: linear-gradient(135deg, #FF9800, #FFB74D); }

.card-ribbon {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
  backdrop-filter: blur(4px);
}

.card-progress {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  z-index: 2;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
}
.card-progress .bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, .25);
  border-radius: 2px;
  overflow: hidden;
}
.card-progress .bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #FFD600, #FF9800);
  border-radius: 2px;
}

/* ---------- Coupon Strip ---------- */
.coupon-strip {
  display: flex;
  gap: 8px;
  padding: 4px 12px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.coupon-strip::-webkit-scrollbar { display: none; }
.coupon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #FFE9DD, #FFF3EB);
  border: 1px dashed var(--primary-light);
  border-radius: var(--radius);
  padding: 6px 10px;
  min-width: 150px;
  position: relative;
  overflow: hidden;
}
.coupon::before, .coupon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--bg);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}
.coupon::before { left: -4px; }
.coupon::after { right: -4px; }
.coupon .amt {
  color: var(--primary);
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: baseline;
}
.coupon .amt::before { content: "¥"; font-size: 11px; margin-right: 1px; }
.coupon .req {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 1px;
}
.coupon .claim {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  margin-left: auto;
  border: none;
}

/* ---------- FAB (Floating Support Button) ---------- */
.fab-support {
  position: fixed;
  bottom: calc(var(--tab-h) + 18px);
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF9800, #FF5722);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 6px 20px rgba(255, 87, 34, .4);
  z-index: 90;
  text-decoration: none;
  transition: transform var(--tx-fast);
  border: 2px solid #fff;
}
.fab-support:active { transform: scale(.9); }
.fab-support::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 87, 34, .35);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.fab-top {
  position: fixed;
  bottom: calc(var(--tab-h) + 76px);
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 89;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity var(--tx), transform var(--tx);
  backdrop-filter: blur(8px);
}
.fab-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---------- Bottom Tab Bar (fixed) ---------- */
.bottom-tab {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  display: flex;
  z-index: 100;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .04);
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0 6px;
  font-size: 11px;
  color: var(--text-light);
  text-decoration: none;
  gap: 2px;
  position: relative;
  transition: color var(--tx-fast);
}
.tab-item.active { color: var(--primary); }
.tab-item.active .tab-icon {
  transform: scale(1.08);
}
.tab-item.active::before {
  content: "";
  position: absolute;
  top: 4px;
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}
.tab-icon {
  font-size: 22px;
  line-height: 1;
  transition: transform var(--tx-fast);
}
.tab-item.center {
  margin-top: -14px;
}
.tab-item.center .tab-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 6px 16px rgba(255, 87, 34, .45);
  border: 3px solid #fff;
}
.tab-item.center.active::before { display: none; }

/* ---------- Detail Overlay (SPA modal) ---------- */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 200;
  display: none;
  align-items: flex-end;
  -webkit-overflow-scrolling: touch;
}
.detail-overlay.show { display: flex; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.detail-box {
  background: #fff;
  width: 100%;
  max-height: 90vh;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  padding-bottom: 80px;
  animation: slideUp .3s ease;
  position: relative;
}
.detail-handle {
  width: 36px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  margin: 8px auto 0;
}
.detail-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.detail-header h4 { font-size: 15px; font-weight: 700; }
.detail-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--text);
}
.detail-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: var(--bg-soft);
  display: block;
}
.detail-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.detail-thumbs::-webkit-scrollbar { display: none; }
.detail-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--bg-soft);
  padding: 0;
  overflow: hidden;
  transition: border-color var(--tx-fast);
}
.detail-thumb.active { border-color: var(--primary); }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.detail-info { padding: 16px; }
.detail-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text);
}
.detail-sales {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  background: linear-gradient(90deg, var(--bg-soft), var(--bg-soft-2));
  border-radius: var(--radius);
}
.detail-price {
  color: var(--primary);
  font-size: 28px;
  font-weight: 800;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.detail-price::before {
  content: "¥";
  font-size: 16px;
}
.detail-orig {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: line-through;
}
.detail-stock {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-light);
  background: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.detail-section { margin-bottom: 16px; }
.detail-section h5 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.spec-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.spec-btn {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  transition: all var(--tx-fast);
  min-width: 60px;
}
.spec-btn:active { transform: scale(.96); }
.spec-btn.active {
  border-color: var(--primary);
  background: var(--bg-soft);
  color: var(--primary);
  font-weight: 700;
}
.spec-btn.disabled {
  color: var(--text-muted);
  background: var(--bg-soft);
  cursor: not-allowed;
  text-decoration: line-through;
}
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.qty-stepper button {
  width: 32px;
  height: 32px;
  border: none;
  background: #fff;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
}
.qty-stepper button:active { background: var(--bg-soft); }
.qty-stepper input {
  width: 44px;
  height: 32px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 600;
}

.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 12px 0;
}
.detail-tabs a {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: var(--text-light);
  position: relative;
}
.detail-tabs a.on { color: var(--primary); font-weight: 700; }
.detail-tabs a.on::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
.detail-content { padding: 0 16px; }
.detail-content img { max-width: 100%; border-radius: var(--radius); margin: 8px 0; }
.detail-content p { font-size: 13px; line-height: 1.8; color: var(--text); margin-bottom: 8px; }

/* ---------- Detail CTA (fixed bottom buttons) ---------- */
.detail-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  z-index: 201;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.detail-cta .icon-btn {
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-light);
  background: transparent;
  border: none;
  gap: 2px;
  cursor: pointer;
}
.detail-cta .icon-btn i { font-size: 18px; }
.btn-add-cart {
  flex: 1;
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 12px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--tx-fast);
}
.btn-add-cart:active { background: var(--bg-soft); }
.btn-buy-now {
  flex: 1.4;
  background: linear-gradient(135deg, #FF9800, #FF5722);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 87, 34, .35);
  transition: transform var(--tx-fast), box-shadow var(--tx-fast);
  letter-spacing: .5px;
}
.btn-buy-now:active { transform: scale(.98); }

/* ---------- Pay Options ---------- */
.pay-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.pay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  background: #fff;
  transition: all var(--tx-fast);
}
.pay-option.selected {
  border-color: var(--primary);
  background: var(--bg-soft);
  box-shadow: 0 2px 8px rgba(255, 87, 34, .12);
}
.pay-option:active { transform: scale(.99); }
.pay-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  background: #fff;
  transition: border-color var(--tx-fast);
}
.pay-option.selected .pay-radio {
  border-color: var(--primary);
  background: var(--primary);
}
.pay-option.selected .pay-radio::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}
.pay-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}
.pay-logo.alipay { background: #1677FF; }
.pay-logo.wechat { background: #07C160; }
.pay-logo.union { background: #E60012; }
.pay-logo.cloud { background: linear-gradient(135deg, #FF9800, #FF5722); }
.pay-info { flex: 1; min-width: 0; }
.pay-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.pay-sub {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}
.pay-tag {
  font-size: 10px;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 600;
  flex-shrink: 0;
  background: #fff;
}
.pay-tag.recommend {
  background: var(--primary);
  color: #fff;
}

/* ---------- Site Footer ---------- */
.site-footer {
  background: #fff;
  padding: 24px 12px 100px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  margin-bottom: 16px;
  font-size: 12px;
}
.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  padding: 4px 12px;
  position: relative;
}
.footer-links a:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 10px;
  background: var(--line);
}
.footer-info {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.8;
}
.footer-info p { margin: 2px 0; }

/* ---------- Secondary Pages (about/contact/service) ---------- */
.page-content {
  padding: 16px;
  padding-bottom: 80px;
}
.page-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.page-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border-radius: 2px;
}
.page-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 8px;
}
.page-text:last-child { margin-bottom: 0; }

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-soft);
  border-radius: var(--radius);
}
.contact-item i {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.contact-item .label { font-size: 11px; color: var(--text-light); }
.contact-item .value { font-size: 14px; font-weight: 600; color: var(--text); }

/* ---------- Empty / Loading / Toast ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.empty-state .ico {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: .4;
}
.empty-state p { font-size: 13px; }

.loading {
  display: flex;
  justify-content: center;
  padding: 24px;
  gap: 4px;
}
.loading span {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: bounce 1.2s ease-in-out infinite;
}
.loading span:nth-child(2) { animation-delay: .15s; }
.loading span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40% { transform: translateY(-8px); opacity: 1; }
}

/* ============================================================
 * Toast — iOS 风格顶部下拉提示(不挡内容)
 * ============================================================ */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translate(-50%, -16px);
  background: rgba(0, 0, 0, .85);
  color: #fff;
  padding: 10px 18px 10px 14px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  max-width: 80%;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  line-height: 1;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast::before {
  content: '✓';
  font-size: 14px;
  font-weight: 700;
  color: #4CAF50;
}

/* ---------- Skeleton (loading placeholder) ---------- */
.skeleton {
  background: linear-gradient(90deg, #f0e8e0 25%, #faf5f0 50%, #f0e8e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Responsive: PC 居中适配 ---------- */
@media (min-width: 641px) {
  body {
    background: var(--bg-soft);
  }
  body > * {
    max-width: 375px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    background: var(--bg);
    min-height: 100vh;
  }
  .bottom-tab,
  .fab-support,
  .fab-top {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 375px;
  }
  .fab-support,
  .fab-top {
    transform: translateX(calc(-50% + 167px));
  }
  .detail-overlay .detail-box,
  .detail-overlay .detail-cta {
    max-width: 375px;
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
  }
  .detail-overlay {
    align-items: center;
  }
  .detail-box {
    border-radius: 20px;
    max-height: 85vh;
  }
  .detail-overlay {
    background: rgba(0, 0, 0, .55);
  }
}

/* ---------- Print ---------- */
@media print {
  .bottom-tab, .fab-support, .fab-top, .searchbar, .notice { display: none !important; }
  body { background: #fff; padding: 0; }
  .info-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}

/* ==========================================================================
   iPhone SE 375x667 溢出修复补丁 (2026-08-29 sautumn.asia)
   集中在 @media (max-width: 380px) 段,避免散落多处
   触发条件:scrollWidth > 375
   修复目标:.notice / .notice-text / .quick-cats / .flash-banner 4 处
   ========================================================================== */
@media (max-width: 380px) {
  /* 1. 公告条:超出视宽的滚动文字截断(子元素必须有 max-width + 溢出处理) */
  .notice {
    max-width: 100vw;
    overflow: hidden;
  }
  .notice-text {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
  }
  .notice-ico { flex-shrink: 0; }

  /* 2. 限时秒杀条:flex 子元素必须 min-width:0 才能在 flex 中正确收缩 */
  .flash-banner {
    max-width: 100vw;
    overflow: hidden;
  }
  .flash-banner > * { min-width: 0; }
  .flash-banner .flash-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
  }
  .flash-banner .flash-timer { flex-shrink: 0; }
  .flash-banner .flash-tag { flex-shrink: 0; }

  /* 3. 快捷分类:横向滚动条本身要约束,不撑破 body */
  .quick-cats {
    max-width: 100vw;
    overflow-x: auto;
  }

  /* 4. 兜底:任何 body 直接子元素不能超出视宽 */
  body > * { max-width: 100vw; }
}

/* ==========================================================================
   sautumn.asia UI 修复补丁 (2026-08-29)
   修:详情弹窗挤压 + sheet 全宽 + tabs/tabs/尺码/按钮布局 + 5 处核心 UI 问题
   触发:用户原话「界面 UI 设计很丑,点商品购买本来手机界面就够小了,你再缩小界面」
   ========================================================================== */

/* 1. Modal 蒙层 — fixed 全屏,默认隐藏,.show 才显 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}
.modal-mask.show { display: flex; animation: fadeInModal .25s ease; }
@keyframes fadeInModal { from { opacity: 0; } to { opacity: 1; } }

/* 2. Modal 主体 — 关键修复:width:100vw + max-width:100% + 不让 body 收缩 */
.modal-sheet {
  position: relative;
  background: #fff;
  width: 100vw;
  max-width: 100vw;
  min-height: 60vh;
  max-height: 90vh;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 96px;
  animation: slideUpModal .3s ease;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto;
}
@keyframes slideUpModal { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* 3. Sheet head — sticky 顶部栏 + 关闭按钮右上角圆形 */
.sheet-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.sheet-title {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}
.sheet-close:active { background: var(--bg-soft-2); }

/* 4. Sheet body — 详情内容区,16px 内边距不挤掉图片 */
.sheet-body {
  padding: 0;
  background: #fff;
}

/* 5. Detail head — 商品大图区,关键修复:padding:0 让图占满宽度 */
.detail-head {
  position: relative;
  padding: 0;
  margin: 0;
  background: var(--bg-soft);
}
.prod-img {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: var(--bg-soft);
}
.detail-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin: 16px 16px 8px;
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", serif;
}

/* 6. Detail 区块 — 通用块,16px padding + 块标题 */
.detail-block {
  margin: 0 16px 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
}
.block-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
}
.block-hint {
  font-size: 11px;
  color: var(--text-light);
  margin: 8px 0 0;
  line-height: 1.5;
}

/* 7. 尺码 chip — 横向 5 个等宽 */
.size-list {
  display: flex;
  gap: 8px;
}
.size-chip {
  flex: 1;
  height: 38px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  transition: all var(--tx-fast);
}
.size-chip:active { transform: scale(.96); }
.size-chip.active {
  border-color: var(--primary);
  background: var(--bg-soft);
  color: var(--primary);
}

/* 8. 数量 +/- */
.qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.qty-btn:active { background: var(--bg-soft); }
.qty-num {
  min-width: 32px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.qty-total {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-light);
}
.qty-total b {
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
  margin-left: 4px;
}

/* 9. Detail tabs — 描述/规格/评价/答疑 4 项,横滑滚动兜底 */
.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.detail-tabs::-webkit-scrollbar { display: none; }
.dtab {
  flex: 1;
  min-width: 64px;
  text-align: center;
  padding: 10px 8px;
  font-size: 13px;
  color: var(--text-light);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
.dtab.on {
  color: var(--primary);
  font-weight: 700;
  border-bottom-color: var(--primary);
}

.detail-pane {
  display: none;
  padding: 0 16px 16px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
}
.detail-pane.active { display: block; }
.detail-pane img { max-width: 100%; border-radius: var(--radius); margin: 8px 0; }

/* 10. Sheet actions — 关键修复:fixed 底部 + flex 50% + 大圆角橙色 */
.sheet-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 210;
  display: flex;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
}
.btn-addcart,
.btn-buynow {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  padding: 0;
  line-height: 44px;
  transition: transform var(--tx-fast), opacity var(--tx-fast);
}
.btn-addcart:active, .btn-buynow:active { transform: scale(.98); }

.btn-addcart {
  background: var(--bg-soft);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-buynow {
  background: linear-gradient(135deg, #FF9800, #FF5722);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 87, 34, .35);
  flex: 1.3;
}

/* 11. Cart sheet — 购物车抽屉 */
.cart-sheet {
  min-height: 50vh;
}
.cart-body {
  padding: 12px 16px;
  max-height: 60vh;
  overflow-y: auto;
}
.cart-foot {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-total {
  flex: 1;
  font-size: 13px;
  color: var(--text-light);
}
.cart-total b {
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
  margin-left: 6px;
}
.cart-foot .btn-buynow {
  flex: 0 0 auto;
  width: 120px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  line-height: 44px;
}

/* 12. Toast */


/* 13. PC 端弹窗居中 — 大屏不顶天立地 */
@media (min-width: 768px) {
  .modal-mask { align-items: center; }
  .modal-sheet {
    max-width: 420px;
    border-radius: var(--radius-xl);
    margin: auto;
    max-height: 85vh;
  }
  .sheet-actions {
    position: sticky;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  }
}

/* ============================================================
 * v32 第 3 次修正 — 2026-08-30
 * A) quick-cats: emoji 圆块 -> 真实商品图圆形封面
 * B) categories.html: 2 列类目网格
 * C) search.html: 大搜索框 + 热搜词 + 历史 + 结果
 * ============================================================ */

/* A) quick-cats — 真实商品图圆形封面 */
.quick-cats .cat-cover {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(255, 87, 34, .12);
  border: 2px solid #fff;
  transition: transform var(--tx-fast), box-shadow var(--tx-fast);
}
.quick-cats a:active .cat-cover { transform: scale(.92); }
.quick-cats .cat-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.quick-cats .cat-name {
  font-size: 11px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.2;
}
/* 兼容:旧的 emoji i 标签若存在,继续兜底 */
.quick-cats i {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 3px 10px rgba(255, 87, 34, .12);
  border: 2px solid #fff;
  transition: transform var(--tx-fast);
}
.quick-cats a:active i { transform: scale(.92); }

/* B) Categories Page — 2 列类目网格 */
.cats-page .cats-topbar {
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  padding: 8px 12px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line-light);
}
.cats-page .cats-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 4px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cats-page .cats-title::before {
  content: "📑";
  font-size: 18px;
}
.cats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px;
}
.cat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform var(--tx-fast), box-shadow var(--tx);
  position: relative;
}
.cat-card:active { transform: scale(.98); }
.cat-card:hover { box-shadow: var(--shadow-hover); }
.cat-card-cover {
  position: relative;
  width: 100%;
  padding-bottom: 100%;  /* 1:1 正方形 */
  background: var(--bg-soft);
  overflow: hidden;
}
.cat-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.cat-card:hover .cat-card-cover img { transform: scale(1.06); }
.cat-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.cat-card-info {
  padding: 10px 12px 12px;
}
.cat-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.cat-card-tag {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.cat-card-count {
  font-size: 11px;
  color: var(--text-muted);
}
.cat-card-count b {
  color: var(--primary);
  font-weight: 700;
}
.cat-card-enter {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.cat-card-enter::after { content: "›"; font-size: 14px; }

/* 单分类详情(进入分类后) */
.cat-detail-head {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  padding: 16px 12px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cat-detail-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .15) 50%, transparent 70%);
  animation: shine 2.6s linear infinite;
  pointer-events: none;
}
.cat-detail-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
  position: relative;
}
.cat-detail-tag {
  font-size: 12px;
  opacity: .92;
  position: relative;
}
.cat-back {
  position: absolute;
  left: 12px;
  top: 14px;
  color: #fff;
  font-size: 20px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  text-decoration: none;
}

/* C) Search Page */
.search-page .search-topbar {
  background: #fff;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line-light);
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-page .search-input-wrap { flex: 1; min-width: 0; }
.search-page .search-go { flex: 0 0 auto; padding: 8px 14px; font-size: 14px; }
.search-page .search-back { flex: 0 0 auto; padding: 6px 10px; }
.search-page .search-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.search-page .search-input-wrap {
  flex: 1;
  position: relative;
}
.search-page .search-input-wrap input {
  width: 100%;
  height: 40px;
  border-radius: 20px;
  padding: 0 16px 0 40px;
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  font-size: 14px;
  color: var(--text);
  transition: border-color var(--tx-fast), background var(--tx-fast);
}
.search-page .search-input-wrap input::placeholder { color: var(--text-muted); }
.search-page .search-input-wrap input:focus {
  background: #fff;
  border-color: var(--primary);
}
.search-page .search-input-wrap::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>") no-repeat center;
  background-size: 16px 16px;
  pointer-events: none;
}
.search-page .search-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(255, 87, 34, .35);
  transition: transform var(--tx-fast);
}
.search-page .search-btn:active { transform: scale(.96); }

.search-section {
  padding: 14px 12px 4px;
}
.search-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
  font-weight: 600;
}
.search-section-title .clear {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}
.search-hot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-hot-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 13px;
  border-radius: 18px;
  background: var(--bg-soft-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--tx-fast);
  line-height: 1;
}
.search-hot-chip:active { background: var(--bg-soft); transform: scale(.96); }
.search-hot-chip .rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.search-hot-chip.hot-1 .rank-num { background: #FF3B30; }
.search-hot-chip.hot-2 .rank-num { background: #FF9800; }
.search-hot-chip.hot-3 .rank-num { background: #FFC107; }

.search-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-history-chip {
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--line-light);
  color: var(--text-light);
  font-size: 13px;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.search-history-chip:active { background: var(--bg-soft); }

.search-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.search-empty .ico {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: .6;
}
.search-empty .hint {
  font-size: 13px;
  line-height: 1.6;
}
.search-empty .suggest {
  margin-top: 12px;
  display: inline-block;
  background: var(--bg-soft);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.search-results-head {
  font-size: 13px;
  color: var(--text-light);
  padding: 10px 12px;
  background: var(--bg-soft-2);
  border-bottom: 1px solid var(--line-light);
}
.search-results-head b { color: var(--primary); }

/* 复用 .info-flow / .info-card(已在前面) */
.search-page .info-flow {
  padding: 4px 12px 12px;
}


/* ============================================================
 * Categories 页 — 2 列类目网格
 * ============================================================ */
.cats-main {
  padding: 14px 14px 80px;
}
.cats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cat-card {
  display: block;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(255, 87, 34, .08);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
}
.cat-card-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft-2);
  overflow: hidden;
}
.cat-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
.cat-card-info {
  padding: 12px 14px 14px;
}
.cat-card-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.cat-card-tag {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
  min-height: 18px;
}
.cat-card-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* 返回按钮 */
.cat-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
  position: sticky;
  top: 56px;
  background: var(--bg);
  z-index: 5;
  border-bottom: 1px solid var(--line-light);
}
.cat-back {
  background: var(--bg-soft);
  border: none;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.cat-detail-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

/* ============================================================
 * Search 页 — 热搜 / 历史 / 推荐 chips
 * ============================================================ */
.search-cat-chip {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
  transition: background .15s ease;
}
.search-cat-chip:active {
  background: var(--primary);
  color: #fff;
}
.search-empty-ico {
  font-size: 48px;
  opacity: .6;
  margin-bottom: 12px;
}
.search-empty-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.search-empty-hint {
  font-size: 13px;
  color: var(--text-light);
}
.search-result-head {
  font-size: 13px;
  color: var(--text-light);
  padding: 14px 16px 8px;
  background: var(--bg);
  position: sticky;
  top: 56px;
  z-index: 4;
}
.search-result-head b { color: var(--primary); font-weight: 700; }


/* ============================================================
 * 分类详情头部 — 返回按钮 + 标题
 * ============================================================ */
.cat-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
  position: sticky;
  top: 56px;
  background: var(--bg);
  z-index: 5;
  border-bottom: 1px solid var(--line-light);
}
.cat-back-btn {
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 8px 14px;
  background: var(--bg-soft);
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.cat-detail-title {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ============================================================
 * 首页底部信息区(site-footer 加强)
 * ============================================================ */
.site-footer .footer-inner {
  max-width: 640px;
  margin: 0 auto;
}
.site-footer .site-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  text-align: center;
  letter-spacing: 0.5px;
}
.site-footer .site-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-light);
  margin: 0 0 14px;
  padding: 0 4px;
  text-align: justify;
}
.site-footer .footer-info {
  list-style: none;
  padding: 12px 0;
  margin: 0;
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
  font-size: 13px;
  color: var(--text-light);
}
.site-footer .footer-info li {
  padding: 6px 0;
  line-height: 1.5;
  text-align: center;
}
.site-footer .footer-info a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.site-footer .footer-icp {
  text-align: center;
  margin: 14px 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  background: var(--bg-soft);
  border-radius: 10px;
}
.site-footer .footer-icp::before {
  content: '🛡';
  font-size: 14px;
}
.site-footer .footer-icp a {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.site-footer .footer-copy {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  margin: 8px 0 0;
  opacity: 0.7;
}

/* ---------- Bottom Tab: 购物车 tab + 数字红点 ---------- */
.bottom-tab .tab-item .tab-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
  display: none;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.5px;
}
.bottom-tab .tab-item .tab-badge.show { display: block; }

/* 5 项 tab 时保持固定高度(不因 badge/icon 撑高) */
.bottom-tab .tab-item .tab-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
}
.bottom-tab {
  min-height: 56px;
}

/* 购物车抽屉为空时的居中提示 */
.cart-empty {
  text-align: center;
  color: var(--text-light);
  padding: 40px 20px;
  font-size: 13px;
}
.cart-empty .ce-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.6;
}
.cart-empty .ce-tip {
  display: block;
  margin-bottom: 16px;
}
.cart-empty .ce-go {
  display: inline-block;
  padding: 8px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
}


/* ============================================================
 * 购物车列表项(必须样式)
 * ============================================================ */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-light);
  position: relative;
}
.cart-item:last-child { border-bottom: none; }
.cart-item img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: #f5f5f5;
}
.ci-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 24px;
}
.ci-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ci-spec {
  font-size: 11px;
  color: var(--text-light);
}
.ci-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.ci-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}
.ci-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}
.ci-qty button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
.ci-qty button:active {
  background: var(--bg-soft);
}
.ci-qty span {
  min-width: 20px;
  text-align: center;
  font-weight: 600;
}
.ci-del {
  position: absolute;
  top: 8px;
  right: 0;
  width: 24px;
  height: 24px;
  background: var(--bg-soft);
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  color: var(--text-light);
  font-size: 16px;
  cursor: pointer;
}
.ci-del:hover { background: #ffe3e3; color: #ff3b30; }
