/* ============================================================================
 * 产品订购 / 选购页 —— 红金电商主题（对齐 mf.qixidc.cn 首页产品区）
 *
 * 适用范围：resources/views/shared/shop-mf-cards.php（卡片网格）以及
 *           shop-catalog.php / shop-board.php 里的 .mf-shop 容器。
 *
 * 核心视觉对齐参考站：
 *   - 横向产品分类大标签（图标在上、文字在下，选中项红色 #e1251b）
 *   - 商品卡片：标题 + 红色角标 + 描述 + 价格 + 金黄「立即购买」按钮
 *   - 无左侧分类树（参考站首页是横向标签，不是左侧树）
 * 本文件是独立的红金主题，不依赖 purchase-workspace.css 的 --shop-* 蓝色令牌。
 * ==========================================================================*/

:root body .mf-shop {
  --mf-red: #e1251b;
  --mf-red-deep: #c01e16;
  --mf-gold-a: #ffd94a;
  --mf-gold-b: #ffa000;
  --mf-gold-ink: #7a3f00;
  --mf-ink: #333;
  --mf-muted: #999;
  --mf-line: #eee;
  --mf-bg: #f5f5f5;
  color: var(--mf-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
:root body .mf-shop { padding: 18px 0 8px; }
:root body .mf-shop * { box-sizing: border-box; }

/* ---------------------------------------------------------------------------
 * 0. 订购步骤条
 * -------------------------------------------------------------------------*/
:root body .mf-shop .purchase-steps {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 0 2px; list-style: none; color: var(--mf-muted); font-size: 13px;
}
:root body .mf-shop .purchase-steps li { display: flex; align-items: center; gap: 8px; }
:root body .mf-shop .purchase-steps li:not(:first-child)::before {
  content: ''; width: 26px; height: 1px; margin-right: 2px; background: var(--mf-line);
}
:root body .mf-shop .purchase-steps span {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--mf-line); font-size: 11px; font-weight: 600; color: var(--mf-muted);
}
:root body .mf-shop .purchase-steps .is-current { color: var(--mf-ink); font-weight: 600; }
:root body .mf-shop .purchase-steps .is-current span { background: var(--mf-red); border-color: var(--mf-red); color: #fff; }

/* ---------------------------------------------------------------------------
 * 1. 横向产品分类大标签（图标在上、文字在下，选中红色）
 * -------------------------------------------------------------------------*/
:root body .mf-shop .mf-cats {
  display: flex; align-items: stretch; gap: 0;
  margin-bottom: 16px; border: 1px solid var(--mf-line); border-radius: 8px; background: #fff;
  overflow: hidden;
}
:root body .mf-shop .mf-cat {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 16px 8px; color: var(--mf-muted); text-decoration: none;
  border-right: 1px solid var(--mf-line); transition: color .15s, background .15s;
}
:root body .mf-shop .mf-cat:last-child { border-right: 0; }
:root body .mf-shop .mf-cat .mf-cat-ico { width: 30px; height: 30px; display: grid; place-items: center; }
:root body .mf-shop .mf-cat .mf-cat-ico svg { width: 26px; height: 26px; }
:root body .mf-shop .mf-cat span { font-size: 15px; font-weight: 600; }
:root body .mf-shop .mf-cat:hover { color: var(--mf-red); }
:root body .mf-shop .mf-cat.active { color: var(--mf-red); background: #fff7f6; box-shadow: inset 0 -3px 0 var(--mf-red); }

/* ---------------------------------------------------------------------------
 * 2. 机型 / 二级分类标签（横向小标签）
 * -------------------------------------------------------------------------*/
:root body .mf-shop .mf-linetabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--mf-line);
}
:root body .mf-shop .mf-linetab {
  display: inline-flex; align-items: center; height: 32px; padding: 0 15px;
  border: 1px solid var(--mf-line); border-radius: 16px; background: #fff;
  color: var(--mf-muted); font-size: 13px; text-decoration: none;
}
:root body .mf-shop .mf-linetab:hover { border-color: var(--mf-red); color: var(--mf-red); }
:root body .mf-shop .mf-linetab.active { border-color: var(--mf-red); background: var(--mf-red); color: #fff; }

/* ---------------------------------------------------------------------------
 * 3. 工具条（产品数 + 搜索 + 排序）
 * -------------------------------------------------------------------------*/
:root body .mf-shop .mf-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 16px;
}
:root body .mf-shop .mf-count { color: var(--mf-muted); font-size: 13px; }
:root body .mf-shop .mf-count strong { color: var(--mf-ink); }
:root body .mf-shop .mf-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
:root body .mf-shop .mf-search { display: flex; gap: 8px; }
:root body .mf-shop .mf-search input[type="search"] {
  height: 36px; min-width: 200px; padding: 0 12px; border: 1px solid var(--mf-line);
  border-radius: 6px; background: #fff; color: var(--mf-ink); font: inherit;
}
:root body .mf-shop .mf-search input[type="search"]:focus { outline: 0; border-color: var(--mf-red); }
:root body .mf-shop .mf-sorts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
:root body .mf-shop .mf-sorts-label { color: var(--mf-muted); font-size: 13px; margin-right: 4px; }
:root body .mf-shop .mf-sort { color: var(--mf-muted); font-size: 13px; padding: 5px 9px; border-radius: 5px; text-decoration: none; }
:root body .mf-shop .mf-sort:hover { color: var(--mf-red); }
:root body .mf-shop .mf-sort.active { color: var(--mf-red); background: #fff0ee; }

/* ---------------------------------------------------------------------------
 * 4. 商品卡片网格
 * -------------------------------------------------------------------------*/
:root body .mf-shop .mf-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
:root body .mf-shop .mf-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--mf-line); border-radius: 8px; background: #fff;
  padding: 18px; transition: border-color .16s, box-shadow .16s, transform .16s;
}
:root body .mf-shop .mf-card:hover { border-color: var(--mf-red); box-shadow: 0 10px 26px rgba(225, 37, 27, .08); transform: translateY(-2px); }
:root body .mf-shop .mf-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
:root body .mf-shop .mf-card-name { margin: 0; font-size: 16px; font-weight: 700; color: var(--mf-ink); min-width: 0; }
:root body .mf-shop .mf-card-name a { color: inherit; text-decoration: none; }
:root body .mf-shop .mf-card-name a:hover { color: var(--mf-red); }
:root body .mf-shop .mf-card-label {
  flex: 0 0 auto; padding: 2px 8px; border-radius: 3px; background: var(--mf-red);
  color: #fff; font-size: 12px; line-height: 1.6; white-space: nowrap;
}
:root body .mf-shop .mf-card-desc { margin: 0 0 12px; color: var(--mf-muted); font-size: 13px; line-height: 1.7; flex: 1 1 auto; }
:root body .mf-shop .mf-card-specs { margin: 0 0 12px; color: var(--mf-muted); font-size: 12.5px; line-height: 1.8; }
:root body .mf-shop .mf-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px dashed var(--mf-line); padding-top: 12px;
}
:root body .mf-shop .mf-price { display: inline-flex; align-items: baseline; color: var(--mf-red); }
:root body .mf-shop .mf-price em { font-style: normal; font-size: 14px; }
:root body .mf-shop .mf-price b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
:root body .mf-shop .mf-price small { font-style: normal; color: var(--mf-muted); font-size: 12px; margin-left: 3px; }
:root body .mf-shop .mf-actions { display: flex; align-items: center; gap: 10px; }

/* 金黄「立即购买」按钮（对齐参考站 button-yellowgradient） */
:root body .mf-shop .mf-buy {
  display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 18px;
  border: 0; border-radius: 5px; background: linear-gradient(180deg, var(--mf-gold-a), var(--mf-gold-b));
  color: var(--mf-gold-ink); font-size: 13.5px; font-weight: 700; text-decoration: none; cursor: pointer;
}
:root body .mf-shop .mf-buy:hover { filter: brightness(1.04); }
:root body .mf-shop .mf-buy.disabled { background: #eee; color: #999; cursor: not-allowed; }
:root body .mf-shop .mf-quick {
  background: none; border: 0; color: var(--mf-muted); font-size: 12.5px; cursor: pointer; padding: 6px 2px;
}
:root body .mf-shop .mf-quick:hover { color: var(--mf-red); }

/* ---------------------------------------------------------------------------
 * 5. 分页 / 空态
 * -------------------------------------------------------------------------*/
:root body .mf-shop .mf-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; color: var(--mf-muted); font-size: 13px; }
:root body .mf-shop .mf-pager-nav { display: flex; gap: 6px; }
:root body .mf-shop .mf-pager a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 9px;
  border: 1px solid var(--mf-line); border-radius: 5px; background: #fff; color: var(--mf-muted); text-decoration: none;
}
:root body .mf-shop .mf-pager a:hover { border-color: var(--mf-red); color: var(--mf-red); }
:root body .mf-shop .mf-pager a.active { border-color: var(--mf-red); background: var(--mf-red); color: #fff; }
:root body .mf-shop .mf-pager .disabled { display: inline-flex; align-items: center; min-width: 30px; height: 30px; padding: 0 9px; border: 1px solid var(--mf-line); border-radius: 5px; color: #ccc; }
:root body .mf-shop .mf-empty { text-align: center; padding: 48px 20px; color: var(--mf-muted); }
:root body .mf-shop .mf-empty h3 { color: var(--mf-ink); font-size: 16px; margin: 0 0 6px; }
:root body .mf-shop .mf-empty p { margin: 0 0 18px; font-size: 13px; }

/* ---------------------------------------------------------------------------
 * 6. 板块欢迎选购条
 * -------------------------------------------------------------------------*/
:root body .mf-shop .mf-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 16px; padding: 14px 18px;
  border: 1px solid #ffe0dd; border-radius: 8px;
  background: linear-gradient(90deg, #fff5f4 0%, #fff 78%);
}
:root body .mf-shop .mf-strip-desc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; min-width: 0; }
:root body .mf-shop .mf-strip-desc strong { font-size: 16px; font-weight: 750; color: var(--mf-red); }
:root body .mf-shop .mf-strip-desc span { color: var(--mf-muted); font-size: 13px; }
:root body .mf-shop .mf-strip-acts { display: flex; flex-wrap: wrap; gap: 10px; }

/* 板块页的次级按钮（控制台 / 产品文档）用描边按钮 */
:root body .mf-shop .mf-btn-outline {
  display: inline-flex; align-items: center; height: 34px; padding: 0 16px;
  border: 1px solid var(--mf-red); border-radius: 5px; background: #fff;
  color: var(--mf-red); font-size: 13.5px; font-weight: 600; text-decoration: none;
}
:root body .mf-shop .mf-btn-outline:hover { background: #fff0ee; }

/* ---------------------------------------------------------------------------
 * 7. 窄屏
 * -------------------------------------------------------------------------*/
@media (max-width: 960px) {
  :root body .mf-shop .mf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root body .mf-shop .mf-grid { grid-template-columns: minmax(0, 1fr); }
  :root body .mf-shop .mf-cat { padding: 12px 4px; }
  :root body .mf-shop .mf-cat span { font-size: 13px; }
  :root body .mf-shop .mf-tools { width: 100%; }
  :root body .mf-shop .mf-search { width: 100%; }
  :root body .mf-shop .mf-search input[type="search"] { min-width: 0; flex: 1; }
}

/* 业务选购页：左侧分类 + 右侧纵向规格卡，保持参考页的信息层级。 */
:root body .mf-purchase{--mf-red:#3867f4;--mf-red-deep:#2853d8;--mf-gold-a:#4f74f6;--mf-gold-b:#3862eb;--mf-gold-ink:#fff;padding:28px 0 48px}
:root body .mf-purchase .mf-purchase-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:34px;align-items:start}
:root body .mf-purchase .mf-side{background:#fff;border:1px solid #e1e7f0;min-height:570px}
:root body .mf-purchase .mf-side header{position:relative;padding:22px 24px 18px;background:linear-gradient(135deg,#fff,#f2f6ff);border-bottom:12px solid #f3f6fb}
:root body .mf-purchase .mf-side header:after{content:"";position:absolute;right:24px;top:22px;width:48px;height:48px;border-radius:13px;background:linear-gradient(145deg,#dce7ff,#fff);box-shadow:inset 0 0 0 1px #cddaff}
:root body .mf-purchase .mf-side header span{display:block;font-size:23px;color:#121a2d;font-weight:500}
:root body .mf-purchase .mf-side header small{display:block;margin-top:12px;font-size:14px;color:#55627a}
:root body .mf-purchase .mf-side nav{padding:8px 16px}
:root body .mf-purchase .mf-side nav a{display:flex;align-items:center;gap:18px;min-height:64px;padding:12px 14px;border-bottom:1px solid #e7ebf2;color:#34425e;text-decoration:none}
:root body .mf-purchase .mf-side nav a b{font-size:22px;color:#26334c;line-height:1;font-weight:600}
:root body .mf-purchase .mf-side nav a span{font-size:15px;line-height:1.45}
:root body .mf-purchase .mf-side nav a:hover,:root body .mf-purchase .mf-side nav a.active{color:#3867f4;background:#f5f8ff}
:root body .mf-purchase .mf-side nav a.active b{color:#3867f4}
:root body .mf-purchase .mf-side footer{padding:16px 24px}.mf-purchase .mf-side footer a{font-size:13px;color:#3867f4}
:root body .mf-purchase .mf-purchase-main{min-width:0}
:root body .mf-purchase .mf-strip{min-height:80px;margin:0 0 18px;padding:17px 32px;border:1px solid #dfe5ef;border-radius:0;background:linear-gradient(110deg,#fff 0%,#fff 45%,#f2f6ff 100%)}
:root body .mf-purchase .mf-strip-desc strong{font-size:17px;color:#34425e}
:root body .mf-purchase .mf-strip-desc span{color:#7b879c}
:root body .mf-purchase .mf-buy{height:42px;min-width:112px;padding:0 22px;border-radius:2px;background:#4268ee;color:#fff;font-size:14px;font-weight:500}
:root body .mf-purchase .mf-buy:hover{background:#3159e6;filter:none}
:root body .mf-purchase .mf-btn-outline{height:42px;min-width:132px;justify-content:center;border-color:#4268ee;border-radius:2px;color:#4268ee;background:#fff;font-weight:500}
:root body .mf-purchase .mf-selection-meta{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px;color:#77839a;font-size:13px}
:root body .mf-purchase .mf-selection-meta strong{font-size:15px;color:#34425e}
:root body .mf-purchase .mf-grid{grid-template-columns:repeat(3,minmax(250px,320px));gap:20px;justify-content:start}
:root body .mf-purchase .mf-card{position:relative;min-height:500px;padding:32px 24px 24px;border-color:#dfe5ef;border-radius:0;box-shadow:0 4px 18px rgba(36,55,94,.025)}
:root body .mf-purchase .mf-card:before{content:"";position:absolute;top:0;left:24px;width:68px;height:4px;background:#3867f4}
:root body .mf-purchase .mf-card:hover{border-color:#91a9f8;box-shadow:0 14px 34px rgba(45,78,165,.1);transform:translateY(-2px)}
:root body .mf-purchase .mf-card-head{display:block;margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid #e8ecf2}
:root body .mf-purchase .mf-card-name{font-size:17px;line-height:1.5;color:#34425e}
:root body .mf-purchase .mf-card-label{display:inline-flex;margin-top:8px;background:#eef3ff;color:#3867f4}
:root body .mf-purchase .mf-card-desc{flex:0 0 auto;min-height:0;margin-bottom:14px;color:#7b879c}
:root body .mf-purchase .mf-card-specs{flex:1 1 auto;font-size:14px!important;line-height:2.15!important}
:root body .mf-purchase .mf-card-specs li{display:block!important;line-height:2.2!important;color:#354158}
:root body .mf-purchase .mf-card-specs li span:first-child{display:inline!important;color:#354158!important}
:root body .mf-purchase .mf-card-specs li span:first-child:not(:empty):after{content:"："}
:root body .mf-purchase .mf-card-specs li span:last-child{display:inline!important;color:#354158!important}
:root body .mf-purchase .mf-card-foot{padding-top:22px;border-top:1px solid #e8ecf2}
:root body .mf-purchase .mf-price{color:#3867f4}.mf-purchase .mf-price b{font-size:26px}.mf-purchase .mf-price small{color:#5e6c85}
:root body .mf-purchase .mf-actions{margin-left:auto}
@media(max-width:1100px){:root body .mf-purchase .mf-purchase-layout{grid-template-columns:230px minmax(0,1fr);gap:20px}:root body .mf-purchase .mf-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){:root body .mf-purchase .mf-purchase-layout{grid-template-columns:1fr}:root body .mf-purchase .mf-side{min-height:0}:root body .mf-purchase .mf-side nav{display:grid;grid-template-columns:repeat(2,1fr)}:root body .mf-purchase .mf-side nav a{min-height:50px}:root body .mf-purchase .mf-grid{grid-template-columns:1fr}:root body .mf-purchase .mf-card{min-height:0}}
