/*
 * 客户端店铺前台 · 商品卡 / 分类磁贴 / 商品详情
 *
 * 版式思路沿用门店大屏端（PAD，见 public/static/pad.css）：
 *   · 白卡片 + 细边框 + 轻阴影，不靠重色块分区
 *   · 金黄 #febf14 系用于价格、品牌标、主按钮；红色退为缺货/报错专用
 *   · 库存压成图片右上角的小角标，不单独占一行——占行会把卡片撑得高低不齐
 *   · 商品名两行截断：吉客云的货品名长短能差一倍，不截断网格会犬牙交错
 *   · 详情左图右信息，关键参数走 2×2 图标网格；空值行整行不渲染，
 *     宁可不提，也不要摆一排「—」让客户追问为什么没有
 *
 * 抽成外部文件而不是塞在各页的 @push('styles')：同一张商品卡同时被
 * 首页、商品列表两处复用，样式散在多个文件里必然「改一处漏一处」。
 *
 * 注意：本文件在 layout 的内联 <style> 之后、页面 @push('styles') 之前引入，
 * 所以能覆盖 layout 的默认（蓝色系）外观，又允许单页再做局部覆盖。
 */

:root {
    --shop-gold: #febf14;      /* 填充色：主按钮、品牌标底、角标高亮 */
    --shop-gold-strong: #feb402;
    --shop-gold-line: #febb16; /* 描边：次按钮边框 */
    --shop-gold-text: #febf14; /* 价格文字。想更沉稳就把这一行换成 #b8860b，
                                  三个页面的价格会一起变，不用逐页改 */
    --shop-ink: #222;
    --shop-ink-2: #333;
    --shop-muted: #8a8a8a;
    --shop-line: #ececec;
    --shop-line-2: #d8d8d8;
    --shop-card: #fff;
    --shop-ok: #169f18;
    --shop-low: #c77700;
    --shop-err: #e0342f;
    --shop-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    --shop-shadow-hover: 0 10px 24px rgba(0, 0, 0, .09);
}

/* ===== 商品网格 =====
   display 必须在这里给：layout 里那份旧的 .pgrid 已经删掉了，
   漏了 display 网格会退化成整宽堆叠，卡片被图片撑到一千多像素高。 */
.pgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
    gap: 16px;
}

/* ===== 商品卡 ===== */
.tcard {
    background: var(--shop-card);
    border: 1px solid var(--shop-line);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .14s ease, transform .14s ease, border-color .14s ease;
}

.tcard:hover {
    transform: translateY(-2px);
    box-shadow: var(--shop-shadow-hover);
    border-color: #e2e2e2;
}

.tcard-media {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-bottom: 1px solid #f4f4f4;
    overflow: hidden;
}

.tcard-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
    mix-blend-mode: multiply;
}

.tcard-ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #cfcfcf;
}

.tcard-ph svg {
    width: 54px;
    height: 54px;
}

.tcard-ph em {
    font-style: normal;
    font-size: 10.5px;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: #b9b9b9;
}

/* 库存角标：压在图片右上角。
   三种状态——有货绿、少货橙、缺货红；库存压根没同步到本仓时走灰色的
   "On request"，绝不写成 Out of stock（那是查过确实为 0 才用的措辞）。 */
.tcard-badge {
    position: absolute;
    right: 8px;
    top: 8px;
    background: rgba(22, 159, 24, .94);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: .2px;
}

.tcard-badge.low {
    background: rgba(199, 119, 0, .94);
}

.tcard-badge.out {
    background: rgba(224, 52, 47, .94);
}

.tcard-badge.unknown {
    background: rgba(122, 122, 122, .9);
}

.tcard-body {
    padding: 10px 12px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.tcard-brand {
    align-self: flex-start;
    background: #fdce02;
    color: #000;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 3px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 两行截断：卡片高度必须整齐，否则一排里高的高矮的矮，价格线不在一条线上 */
.tcard-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--shop-ink);
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.tcard-size {
    font-size: 12.5px;
    color: var(--shop-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tcard-price {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
}

.tcard-price .amt {
    font-size: 20px;
    font-weight: 800;
    color: var(--shop-gold-text);
    letter-spacing: -.2px;
}

.tcard-price .from {
    font-size: 12px;
    font-weight: 600;
    color: var(--shop-muted);
}

.tcard-price .unit {
    font-size: 12px;
    color: #9a9a9a;
}

.tcard-price .was {
    font-size: 12.5px;
    color: #a5a5a5;
    text-decoration: line-through;
}

.tcard-price .amt.call {
    font-size: 14px;
    font-weight: 700;
    color: var(--shop-muted);
}

.tcard-actions {
    padding: 10px 12px 12px;
    display: flex;
    gap: 8px;
}

/* ===== 按钮 =====
   大屏端的主按钮是「金底黑字」——金色做底、深色做字，对比度比金字白底高得多。
   红色留给缺货、删除、报错，不再当主色用。 */
.btn-gold {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--shop-gold-line);
    color: #1a1a1a;
    border: 0;
    border-radius: 6px;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .2px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn-gold:hover {
    background: var(--shop-gold-strong);
}

.btn-outline {
    background: #fff;
    color: #8a6500;
    border: 1px solid var(--shop-gold-line);
}

.btn-outline:hover {
    background: #fffbe9;
}

.btn-dead {
    background: #ececec;
    color: #9a9a9a;
    cursor: not-allowed;
}

.btn-dead:hover {
    background: #ececec;
}

/* ===== 筛选条 ===== */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar input[type=text],
.filter-bar select {
    padding: 10px 12px;
    border: 1px solid var(--shop-line-2);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--shop-ink-2);
}

.filter-bar input[type=text] {
    flex: 1;
    min-width: 200px;
}

.filter-bar select {
    min-width: 130px;
}

.filter-bar .btn-gold,
.filter-bar .btn-outline {
    flex: 0 0 auto;
    padding: 10px 18px;
    font-size: 14px;
}

/* 已选条件：可点掉的小胶囊 */
.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.filter-chips .fchip {
    background: #fffbe9;
    border: 1px solid #f6e2a8;
    color: #7a5a00;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
}

.filter-chips .fchip strong {
    font-weight: 700;
}

.filter-chips .fchip a {
    color: #b8860b;
    text-decoration: none;
    font-weight: 800;
    margin-left: 5px;
}

/* ===== 面包屑 ===== */
.crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #9a9a9a;
    margin-bottom: 18px;
}

.crumbs a {
    color: #666;
    text-decoration: none;
}

.crumbs a:hover {
    color: #b8860b;
}

.crumbs .sep {
    color: #cfcfcf;
}

.crumbs .cur {
    color: var(--shop-ink-2);
}

/* ===== 分类磁贴 ===== */
.cat-hero {
    background: #fff;
    border: 1px solid var(--shop-line);
    border-radius: 10px;
    padding: 22px 20px;
    margin-bottom: 22px;
    box-shadow: var(--shop-shadow);
}

.cat-hero h1 {
    margin: 0 0 4px;
    font-size: 22px;
    color: var(--shop-ink-2);
}

.cat-hero .muted {
    margin: 0 0 16px;
}

.cat-group {
    margin-bottom: 30px;
}

.cat-group-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
    color: var(--shop-ink-2);
    padding-left: 11px;
    border-left: 3px solid var(--shop-gold-line);
    line-height: 1.2;
}

.catgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.catcard {
    background: #fff;
    border: 1px solid var(--shop-line);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow .14s ease, transform .14s ease;
}

.catcard:hover {
    transform: translateY(-2px);
    box-shadow: var(--shop-shadow-hover);
}

.catcard-img {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-bottom: 1px solid #f4f4f4;
    overflow: hidden;
}

.catcard-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catcard-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f2f2f2;
    color: #b9b9b9;
    font-size: 26px;
    font-weight: 800;
}

.catcard-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.catcard-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--shop-ink);
    line-height: 1.3;
}

.catcard-count {
    font-size: 12px;
    font-weight: 700;
    color: #7a5a00;
    background: #fff8e1;
    border: 1px solid #f6e2a8;
    border-radius: 999px;
    padding: 2px 9px;
    align-self: flex-start;
}

/* ===== 商品详情 ===== */
.pd-card {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    background: #fff;
    border: 1px solid var(--shop-line);
    border-radius: 10px;
    padding: 22px;
    box-shadow: var(--shop-shadow);
}

.pd-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    background: #fff;
    border: 1px solid #f4f4f4;
    border-radius: 8px;
}

.pd-media img {
    width: 100%;
    max-width: 380px;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.pd-ph {
    color: #c2c2c2;
    font-size: 14px;
}

.pd-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pd-brand {
    display: inline-block;
    background: #fdce02;
    color: #000;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 3px;
}

.pd-title {
    margin: 10px 0 0;
    font-size: 21px;
    line-height: 1.35;
    font-weight: 800;
    color: #000;
    word-break: break-word;
}

.pd-price-line {
    margin-top: 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.pd-price-line .lbl {
    font-size: 14px;
    font-weight: 600;
    color: #696969;
}

.pd-price-line .val {
    font-size: 28px;
    font-weight: 800;
    color: var(--shop-gold-text);
    letter-spacing: -.4px;
}

.pd-price-line .from {
    font-size: 13px;
    font-weight: 600;
    color: var(--shop-muted);
}

.pd-price-line .was {
    font-size: 14px;
    color: #a5a5a5;
    text-decoration: line-through;
}

.pd-tag {
    background: #fff8e1;
    border: 1px solid #f6e2a8;
    color: #8a6500;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* 2×2 参数网格：与大屏端同一套「图标 + 名 + 值」，客户扫一眼就能对上规格 */
.pd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin-top: 18px;
    border-top: 1px solid var(--shop-line-2);
}

.pd-grid .cell {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 12px 14px;
    border-bottom: 1px solid var(--shop-line-2);
    min-width: 0;
}

.pd-grid .cell:nth-child(odd) {
    border-right: 1px solid var(--shop-line-2);
    padding-left: 0;
}

.pd-grid .cell:nth-last-child(-n+2) {
    border-bottom: 0;
}

.pd-grid .ic {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
}

.pd-grid .k {
    font-size: 12px;
    font-weight: 800;
    color: #000;
}

.pd-grid .v {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--shop-ink-2);
    margin-top: 2px;
    word-break: break-word;
}

.pd-grid .v.in {
    color: #177d1a;
}

.pd-grid .v.out {
    color: var(--shop-err);
}

.pd-grid .v.unknown {
    color: #7b7b7b;
}

/* 多规格：点规格标签直接换价格与库存，
   避免「看着 A 的价，加到购物车里是 B」 */
.pd-variants {
    width: 100%;
    margin-top: 18px;
}

.pd-variants .vd-head {
    font-size: 13px;
    font-weight: 800;
    color: var(--shop-ink-2);
    margin-bottom: 10px;
}

.pd-variants .sku-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sku-chip {
    border: 1px solid var(--shop-line-2);
    background: #fff;
    color: var(--shop-ink-2);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}

.sku-chip:hover {
    border-color: var(--shop-gold-line);
}

.sku-chip.active {
    background: #fff8e1;
    border-color: var(--shop-gold-line);
    color: #8a6500;
}

.sku-chip.out {
    color: #b0b0b0;
    background: #f7f7f7;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* 数量步进器：大屏端是 − n + 三连，比数字输入框更好点（触屏上尤其） */
.pd-buy {
    width: 100%;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--shop-line);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.num-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--shop-line-2);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.num-box button {
    width: 38px;
    height: 42px;
    border: 0;
    background: #fff;
    font-size: 18px;
    font-weight: 700;
    color: var(--shop-ink-2);
    cursor: pointer;
    font-family: inherit;
}

.num-box button:hover {
    background: #fafafa;
}

.num-box .num-input {
    width: 52px;
    height: 42px;
    line-height: 42px;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    border-left: 1px solid var(--shop-line-2);
    border-right: 1px solid var(--shop-line-2);
}

.pd-buy .btn-gold {
    flex: 1;
    min-width: 160px;
    height: 42px;
    font-size: 14px;
}

.pd-buy .buy-note {
    font-size: 13px;
    color: #777;
    width: 100%;
}

.pd-buy .buy-note.out {
    color: var(--shop-err);
    font-weight: 700;
}

/* About this product：只列有值的参数 */
.pd-about {
    margin-top: 26px;
    background: #fff;
    border: 1px solid var(--shop-line);
    border-radius: 10px;
    padding: 20px 22px;
    box-shadow: var(--shop-shadow);
}

.pd-about h2 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
    color: var(--shop-ink);
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px 24px;
    margin: 0;
}

.spec-cell {
    display: flex;
    gap: 8px;
    border-bottom: 1px dashed #f0f0f0;
    padding-bottom: 8px;
}

.spec-cell dt {
    flex: 0 0 110px;
    color: #888;
    font-size: 13px;
    margin: 0;
}

.spec-cell dd {
    margin: 0;
    color: var(--shop-ink-2);
    font-size: 13px;
    font-weight: 600;
    word-break: break-word;
}

.pd-empty {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .pd-card {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 16px;
    }

    .pd-media {
        min-height: 0;
    }

    .pd-media img {
        max-width: 320px;
    }

    .pd-title {
        font-size: 18px;
    }

    .pd-price-line .val {
        font-size: 24px;
    }
}

@media (max-width: 640px) {
    .pgrid,
    .catgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .tcard-media {
        aspect-ratio: 1 / 1;
    }

    .tcard-body {
        padding: 8px 10px 0;
    }

    .tcard-name {
        font-size: 13px;
    }

    .tcard-price .amt {
        font-size: 17px;
    }

    .tcard-actions {
        padding: 8px 10px 10px;
        gap: 6px;
    }

    .btn-gold {
        padding: 8px 6px;
        font-size: 12px;
    }

    .pd-grid {
        grid-template-columns: 1fr;
    }

    .pd-grid .cell {
        border-right: 0 !important;
        padding-left: 0;
    }

    .pd-grid .cell:nth-last-child(-n+2) {
        border-bottom: 1px solid var(--shop-line-2);
    }

    .pd-grid .cell:last-child {
        border-bottom: 0;
    }

    /* 手机上把「加购」钉在底部：详情页很长，滑到参数表时手边必须有按钮 */
    body.p-detail .pd-buy {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 66px;
        z-index: 40;
        margin: 0;
        padding: 10px 14px;
        background: #fff;
        border-top: 1px solid var(--shop-line);
        box-shadow: 0 -6px 16px rgba(0, 0, 0, .06);
        gap: 10px;
    }

    body.p-detail .pd-buy .buy-note {
        display: none;
    }

    body.p-detail {
        padding-bottom: 140px;
    }
}

/* ===== 快速录入（Quick Order）=====
   逐行敲 SKU 的表格模式：给代客下单的销售和拿扫码枪的店员。
   复用全局令牌；下拉、表格行距、触控目标都按店内 PAD 的语言。 */
.qo-head {
    margin: 0 0 14px;
}

.qo-card {
    padding: 14px;
}

.qo-scroll {
    overflow-x: auto;
}

.qo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.qo-table th {
    text-align: left;
    color: var(--shop-muted);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 6px 8px;
    border-bottom: 1px solid var(--shop-line-2);
}

.qo-row td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--shop-line);
    vertical-align: middle;
}

.qo-item-cell {
    position: relative;
}

.qo-search {
    width: 100%;
    min-height: 44px;   /* 触控目标与 PAD 端一致 */
    box-sizing: border-box;
    border: 1px solid var(--shop-line-2);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 15px;
    background: #fff;
}

.qo-search:focus {
    outline: none;
    border-color: var(--shop-gold);
    box-shadow: 0 0 0 2px rgba(254, 191, 20, .22);
}

.qo-search.qo-picked {
    border-color: var(--shop-gold-line);
    background: #fffdf3;
}

.qo-qty {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid var(--shop-line-2);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 15px;
    text-align: center;
}

.qo-qty:disabled {
    background: #f7f7f7;
    color: var(--shop-muted);
}

.qo-unit, .qo-stock, .qo-line {
    white-space: nowrap;
    text-align: right;
}

.qo-ok { color: var(--shop-ok); }
.qo-warn { color: var(--shop-err); font-weight: 600; }

/* 自动补全下拉：贴在搜索框正下方 */
.qo-dd {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    background: #fff;
    border: 1px solid var(--shop-line-2);
    border-radius: 8px;
    box-shadow: var(--shop-shadow-hover);
    max-height: 288px;
    overflow-y: auto;
    /* 候选是「编号|名称|条码|库存|单价」五列，商品列 46% 宽装不下，
       拉宽到横跨整表（对齐吉客云的候选表格） */
    min-width: 620px;
}

.qo-opt {
    padding: 8px 12px;
    cursor: pointer;
    min-height: 44px;
    box-sizing: border-box;
}

.qo-opt + .qo-opt {
    border-top: 1px solid var(--shop-line);
}

.qo-opt.qo-active, .qo-opt:hover {
    background: #fffdf3;
}

.qo-opt-name {
    font-size: 14px;
    color: var(--shop-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qo-opt-meta {
    font-size: 12px;
    color: var(--shop-muted);
    margin-top: 2px;
}

/* SKU 候选表格行 + 表头（吉客云式：编号 | 名称·规格 | 条码 | 库存 | 单价） */
.qo-opt-hd,
.qo-opt.qo-sku {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 150px 56px 84px;
    gap: 10px;
    align-items: center;
}

.qo-opt-hd {
    padding: 6px 12px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--shop-muted);
    background: #fafaf7;
    border-bottom: 1px solid var(--shop-line-2);
    position: sticky;
    top: 0;
}

.qo-opt.qo-sku {
    padding: 7px 12px;
    min-height: 38px;
}

.qo-opt-hd .r,
.qo-sku .r {
    text-align: right;
}

.qo-sku-code,
.qo-sku-bc {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qo-sku-code {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--shop-ink);
}

.qo-sku-name {
    font-size: 13px;
    color: var(--shop-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qo-sku-bc {
    font-size: 11.5px;
    color: var(--shop-muted);
}

.qo-sku-st {
    font-size: 12.5px;
}

.qo-sku-pr {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--shop-ink);
}

.qo-empty {
    padding: 10px 12px;
    font-size: 12.5px;
    color: var(--shop-muted);
}

.qo-empty.warn {
    color: #92400e;
    background: #fffbeb;
}

@media (max-width: 760px) {
    .qo-dd {
        min-width: 0;
    }

    .qo-opt-hd,
    .qo-opt.qo-sku {
        grid-template-columns: 110px minmax(0, 1fr) 56px 80px;
    }

    .qo-opt-hd span:nth-child(3),
    .qo-sku-bc {
        display: none;
    }
}

.qo-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.qo-total {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.qo-total strong {
    font-size: 18px;
    color: var(--shop-ink);
}

.qo-err {
    color: var(--shop-err);
    font-size: 13px;
    margin-top: 8px;
    min-height: 1em;
}

.qo-head kbd {
    border: 1px solid var(--shop-line-2);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 0 4px;
    font-size: 11px;
    background: #fff;
}

@media (max-width: 640px) {
    /* 手机上五列表格太挤：单价/库存折进条目格下面并补上列名，
       行小计隐藏（合计在底部条上已有，逐行小计是桌面上的核对工具） */
    .qo-table, .qo-table tbody, .qo-table tr, .qo-table td {
        display: block;
    }
    .qo-table thead { display: none; }
    .qo-row {
        padding: 10px 0;
        border-bottom: 1px solid var(--shop-line);
    }
    .qo-row td { border: 0; padding: 2px 0; }
    .qo-qty { width: 96px; min-height: 40px; }
    .qo-unit, .qo-stock {
        display: inline-block;
        text-align: left;
        margin-right: 16px;
        font-size: 13px;
    }
    .qo-row td.qo-line { display: none; }  /* td 选择器特异性更高，必须带前缀才能压住 */
    .qo-unit::before { content: 'Unit: '; color: var(--shop-muted); }
    .qo-stock::before { content: 'Stock: '; color: var(--shop-muted); }
}
