:root {
  --brand: #0e7490;
  --brand-dark: #155e75;
  --brand-soft: #ecfeff;
  --bg: #f4f8fa;
  --card: #fff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --price: #0e7490;
  --danger: #9b2f28;
  --danger-line: #c96a62;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
.topbar {
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
  font-size: 12px;
  color: #666;
}
.topbar-inner {
  max-width: 1190px;
  margin: 0 auto;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar span, .topbar a { margin-left: 14px; color: #666; }
.search-head {
  background: #fff;
  padding: 18px 0 12px;
  border-bottom: 2px solid var(--brand);
}
.search-inner {
  max-width: 1190px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo { flex: none; display: flex; align-items: center; gap: 8px; min-width: 140px; }
.logo-mark {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(145deg, #22d3ee, #0e7490);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}
.logo-text { font-size: 22px; font-weight: 800; color: var(--brand-dark); }
.logo-sub { font-size: 11px; color: #64748b; margin-top: 2px; }
.search-box { flex: 1; max-width: 620px; }
.search-row {
  display: flex;
  height: 40px;
  border: 2px solid var(--brand);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.search-row input {
  flex: 1; border: 0; outline: none; padding: 0 14px; font-size: 14px;
}
.search-row button {
  width: 88px; border: 0; background: var(--brand); color: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.search-row button:hover { background: var(--brand-dark); }
.hot-words {
  margin-top: 8px; font-size: 12px; color: #999;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.hot-words a:hover { color: var(--brand-dark); }
.nav-actions { display: flex; gap: 10px; flex: none; align-items: center; }
.nav-actions a, .nav-actions button {
  height: 36px; padding: 0 14px; border-radius: 4px;
  border: 1px solid #ddd; background: #fff; cursor: pointer;
  font-size: 13px; display: inline-flex; align-items: center;
}
.nav-actions a.active, .nav-actions button.active {
  border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft);
}
.cart-badge {
  background: var(--brand); color: #fff; border-radius: 10px;
  padding: 0 6px; margin-left: 6px; font-size: 11px;
}
.wrap { max-width: 1190px; margin: 0 auto; padding: 12px; }
.filter-bar {
  background: #fff; border: 1px solid #e6e6e6; margin-bottom: 12px;
  padding: 10px 14px; display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap; font-size: 13px;
}
.filter-bar .crumb b { color: var(--brand-dark); }
.meta { color: #999; font-size: 12px; }
.main-row {
  display: grid; grid-template-columns: 1fr 360px; gap: 12px; align-items: start;
}
@media (max-width: 980px) { .main-row { grid-template-columns: 1fr; } }
.grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.sku-card {
  background: var(--card); border: 1px solid transparent;
  transition: border-color .15s, box-shadow .15s; position: relative;
}
.sku-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 12px rgba(14,116,144,.16);
}
.sku-card.ad { outline: 1px solid #a5f3fc; }
.thumb {
  aspect-ratio: 1; background: #fafafa; display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.thumb-art {
  width: 72%; height: 72%; border-radius: 18px;
  display: grid; place-items: center; color: #fff;
  font-size: 42px; font-weight: 700;
  box-shadow: inset 0 0 40px rgba(0,0,0,.08);
}
.ad-tag {
  position: absolute; left: 8px; top: 8px;
  background: rgba(14,116,144,.78); color: #fff;
  font-size: 11px; padding: 2px 6px; border-radius: 2px; z-index: 2;
}
.info { padding: 10px 12px 14px; }
.price-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.price {
  color: var(--price); font-size: 20px; font-weight: 700;
  font-family: Arial, sans-serif;
}
.price small { font-size: 13px; font-weight: 700; }
.sales { color: #999; font-size: 12px; }
.title {
  font-size: 13px; line-height: 1.45; height: 38px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  margin: 0 0 8px;
}
.title em { font-style: normal; color: var(--brand-dark); font-weight: 600; margin-right: 4px; }
.shop-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #999;
}
.rating { color: var(--brand-dark); }
.chip {
  margin-top: 6px; font-size: 11px; color: #475569; background: #f1f5f9;
  display: inline-block; padding: 2px 6px; border-radius: 2px;
}
.charge {
  margin-top: 6px; font-size: 11px; color: #155e75; background: #ecfeff;
  display: inline-block; padding: 2px 6px; border-radius: 2px;
}
.ids { margin-top: 4px; font-size: 11px; color: #94a3b8; display: flex; justify-content: space-between; }
.algo-panel {
  background: #0f172a; color: #e2e8f0; border-radius: 6px;
  border: 1px solid #1e293b; position: sticky; top: 8px;
  max-height: calc(100vh - 24px); display: flex; flex-direction: column;
  overflow: hidden; font-family: "SF Mono", Consolas, monospace; font-size: 12px;
}
.algo-head {
  padding: 10px 12px; background: #155e75; color: #fff;
  display: flex; justify-content: space-between; align-items: center;
}
.algo-body { overflow-y: auto; padding: 8px 10px 14px; flex: 1; line-height: 1.45; }
.algo-step {
  border-left: 3px solid #334155; padding: 8px 10px; margin: 8px 0;
  background: #1e293b; border-radius: 0 4px 4px 0;
}
.algo-step.stage-organic { border-color: #22d3ee; }
.algo-step.stage-ads, .algo-step.stage-recall, .algo-step.stage-rank,
.algo-step.stage-diversity, .algo-step.stage-auction { border-color: #fbbf24; }
.algo-step.stage-mix { border-color: #a78bfa; }
.algo-step .title { color: #f8fafc; font-weight: 600; height: auto; display: block; }
.algo-step .formula { color: #67e8f9; margin-top: 4px; word-break: break-all; }
.algo-step .detail { color: #94a3b8; margin-top: 4px; word-break: break-word; }
.algo-empty { color: #64748b; padding: 24px 8px; text-align: center; }
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #34d399; margin-right: 6px;
}
.panel {
  background: #fff; border: 1px solid var(--line); padding: 20px; border-radius: 4px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 20px; border: 0; border-radius: 4px;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--brand-dark); border: 1px solid var(--brand); }
.btn:focus-visible, .create-product summary:focus-visible, .product-form input:focus-visible, .inline-edit input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.btn:active { background: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.sku-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.sku-opt {
  border: 1px solid #ddd; padding: 8px 12px; border-radius: 4px; cursor: pointer;
  font-size: 13px; background: #fff;
}
.sku-opt.on { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.sku-opt.disabled { opacity: .4; pointer-events: none; }
.detail-layout {
  display: grid; grid-template-columns: 420px 1fr; gap: 24px;
}
@media (max-width: 860px) { .detail-layout { grid-template-columns: 1fr; } }
.cart-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cart-table th, .cart-table td {
  border-bottom: 1px solid var(--line); padding: 12px 8px; text-align: left;
}
.qty-input { width: 64px; height: 32px; padding: 0 8px; }
.empty { text-align: center; padding: 48px; color: #999; background: #fff; }
.flash {
  background: #ecfeff; border: 1px solid #a5f3fc; color: #155e75;
  padding: 10px 14px; margin-bottom: 12px; border-radius: 4px;
}
.err {
  background: #fff; border: 1px solid #fcc; color: #c00; padding: 12px; margin-bottom: 12px;
}
.inline-form { display: inline; }
.link-btn { border: 0; background: none; color: #666; cursor: pointer; font-size: 12px; margin-left: 14px; padding: 0; }
.auth-card { max-width: 440px; margin: 44px auto; }
.stack-form { display: grid; gap: 16px; }
.stack-form label { display: grid; gap: 7px; font-size: 13px; color: var(--muted); }
.stack-form input { height: 42px; border: 1px solid var(--line); border-radius: 4px; padding: 0 12px; font-size: 14px; }
.text-link, .success { color: var(--brand-dark); }
.merchant-head { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 16px; }
.merchant-head h2 { margin: 0 0 4px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.stat { background: #fff; border: 1px solid var(--line); padding: 18px; display: grid; gap: 6px; }
.stat b { font-size: 22px; color: var(--brand-dark); }
.stat span { font-size: 12px; color: var(--muted); }
.merchant-section { margin-bottom: 12px; }
.merchant-section h3 { margin-top: 0; }
.metric-row { display: flex; flex-wrap: wrap; gap: 10px; }
.metric-row span { background: var(--brand-soft); padding: 6px 9px; font-size: 12px; }
.inline-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-edit label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; }
.inline-edit input { width: 88px; height: 44px; border: 1px solid var(--line); border-radius: 4px; padding: 0 8px; }
.inline-edit .btn, .sku-status-form .btn { min-height: 44px; padding: 0 14px; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.create-product { margin: 0 0 16px; background: #f8fafc; padding: 12px; }
.create-product summary { cursor: pointer; color: var(--brand-dark); font-weight: 600; }
.product-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.product-form label { display: grid; min-width: 0; gap: 6px; color: var(--muted); font-size: 12px; }
.product-form input { height: 44px; border: 1px solid var(--line); border-radius: 4px; padding: 0 9px; min-width: 0; }
.product-form .btn { align-self: end; min-height: 44px; }
.sku-status { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 9px; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sku-status--active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.sku-status--inactive { border-color: var(--line); background: var(--bg); color: var(--muted); }
.sku-action--off { border-color: var(--danger-line) !important; color: var(--danger) !important; }
.merchant-products-table code { font-size: 12px; color: var(--text); }
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .product-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .merchant-head { align-items: flex-start; gap: 12px; flex-direction: column; }
  .merchant-products-table thead { display: none; }
  .merchant-products-table, .merchant-products-table tbody, .merchant-products-table tr, .merchant-products-table td { display: block; width: 100%; }
  .merchant-products-table tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .merchant-products-table td { display: grid; grid-template-columns: minmax(92px, .35fr) minmax(0, 1fr); gap: 10px; border: 0; padding: 7px 0; }
  .merchant-products-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; }
  .merchant-products-table td.empty { display: block; }
  .merchant-products-table td.empty::before { content: none; }
}

/* ================= 蜂蜜首页封面 Hero ================= */
.hero {
  position: relative;
  margin-bottom: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(115deg, #431407 0%, #78350f 32%, #b45309 66%, #d97706 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(120, 53, 15, .25);
}
/* 蜂巢六边形纹理背景 */
.hero-honeycomb {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(circle at 25px 25px, rgba(255,255,255,.06) 2px, transparent 2.5px),
    radial-gradient(circle at 75px 75px, rgba(255,255,255,.05) 2px, transparent 2.5px);
  background-size: 100px 100px;
}
.hero-honeycomb::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,.35), transparent 65%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 20px;
  align-items: center;
  padding: 40px 44px 30px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(254, 243, 199, .16);
  border: 1px solid rgba(254, 243, 199, .4);
  color: #fde68a;
  font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 16px;
}
.hero-title {
  margin: 0 0 12px;
  font-size: 40px; line-height: 1.25; font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.hero-title span { color: #fbbf24; }
.hero-sub {
  margin: 0 0 22px;
  font-size: 15px; color: #fef3c7; letter-spacing: 2px;
}
.hero-cta { display: flex; gap: 12px; margin-bottom: 26px; }
.hero-cta a {
  height: 44px; padding: 0 28px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  transition: transform .15s, box-shadow .15s;
}
.cta-primary {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #451a03 !important;
  box-shadow: 0 4px 14px rgba(251, 191, 36, .4);
}
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(251,191,36,.55); }
.cta-ghost {
  border: 1.5px solid rgba(254, 243, 199, .55);
  color: #fef3c7 !important;
}
.cta-ghost:hover { background: rgba(254,243,199,.12); }
.hero-stats { display: flex; gap: 34px; }
.hero-stats .stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stats .stat b { font-size: 22px; color: #fbbf24; font-weight: 800; }
.hero-stats .stat span { font-size: 12px; color: rgba(254,243,199,.85); }

/* 右侧蜜罐视觉 */
.hero-art { position: relative; height: 250px; }
.honey-jar {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fde68a, #f59e0b 68%, #b45309);
  display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.3), inset 0 -10px 24px rgba(120,53,15,.4);
}
.jar-emoji { font-size: 92px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.3)); }
.jar-drip {
  position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 34px;
  background: linear-gradient(#f59e0b, #d97706);
  border-radius: 0 0 14px 14px;
  opacity: .95;
  animation: drip 2.6s ease-in-out infinite;
}
@keyframes drip {
  0%, 100% { height: 22px; opacity: .9; }
  50% { height: 38px; opacity: 1; }
}
.hex {
  position: absolute;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  font-size: 26px;
  background: rgba(254, 243, 199, .14);
  border: 1px solid rgba(254, 243, 199, .35);
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  animation: float 5s ease-in-out infinite;
}
.hex-1 { left: 8px; top: 16px; animation-delay: 0s; }
.hex-2 { left: 46px; bottom: 26px; width: 46px; height: 46px; font-size: 20px; animation-delay: 1.2s; }
.hex-3 { right: 8px; top: 8px; width: 44px; height: 44px; font-size: 18px; animation-delay: 2.1s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-price-tag {
  position: absolute; right: 10px; bottom: 8px;
  background: #fff; color: #78350f;
  border-radius: 10px; padding: 8px 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  transform: rotate(-3deg);
}
.pt-label { font-size: 11px; color: #b45309; }
.pt-price { font-size: 22px; font-weight: 800; color: #b45309; }
.pt-price small { font-size: 12px; font-weight: 600; }

/* 蜜种速选条 */
.hero-cats {
  position: relative;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 44px 18px;
  border-top: 1px solid rgba(254,243,199,.2);
}
.cats-label { font-size: 13px; color: #fde68a; font-weight: 700; margin-right: 6px; }
.hero-cats a {
  padding: 7px 16px; border-radius: 999px;
  background: rgba(254, 243, 199, .12);
  border: 1px solid rgba(254, 243, 199, .3);
  color: #fef3c7; font-size: 13px;
  transition: background .15s, transform .15s;
}
.hero-cats a:hover { background: rgba(251,191,36,.3); transform: translateY(-1px); }

/* 信任条 */
.trust-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 12px;
}
.trust-item {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; text-align: center;
  font-size: 14px; font-weight: 600; color: #78350f;
}
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding: 30px 24px 20px; }
  .hero-art { display: none; }
  .hero-title { font-size: 30px; }
  .hero-cats { padding: 12px 24px 16px; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
}
