/* ============================================================
   商城（home 应用）资讯风格样式
   设计语言：与 /news/css/news.css 一致（白卡片/圆角/蓝渐变/简洁排版）
   加载顺序：style.css（兜底）→ news.css（设计变量/顶栏/页脚）→ news-shop.css（商城组件）
   ============================================================ */

/* ---------- 布局 ---------- */
body{background:var(--c-bg,#f4f7fb);color:var(--c-text,#1f2937);}
.container.page{padding-top:24px;padding-bottom:40px;min-height:60vh;}
.muted{color:var(--c-sub,#6b7280);}

/* ---------- 分类条 ---------- */
.cat-strip{background:#fff;border-bottom:1px solid var(--c-line,#e5e9f0);}
.cat-inner{display:flex;flex-wrap:wrap;gap:6px 18px;padding:10px 0;}
.cat-inner a{font-size:14px;color:var(--c-sub,#6b7280);padding:4px 2px;text-decoration:none;white-space:nowrap;border-bottom:2px solid transparent;transition:color .2s,border-color .2s;}
.cat-inner a:hover{color:var(--c-blue,#2563eb);}
.cat-inner a.active{color:var(--c-blue,#2563eb);font-weight:600;border-bottom-color:var(--c-blue,#2563eb);}

/* ---------- 面包屑 ---------- */
.breadcrumb{font-size:13px;color:var(--c-sub,#6b7280);margin:0 0 14px;}
.breadcrumb a{color:var(--c-sub,#6b7280);text-decoration:none;margin:0 2px;}
.breadcrumb a:hover{color:var(--c-blue,#2563eb);}

/* ---------- 筛选条 ---------- */
.shop-filter-bar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:10px;padding:10px 14px;margin-bottom:16px;}
.shop-filter-bar .label{font-size:13px;color:var(--c-sub,#6b7280);}
.shop-filter-bar a{font-size:13px;color:var(--c-sub,#6b7280);padding:4px 12px;border-radius:16px;text-decoration:none;transition:all .2s;}
.shop-filter-bar a:hover{color:var(--c-blue,#2563eb);background:#eff6ff;}
.shop-filter-bar a.active{color:#fff;background:linear-gradient(135deg,#3b82f6,#2563eb);}

/* ---------- 区块标题 ---------- */
.section-title{font-size:18px;font-weight:700;color:var(--c-text,#1f2937);margin:26px 0 14px;padding-left:10px;border-left:4px solid var(--c-blue,#2563eb);}
.page-title{font-size:22px;font-weight:700;color:var(--c-text,#1f2937);margin:0 0 16px;}

/* ---------- 商品网格 ---------- */
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;}
.product-card{position:relative;background:var(--c-card,#fff);border:1px solid var(--c-line,#e5e9f0);border-radius:12px;overflow:hidden;transition:transform .2s,box-shadow .2s;}
.product-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(30,58,138,.10);}
.product-card .thumb{width:100%;aspect-ratio:1/1;object-fit:cover;background:#f1f5f9;display:block;}
.product-card .body{padding:12px 14px 14px;}
.product-card .name{font-size:14px;line-height:1.5;min-height:42px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.product-card .name a{color:var(--c-text,#1f2937);text-decoration:none;}
.product-card .name a:hover{color:var(--c-blue,#2563eb);}
.product-card .meta{display:flex;align-items:baseline;gap:8px;margin-top:8px;flex-wrap:wrap;}
.product-card .price{color:#ef4444;font-size:17px;font-weight:700;}
.product-card .price small{font-size:12px;font-weight:500;}
.product-card .price.price-free{color:#10b981;font-size:15px;font-weight:600;}
.product-card .price.price-negotiable{color:#f59e0b;font-size:15px;font-weight:600;}
.product-card .market-price{color:#94a3b8;font-size:12px;text-decoration:line-through;}
.product-card .sales{color:#94a3b8;font-size:12px;margin-left:auto;}

/* ---------- 商品标签角标 ---------- */
.flags{position:absolute;top:8px;left:8px;z-index:2;display:flex;flex-direction:column;gap:4px;}
.flag{font-size:11px;color:#fff;padding:2px 7px;border-radius:4px;}
.flag-top{background:#f59e0b;}
.flag-hot{background:#ef4444;}
.flag-new{background:#10b981;}
.flag-rec{background:#8b5cf6;}

/* ---------- 空状态 ---------- */
.cart-empty{text-align:center;padding:70px 20px;color:#94a3b8;font-size:15px;background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:12px;margin:20px 0;}
.cart-empty a:not(.btn){color:var(--c-blue,#2563eb);}

/* ---------- 按钮 ---------- */
.btn{display:inline-block;height:38px;line-height:36px;padding:0 20px;border:1px solid transparent;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;text-decoration:none;text-align:center;transition:all .2s;box-sizing:border-box;}
.btn:hover{text-decoration:none;}
.btn-primary{color:#fff;background:linear-gradient(135deg,#3b82f6,#2563eb);}
.btn-primary:hover{opacity:.92;color:#fff;}
.btn-danger{color:#fff;background:linear-gradient(135deg,#f87171,#ef4444);}
.btn-danger:hover{opacity:.92;color:#fff;}
.btn-outline{background:#fff;color:#475569;border-color:#e2e8f0;}
.btn-outline:hover{border-color:var(--c-blue,#2563eb);color:var(--c-blue,#2563eb);}
.btn-sm{height:30px;line-height:28px;padding:0 12px;font-size:12px;border-radius:6px;}
/* ---------- 订单列表支付按钮 ---------- */
.btn-pay{color:#fff;border:none;font-weight:600;display:inline-flex;align-items:center;gap:6px;}
.btn-pay.wechat{background:linear-gradient(135deg,#07c160,#04a850);}
.btn-pay.alipay{background:linear-gradient(135deg,#1677ff,#0e5fd9);}
.btn-pay.mock{background:linear-gradient(135deg,#f59e0b,#d97706);}
.btn-pay:hover{opacity:.92;color:#fff;}
.pay-method-tag{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:999px;font-size:12px;background:#f1f5f9;color:#475569;border:1px solid #e2e8f0;}
.pay-method-1{background:#e8f9ed;color:#04a850;border-color:#b7e9c6;}
.pay-method-2{background:#e6f1ff;color:#0e5fd9;border-color:#b8d2f6;}
.pay-method-4{background:#fff4e0;color:#b45309;border-color:#fcd9a8;}
.pay-method-0{background:#f1f5f9;color:#475569;border-color:#e2e8f0;}
.pay-note{display:inline-flex;align-items:center;height:30px;padding:0 12px;border-radius:6px;font-size:12px;background:#f1f5f9;color:#64748b;border:1px dashed #cbd5e1;}

/* ---------- 表格（购物车） ---------- */
.table{width:100%;table-layout:fixed;border-collapse:collapse;background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:12px;overflow:hidden;font-size:14px;}
.table th{background:#f8fafc;color:var(--c-sub,#6b7280);font-weight:600;padding:12px 14px;text-align:left;border-bottom:1px solid var(--c-line,#e5e9f0);}
.table td{padding:12px 14px;border-bottom:1px solid #f1f5f9;vertical-align:middle;word-break:break-all;}
.table .name{word-break:break-word;}
.table tr:last-child td{border-bottom:none;}
.table .price{color:#ef4444;font-weight:600;}
.table .cart-item-info{display:flex;gap:10px;align-items:center;}
.table .cart-item-info .thumb{width:56px;height:56px;object-fit:cover;border-radius:8px;background:#f1f5f9;}
.table .cart-item-info .name{font-size:14px;color:var(--c-text,#1f2937);text-decoration:none;line-height:1.6;}
.table .cart-item-info .name:hover{color:var(--c-blue,#2563eb);}
.table .cart-item-info .item-tag{display:inline-block;font-size:11px;line-height:1;padding:3px 6px;border-radius:4px;font-weight:600;letter-spacing:.5px;vertical-align:2px;margin-right:6px;white-space:nowrap;}
.table .cart-item-info .tag-virtual{background:#f3e8ff;color:#7c3aed;border:1px solid #e9d5ff;}
.table .cart-item-info .tag-physical{background:#fff7ed;color:#c2410c;border:1px solid #fed7aa;}
.table .sku{font-size:12px;color:#94a3b8;margin-top:2px;}
/* 商品信息里的文字区必须允许收缩，否则长标题会把表格顶出横向滚动 */
.cart-table .cart-item-info > div{min-width:0;}

/* ---------- 购物车：窄屏卡片化，避免固定列宽把商品名压成一字一行 ---------- */
@media (max-width: 640px) {
  .cart-table thead{display:none;}
  .cart-table,.cart-table tbody,.cart-table tr,.cart-table td{display:block;width:100%;box-sizing:border-box;}
  .cart-table tr{position:relative;background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:10px;margin-bottom:12px;padding:12px 14px;box-shadow:0 1px 2px rgba(0,0,0,.04);}
  .cart-table td{padding:6px 0;border:none;text-align:left;word-break:normal;}
  /* 复选框绝对定位到右上角，不挤占商品空间 */
  .cart-table td:first-child{position:absolute;top:12px;right:14px;width:auto;padding:0;}
  /* 商品信息：图左文右，文字区占满 */
  .cart-table .cart-item-info{align-items:flex-start;padding-right:32px;}
  .cart-table .cart-item-info .thumb{width:64px;height:64px;flex-shrink:0;}
  .cart-table .cart-item-info .name{display:inline;word-break:normal;}
  /* 单价/数量/小计/操作：并排展示，自动换行 */
  .cart-table td:nth-child(3),
  .cart-table td:nth-child(4),
  .cart-table td:nth-child(5),
  .cart-table td:nth-child(6){display:inline-flex;width:auto;align-items:center;gap:4px;margin-right:14px;font-size:13px;vertical-align:top;}
  .cart-table td:nth-child(3)::before{content:'单价：';color:#94a3b8;font-size:12px;}
  .cart-table td:nth-child(4)::before{content:'数量：';color:#94a3b8;font-size:12px;}
  .cart-table td:nth-child(5)::before{content:'小计：';color:#94a3b8;font-size:12px;}
  .cart-table td:nth-child(6)::before{content:'操作：';color:#94a3b8;font-size:12px;}
  .cart-table td:nth-child(6){margin-right:0;}
  .cart-table .price{font-size:15px;}
  .cart-table .quantity-box button{width:26px;height:28px;font-size:14px;}
  .cart-table .quantity-box input{width:36px;height:28px;font-size:14px;}
}

/* ---------- 数量步进器 ---------- */
.quantity-box{display:inline-flex;align-items:center;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;}
.quantity-box button{width:30px;height:32px;border:0;background:#f8fafc;color:#475569;font-size:15px;cursor:pointer;}
.quantity-box button:hover{background:#eef2ff;color:var(--c-blue,#2563eb);}
.quantity-box input{width:44px;height:32px;border:0;text-align:center;font-size:14px;outline:none;}

/* ---------- 购物车合计条 ---------- */
.cart-total-bar{display:flex;align-items:center;justify-content:flex-end;gap:14px;background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:12px;padding:14px 20px;margin-top:14px;font-size:14px;color:var(--c-sub,#6b7280);}
.cart-total-bar .total-price{font-size:22px;color:#ef4444;font-weight:700;}

/* ---------- 面板 ---------- */
.panel{background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:12px;padding:18px 20px;}
.panel h3{margin:0 0 12px;font-size:16px;color:var(--c-text,#1f2937);}

/* ---------- 表单 ---------- */
.form-group{margin-bottom:14px;}
.form-group label{display:block;font-size:13px;color:var(--c-sub,#6b7280);margin-bottom:6px;}
.form-group input[type="text"],.form-group input[type="password"],.form-group input[type="tel"],.form-group input[type="email"],.form-group input[type="number"],.form-group textarea,.form-group select{width:100%;height:38px;padding:0 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:14px;color:var(--c-text,#1f2937);box-sizing:border-box;outline:none;background:#fff;transition:border-color .2s,box-shadow .2s;}
.form-group textarea{height:auto;padding:10px 12px;resize:vertical;line-height:1.6;}
.form-group input:focus,.form-group textarea:focus,.form-group select:focus{border-color:var(--c-blue,#2563eb);box-shadow:0 0 0 3px rgba(37,99,235,.12);}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px;}

/* ---------- 提示条 ---------- */
.alert{padding:10px 14px;border-radius:8px;font-size:13px;margin-bottom:14px;line-height:1.6;}
.alert-warning{background:#fffbeb;border:1px solid #fde68a;color:#b45309;}
.alert-success{background:#ecfdf5;border:1px solid #a7f3d0;color:#047857;}

/* ---------- 登录/注册 ---------- */
.auth-wrap{display:flex;justify-content:center;}
.auth-panel{width:min(420px,100%);background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:14px;padding:30px 32px;box-shadow:0 8px 30px rgba(30,58,138,.06);}
.auth-panel h2{margin:0 0 4px;font-size:22px;}
.auth-panel .sub{color:var(--c-sub,#6b7280);font-size:13px;margin:0 0 20px;}
.auth-panel .form-group input{height:40px;}
.auth-panel .btn{width:100%;}

/* ---------- 商品详情 ---------- */
.detail-wrap{background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:14px;padding:22px;}
.detail-layout{display:grid;grid-template-columns:minmax(280px,400px) 1fr;gap:28px;}
@media (max-width:768px){.detail-layout{grid-template-columns:1fr;}}
.detail-gallery{background:#f8fafc;border:1px solid var(--c-line,#e5e9f0);border-radius:12px;padding:14px;align-self:start;}
.detail-gallery .main-img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:8px;display:block;}
.gallery-stage{position:relative;}
.gal-arrow{position:absolute;top:50%;transform:translateY(-50%);width:32px;height:32px;line-height:28px;text-align:center;font-size:22px;color:#334155;background:rgba(255,255,255,.92);border:1px solid #e2e8f0;border-radius:50%;cursor:pointer;opacity:0;transition:opacity .2s,color .2s,border-color .2s;z-index:2;padding:0;}
.detail-gallery:hover .gal-arrow{opacity:1;}
.gal-arrow.gal-prev{left:10px;}
.gal-arrow.gal-next{right:10px;}
.gal-arrow:hover{color:var(--c-blue,#2563eb);border-color:var(--c-blue,#2563eb);}
.gal-single .gal-arrow{display:none;}
.gal-counter{position:absolute;right:12px;bottom:12px;padding:2px 10px;font-size:12px;line-height:1.6;color:#fff;background:rgba(15,23,42,.55);border-radius:10px;}
.gal-single .gal-counter{display:none;}
.gallery-thumbs{display:flex;gap:8px;margin-top:10px;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin;}
.gallery-thumbs::-webkit-scrollbar{height:6px;}
.gallery-thumbs::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px;}
.gal-thumb{flex:0 0 auto;width:62px;height:62px;border:2px solid transparent;border-radius:8px;overflow:hidden;cursor:pointer;background:#fff;transition:border-color .2s;}
.gal-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.gal-thumb:hover{border-color:#93c5fd;}
.gal-thumb.active{border-color:var(--c-blue,#2563eb);}
.detail-info h1{font-size:22px;margin:0 0 10px;line-height:1.4;}
.detail-flags{display:flex;gap:6px;margin-bottom:10px;}
.detail-flags .flag{position:static;}
.detail-price-row{display:flex;align-items:baseline;gap:12px;background:#fff1f2;border-radius:10px;padding:12px 16px;margin-bottom:12px;}
.detail-price-row .price{color:#ef4444;font-size:28px;font-weight:700;}
.detail-price-row .price small{font-size:16px;font-weight:500;}
.detail-price-row .market-price{color:#94a3b8;text-decoration:line-through;font-size:14px;}
.stock-line{display:flex;gap:18px;font-size:13px;color:var(--c-sub,#6b7280);margin-bottom:16px;}
.stock-line b{color:var(--c-text,#1f2937);}
.spec-group{margin-bottom:14px;}
.spec-name{font-size:13px;color:var(--c-sub,#6b7280);margin-bottom:8px;}
.spec-values{display:flex;flex-wrap:wrap;gap:8px;}
.spec-values label{cursor:pointer;}
.spec-values input{display:none;}
.spec-values .sv{display:inline-block;padding:7px 16px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;color:#475569;transition:all .2s;}
.spec-values input:checked + .sv{border-color:var(--c-blue,#2563eb);color:var(--c-blue,#2563eb);background:#eff6ff;font-weight:600;}
.quantity-row{display:flex;align-items:center;gap:12px;margin:18px 0;}
.buy-row{display:flex;gap:12px;margin-top:4px;}
.buy-row .btn{flex:1;max-width:180px;height:44px;line-height:42px;}
.ai-summary{margin-top:22px;background:linear-gradient(135deg,#eff6ff,#f0fdfa);border:1px solid #dbeafe;border-radius:12px;padding:16px 18px;}
.ai-summary .ai-tag{display:inline-block;font-size:12px;color:var(--c-blue,#2563eb);background:#fff;border:1px solid #bfdbfe;border-radius:6px;padding:2px 8px;margin-bottom:8px;font-weight:600;}
.ai-summary p{margin:0;font-size:14px;color:#334155;line-height:1.8;}
.semantic-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;}
.semantic-tags .tag{font-size:12px;color:var(--c-blue,#2563eb);background:#eff6ff;border:1px solid #dbeafe;border-radius:16px;padding:3px 12px;}
.desc-section{margin-top:26px;}
.desc-content{background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:12px;padding:20px;font-size:14px;line-height:1.9;color:#334155;}
.faq-list details{background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:10px;margin-bottom:10px;padding:12px 16px;}
.faq-list summary{cursor:pointer;font-size:14px;font-weight:600;color:var(--c-text,#1f2937);}

/* ---------- 结算（单列纵向，宽度由 .app-container 统一控制，所有 panel 等宽对齐） ---------- */
.checkout-layout{display:flex;flex-direction:column;gap:18px;}
.checkout-main{min-width:0;}
.checkout-main .panel{margin-bottom:0;min-width:0;}
.address-item{display:flex;align-items:center;gap:10px;border:1px solid #e2e8f0;border-radius:10px;padding:12px 14px;margin-bottom:10px;cursor:pointer;font-size:14px;transition:border-color .2s,background .2s;}
.address-item:hover{border-color:#cbd5e1;background:#f8fafc;}
.address-item:has(input:checked){border-color:#cbd5e1;background:#f1f5f9;}
.addr-radio{width:16px;height:16px;flex-shrink:0;accent-color:var(--c-blue,#2563eb);}
.ad-name{font-weight:600;color:var(--c-text,#1f2937);flex-shrink:0;white-space:nowrap;}
.ad-tag{font-size:11px;color:#fff;background:#ef4444;border-radius:4px;padding:1px 6px;flex-shrink:0;white-space:nowrap;}
.address-item .ad-detail{flex:1 1 0;min-width:0;word-break:break-word;line-height:1.5;}
.address-item .ad-phone{flex-shrink:0;white-space:nowrap;}
@media (max-width:640px){
.address-item{flex-wrap:wrap;align-items:flex-start;gap:6px 10px;}
.addr-radio{order:1;margin-top:2px;}
.ad-name{order:2;}
.ad-tag{order:3;}
.address-item .ad-detail{order:4;width:calc(100% - 26px);margin-left:26px;}
.address-item .ad-phone{order:5;width:calc(100% - 26px);margin-left:26px;}
}
.oi-name{font-size:13px;color:var(--c-text,#1f2937);}
.oi-price{color:#ef4444;font-weight:600;font-size:13px;}
.order-item-line{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed #f1f5f9;font-size:13px;}
.oi-thumb{flex-shrink:0;width:64px;height:64px;border-radius:6px;border:1px solid #eef1f6;overflow:hidden;background:#fafbfc;display:flex;align-items:center;justify-content:center;}
.oi-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.oi-thumb-empty{background:repeating-linear-gradient(45deg,#fafbfc,#fafbfc 6px,#f3f4f6 6px,#f3f4f6 12px);}
.oi-main{flex:1;min-width:0;}
.oi-name-link{color:inherit;text-decoration:none;}
.oi-name-link:hover{color:#2563eb;}
.oi-spec{margin-top:2px;font-size:12px;}
.order-summary-line{display:flex;justify-content:space-between;font-size:13px;color:var(--c-sub,#6b7280);padding:5px 0;}

/* ---------- 订单 ---------- */
.order-card{background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:12px;margin-bottom:14px;overflow:hidden;}
.order-head{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:#f8fafc;border-bottom:1px solid var(--c-line,#e5e9f0);font-size:13px;color:var(--c-sub,#6b7280);}
.order-head .status{color:var(--c-blue,#2563eb);font-weight:600;}
.order-body{padding:12px 16px;}
.order-summary-line .price{color:#ef4444;font-weight:700;}
/* 订单列表商品展示：多商品时仅缩略图横向排列（不堆叠详情块） */
.order-thumbs-row{display:flex;flex-wrap:wrap;gap:8px;padding:6px 0 10px;}
.order-thumbs-row .oi-thumb-sm{width:54px;height:54px;border-radius:6px;border:1px solid #eef1f6;overflow:hidden;background:#fafbfc;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:transform .15s ease;}
.order-thumbs-row .oi-thumb-sm:hover{transform:translateY(-1px);border-color:var(--c-blue,#2563eb);}
.order-thumbs-row .oi-thumb-sm img{width:100%;height:100%;object-fit:cover;display:block;}
.receiver-info{font-size:13px;color:var(--c-sub,#6b7280);line-height:1.8;background:#f8fafc;border-radius:8px;padding:10px 14px;margin-bottom:12px;}

/* ---------- 会员中心 ---------- */
.uc-stat{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:14px;margin-bottom:20px;}
.stat-card{background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:12px;padding:18px;text-align:center;}
.stat-card .num{font-size:24px;font-weight:700;color:var(--c-blue,#2563eb);}
.stat-card .name{font-size:13px;color:var(--c-sub,#6b7280);margin-top:4px;}
.uc-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;}
.uc-links a{display:block;background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:10px;padding:14px 16px;font-size:14px;color:var(--c-text,#1f2937);text-decoration:none;transition:all .2s;}
.uc-links a:hover{border-color:var(--c-blue,#2563eb);color:var(--c-blue,#2563eb);transform:translateY(-2px);}

/* ---------- 分页 ---------- */
.pagination{display:flex;align-items:center;justify-content:center;gap:8px;padding:22px 0 8px;flex-wrap:wrap;}
.pagination a,.pagination .cur{min-width:32px;height:32px;line-height:32px;text-align:center;padding:0 10px;border-radius:8px;font-size:13px;text-decoration:none;box-sizing:border-box;}
.pagination a{background:#fff;border:1px solid #e2e8f0;color:#475569;}
.pagination a:hover{border-color:var(--c-blue,#2563eb);color:var(--c-blue,#2563eb);}
.pagination .cur{background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;font-weight:600;}
.pagination .page-info{font-size:13px;color:#94a3b8;margin-right:6px;}

/* ---------- 商品评价 ---------- */
.cmt-summary{display:flex;flex-wrap:wrap;gap:20px;align-items:center;padding:16px;background:#fafbfc;border:1px solid var(--c-line,#e5e9f0);border-radius:10px;margin-bottom:14px;}
.cmt-avg{text-align:center;min-width:110px;}
.cmt-avg-num{font-size:34px;font-weight:700;color:#f59e0b;line-height:1.1;}
.cmt-avg-stars{color:#f59e0b;font-size:15px;letter-spacing:1px;margin:2px 0;}
.cmt-dims{display:flex;flex-direction:column;gap:6px;}
.cmt-dim{display:flex;gap:10px;align-items:center;font-size:13px;color:var(--c-sub,#6b7280);}
.cmt-dim b{color:#f59e0b;font-size:15px;}
.cmt-dist{flex:1;min-width:200px;display:flex;flex-direction:column;gap:4px;}
.cmt-dist-row{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--c-sub,#6b7280);}
.cdr-label{width:32px;flex-shrink:0;}
.cdr-bar{flex:1;height:8px;background:#eef1f5;border-radius:4px;overflow:hidden;}
.cdr-bar i{display:block;height:100%;background:#f59e0b;border-radius:4px;}
.cdr-pct{width:36px;text-align:right;flex-shrink:0;}

.shop-filter-bar.cmt-filter{border:0;padding:0;margin:0 0 14px;gap:6px;}
.cmt-filter a{background:#f4f6f9;}

.cmt-item{padding:14px 0;border-bottom:1px dashed #eceff3;}
.cmt-item:last-child{border-bottom:0;}
.cmt-item-head{display:flex;align-items:center;gap:10px;margin-bottom:6px;flex-wrap:wrap;}
.cmt-name{font-weight:600;font-size:13px;color:var(--c-text,#1f2937);}
.cmt-stars{color:#f59e0b;font-size:13px;letter-spacing:1px;}
.cmt-item-body p{margin:4px 0 0;font-size:14px;line-height:1.7;color:#374151;}
.cmt-imgs{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
.cmt-imgs img{width:72px;height:72px;object-fit:cover;border-radius:6px;border:1px solid var(--c-line,#e5e9f0);cursor:pointer;}
.cmt-item-reply{margin-top:10px;padding:10px 12px;background:#fff7ed;border-left:3px solid #f59e0b;border-radius:0 6px 6px 0;font-size:13px;color:#78350f;line-height:1.7;}
.cmt-more{text-align:center;padding:16px 0;}
.cmt-more a{color:var(--c-blue,#2563eb);font-size:14px;}
.cmt-empty{padding:36px 0;text-align:center;color:#94a3b8;font-size:14px;}

/* ---------- 评价表单页 ---------- */
.comment-product{display:flex;gap:12px;align-items:flex-start;padding:12px;background:#fafbfc;border-radius:8px;margin-bottom:6px;}
.comment-product .thumb{width:64px;height:64px;object-fit:cover;border-radius:6px;flex-shrink:0;}
.cp-name{font-size:14px;font-weight:600;line-height:1.5;}
.rate-row{display:flex;align-items:center;gap:12px;padding:8px 0;flex-wrap:wrap;}
.rate-label{width:70px;font-size:13px;color:var(--c-sub,#6b7280);flex-shrink:0;}
.rate-stars{display:inline-flex;gap:2px;cursor:pointer;}
.rate-stars .star{font-size:22px;color:#d9dee5;transition:color .15s;user-select:none;}
.rate-stars .star.on{color:#f59e0b;}
.rate-stars .star:hover{color:#fbbf24;}
.rate-text{font-size:13px;color:#f59e0b;}
.comment-img-preview{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
.ci-thumb{width:72px;height:72px;object-fit:cover;border-radius:6px;border:1px solid var(--c-line,#e5e9f0);cursor:pointer;}
.comment-tips{margin:0;padding-left:18px;font-size:13px;color:var(--c-sub,#6b7280);line-height:2;}

/* ---------- 我的评价 ---------- */
.comment-card{background:#fff;border:1px solid var(--c-line,#e5e9f0);border-radius:10px;padding:14px 16px;margin-bottom:12px;}
.cc-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:8px;}
.cc-product-link{display:flex;align-items:center;gap:10px;flex:1;min-width:0;color:inherit;text-decoration:none;}
.cc-product-link:hover .cc-product-name{color:#2563eb;}
.cc-thumb{width:56px;height:56px;object-fit:cover;border:1px solid #eef1f6;border-radius:6px;flex-shrink:0;background:#fafbfc;}
.cc-product-info{display:flex;flex-direction:column;gap:2px;min-width:0;}
.cc-product-name{font-size:14px;font-weight:600;line-height:1.5;color:inherit;}
.cc-sku{font-size:12px;}
.cc-product{font-size:14px;font-weight:600;line-height:1.5;}
.cc-status{font-size:12px;padding:2px 8px;border-radius:4px;flex-shrink:0;}
.status-0{background:#fef3c7;color:#92400e;}
.status-1{background:#d1fae5;color:#065f46;}
.status-2{background:#f1f5f9;color:#64748b;}
.cc-rate{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;margin-bottom:8px;}
.stars-mini{color:#f59e0b;letter-spacing:1px;}
.cc-content{font-size:14px;line-height:1.7;color:#374151;}
.cc-images{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
.cc-images img{width:64px;height:64px;object-fit:cover;border-radius:6px;}
.cc-reply{margin-top:10px;padding:10px 12px;background:#fff7ed;border-left:3px solid #f59e0b;border-radius:0 6px 6px 0;font-size:13px;color:#78350f;line-height:1.7;}
.cc-foot{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;margin-top:10px;padding-top:10px;border-top:1px dashed #eceff3;}

/* ---------- 结算页：商品清单横排表格 + 紧凑支付方式 ---------- */
.checkout-goods { width: 100%; border-collapse: collapse; }
.checkout-goods th {
  text-align: left;
  padding: 8px 10px;
  background: #fafbfc;
  border-bottom: 1px solid var(--c-line, #e5e9f0);
  font-size: 13px;
  color: var(--c-sub, #6b7280);
  font-weight: 600;
}
.checkout-goods td {
  padding: 12px 10px;
  border-bottom: 1px dashed #eceff3;
  vertical-align: middle;
}
.checkout-goods .cart-item-info { display: flex; gap: 10px; align-items: center; }
.checkout-goods .thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.checkout-goods .name { font-size: 14px; line-height: 1.5; }
.checkout-goods .sku { font-size: 12px; color: var(--c-sub, #6b7280); margin-top: 2px; }

/* 确认订单商品清单：窄屏卡片化，避免固定列宽压碎商品名 */
@media (max-width: 640px) {
  .checkout-goods thead { display: none; }
  .checkout-goods,
  .checkout-goods tbody,
  .checkout-goods tr,
  .checkout-goods td { display: block; width: 100%; box-sizing: border-box; }
  .checkout-goods tr {
    position: relative;
    background: #fff;
    border: 1px solid var(--c-line, #e5e9f0);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 12px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
  }
  .checkout-goods td { padding: 6px 0; border: none; text-align: left; word-break: normal; }
  .checkout-goods .cart-item-info { align-items: flex-start; }
  .checkout-goods .cart-item-info .thumb { width: 64px; height: 64px; flex-shrink: 0; }
  .checkout-goods .cart-item-info .name { display: inline; word-break: normal; }
  .checkout-goods td:nth-child(2),
  .checkout-goods td:nth-child(3),
  .checkout-goods td:nth-child(4) {
    display: inline-flex;
    width: auto;
    align-items: center;
    gap: 4px;
    margin-right: 14px;
    font-size: 13px;
    vertical-align: top;
  }
  .checkout-goods td:nth-child(2)::before { content: '单价：'; color: #94a3b8; font-size: 12px; }
  .checkout-goods td:nth-child(3)::before { content: '数量：'; color: #94a3b8; font-size: 12px; }
  .checkout-goods td:nth-child(4)::before { content: '小计：'; color: #94a3b8; font-size: 12px; }
  .checkout-goods td:nth-child(4) { margin-right: 0; }
  .checkout-goods .price { font-size: 15px; }
}

.checkout-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 10px 4px;
  font-size: 14px;
  color: var(--c-sub, #6b7280);
}
.checkout-summary .cs-total { font-size: 15px; color: var(--c-text, #1f2937); }
.checkout-summary .cs-total .price { font-size: 20px; }

/* 支付方式（多项时均分一行，窄屏自动换行） */
.pay-methods { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; }
.pay-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 200px;
  /* ⚠️ max-width 必须有：flex-grow:1 会让卡片均分整行宽度，
     有好几张时看着正常，但**只剩一张**（后台只启用了一种支付方式）时
     它会撑满整行，变成一条又扁又长的横条。
     加个上限后：多张仍是等宽填满，单张停在一个正常卡片的宽度。 */
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid var(--c-line, #e5e9f0);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pay-item:hover { border-color: #c7d2e0; background: #fafbfc; }
.pay-item:has(input:checked) {
  border-color: var(--c-blue, #2563eb);
  background: #eff6ff;
}
.pi-body { display: flex; flex-direction: column; gap: 2px; line-height: 1.4; }
.pi-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.pi-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.pi-ico svg { display: block; }
.pi-wechat { background: linear-gradient(135deg, #07c160, #04a850); }
.pi-alipay { background: linear-gradient(135deg, #1677ff, #0e5fd9); }
/* 模拟支付（测试）选项：琥珀色虚线框，与真实支付区分 */
.pay-item-mock { border-style: dashed; border-color: #f59e0b; }
.pay-item-mock .pi-mock { background: linear-gradient(135deg, #f59e0b, #d97706); }
.mock-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; font-size: 11px; line-height: 1.6; border-radius: 8px; background: #fff7ed; color: #d97706; border: 1px solid #fed7aa; vertical-align: middle; }

/* ---------- 在线支付页 ---------- */
.pay-page { max-width: 560px; margin: 0 auto; }
.pay-panel { padding: 28px 24px; text-align: center; }
.pay-amount-box { margin-bottom: 20px; }
.pay-amount {
  font-size: 32px;
  font-weight: 700;
  color: #e60012;
  line-height: 1.3;
  margin: 6px 0;
}
.pay-qrcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}
.pay-qrcode #qrcode {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--c-line, #e5e9f0);
  border-radius: 10px;
  line-height: 0;
}
.pay-qrcode #qrcode img { width: 180px; height: 180px; }
.pay-jumping { padding: 28px 0; }
.pay-status {
  margin: 16px 0;
  padding: 10px;
  font-size: 14px;
  min-height: 22px;
}
.pay-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed #eceff3;
}

/* ---------- 线下支付指引（pay/offline：银行汇款 + 收款码） ---------- */
.offline-block { margin: 18px 0; text-align: left; }
.offline-h3 {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin-bottom: 10px;
  padding-left: 9px;
  border-left: 3px solid #0d9488;
  line-height: 1.2;
}
.offline-table {
  border: 1px solid #eef1f5;
  border-radius: 8px;
  background: #fafbfc;
  padding: 2px 12px;
}
.offline-tr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 14px;
  border-bottom: 1px dashed #eceff3;
}
.offline-tr:last-child { border-bottom: none; }
.offline-th { flex: 0 0 76px; color: #94a3b8; }
.offline-td {
  flex: 1;
  color: #222;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
/* 银行账号：等宽 + 可整体选中，避免手动拖选漏字符 */
.offline-no {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  letter-spacing: .5px;
  word-break: break-all;
  user-select: all;
}
.offline-qrs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.offline-qr { text-align: center; }
.offline-qr-name { font-size: 13px; color: #555; margin-bottom: 6px; }
.offline-qr-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  padding: 8px;
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  cursor: zoom-in;
}
.offline-tip-line { font-size: 12px; color: #94a3b8; margin-top: 10px; }
/* 汇款说明是纯文本，靠 pre-line 让换行生效——不能用 |raw 输出（存储型 XSS 面） */
.offline-note { text-align: left; white-space: pre-line; margin: 18px 0 0; }
/* 订单列表「汇款信息」弹窗底部提示 */
.offline-foot-tip { font-size: 13px; color: #64748b; margin-top: 14px; text-align: left; line-height: 1.7; }
/* 线下支付弹窗：内容可能很长（多张收款码 + 汇款说明）→ 限高内滚，避免被视口裁掉上下两端 */
.offline-modal .modal-box { width: min(520px, 100%); max-height: 86vh; overflow-y: auto; }
.offline-modal .offline-block:last-child { margin-bottom: 0; }
.offline-zoom {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .72);
  cursor: zoom-out;
  padding: 24px;
}
.offline-zoom img {
  max-width: 90vw;
  max-height: 90vh;
  background: #fff;
  padding: 12px;
  border-radius: 10px;
}

/* ---------- 购物车：数量自动保存提示 ---------- */
.save-hint {
  display: inline-block;
  min-width: 48px;
  margin-right: 8px;
  font-size: 12px;
  text-align: right;
  vertical-align: middle;
}
.save-hint.saving { color: #94a3b8; }
.save-hint.saved  { color: #00a854; }
.save-hint.failed { color: #e60012; }

/* ---------- 结算页收货地址折叠 ---------- */
.addr-list .addr-collapsed { display: none; }
.addr-more { margin-top: 8px; display: flex; gap: 16px; flex-wrap: wrap; }
.addr-more a { font-size: 13px; color: var(--c-blue, #2563eb); cursor: pointer; text-decoration: none; }
.addr-more a.addr-add { color: var(--c-blue, #2563eb); }

/* ---------- 提交订单按钮：右侧 ---------- */
.submit-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 16px 0 4px;
  margin-top: 12px;
  border-top: 1px dashed var(--c-line, #eceff3);
}
.submit-bar .btn-danger {
  /* 覆盖 .btn 基础类锁死的 height:38px; line-height:36px（避免 padding 把内容裁剪导致字错位） */
  height: auto;
  line-height: 1.5;
  padding: 12px 32px;
  font-size: 15px;
  border-radius: 8px;
  white-space: nowrap;
  min-width: 280px;
  text-align: center;
  display: inline-block;
  vertical-align: middle;
}

/* ---------- 结算页：所有 panel 强制等宽（兜底） ---------- */
.checkout-main .panel,
.checkout-main .addr-list,
.checkout-main .pay-methods,
.checkout-goods { max-width: 100%; box-sizing: border-box; }
.checkout-goods { width: 100%; }
.checkout-goods td { overflow-wrap: anywhere; }
.checkout-summary { flex-wrap: wrap; max-width: 100%; }
.addr-list { width: 100%; }
.pay-methods { width: 100%; }
