/* ===========================================================
   Zaka · 商品列表分块样式（对齐货源站那种"分类即表头"的简约排版）
   只做展示层，不动任何数据
   =========================================================== */

.zk-block {
    margin: 0 0 18px;
    border: 1px solid var(--tk-line);
    border-radius: var(--tk-radius);
    overflow: hidden;
    background: #fff;
}

.zk-block:last-child { margin-bottom: 4px; }

.zk-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

/* ---------- 表头（分类名 + 列名） ---------- */
.zk-table thead th {
    padding: 11px 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .2px;
    text-align: left;
    background: linear-gradient(100deg, var(--tk-primary), var(--tk-primary-dark));
    white-space: nowrap;
    vertical-align: middle;
}

.zk-th-name { width: auto; }
.zk-th-price { text-align: center !important; }
.zk-th-stock { text-align: center !important; }
.zk-th-op { text-align: center !important; }

/* 桌面端才固定列宽，手机端自动分配 */
@media (min-width: 769px) {
    .zk-table { table-layout: fixed; }
    .zk-th-price { width: 96px; }
    .zk-th-stock { width: 84px; }
    .zk-th-op { width: 104px; }
}

.zk-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    vertical-align: middle;
}

.zk-block-title { vertical-align: middle; }

.zk-block-count {
    margin-left: 8px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, .92);
    background: rgba(255, 255, 255, .18);
    border-radius: 20px;
    vertical-align: middle;
}

.zk-block-more {
    float: right;
    margin-left: 10px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, .9) !important;
    text-decoration: none;
    vertical-align: middle;
}

.zk-block-more:hover { color: #fff !important; text-decoration: underline; }

/* ---------- 说明条（货源站的类目介绍，固定在最上排） ---------- */
.zk-note-row td {
    padding: 10px 12px !important;
    font-size: 12.5px;
    line-height: 1.65;
    color: #8a5a00;
    background: #fff8e8;
    border-bottom: 1px solid #f6e2b8;
}

.zk-note-row i { margin-right: 7px; color: #d99a00; }

/* ---------- 商品行 ---------- */
.zk-table tbody tr.zk-row-item { border-bottom: 1px solid var(--tk-line-soft); }
.zk-table tbody tr.zk-row-item:nth-child(even) { background: #fcfcff; }
.zk-table tbody tr.zk-row-item:hover { background: #f6f7fe; }
.zk-table tbody tr.zk-row-item:last-child { border-bottom: 0; }

.zk-table tbody td {
    padding: 11px 12px;
    vertical-align: middle;
    font-size: 13px;
}

.zk-name { word-break: break-word; }

.zk-name-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--tk-text) !important;
    text-decoration: none;
}

.zk-thumb {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #fafbff;
    border: 1px solid var(--tk-line);
    border-radius: 8px;
}

.zk-name-txt {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    color: var(--tk-text);
}

.zk-name-link:hover .zk-name-txt { color: var(--tk-primary); }

.zk-badge {
    display: inline-block;
    flex: 0 0 auto;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.6;
    color: #7a3d00;
    background: #ffe7b8;
    border: 1px solid #f5c46b;
    border-radius: 4px;
    white-space: nowrap;
}

.zk-td-price { text-align: center; }
.zk-td-stock { text-align: center; }
.zk-td-op { text-align: center; }

.zk-price {
    font-size: 14px;
    font-weight: 700;
    color: #ff5000;
}

.zk-stock { color: var(--tk-text-soft); font-size: 12.5px; }

.zk-buy {
    display: inline-block;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff !important;
    background: var(--tk-primary);
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease;
}

.zk-buy:hover { background: var(--tk-primary-dark); }

/* 手机端价格/库存：桌面隐藏 */
.zk-sub { display: none; }

.zk-back {
    float: right;
    font-size: 12px;
    color: var(--tk-text-soft) !important;
    text-decoration: none;
}

.zk-back:hover { color: var(--tk-primary) !important; }

.zk-hd-sub {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 400;
    color: var(--tk-text-mute);
}

/* 左侧分类多的时候给个滚动区 */
.tk-cat-box { max-height: 620px; overflow-y: auto; }
.tk-cat-box::-webkit-scrollbar { width: 6px; }
.tk-cat-box::-webkit-scrollbar-thumb { background: #d9dce6; border-radius: 6px; }

/* ---------- 手机端 ---------- */
@media (max-width: 768px) {
    .zk-th-price, .zk-th-stock, .zk-td-price, .zk-td-stock { display: none; }
    .zk-th-op { width: 74px; }
    .zk-table thead th { padding: 9px 10px; font-size: 12.5px; }
    .zk-table tbody td { padding: 9px 10px; }
    .zk-thumb { flex: 0 0 34px; width: 34px; height: 34px; }
    .zk-name-txt { font-size: 12.5px; }
    .zk-sub {
        display: flex;
        gap: 10px;
        align-items: baseline;
        margin: 5px 0 0 44px;
        font-size: 12px;
        color: var(--tk-text-soft);
    }
    .zk-sub b { font-size: 13.5px; color: #ff5000; }
    .zk-buy { padding: 5px 10px; font-size: 12px; }
    .zk-block-count { display: none; }
    .zk-block-more { font-size: 11.5px; }
    .zk-note-row td { font-size: 12px; }
    .zk-block { margin-bottom: 12px; }
    .tk-cat-box { max-height: 260px; }
}

/* ===========================================================
   商品详情页（点击「购买」后）—— 统一成简洁卡片风
   =========================================================== */

.item-title-content {
    align-items: flex-start !important;
    padding: 16px 18px !important;
    background: #fff !important;
    border: 1px solid var(--tk-line);
    border-radius: var(--tk-radius);
}

.item-title-content > div { width: 100%; }

.item-title-content .fs-4 {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.6;
    color: var(--tk-text);
}

.item-title-content .text-muted {
    display: inline-block;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--tk-text-soft) !important;
}

.item-amount {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
}

.item-amount span { font-size: 26px !important; font-weight: 800; }

.item-controls {
    margin-top: 14px !important;
    padding: 0 !important;
    background: none !important;
}

.item-controls table.table { margin-bottom: 0; }

.item-controls table.table > tbody > tr > td {
    padding: 12px 0 !important;
    border-top: 1px solid var(--tk-line-soft);
    vertical-align: middle;
}

.item-controls table.table > tbody > tr:first-child > td { border-top: 0; }

.sku-cate-td { width: 88px; padding-left: 0 !important; white-space: nowrap; }

.sku-cate-td .cate-name {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--tk-text-soft) !important;
}

.sku-wrapper { gap: 8px; }

.sku-item {
    margin: 0 !important;
    padding: 8px 12px !important;
    background: #f7f8fd !important;
    border: 1px solid var(--tk-line) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    animation: none !important;
    transition: border-color .15s ease, background .15s ease !important;
}

.sku-item:not(article):hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: var(--tk-primary) !important;
}

.sku-item.sku-current { background: #eef0ff !important; border-color: var(--tk-primary) !important; }

.sku-wrapper .sku-item .sku-icon img { height: 26px; box-shadow: none !important; border-radius: 6px; }

.sku-name { font-size: 13px; line-height: 1.5; color: var(--tk-text); }

.sku-quantity-wrapper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.sku-quantity-wrapper .quantity-input {
    width: 96px !important;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    border: 1px solid var(--tk-line) !important;
    border-radius: 8px;
    background: #fff;
}

.sku-quantity-wrapper .sku-stock,
.sku-quantity-wrapper span.sku-stock {
    padding: 3px 10px !important;
    font-size: 12px;
    line-height: 1.7;
    border-radius: 6px;
}

.shop-checkout-btn { gap: 10px; margin-top: 16px; }

.checkout-btn {
    flex: 1 1 auto;
    width: auto !important;
    min-height: 44px;
    padding: 0 22px !important;
    border-radius: 10px !important;
    font-size: 14.5px;
    font-weight: 600;
    box-shadow: none !important;
    transition: background .15s ease, color .15s ease;
}

.shop-checkout-btn .btn-buy-now { background: var(--tk-primary) !important; border-radius: 10px !important; }
.shop-checkout-btn .btn-buy-now:hover { background: var(--tk-primary-dark) !important; }

.shop-checkout-btn .btn-add-cart {
    color: var(--tk-primary) !important;
    background: #fff !important;
    border: 1px solid var(--tk-primary) !important;
    border-radius: 10px !important;
}

.shop-checkout-btn .btn-add-cart:hover { background: #eef0ff !important; }

.item-image-main img,
.item-image-main a img {
    background: #fafbff;
    border: 1px solid var(--tk-line);
    border-radius: var(--tk-radius);
}

.item-image-sku-mini img { border: 1px solid var(--tk-line); border-radius: 8px; }

.introduce-content { font-size: 13.5px; line-height: 1.8; color: var(--tk-text); }

.item-image-list { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 768px) {
    .item-title-content { padding: 13px 14px !important; }
    .item-title-content .fs-4 { font-size: 15px !important; }
    .sku-cate-td { width: 72px; }
    .checkout-btn { font-size: 14px; min-height: 42px; }
    .item-amount span { font-size: 23px !important; }
}

/* 规格按钮文字过长时正常折行，不裁切 */
.sku-wrapper .sku-item { max-width: 100%; }
.sku-wrapper .sku-item .sku-name { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }

/* SEO：页面 H1（视觉隐藏，供搜索引擎与无障碍识别，不影响排版） */
.tk-h1-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
