/* =============================================================
   日用百货商城 前台样式
   规范：主色 #2b74b9 / 强调 #f5a623，圆角 6px，轻阴影，无渐变无粒子
   所有 select / input / button / 滚动条 均重写，不使用浏览器原生样式
   ============================================================= */

:root {
    --c-primary: #2b74b9;
    --c-primary-dark: #24629c;
    --c-primary-soft: #eaf2f9;
    --c-accent: #f5a623;
    --c-accent-dark: #e0951a;
    --c-text: #222222;
    --c-text-sub: #666666;
    --c-text-lite: #999999;
    --c-bg: #f7f8fa;
    --c-card: #ffffff;
    --c-line: #e8eaed;
    --c-line-soft: #f0f1f3;
    --c-success: #1f7a3d;
    --c-warn: #b7791f;
    --c-error: #c0392b;
    --radius: 6px;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    --page-max: 1200px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

a { color: inherit; text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--c-primary); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 12px; }

/* 滚动条重写 */
* { scrollbar-width: thin; scrollbar-color: #cfd4da transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f2f3f5; }
::-webkit-scrollbar-thumb { background: #cfd4da; border-radius: 6px; border: 2px solid #f2f3f5; }
::-webkit-scrollbar-thumb:hover { background: #b6bcc4; }

.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 16px; }
.card { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--c-text-lite); }
.sub { color: var(--c-text-sub); }
.price { color: #d9480f; font-weight: 600; }
.price-num { color: #d9480f; font-weight: 600; }
.market-price { color: var(--c-text-lite); text-decoration: line-through; font-size: 13px; margin-left: 6px; font-weight: 400; }
.tag { display: inline-block; font-size: 12px; line-height: 1; padding: 4px 7px; border-radius: 3px; background: var(--c-primary-soft); color: var(--c-primary); }
.tag-accent { background: #fdf1dd; color: var(--c-accent-dark); }
.tag-line { background: transparent; border: 1px solid var(--c-line); color: var(--c-text-sub); }
.hide { display: none !important; }
.text-right { text-align: right; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 88px; height: 38px; padding: 0 18px;
    font-size: 15px; font-family: inherit; line-height: 1;
    color: var(--c-text); background: #fff;
    border: 1px solid var(--c-line); border-radius: var(--radius);
    cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    -webkit-appearance: none; appearance: none;
}
.btn:hover { border-color: #c9d3de; background: #f6f8fa; }
.btn:active { background: #eef2f6; }
.btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 1px; }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; }
.btn-accent { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--c-primary); color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-primary-soft); color: var(--c-primary); }
.btn-sm { min-width: 0; height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------------- 表单控件 ---------------- */
.input, .select, .textarea {
    width: 100%; height: 40px; padding: 0 12px;
    font-size: 15px; font-family: inherit; color: var(--c-text);
    background: #fff; border: 1px solid #dcdfe6; border-radius: var(--radius);
    -webkit-appearance: none; appearance: none;
    transition: border-color .15s ease;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--c-primary); }
.input::placeholder, .textarea::placeholder { color: #b8bec7; }
.input[readonly] { background: #f5f6f8; color: var(--c-text-sub); }
.select {
    padding-right: 34px; cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L1 2h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.select[multiple] { background-image: none; }
.checkbox, .radio {
    width: 18px; height: 18px; margin: 0; vertical-align: -4px; cursor: pointer;
    -webkit-appearance: none; appearance: none;
    background: #fff; border: 1px solid #c4cad2; border-radius: 3px; position: relative;
    transition: background-color .15s ease, border-color .15s ease;
}
.radio { border-radius: 50%; }
.checkbox:checked, .radio:checked { background: var(--c-primary); border-color: var(--c-primary); }
.checkbox:checked::after {
    content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.radio:checked::after {
    content: ""; position: absolute; left: 4px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #fff;
}
.checkbox:focus-visible, .radio:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 14px; color: var(--c-text-sub); margin-bottom: 6px; }
.field .req { color: var(--c-error); margin-left: 2px; }
.req { color: var(--c-error); margin-left: 2px; font-size: 14px; }
.field .err { display: block; font-size: 13px; color: var(--c-error); margin-top: 6px; min-height: 18px; }
.field .tip { font-size: 13px; color: var(--c-text-lite); margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------------- 顶部公告 ---------------- */
.notice {
    background: #fffdf6; border-bottom: 1px solid #f3e9d2; color: #7a5a18; font-size: 14px;
}
.notice .wrap { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.notice-txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-close { background: none; border: 0; color: #a08a5a; font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 6px; }
.notice-close:hover { color: #7a5a18; }

/* ---------------- 页头 ---------------- */
.site-header { background: #fff; border-bottom: 1px solid var(--c-line); }
.header-top .wrap { display: flex; align-items: center; gap: 24px; padding-top: 16px; padding-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: var(--c-primary); flex-shrink: 0; }
.logo img { height: 40px; width: auto; }
.logo-text { letter-spacing: .5px; }
.search { flex: 1; display: flex; max-width: 560px; }
.search .input { border-radius: var(--radius) 0 0 var(--radius); border-right: 0; }
.search .btn { border-radius: 0 var(--radius) var(--radius) 0; min-width: 76px; }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 14px; }
.header-actions a { display: inline-flex; align-items: center; gap: 5px; color: var(--c-text-sub); }
.header-actions a:hover { color: var(--c-primary); }
.ha-item {
    position: relative; display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 10px; border-radius: var(--radius); line-height: 1.2;
    transition: background-color .15s ease, color .15s ease;
}
.ha-item:hover { background: var(--c-primary-soft); color: var(--c-primary); }
.ha-ico { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }
.ha-txt { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ha-bare { padding: 6px 6px; }
.cart-badge .num {
    position: absolute; top: 1px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
    font-size: 11px; line-height: 16px; text-align: center; color: #fff; background: var(--c-accent); border-radius: 8px;
}
.header-nav { border-top: 1px solid var(--c-line-soft); }
.header-nav .wrap { display: flex; align-items: center; gap: 4px; min-height: 46px; }
.nav-item { padding: 0 16px; line-height: 46px; font-size: 15px; color: var(--c-text); }
.nav-item:hover { color: var(--c-primary); background: #f7fafd; }
.nav-item.is-active { color: var(--c-primary); font-weight: 600; }
.nav-cate { position: relative; }
.nav-cate .mega {
    display: none; position: absolute; left: 0; top: 46px; z-index: 30; width: 240px; padding: 10px 0;
    background: #fff; border: 1px solid var(--c-line); border-top: 0; box-shadow: var(--shadow);
}
.nav-cate:hover .mega { display: block; }
.mega a { display: block; padding: 7px 18px; font-size: 14px; color: var(--c-text-sub); line-height: 1.4; }
.mega a:hover { background: #f5f8fb; color: var(--c-primary); }
.mega .mega-parent { font-size: 13px; color: var(--c-text-lite); padding: 8px 18px 4px; }
.nav-toggle { display: none; }
.header-phone { font-size: 14px; color: var(--c-text-sub); margin-left: auto; }
.header-phone strong { color: var(--c-primary); font-weight: 600; }

/* ---------------- 板块 ---------------- */
.section { margin-top: 24px; }
.section-hd { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-title { font-size: 20px; }
.section-sub { font-size: 13px; color: var(--c-text-lite); }
.section-more { margin-left: auto; font-size: 14px; color: var(--c-text-sub); }
.section-more:hover { color: var(--c-primary); }
.banner { position: relative; overflow: hidden; border-radius: var(--radius); background: #dfe4ea; }
.banner-track { display: flex; transition: transform .45s ease; }
.banner-slide { position: relative; flex: 0 0 100%; height: 360px; }
.banner-slide a { display: block; height: 100%; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-slide .banner-inner { height: 100%; display: flex; align-items: center; padding: 0 6%; background: #eef2f6; color: var(--c-primary); font-size: 26px; font-weight: 600; }
.banner-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 20px; font-size: 15px; color: #fff; background: rgba(0,0,0,.35); }
.banner-arrow, .banner-dots { z-index: 5; }
.banner-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 56px; border: 0; background: rgba(255,255,255,.85); color: var(--c-text-sub); font-size: 20px; cursor: pointer; transition: background-color .15s ease; }
.banner-arrow:hover { background: #fff; color: var(--c-primary); }
.banner-arrow.prev { left: 0; border-radius: 0 var(--radius) var(--radius) 0; }
.banner-arrow.next { right: 0; border-radius: var(--radius) 0 0 var(--radius); }
.banner-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.banner-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; }
.banner-dots i.on { background: #fff; }

.cate-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.cate-cell { padding: 16px 8px; text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.cate-cell img { width: 48px; height: 48px; margin: 0 auto 8px; object-fit: contain; }
.cate-cell .ph-img { width: 48px; height: 48px; margin: 0 auto 8px; font-size: 12px; }
.cate-cell span { font-size: 14px; color: var(--c-text); }
.cate-cell:hover span { color: var(--c-primary); }

.guarantee { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.guarantee-item { display: flex; align-items: center; gap: 12px; padding: 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.guarantee-item img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.guarantee-item .g-title { font-size: 15px; font-weight: 600; }
.guarantee-item .g-desc { font-size: 13px; color: var(--c-text-lite); }

/* 首页主体资质条：公司名与备案号直接取后台配置，点击进公示页 */
.subject-band {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 12px 18px; background: #fff; border-left: 3px solid var(--c-primary);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.subject-band .sb-name { font-size: 15px; font-weight: 600; }
.subject-band .sb-item { font-size: 13px; color: var(--c-text-sub); }
.subject-band .sb-link { margin-left: auto; font-size: 13px; color: var(--c-primary); white-space: nowrap; }
.subject-band .sb-link:hover { text-decoration: underline; }

/* 成交数据条：数字为订单表实记，无成交时该板块整体不渲染 */
.deal-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.deal-cell { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 12px; text-align: center; }
.deal-num { display: block; font-size: 26px; font-weight: 700; color: var(--c-primary); line-height: 1.2; }
.deal-label { display: block; font-size: 13px; color: var(--c-text-sub); margin-top: 6px; }
.deal-note { font-size: 12px; color: var(--c-text-lite); line-height: 1.7; margin-top: 10px; }

.paid-list { padding: 4px 18px; }
.paid-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-line-soft); font-size: 14px; }
.paid-item:last-child { border-bottom: none; }
.paid-goods { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paid-num { color: var(--c-text-lite); font-size: 13px; }
.paid-time { color: var(--c-text-sub); font-size: 13px; }

/* 发货流程：自营实物仓的人工打包揽收过程 */
.flow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.flow-step { display: flex; gap: 10px; padding: 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.flow-no {
    width: 26px; height: 26px; line-height: 26px; text-align: center; flex-shrink: 0;
    border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); font-weight: 700; font-size: 14px;
}
.flow-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.flow-desc { font-size: 13px; color: var(--c-text-lite); line-height: 1.6; }
.flow-foot {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px;
    padding: 12px 18px; background: var(--c-primary-soft); border-radius: var(--radius);
    font-size: 13px; color: var(--c-text-sub);
}
.flow-foot a { margin-left: auto; color: var(--c-primary); white-space: nowrap; }
.goods-sales.new-in { color: var(--c-success); }

/* 商品卡片 */
.goods-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.goods-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.goods-card { position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.goods-thumb { position: relative; display: block; overflow: hidden; background: #f2f4f7; }
.goods-thumb img, .goods-thumb .ph-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .25s ease; }
.goods-card:hover .goods-thumb img, .goods-card:hover .goods-thumb .ph-img { transform: scale(1.02); }
.goods-flag { position: absolute; top: 8px; left: 8px; }
.goods-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.goods-title { font-size: 15px; line-height: 1.45; height: 2.9em; overflow: hidden; }
.goods-card:hover .goods-title { color: var(--c-primary); }
.goods-meta { display: flex; align-items: baseline; margin-top: auto; }
.goods-meta .price-num { font-size: 19px; }
.goods-meta .price-num::before { content: "¥"; font-size: 13px; margin-right: 1px; }
.goods-sales { font-size: 12px; color: var(--c-text-lite); margin-left: auto; }

/* 图片占位：后台上传实拍图前统一显示 */
.ph-img {
    display: flex; align-items: center; justify-content: center; text-align: center;
    background: repeating-linear-gradient(45deg, #f2f4f7, #f2f4f7 10px, #edf0f4 10px, #edf0f4 20px);
    color: #a4abb5; font-size: 13px; padding: 8px; line-height: 1.4;
}

/* ---------------- 列表页 ---------------- */
.filter-bar { padding: 14px 16px; margin-bottom: 16px; }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.filter-row + .filter-row { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--c-line); }
.filter-label { color: var(--c-text-lite); flex-shrink: 0; width: 60px; }
.filter-link { padding: 4px 12px; border-radius: var(--radius); color: var(--c-text-sub); }
.filter-link:hover { background: #f2f6fa; color: var(--c-primary); }
.filter-link.on { background: var(--c-primary); color: #fff; }
.price-filter { display: inline-flex; align-items: center; gap: 6px; }
.price-filter .input { width: 76px; height: 30px; font-size: 13px; }
.breadcrumb { padding: 14px 0 0; font-size: 14px; color: var(--c-text-lite); }
.breadcrumb a { color: var(--c-text-sub); }
.breadcrumb span + span::before { content: "/"; margin: 0 8px; color: #ccd1d8; }

.empty { padding: 60px 20px; text-align: center; color: var(--c-text-lite); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.empty .empty-t { font-size: 16px; color: var(--c-text-sub); margin-bottom: 14px; }

.pager { display: flex; justify-content: center; gap: 6px; margin: 24px 0; }
.pager a, .pager i {
    min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--c-line); border-radius: 4px; font-size: 14px; font-style: normal; color: var(--c-text-sub);
}
.pager a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.pager .on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pager .gap { border: 0; background: none; }

/* ---------------- 详情页 ---------------- */
.detail-main { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 24px; padding: 20px; }
.gallery .g-big { position: relative; border-radius: var(--radius); overflow: hidden; background: #f2f4f7; cursor: zoom-in; }
.gallery .g-big img, .gallery .g-big .ph-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .18s ease; }
.gallery .g-big.is-zoom img { transform: scale(2.1); }
.gallery .g-big.is-zoom:hover { cursor: zoom-out; }
.gallery .g-zoom-tip {
    position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; font-size: 12px; line-height: 1.6;
    color: #fff; background: rgba(20, 30, 40, .58); border-radius: 12px; pointer-events: none;
}
.gallery { position: relative; }
.gallery .g-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .g-thumbs button {
    width: 62px; height: 62px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden;
    background: #f2f4f7; cursor: pointer; transition: border-color .15s ease;
}
.gallery .g-thumbs button.on { border-color: var(--c-primary); }
.gallery .g-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-size: 22px; line-height: 1.4; }
.detail-price { margin: 14px 0; padding: 14px 16px; background: #fafbfc; border-radius: var(--radius); border-left: 3px solid var(--c-accent); }
.detail-price .p-now { font-size: 30px; color: #d9480f; font-weight: 700; }
.detail-price .p-now::before { content: "¥"; font-size: 16px; }
.detail-rows { font-size: 14px; }
.detail-rows .row-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--c-line-soft); }
.detail-rows .row-k { width: 68px; color: var(--c-text-lite); flex-shrink: 0; }
.spec-group { margin: 8px 0; }
.spec-group .sg-name { font-size: 14px; color: var(--c-text-lite); margin-bottom: 8px; }
.spec-values { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-btn {
    min-height: 34px; padding: 0 14px; font-size: 14px; font-family: inherit; color: var(--c-text);
    background: #fff; border: 1px solid #dcdfe6; border-radius: 4px; cursor: pointer; transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.spec-btn:hover { border-color: var(--c-primary); }
.spec-btn.on { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }
.spec-btn.out { color: #c2c7ce; border-style: dashed; background: #f7f8fa; text-decoration: line-through; cursor: not-allowed; }
.buy-num { display: inline-flex; align-items: center; }
.buy-num button { width: 34px; height: 34px; font-size: 16px; background: #f5f6f8; border: 1px solid #dcdfe6; cursor: pointer; color: var(--c-text-sub); }
.buy-num button:hover { background: #eceef1; color: var(--c-primary); }
.buy-num .input { width: 58px; height: 34px; text-align: center; border-radius: 0; border-left: 0; border-right: 0; }
.buy-actions { display: flex; gap: 12px; margin-top: 20px; align-items: center; flex-wrap: wrap; }
.fav-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
    font-size: 15px; font-family: inherit; color: var(--c-text-sub);
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.fav-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.fav-btn:hover { color: #e0356b; border-color: #f3b6ca; background: #fdf2f6; }
.fav-btn.on { color: #e0356b; border-color: #f3b6ca; background: #fdf2f6; }
.fav-btn.on svg { fill: #e0356b; stroke: #e0356b; }
.fav-corner-form { position: absolute; top: 6px; right: 6px; z-index: 3; }
.fav-corner {
    width: 30px; height: 30px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; background: rgba(20, 30, 40, .42); border: 0; border-radius: 50%; cursor: pointer;
    transition: background-color .15s ease;
}
.fav-corner svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.fav-corner:hover { background: rgba(224, 53, 107, .88); }
.fav-corner.on { background: #e0356b; }
.fav-corner.on svg { fill: #fff; stroke: #fff; }
.stock-tip { font-size: 13px; color: var(--c-text-lite); }
.stock-tip.warn { color: var(--c-accent-dark); }
.stock-tip.bad { color: var(--c-error); }

.tabs { margin-top: 20px; }
.tabs-hd { display: flex; gap: 2px; border-bottom: 1px solid var(--c-line); }
.tabs-hd button {
    height: 42px; padding: 0 22px; font-size: 15px; font-family: inherit; color: var(--c-text-sub);
    background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; transition: color .15s ease, border-color .15s ease;
}
.tabs-hd button.on { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 600; }
.tab-pane { display: none; padding: 18px 4px; }
.tab-pane.on { display: block; }
.param-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.param-table th, .param-table td { padding: 10px 14px; border: 1px solid var(--c-line-soft); text-align: left; }
.param-table th { width: 130px; background: #fafbfc; color: var(--c-text-lite); font-weight: 400; }
.rich { font-size: 15px; line-height: 1.9; color: #333; }
.rich img, .rich .rich-img { max-width: 100%; height: auto; margin: 10px 0; border-radius: 4px; }
.rich ul, .rich ol { padding-left: 22px; list-style: disc; }
.rich ol { list-style: decimal; }
.rich h3, .rich h4 { margin: 18px 0 8px; font-size: 17px; }
.rich table { width: 100%; border-collapse: collapse; }
.rich table th, .rich table td { border: 1px solid var(--c-line); padding: 8px 10px; }

.comment-item { padding: 14px 0; border-bottom: 1px solid var(--c-line-soft); }
.comment-hd { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.comment-hd .cname { color: var(--c-text); font-weight: 600; }
.comment-stars { color: var(--c-accent); font-size: 13px; letter-spacing: 1px; }
.comment-time { margin-left: auto; font-size: 12px; color: var(--c-text-lite); }
.comment-body { margin-top: 6px; font-size: 14px; color: #444; }
.comment-pics { display: flex; gap: 8px; margin-top: 8px; }
.comment-pics img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; }

/* ---------------- 购物车 / 表格 ---------------- */
.table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.table th, .table td { padding: 14px 12px; border-bottom: 1px solid var(--c-line-soft); text-align: left; vertical-align: middle; }
.table th { background: #fafbfc; color: var(--c-text-sub); font-weight: 600; white-space: nowrap; }
.table .t-goods { display: flex; gap: 12px; align-items: center; min-width: 240px; }
.table .t-goods img, .table .t-goods .ph-img { width: 64px; height: 64px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.table .t-name { line-height: 1.4; }
.table .t-spec { font-size: 12px; color: var(--c-text-lite); margin-top: 3px; }
.table .t-del { color: var(--c-text-lite); cursor: pointer; background: none; border: 0; font-size: 13px; font-family: inherit; }
.table .t-del:hover { color: var(--c-error); }
.cart-panel { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.row-form { display: inline; }
.cart-bar { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--c-line); background: #fcfcfd; flex-wrap: wrap; }
.cart-bar .sum { margin-left: auto; font-size: 14px; color: var(--c-text-sub); }
.cart-bar .sum b { font-size: 22px; color: #d9480f; }
.cart-bar .sum b::before { content: "¥"; font-size: 14px; }
.line-warn { font-size: 12px; color: var(--c-error); }

/* ---------------- 下单 / 支付 ---------------- */
.block { padding: 16px 20px; margin-bottom: 16px; }
.block-title { font-size: 16px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--c-line-soft); }
.addr-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.addr-item { position: relative; padding: 14px 16px; border: 1px solid var(--c-line); border-radius: var(--radius); cursor: pointer; background: #fff; transition: border-color .15s ease; }
.addr-item:hover { border-color: #b9cfe4; }
.addr-item.on { border-color: var(--c-primary); background: #f7fbfe; }
.addr-item .a-line1 { font-size: 15px; }
.addr-item .a-line1 b { font-weight: 600; margin-right: 10px; }
.addr-item .a-detail { font-size: 13px; color: var(--c-text-sub); margin-top: 4px; }
.addr-item .a-ops { margin-top: 8px; display: flex; gap: 12px; font-size: 13px; }
.addr-item .a-ops button { background: none; border: 0; padding: 0; font-size: 13px; font-family: inherit; color: var(--c-text-sub); cursor: pointer; }
.addr-item .a-ops button:hover { color: var(--c-primary); }
.addr-item .a-default { position: absolute; right: 12px; top: 10px; }
.pick-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pick { min-width: 150px; padding: 10px 14px; border: 1px solid var(--c-line); border-radius: var(--radius); cursor: pointer; font-size: 14px; background: #fff; transition: border-color .15s ease; }
.pick.on { border-color: var(--c-primary); background: #f7fbfe; color: var(--c-primary); }
/* 单选卡片：不依赖脚本也能高亮当前选中项 */
.pick:has(input:checked) { border-color: var(--c-primary); background: #f7fbfe; color: var(--c-primary); }
.addr-item:has(input:checked) { border-color: var(--c-primary); background: #f7fbfe; }
.pay-method:has(input:checked) { border-color: #1f9d55; background: #f5fbf7; }
.sum-lines { font-size: 14px; }
.sum-lines div { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-lines .total { font-size: 16px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--c-line); }
.sum-lines .total b { font-size: 24px; color: #d9480f; }
.submit-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 16px; padding: 14px 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); flex-wrap: wrap; }
.submit-bar .info { font-size: 14px; color: var(--c-text-sub); }
.submit-bar .info b { font-size: 22px; color: #d9480f; }
.submit-bar .btn { margin-left: auto; }

.pay-box { max-width: 460px; margin: 40px auto; padding: 28px; text-align: center; }
.pay-box .pay-amount { font-size: 32px; color: #d9480f; font-weight: 700; margin: 6px 0 2px; }
.pay-box .pay-amount::before { content: "¥"; font-size: 18px; }
.pay-methods { margin: 22px 0; text-align: left; }
.pay-method { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--c-line); border-radius: var(--radius); cursor: pointer; }
.pay-method.on { border-color: #1f9d55; background: #f5fbf7; }
.pay-method .pm-logo { width: 30px; height: 30px; border-radius: 4px; background: #1f9d55; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.pay-qr { margin: 18px auto 6px; width: 100%; max-width: 260px; min-height: 150px; border: 1px solid var(--c-line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; color: var(--c-text-lite); font-size: 13px; line-height: 1.9; background: #fcfcfd; }
.pay-tip { font-size: 13px; color: var(--c-text-lite); line-height: 1.8; }
.pay-err { margin-top: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.7; color: #b02a37; text-align: left; background: #fdf1f2; border: 1px solid #f5c2c7; border-radius: var(--radius); }
.pay-go { display: block; width: 100%; margin-top: 14px; }
.pay-link-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.pay-link { flex: 1; min-width: 0; padding: 8px 10px; font-size: 12px; color: var(--c-text-sub); border: 1px solid var(--c-line); border-radius: var(--radius); background: #fcfcfd; }
.countdown { font-size: 14px; color: var(--c-accent-dark); margin-bottom: 10px; }

/* ---------------- 用户中心 ---------------- */
.user-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.user-side { padding: 8px 0; }
.user-side a { display: flex; align-items: center; gap: 8px; padding: 11px 20px; font-size: 15px; color: var(--c-text); }
.user-side a:hover { background: #f6f9fc; color: var(--c-primary); }
.user-side a.on { color: var(--c-primary); font-weight: 600; background: var(--c-primary-soft); border-right: 2px solid var(--c-primary); }
.user-side .side-title { padding: 12px 20px; font-size: 13px; color: var(--c-text-lite); }
.user-main { min-width: 0; }
.order-card { padding: 0; margin-bottom: 16px; overflow: hidden; }
.order-hd { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 18px; background: #fafbfc; border-bottom: 1px solid var(--c-line-soft); font-size: 14px; color: var(--c-text-sub); }
.order-hd .ono { color: var(--c-text); font-weight: 600; }
.order-status { margin-left: auto; font-weight: 600; color: var(--c-primary); }
.order-status.s0 { color: var(--c-accent-dark); }
.order-status.s4 { color: var(--c-text-lite); }
.order-status.s3 { color: var(--c-success); }
.order-lines { padding: 8px 18px; }
.line-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--c-line-soft); font-size: 14px; }
.line-item:last-child { border-bottom: 0; }
.line-item img, .line-item .ph-img { width: 56px; height: 56px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.line-item .li-name { flex: 1; min-width: 0; }
.line-item .li-price { color: var(--c-text-sub); white-space: nowrap; }
.order-ft { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--c-line-soft); flex-wrap: wrap; }
.order-ft .ft-sum { margin-left: auto; font-size: 14px; color: var(--c-text-sub); }
.order-ft .ft-sum b { color: #d9480f; font-size: 18px; }
.status-tag { display: inline-block; padding: 3px 10px; border-radius: 3px; font-size: 13px; background: var(--c-primary-soft); color: var(--c-primary); }
.status-tag.t0 { background: #fdf1dd; color: var(--c-accent-dark); }
.status-tag.t1 { background: #eaf2f9; color: var(--c-primary); }
.status-tag.t2 { background: #e9f5ee; color: var(--c-success); }
.status-tag.t3 { background: #f0f1f3; color: var(--c-text-sub); }
.status-tag.t4 { background: #f0f1f3; color: var(--c-text-lite); }
.express-line { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #f9fbfd; border: 1px dashed #cfdcec; border-radius: var(--radius); font-size: 14px; }
.express-line .eno { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--c-text); }
.copy-btn { background: none; border: 1px solid var(--c-line); border-radius: 4px; font-size: 12px; padding: 3px 8px; cursor: pointer; color: var(--c-text-sub); font-family: inherit; }
.copy-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.avatar { width: 68px; height: 68px; border-radius: 50%; overflow: hidden; background: #eef1f4; display: flex; align-items: center; justify-content: center; color: var(--c-text-lite); font-size: 24px; }
.profile-hd { display: flex; align-items: center; gap: 16px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.auth-box { max-width: 400px; margin: 48px auto; padding: 30px; }
.auth-box h1 { font-size: 20px; text-align: center; margin-bottom: 22px; }
.auth-alt { margin-top: 16px; font-size: 14px; text-align: center; color: var(--c-text-sub); }
.captcha-row { display: flex; gap: 10px; }
.captcha-row .input { flex: 1; }
.captcha-img { width: 120px; height: 40px; border: 1px solid #dcdfe6; border-radius: var(--radius); cursor: pointer; background: #fff; }
.file-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.radio-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--c-text-sub); cursor: pointer; margin: 10px 0; }
.file-pick input[type=file] {
    width: 100%; height: 40px; padding: 6px 10px; font-size: 14px; font-family: inherit; color: var(--c-text-sub);
    background: #fff; border: 1px dashed #dcdfe6; border-radius: var(--radius); -webkit-appearance: none; appearance: none; cursor: pointer;
}
.file-pick input[type=file]:hover { border-color: var(--c-primary); }
.upload-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.upload-preview img { width: 76px; height: 76px; object-fit: cover; border-radius: 4px; border: 1px solid var(--c-line); }

/* ---------------- 文章页 ---------------- */
.article-box { padding: 26px 30px; }
.article-box h1 { font-size: 24px; margin-bottom: 8px; }
.article-meta { font-size: 13px; color: var(--c-text-lite); padding-bottom: 14px; border-bottom: 1px solid var(--c-line-soft); margin-bottom: 18px; }
.article-list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-line-soft); font-size: 15px; }
.article-list-item .atime { margin-left: auto; font-size: 13px; color: var(--c-text-lite); }
.side-links a { display: block; padding: 9px 0; font-size: 14px; color: var(--c-text-sub); border-bottom: 1px dashed var(--c-line-soft); }
.side-links a:hover, .side-links a.on { color: var(--c-primary); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }

/* ---------------- 页脚 ---------------- */
.site-footer { margin-top: 36px; padding: 28px 0 20px; background: #fff; border-top: 1px solid var(--c-line); font-size: 14px; color: var(--c-text-sub); }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.footer-cols h4 { font-size: 15px; color: var(--c-text); margin-bottom: 12px; }
.footer-cols li { padding: 4px 0; }
.footer-cols a:hover { color: var(--c-primary); }
.footer-contact li { line-height: 1.9; }
.footer-bottom { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--c-line-soft); text-align: center; font-size: 13px; color: var(--c-text-lite); line-height: 2; }
.footer-bottom a { color: var(--c-text-sub); }
.footer-bottom a:hover { color: var(--c-primary); }

/* ---------------- 提示与弹层 ---------------- */
.toast-wrap { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 200px; max-width: 90vw; padding: 11px 18px; border-radius: var(--radius); font-size: 14px; color: #fff; background: var(--c-text); box-shadow: 0 2px 10px rgba(0,0,0,.14); }
.toast.success { background: var(--c-success); }
.toast.error { background: var(--c-error); }
.toast.warn { background: var(--c-warn); }
.inline-msg { padding: 10px 14px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.inline-msg.success { background: #eef8f1; color: var(--c-success); border: 1px solid #cde9d6; }
.inline-msg.error { background: #fdefee; color: var(--c-error); border: 1px solid #f3d3d0; }
.inline-msg.warn { background: #fdf6e9; color: var(--c-warn); border: 1px solid #f0e0bd; }
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 16px; }
body.no-scroll { overflow: hidden; }

/* 商品图片全屏查看器 */
.viewer {
    position: fixed; inset: 0; z-index: 1900; display: flex; align-items: center; justify-content: center;
    background: rgba(16, 20, 26, .92); padding: 56px 64px 92px;
}
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; background: #fff; }
.viewer-close {
    position: absolute; top: 12px; right: 16px; width: 42px; height: 42px; font-size: 26px; line-height: 1;
    color: #e8ecf1; background: rgba(255,255,255,.1); border: 0; border-radius: 50%; cursor: pointer;
}
.viewer-close:hover { background: rgba(255,255,255,.22); color: #fff; }
.viewer-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 66px;
    font-size: 30px; line-height: 1; color: #e8ecf1; background: rgba(255,255,255,.1); border: 0; cursor: pointer;
}
.viewer-nav:hover { background: rgba(255,255,255,.22); color: #fff; }
.viewer-nav.prev { left: 8px; border-radius: 0 var(--radius) var(--radius) 0; }
.viewer-nav.next { right: 8px; border-radius: var(--radius) 0 0 var(--radius); }
.viewer-foot {
    position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 14px;
    padding: 12px 16px; background: rgba(16, 20, 26, .6);
}
.viewer-count { font-size: 13px; color: #c8d0da; flex-shrink: 0; }
.viewer-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.viewer-thumbs button { width: 52px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: #2a3038; cursor: pointer; flex-shrink: 0; }
.viewer-thumbs button.on { border-color: var(--c-accent); }
.viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 768px) {
    .viewer { padding: 48px 8px 76px; }
    .viewer-nav { width: 36px; height: 54px; font-size: 24px; }
}
.dialog { width: 100%; max-width: 520px; background: #fff; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.18); max-height: 88vh; overflow: auto; }
.dialog-hd { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--c-line); font-size: 16px; font-weight: 600; }
.dialog-hd button { margin-left: auto; background: none; border: 0; font-size: 20px; line-height: 1; color: var(--c-text-lite); cursor: pointer; }
.dialog-hd button:hover { color: var(--c-text); }
.dialog-bd { padding: 18px; }
.dialog-ft { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--c-line); }

/* ---------------- PC 两侧悬浮服务栏与返回顶部 ---------------- */
.side-rail {
    position: fixed; top: 96px; z-index: 900; width: 60px;
    display: none; flex-direction: column; gap: 2px;
}
.side-rail-right { top: auto; bottom: 28px; }
/* 1440 = 1200 内容宽 + 两侧各 120 悬浮栏位；再窄就会压到正文，改用右下角按钮 */
@media (min-width: 1440px) {
    .side-rail { display: flex; }
    .side-rail-left  { left:  max(12px, calc(50% - var(--page-max) / 2 - 74px)); }
    .side-rail-right { right: max(12px, calc(50% - var(--page-max) / 2 - 74px)); }
}
.rail-item { position: relative; }
.rail-btn {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    width: 60px; padding: 9px 0 8px; font-size: 12px; font-family: inherit; line-height: 1.2;
    color: var(--c-text-sub); background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    box-shadow: var(--shadow); cursor: pointer; text-align: center;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.rail-btn svg { width: 20px; height: 20px; fill: currentColor; }
.rail-btn:hover { color: #fff; background: var(--c-primary); border-color: var(--c-primary); }
.rail-num {
    position: absolute; top: 3px; right: 6px; min-width: 15px; height: 15px; padding: 0 4px;
    font-size: 10px; line-height: 15px; font-style: normal; text-align: center;
    color: #fff; background: var(--c-accent); border-radius: 8px;
}
.rail-btn:hover .rail-num { color: var(--c-accent-dark); background: #fff; }
.rail-panel {
    position: absolute; top: -1px; display: none; width: 216px; padding: 14px;
    max-height: calc(100vh - 116px); overflow-y: auto;
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    box-shadow: 0 6px 22px rgba(0, 0, 0, .13); z-index: 20;
}
.rail-panel-wide { width: 392px; }
.side-rail-left .rail-panel  { left: calc(100% + 8px); }
/* 右栏贴屏幕底部，面板改为向上展开，避免超出视口 */
.side-rail-right .rail-panel { top: auto; bottom: -1px; right: calc(100% + 8px); }
.rail-pop:hover > .rail-panel, .rail-pop:focus-within > .rail-panel { display: block; }
.rp-title { font-size: 14px; font-weight: 600; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--c-line-soft); }
.rp-tip { font-size: 12px; color: var(--c-text-lite); line-height: 1.7; margin: 0; }
.rp-tip b { color: var(--c-primary); font-weight: 600; word-break: break-all; }
.rp-qr { width: 168px; height: 168px; object-fit: contain; margin: 0 auto 10px; display: block; border: 1px solid var(--c-line-soft); border-radius: 4px; }
.rp-list li { font-size: 13px; color: var(--c-text-sub); padding: 5px 0; display: flex; flex-direction: column; gap: 2px; }
.rp-list li b { color: var(--c-text); font-weight: 600; font-size: 14px; }
.rp-cates { display: grid; gap: 2px; }
.rp-cate { padding: 4px 0; }
.rp-cate .rp-parent { display: block; font-size: 13px; font-weight: 600; color: var(--c-text); }
.rp-cate .rp-parent:hover { color: var(--c-primary); }
.rp-subs { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; }
.rp-subs a { font-size: 12px; color: var(--c-text-lite); }
.rp-subs a:hover { color: var(--c-primary); }
.rp-rank a { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--c-line-soft); }
.rp-rank a:last-child { border-bottom: 0; }
.rp-rank img, .rp-rank .ph-img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; flex-shrink: 0; font-size: 11px; }
.rp-rank .rp-name { font-size: 13px; color: var(--c-text-sub); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rp-rank .rp-price { margin-left: auto; font-size: 13px; color: #d9480f; font-weight: 600; white-space: nowrap; }
.rp-more { display: block; margin-top: 10px; font-size: 13px; color: var(--c-primary); text-align: center; }
.rail-top-btn { border: 0; background: none; box-shadow: none; }
.rail-top-btn:hover { background: var(--c-primary); color: #fff; }

.top-float {
    position: fixed; right: 16px; bottom: 22px; z-index: 880;
    width: 44px; height: 44px; display: none; align-items: center; justify-content: center;
    font-family: inherit; color: var(--c-text-sub); background: rgba(255, 255, 255, .95);
    border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer;
}
.top-float svg { width: 20px; height: 20px; fill: currentColor; }
.top-float:hover { color: #fff; background: var(--c-primary); border-color: var(--c-primary); }
.top-float.show { display: flex; }
@media (min-width: 1440px) { .top-float { display: none !important; } }

/* ---------------- 收藏 / 足迹 / 投诉 ---------------- */
.block-hd { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--c-line-soft); }
.block-hd .block-title { margin: 0; padding: 0; border: 0; }
.block-ops { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.chip {
    padding: 5px 14px; font-size: 13px; color: var(--c-text-sub);
    background: #f4f7fa; border: 1px solid var(--c-line-soft); border-radius: 16px;
}
.chip:hover { color: var(--c-primary); background: var(--c-primary-soft); }
.chip.on { color: #fff; background: var(--c-primary); border-color: var(--c-primary); }
.link-btn {
    border: 0; background: none; padding: 0; font: inherit; font-size: 13px;
    color: var(--c-text-sub); cursor: pointer; text-decoration: none;
}
.link-btn:hover { color: var(--c-primary); text-decoration: underline; }

.fav-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fav-item { display: flex; flex-direction: column; border: 1px solid var(--c-line-soft); border-radius: var(--radius); overflow: hidden; }
.fav-item:hover { box-shadow: var(--shadow); }
.fav-pic { position: relative; display: block; background: #f2f4f7; }
.fav-pic img, .fav-pic .ph-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.fav-item.is-off .fav-pic img { filter: grayscale(1); opacity: .6; }
.fav-off {
    position: absolute; left: 0; top: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #fff; background: rgba(0, 0, 0, .45);
}
.fav-info { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.fav-name {
    font-size: 14px; color: var(--c-text); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fav-name:hover { color: var(--c-primary); }
.fav-price .price-num { font-size: 17px; }
.fav-ops { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 2px; }
.fav-buy {
    margin-left: auto; font-size: 13px; color: #fff; background: var(--c-primary);
    padding: 4px 12px; border-radius: 14px;
}
.fav-buy:hover { background: var(--c-primary-dark); color: #fff; }

.cp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cp-item { border: 1px solid var(--c-line-soft); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.cp-item:hover { box-shadow: var(--shadow); }
.cp-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cp-no { font-size: 13px; color: var(--c-text-lite); font-family: Consolas, Monaco, monospace; }
.cp-title { font-size: 15px; font-weight: 600; color: var(--c-text); margin: 6px 0 2px; }
.cp-body { font-size: 14px; color: var(--c-text-sub); line-height: 1.7; white-space: pre-wrap; }
.cp-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--c-text-lite); }
.cp-reply { margin-top: 10px; padding: 10px 12px; background: var(--c-primary-soft); border-radius: var(--radius); font-size: 14px; color: var(--c-text); line-height: 1.7; }
.cp-reply b { display: block; margin-bottom: 4px; font-size: 13px; color: var(--c-primary); font-weight: 600; }
.cp-pics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cp-pics img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; border: 1px solid var(--c-line-soft); }
.cp-pics img:hover { transform: scale(1.06); }
.cp-note { padding: 10px 14px; background: #fdf6e8; border-radius: var(--radius); color: #8a6414; font-size: 13px; line-height: 1.7; }

/* ---------------- 自适应（PC → 移动端，一套模板） ---------------- */
@media (max-width: 1024px) {
    .goods-grid, .goods-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cate-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .banner-slide { height: 300px; }
    .detail-main { grid-template-columns: 360px minmax(0, 1fr); }
    .two-col { grid-template-columns: minmax(0, 1fr); }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fav-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    body { font-size: 14px; }
    .wrap { padding: 0 16px; }
    .header-top .wrap { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
    .logo { font-size: 18px; }
    .logo img { height: 32px; }
    .logo .logo-text { font-size: 17px; }
    .search { order: 3; max-width: none; flex-basis: 100%; }
    .header-actions { order: 2; gap: 2px; font-size: 13px; }
    .ha-item { padding: 8px 7px; }
    .ha-item .ha-txt { display: none; }
    .ha-bare { display: none; }
    .cart-badge .num { top: 0; right: 0; }
    .header-phone { display: none; }
    .nav-toggle {
        display: inline-flex; align-items: center; justify-content: center; margin-left: auto;
        width: 44px; height: 44px; background: none; border: 1px solid var(--c-line); border-radius: var(--radius);
        font-size: 20px; color: var(--c-text-sub); cursor: pointer;
    }
    .header-nav .wrap { display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0; }
    .header-nav.open .wrap { display: flex; }
    .nav-item { line-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--c-line-soft); }
    .nav-cate .mega { position: static; width: auto; display: block; border: 0; box-shadow: none; padding: 0 0 6px 16px; }
    .btn, .btn-lg { min-height: 44px; }
    .input, .select { height: 44px; font-size: 15px; }
    .banner-slide { height: 180px; }
    .banner-slide .banner-inner { font-size: 19px; }
    .banner-arrow { display: none; }
    .section { margin-top: 20px; }
    .section-title { font-size: 17px; }
    .goods-grid, .goods-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .goods-body { padding: 10px 10px 12px; }
    .goods-title { font-size: 13px; }
    .goods-meta .price-num { font-size: 16px; }
    .cate-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .cate-cell { padding: 10px 4px; }
    .cate-cell span { font-size: 12px; }
    .guarantee { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .subject-band { padding: 12px 14px; gap: 8px; }
    .subject-band .sb-link { margin-left: 0; }
    .deal-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .deal-num { font-size: 21px; }
    .flow-steps { grid-template-columns: minmax(0, 1fr); }
    .flow-step { padding: 13px 14px; }
    .paid-item { font-size: 13px; gap: 8px; }
    .paid-time { font-size: 12px; }
    .detail-main { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 14px; }
    .detail-price .p-now { font-size: 26px; }
    .user-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .user-side { display: flex; overflow-x: auto; padding: 0; }
    .user-side .side-title { display: none; }
    .user-side a { flex: 0 0 auto; padding: 11px 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
    .user-side a.on { border-right: 0; border-bottom-color: var(--c-primary); background: #fff; }
    .addr-list { grid-template-columns: minmax(0, 1fr); }
    .fav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .fav-info { padding: 8px 10px 10px; }
    .fav-name { font-size: 13px; }
    .block-hd { align-items: flex-start; }
    .block-ops { margin-left: 0; }
    .chip { padding: 9px 14px; }
    .fav-ops { gap: 14px; }
    .link-btn { padding: 8px 0; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .submit-bar { padding: 12px 14px; }
    .submit-bar .btn { margin-left: 0; flex: 1; }
    .cart-bar { padding: 12px 14px; }
    .block { padding: 14px; }
    .article-box { padding: 18px 16px; }
    .auth-box { margin: 20px auto; padding: 20px 16px; }
    .table th, .table td { padding: 10px 8px; }
    .table .t-goods { min-width: 160px; }
    .table .t-goods img, .table .t-goods .ph-img { width: 52px; height: 52px; }
    .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .pay-box { margin: 20px auto; padding: 20px 16px; }
    /* 文字型操作按钮默认只有 17~22px 高，指尖容易误触到相邻的「删除」 */
    .addr-item .a-ops { gap: 16px; }
    .addr-item .a-ops a, .addr-item .a-ops button { padding: 10px 2px; font-size: 14px; }
    .table .t-del { padding: 10px; font-size: 14px; }
    .filter-link { padding: 10px 12px; }
    .section-more, .notice-close { padding: 10px 6px; }
}
