/* 移动端 H5 样式（微信内置浏览器友好） */
* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    background: #f2f4f7;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}
.page { max-width: 640px; margin: 0 auto; padding: 12px 12px 28px; }

/* 顶部 */
.topbar {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 14px; border-radius: 12px;
    background: linear-gradient(135deg, #16a34a, #0d9488);
    color: #fff;
}
.topbar .logo {
    width: 40px; height: 40px; border-radius: 10px; flex: 0 0 40px; overflow: hidden;
    background: rgba(255,255,255,.22);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700;
}
.topbar .logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topbar-text h1 { margin: 0; font-size: 17px; font-weight: 600; }
.topbar-text p { margin: 0; font-size: 12px; opacity: .85; }

/* 卡片 */
.card {
    background: #fff; border-radius: 12px; padding: 16px; margin-top: 12px;
    box-shadow: 0 1px 3px rgba(16,24,40,.06);
}
.card-title {
    font-size: 15px; font-weight: 600; margin-bottom: 12px;
    padding-left: 9px; border-left: 3px solid #16a34a;
}

/* 顶部广告轮播 */
.slider {
    position: relative; max-width: 620px; margin: 0 auto;
    border-radius: 0 0 12px 12px; overflow: hidden;
    background: #e5e7eb; box-shadow: 0 1px 3px rgba(16,24,40,.06);
}
.slider .slides { display: flex; transition: transform .4s ease; }
.slider .slide { flex: 0 0 100%; }
.slider .slide img,
.slider .slide a { display: block; width: 100%; }
.slider .slide img { height: auto; aspect-ratio: 75 / 34; object-fit: cover; }
.slider .dots {
    position: absolute; left: 0; right: 0; bottom: 8px;
    display: flex; justify-content: center; gap: 6px;
}
.slider .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,.6);
}
.slider .dot.on { background: #fff; width: 14px; border-radius: 3px; }

/* 搜索 */
.search-card form { display: flex; gap: 8px; }
.search-card input {
    flex: 1; height: 42px; padding: 0 12px; font-size: 15px;
    border: 1px solid #d1d5db; border-radius: 8px; background: #f9fafb;
    outline: none;
}
.search-card input:focus { border-color: #16a34a; background: #fff; }
.search-card button {
    height: 42px; padding: 0 18px; border: 0; border-radius: 8px;
    background: #16a34a; color: #fff; font-size: 15px;
}
.tip { margin: 10px 0 0; font-size: 12px; color: #6b7280; }

/* 扫一扫按钮 */
.scan-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; height: 42px; margin-top: 10px;
    border: 1px solid #16a34a; border-radius: 8px;
    background: #fff; color: #16a34a; font-size: 15px; font-family: inherit;
}
.scan-btn:active { background: #f0fdf4; }
.scan-btn svg { width: 18px; height: 18px; }

/* 扫码浮层 */
.scan-mask { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: #000; z-index: 99; display: none; }
.scan-mask video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.scan-mask canvas { display: none; }
.scan-frame {
    position: absolute; left: 50%; top: 42%;
    width: 66vw; height: 66vw; max-width: 280px; max-height: 280px;
    transform: translate(-50%, -50%);
    border: 2px solid #22c55e; border-radius: 12px; overflow: hidden;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55);
}
.scan-line {
    position: absolute; left: 8px; right: 8px; height: 2px;
    background: #22c55e; box-shadow: 0 0 8px #22c55e;
    animation: scanMove 2.4s linear infinite;
}
@keyframes scanMove { 0% { top: 8px; } 50% { top: calc(100% - 10px); } 100% { top: 8px; } }
.scan-tip {
    position: absolute; left: 0; right: 0; bottom: 120px; margin: 0;
    padding: 0 24px; text-align: center; color: #fff; font-size: 13px; line-height: 1.5;
}
.scan-actions {
    position: absolute; left: 0; right: 0; bottom: 52px;
    display: flex; justify-content: center; gap: 16px;
}
.scan-actions button {
    padding: 9px 20px; border-radius: 22px; font-size: 14px; font-family: inherit;
    border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.12); color: #fff;
}

/* 查询状态 */
.status-box { text-align: center; padding: 6px 0 12px; }
.status-box h2 { margin: 8px 0 4px; font-size: 17px; }
.status-box p { margin: 0; font-size: 13px; color: #6b7280; }
.status-icon {
    width: 52px; height: 52px; margin: 0 auto; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff;
}
.status-ok .status-icon { background: #16a34a; }
.status-bad .status-icon { background: #dc2626; }
.status-ok h2 { color: #15803d; }
.status-bad h2 { color: #b91c1c; }
.code-line {
    border-top: 1px dashed #e5e7eb; padding-top: 10px;
    font-size: 13px; color: #374151; word-break: break-all;
}
.muted { color: #9ca3af; }

/* 产品 */
.cover { width: 100%; border-radius: 10px; display: block; margin-bottom: 12px; }
.product-name { font-size: 17px; font-weight: 600; }
.product-sub { font-size: 13px; color: #6b7280; margin-top: 2px; }
.info-list { list-style: none; margin: 14px 0 0; padding: 0; }
.info-list li {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 9px 0; border-bottom: 1px solid #f1f3f5; font-size: 14px;
}
.info-list li:last-child { border-bottom: 0; }
.info-list span { color: #6b7280; flex: none; }
.info-list b { font-weight: 500; text-align: right; word-break: break-all; }
.summary {
    margin-top: 12px; padding: 10px 12px; font-size: 13px; color: #4b5563;
    background: #f8faf9; border-radius: 8px;
}

/* 时间轴 */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
    content: ''; position: absolute; left: 5px; top: 8px; bottom: -6px;
    border-left: 1px dashed #d1d5db;
}
.timeline li:last-child::before { display: none; }
.timeline .dot {
    position: absolute; left: 0; top: 6px; width: 11px; height: 11px;
    border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
.tl-title { font-size: 15px; font-weight: 600; }
.tl-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
.tl-content { font-size: 13px; color: #4b5563; margin-top: 4px; }
.tl-img { width: 100%; margin-top: 8px; border-radius: 8px; display: block; }

/* 二维码 */
.qr-box { text-align: center; }
.qr-box img { width: 168px; height: 168px; }
.qr-box p { margin: 6px 0 0; font-size: 12px; color: #6b7280; }

/* 底部 */
.footer { text-align: center; color: #9ca3af; font-size: 12px; margin-top: 18px; }
.footer p { margin: 2px 0; }
