/* ============================================================
   商城首页模板专用样式（.qm-* 前缀，避免与 Astra/原型样式冲突）
   ============================================================ */
.qm-home { background: #f4f7fa; color: #1a2b3c; width: 100%; }
.qm-home .wrap { max-width: 1240px; width: 100%; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }

/* 顶部条 */
.qm-topbar { background: #1a2b3c; color: #cbd6e2; font-size: 12px; padding: 7px 0; }
.qm-topbar .wrap { display: flex; justify-content: space-between; align-items: center; }
.qm-topbar a { color: #7fd4ff; text-decoration: none; }

/* 头部搜索 */
.qm-header { background: #fff; border-bottom: 2px solid #0b5cab; padding: 18px 0; }
.qm-header-inner { display: flex; align-items: center; gap: 28px; }
.qm-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #0b5cab; flex-shrink: 0; }
.qm-logo-mark { width: 42px; height: 42px; background: #0b5cab; color: #fff; border-radius: 6px; display: grid; place-items: center; font-size: 24px; font-weight: 800; }
.qm-logo-text b { display: block; font-size: 20px; line-height: 1.1; }
.qm-logo-text small { font-size: 10px; color: #7a8fa6; letter-spacing: 1px; }
.qm-search { flex: 1; display: flex; max-width: 620px; }
.qm-search input { flex: 1; padding: 11px 14px; border: 2px solid #0b5cab; border-radius: 4px 0 0 4px; font-size: 14px; outline: 0; }
.qm-search button { padding: 0 26px; background: #0b5cab; color: #fff; border: 0; border-radius: 0 4px 4px 0; font-size: 15px; font-weight: 600; cursor: pointer; }
.qm-cart { flex-shrink: 0; text-decoration: none; color: #e8751a; font-weight: 600; font-size: 14px; }
.qm-cart-badge { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; text-align: center; background: #e8751a; color: #fff; border-radius: 10px; font-size: 12px; padding: 0 5px; }

/* 主视觉三栏 */
.qm-hero { display: grid; grid-template-columns: 210px 1fr 180px; gap: 12px; margin-top: 18px; }
.qm-catmenu { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.qm-catmenu-title { background: #e8751a; color: #fff; padding: 12px 16px; font-weight: 700; font-size: 15px; }
.qm-catmenu-title span { margin-right: 6px; }
.qm-catmenu ul { list-style: none; margin: 0; padding: 6px 0; }
.qm-catmenu li a { display: flex; align-items: center; gap: 8px; padding: 10px 16px; color: #2a3b4d; text-decoration: none; font-size: 14px; }
.qm-catmenu li a:hover { background: #f0f5fa; color: #0b5cab; }
.qm-cat-icon svg { vertical-align: middle; }
.qm-cat-arrow { margin-left: auto; color: #b8c9d9; }

/* 轮播 */
.qm-slider { position: relative; height: 400px; border-radius: 6px; overflow: hidden; }
.qm-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; display: flex; align-items: center; justify-content: space-between; padding: 0 48px; }
.qm-slide.on { opacity: 1; }
/* 标题区优先占宽，图形固定 200px 让位；避免 60% 上限把文字挤成竖排 */
.qm-slide-inner { color: #fff; flex: 1 1 auto; min-width: 0; max-width: none; position: relative; z-index: 1; }
/* 提高优先级覆盖 Astra 全局 h2{color}（继承敌不过直接选择器） */
.qm-home .qm-slide-inner h2 { color: #fff !important; font-size: 34px; margin: 0 0 14px; font-weight: 700; white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.15); }
.qm-home .qm-slide-inner p { color: #fff !important; font-size: 16px; opacity: .9; margin: 0 0 24px; white-space: nowrap; }
.qm-slide-btn { display: inline-block; background: #fff; color: #0b5cab !important; padding: 10px 24px; border-radius: 4px; font-weight: 700; text-decoration: none; }
.qm-slide-art { opacity: .9; flex: 0 0 200px; display: flex; justify-content: center; }
.qm-slide-art svg { max-width: 200px; height: auto; }
.qm-slide-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 60px; background: rgba(0,0,0,.3); color: #fff; border: 0; font-size: 28px; cursor: pointer; z-index: 2; }
.qm-prev { left: 0; border-radius: 0 4px 4px 0; }
.qm-next { right: 0; border-radius: 4px 0 0 4px; }
.qm-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.qm-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.qm-dot.on { background: #fff; }

/* 右侧快捷 */
.qm-quick { background: #fff; border-radius: 6px; padding: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.qm-quick-head { font-weight: 700; color: #0b5cab; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #e6ecf2; }
.qm-quick a { display: block; padding: 9px 10px; margin-bottom: 6px; background: #f4f7fa; color: #2a3b4d; text-decoration: none; border-radius: 4px; font-size: 14px; }
.qm-quick a:hover { background: #0b5cab; color: #fff; }
.qm-quick-note { margin-top: 14px; padding: 12px; background: #fff6ee; color: #a35a10; font-size: 12px; line-height: 1.8; border-radius: 4px; text-align: center; }

/* 服务保障条 */
.qm-service { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 16px; }
.qm-service > div { background: #fff; border: 1px solid #e6ecf2; border-radius: 6px; padding: 14px; text-align: center; font-size: 15px; color: #2a3b4d; }
.qm-service b { color: #e8751a; margin-right: 6px; }

/* 分类楼层 */
.qm-floors { margin-top: 24px; }
.qm-floor { background: #fff; border-radius: 6px; margin-bottom: 20px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.qm-floor-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 2px solid #0b5cab; }
.qm-floor-head h2 { font-size: 19px; margin: 0; color: #0b5cab; display: inline; }
.qm-floor-head span { margin-left: 12px; color: #8a9bab; font-size: 13px; }
.qm-floor-head > a { color: #6a7d90; font-size: 13px; text-decoration: none; }
.qm-floor-body { display: flex; }
.qm-floor-products { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px; }
.qm-card { display: block; border: 1px solid #e6ecf2; border-radius: 5px; padding: 12px; text-decoration: none; color: #1a2b3c; transition: box-shadow .2s, transform .2s; }
.qm-card:hover { box-shadow: 0 6px 16px rgba(11,92,171,.12); transform: translateY(-2px); }
.qm-card-img { height: 130px; display: grid; place-items: center; background: #f7fafc; border-radius: 4px; overflow: hidden; }
.qm-card-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.qm-card-title { font-size: 14px; font-weight: 600; margin: 10px 0 5px; line-height: 1.4; min-height: 38px; }
.qm-card-model { font-size: 12px; color: #8a9bab; }
.qm-card-tag { display: inline-block; margin-top: 6px; padding: 2px 7px; background: #fff2e6; color: #c96a12; font-size: 11px; border-radius: 3px; }
.qm-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.qm-price { color: #e8751a; font-weight: 700; font-size: 15px; }
.qm-ad-card { width: 190px; flex-shrink: 0; background: linear-gradient(160deg,#0b5cab,#1a2b3c); color: #fff; padding: 24px 18px; display: flex; flex-direction: column; justify-content: center; text-decoration: none; }
.qm-ad-card h3 { font-size: 19px; margin: 0 0 12px; }
.qm-ad-card p { font-size: 13px; line-height: 1.7; opacity: .85; }
.qm-ad-card span { margin-top: 16px; color: #ffd699; font-weight: 600; }

/* 移动端 */
@media (max-width: 980px) {
    .qm-hero { grid-template-columns: 1fr; }
    .qm-catmenu { display: none; }
    .qm-quick { display: none; }
    .qm-slider { height: 280px; }
    .qm-slide-inner h2 { font-size: 24px; }
    .qm-floor-products { grid-template-columns: repeat(2,1fr); }
    .qm-ad-card { display: none; }
    .qm-service { grid-template-columns: repeat(2,1fr); }
}
