/* ============ 双子星 H5 通用样式 ============ */
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",Arial,sans-serif;background:#f5f6f8;color:#333;font-size:14px;line-height:1.6;-webkit-font-smoothing:antialiased}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
input,button,textarea{font-family:inherit;font-size:inherit}

/* ---------- 顶栏 ---------- */
.h5-header{position:sticky;top:0;z-index:100;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.h5-header-inner{max-width:720px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:10px 14px;gap:10px}
.h5-logo img{height:32px;width:auto}
.h5-logo-badge{width:32px;height:32px;border-radius:8px;background:#d32f2f;color:#fff;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700}
.h5-nav{display:flex;gap:14px;overflow-x:auto;white-space:nowrap;font-size:14px;color:#555;-webkit-overflow-scrolling:touch}
.h5-nav a{padding:4px 2px;border-bottom:2px solid transparent;flex-shrink:0}
.h5-nav a.active{color:#1a5fc7;border-bottom-color:#1a5fc7;font-weight:600}
.h5-nav::-webkit-scrollbar{display:none}

/* ---------- 主区域 ---------- */
.h5-main{max-width:720px;margin:0 auto;padding:0 0 90px;min-height:100vh}

/* ---------- 底部 Tab 导航 ---------- */
.tabbar{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:720px;z-index:200;background:#fff;border-top:1px solid #eee;display:flex;box-shadow:0 -2px 10px rgba(0,0,0,.04)}
.tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:8px 0 10px;color:#999;font-size:11px}
.tabbar a .ico{font-size:21px;line-height:1}
.tabbar a.active{color:#d32f2f;font-weight:600}
.tabbar a.active .ico{transform:scale(1.08)}

/* ---------- 轮播 ---------- */
.swiper{position:relative;border-radius:12px;overflow:hidden;background:#e5e7eb;margin-bottom:14px}
.swiper-track{display:flex;transition:transform .35s ease}
.swiper-item{min-width:100%}
.swiper-item img{width:100%;height:170px;object-fit:cover}
.swiper-item .swiper-title{position:absolute;left:0;right:0;bottom:0;padding:28px 14px 10px;color:#fff;font-size:15px;font-weight:600;background:linear-gradient(transparent,rgba(0,0,0,.55))}
.swiper-dots{position:absolute;right:12px;bottom:10px;display:flex;gap:5px}
.swiper-dots span{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.5);transition:all .25s}
.swiper-dots span.on{background:#fff;width:18px;border-radius:4px}

/* ---------- 卡片 ---------- */
.h5-card{background:#fff;border-radius:12px;padding:14px;margin-bottom:12px}
.h5-card-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.h5-card-title .t{font-size:16px;font-weight:700;position:relative;padding-left:10px}
.h5-card-title .t::before{content:'';position:absolute;left:0;top:50%;transform:translateY(-50%);width:4px;height:16px;border-radius:2px;background:#1a5fc7}
.h5-card-title .more{font-size:12px;color:#9ca3af}

/* ---------- 文章列表 ---------- */
.art-item{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid #f3f4f6}
.art-item:last-child{border-bottom:none}
.art-item .info{flex:1;min-width:0}
.art-item .title{font-size:15px;font-weight:600;color:#222;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5}
.art-item .meta{margin-top:6px;font-size:12px;color:#9ca3af;display:flex;gap:10px;align-items:center}
.art-item .meta .cat{color:#1a5fc7;background:#eef3fd;padding:1px 8px;border-radius:4px;font-size:11px}
.art-item .thumb{width:110px;height:76px;border-radius:8px;object-fit:cover;background:#f3f4f6;flex-shrink:0;overflow:hidden;display:block}
.art-item .thumb img{width:100%;height:100%;object-fit:cover;display:block}

/* ---------- 分类导航（首页） ---------- */
.cat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.cat-item{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:12px;color:#555;padding:6px 0}
.cat-item .ico{width:44px;height:44px;border-radius:50%;background:#eef3fd;display:flex;align-items:center;justify-content:center;font-size:20px}

/* ---------- 文章详情 ---------- */
.detail-title{font-size:21px;font-weight:700;line-height:1.5;margin-bottom:10px}
.detail-meta{display:flex;align-items:center;gap:12px;font-size:12px;color:#9ca3af;margin-bottom:16px;flex-wrap:wrap}
.detail-cover{width:100%;max-height:220px;object-fit:cover;border-radius:10px;margin-bottom:16px}
.detail-content{font-size:15.5px;line-height:1.9;color:#333;word-break:break-word}
.detail-content img{max-width:100%;height:auto;border-radius:8px;margin:8px 0}
.detail-content h2,.detail-content h3{margin:18px 0 8px;color:#1f2937}
.detail-content p{margin:8px 0}
.detail-content blockquote{border-left:3px solid #1a5fc7;background:#f8fafc;padding:8px 12px;margin:10px 0;color:#4b5563}
.detail-content a{color:#1a5fc7}
.detail-content pre{background:#1f2937;color:#e5e7eb;padding:12px;border-radius:8px;overflow-x:auto;font-size:13px;margin:10px 0}

/* 详情操作条 */
.detail-actions{display:flex;gap:12px;margin:20px 0}
.detail-actions .btn{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:11px 0;border-radius:10px;font-size:14px;cursor:pointer;border:none}
.detail-actions .btn-like{background:#eef3fd;color:#1a5fc7}
.detail-actions .btn-like.on{background:#1a5fc7;color:#fff}
.detail-actions .btn-fav{background:#fef3c7;color:#92400e}
.detail-actions .btn-fav.on{background:#f59e0b;color:#fff}

/* 评论 */
.comment-item{padding:12px 0;border-bottom:1px solid #f3f4f6}
.comment-item:last-child{border-bottom:none}
.comment-item .u{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.comment-item .u .avatar{width:30px;height:30px;border-radius:50%;background:#eef3fd;display:flex;align-items:center;justify-content:center;font-size:13px;color:#1a5fc7;flex-shrink:0;overflow:hidden}
.comment-item .u .avatar img{width:100%;height:100%;object-fit:cover}
.comment-item .u .name{font-size:13px;font-weight:600;color:#444}
.comment-item .u .time{margin-left:auto;font-size:11px;color:#b0b8c4}
.comment-item .text{font-size:14px;color:#333}
.comment-input{display:flex;gap:8px;margin-top:14px}
.comment-input input{flex:1;border:1px solid #e5e7eb;border-radius:8px;padding:9px 12px;font-size:14px;outline:none}
.comment-input input:focus{border-color:#1a5fc7}
.comment-input button{background:#1a5fc7;color:#fff;border:none;border-radius:8px;padding:0 18px;font-size:14px;cursor:pointer}

/* ---------- 首页顶部图 ---------- */
.home-top-img{width:100%;display:block;margin-bottom:2px}
.home-top-img a{display:block}
.home-top-img img{width:100%;display:block}

/* ---------- 品牌视频区 ---------- */
.video-section{background:#fff;border-radius:12px;padding:16px 14px;margin-bottom:12px}
.video-section .vs-title{font-size:17px;font-weight:700;text-align:center;margin-bottom:14px;position:relative}
.video-section .vs-title::before,.video-section .vs-title::after{content:'';position:absolute;top:50%;width:44px;height:1px;background:#e5e7eb}
.video-section .vs-title::before{left:calc(50% - 92px)}
.video-section .vs-title::after{right:calc(50% - 92px)}
.video-grid{display:grid;grid-template-columns:1fr;gap:12px}
.video-grid.two{grid-template-columns:1fr 1fr}
.video-box{position:relative;border-radius:10px;overflow:hidden;background:#000}
.video-box video{width:100%;display:block;aspect-ratio:16/9;background:#000}

/* ---------- 品牌动态 ---------- */
.dyn-list .dyn-item{display:flex;gap:14px;padding:14px 0;border-bottom:1px solid #f3f4f6}
.dyn-list .dyn-item:last-child{border-bottom:none}
.dyn-item .thumb{width:112px !important;height:80px !important;min-width:112px;max-width:112px;min-height:80px;max-height:80px;border-radius:8px;object-fit:cover;background:#f3f4f6;flex-shrink:0;display:block !important}
.dyn-item .info{flex:1;min-width:0;display:flex;flex-direction:column}
.dyn-item .title{font-size:15px;font-weight:700;color:#222;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dyn-item .desc{font-size:15px;font-weight:400;color:#6b7280;margin-top:6px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dyn-item .meta{margin-top:auto;font-size:12px;color:#9ca3af;display:flex;gap:8px;align-items:center;padding-top:6px}

/* ---------- 底部广告 ---------- */
.home-bottom-ad{width:100%;display:block;margin-top:2px}
.home-bottom-ad img{width:100%;display:block}

/* ---------- 产品页 ---------- */
.search-bar{display:flex;align-items:center;background:#fff;border-radius:22px;padding:8px 14px;margin:0 auto 12px;box-shadow:0 1px 3px rgba(0,0,0,.04);width:95%;box-sizing:border-box}
.search-bar input{flex:1;border:none;background:transparent;outline:none;font-size:14px;color:#333}
.search-bar .ico{color:#9ca3af;margin-right:8px}
.cat-list{margin:0 auto 14px;width:95%;box-sizing:border-box}
/* ========== 风格1：竖排色块（基础样式，同时作为风格2/3 的底层） ========== */
.cat-item{position:relative;display:block;background:linear-gradient(135deg,#b9144a,#a0123f);color:#fff;padding:14px 50px 14px 18px;border-radius:10px;margin-bottom:6px;font-weight:500;box-shadow:0 1px 2px rgba(185,20,74,.2);transition:transform .1s}
.cat-item:active{transform:scale(.98)}
.cat-item.sub{background:#d04470;margin-left:18px;width:calc(100% - 18px);font-weight:400}
.cat-item .cat-name{display:block;text-align:left;font-size:18px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cat-item.sub .cat-name{font-size:16px}
.cat-item .cat-ico{position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:20px;opacity:.95;line-height:1}
.cat-item.active{background:linear-gradient(135deg,#ff5b8a,#d32f2f);box-shadow:0 4px 10px rgba(255,91,138,.35);font-weight:600}
.cat-item.active.sub{background:linear-gradient(135deg,#ff7da0,#e0497a)}

/* ========== 风格2：横排滑动标签 ========== */
.cat-list.s2{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;overflow-y:hidden;padding:2px 2px 8px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.cat-list.s2::-webkit-scrollbar{display:none}
.cat-list.s2 .cat-item{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;background:#fff;color:#a0123f;border:1px solid #ecc9d5;border-radius:999px;padding:8px 15px;margin-bottom:0;font-size:14px;font-weight:500;box-shadow:none}
.cat-list.s2 .cat-item:active{transform:scale(.96)}
.cat-list.s2 .cat-item.sub{margin-left:0;width:auto;font-weight:500}
.cat-list.s2 .cat-item .cat-name{display:inline;font-size:14px;text-align:left}
.cat-list.s2 .cat-item.sub .cat-name{font-size:14px}
.cat-list.s2 .cat-item .cat-ico{position:static;transform:none;font-size:14px;opacity:1;line-height:1}
.cat-list.s2 .cat-item.active{background:#a0123f;color:#fff;border-color:#a0123f;font-weight:600;box-shadow:0 2px 8px rgba(160,18,63,.28)}
.cat-list.s2 .cat-item.active.sub{background:#a0123f}

/* ========== 风格3：两列卡片 ========== */
.cat-list.s3{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cat-list.s3 .cat-item{display:flex;align-items:center;gap:8px;background:linear-gradient(135deg,#b9144a,#a0123f);color:#fff;padding:13px 12px;border-radius:10px;margin-bottom:0;font-weight:500}
.cat-list.s3 .cat-item.sub{margin-left:0;width:auto;background:#d04470;font-weight:400}
.cat-list.s3 .cat-item .cat-name{display:block;font-size:15px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cat-list.s3 .cat-item.sub .cat-name{font-size:14px}
.cat-list.s3 .cat-item .cat-ico{position:static;transform:none;order:-1;font-size:18px;opacity:1;line-height:1;flex-shrink:0}
.cat-list.s3 .cat-item.active{background:linear-gradient(135deg,#ff5b8a,#d32f2f);font-weight:600}
.cat-list.s3 .cat-item.active.sub{background:linear-gradient(135deg,#ff7da0,#e0497a)}

/* 分类菜单始终完整展开：选中分类后仅高亮当前项，不收起
   （选中后由 JS 自动滚到产品区来消除"点了没反应"的错觉） */

.prod-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:95%;margin:0 auto;box-sizing:border-box}
.prod-card{background:#fff;border-radius:12px;overflow:hidden;display:flex;flex-direction:column}
.prod-card .pc-thumb{width:100%;aspect-ratio:1/1;object-fit:cover;background:#f3f4f6}
.prod-card .pc-thumb-link{display:block}
.prod-card .pc-body-link{position:relative;overflow:hidden;display:block;padding:10px 12px 8px 18px}
.prod-card .pc-body-link::before{content:'';position:absolute;left:6px;top:12px;width:3px;height:16px;background:#d32f2f;border-radius:2px}
.prod-card .pc-name{font-size:14px;font-weight:600;color:#222;line-height:20px;height:20px;margin:0;white-space:nowrap;overflow:hidden}
.prod-card .pc-name .roll-text{display:inline-block;white-space:nowrap;will-change:transform}
.prod-card .pc-name.scroll .roll-text{animation:name-roll 8s ease-in-out infinite alternate}
@keyframes name-roll{from{transform:translateX(0)}to{transform:translateX(calc(-1 * var(--dist,0px)))}}
.prod-card .pc-meta{margin-top:6px;display:flex;flex-direction:column;gap:2px}
.prod-card .pc-meta-row{font-size:12px;line-height:1.5}
.prod-card .pc-meta-row .lbl{color:#d32f2f;font-weight:500}
.prod-card .pc-meta-row .val{color:#222}
.prod-card .pc-foot{display:flex;gap:8px;padding:8px 12px 12px}
.prod-card .pc-detail,.prod-card .pc-video{flex:1;text-align:center;padding:7px 0;border-radius:20px;font-size:13px;color:#fff}
.prod-card .pc-detail{background:#5b6cff}
.prod-card .pc-detail:active{background:#4855db}
.prod-card .pc-video{background:#ff5b8a}
.prod-card .pc-video:active{background:#e0497a}

/* ---------- 产品详情 ---------- */
.prod-video{width:100%;background:#000}
.prod-video video{width:100%;display:block;aspect-ratio:16/9;background:#000}
.prod-info{background:#fff;border-radius:12px;padding:18px 16px;margin-bottom:12px}
.prod-info h1{font-size:18px;font-weight:700;color:#222;margin:0 0 6px;line-height:1.5}
.prod-info .code{font-size:12px;color:#9ca3af;margin-bottom:14px}
.spec-row{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f3f4f6;font-size:13px}
.spec-row:last-child{border-bottom:none}
.spec-row .label{color:#9ca3af}
.spec-row .value{color:#222;font-weight:500}
.prod-share-row{margin-top:16px;text-align:center}
.prod-share-btn{display:inline-block;background:#d32f2f;color:#fff;padding:10px 30px;border-radius:22px;font-size:14px;border:none;cursor:pointer}
.prod-share-btn:disabled{opacity:.6}

/* 空状态 / 加载 */
.empty{text-align:center;color:#b0b8c4;padding:40px 0;font-size:14px}
.load-more{text-align:center;padding:12px}
.load-more a{color:#1a5fc7;font-size:13px}

/* ---------- 页脚 ---------- */
.h5-footer{background:#fff;border-top:1px solid #f3f4f6;text-align:center;padding:18px 14px 84px;font-size:12px;color:#b0b8c4}
.h5-footer p{margin:3px 0}
.h5-footer a{color:#9ca3af}

/* ---------- Toast ---------- */
#toast{position:fixed;left:50%;top:45%;transform:translate(-50%,-50%);background:rgba(0,0,0,.75);color:#fff;padding:10px 20px;border-radius:8px;font-size:14px;z-index:999;display:none;max-width:80%;text-align:center}
