/* ============================================
   Tokyo Skin for Dujiaoka Unicorn Theme
   仿灵球创研社（Tokyo 主题）风格
   ============================================ */
:root {
    --tk-bg: #f0f0f3;
    --tk-surface: #ffffff;
    --tk-black: #000000;
    --tk-text: #1c2024;
    --tk-muted: #60646c;
    --tk-muted-soft: #b0b4ba;
    --tk-link: #0d74ce;
    --tk-border: #e0e1e6;
    --tk-border-strong: #d9d9e0;
    --tk-shadow-soft: 0 3px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.07);
    --tk-shadow-elevated: 0 10px 20px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.05);
    --tk-radius-sm: 8px;
    --tk-radius-md: 16px;
    --tk-radius-lg: 24px;
    --tk-radius-pill: 9999px;
}

/* ---------- 全局 ---------- */
body {
    background: var(--tk-bg) !important;
    color: var(--tk-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
    font-size: 15px;
    line-height: 1.5;
}

a { color: inherit; }
a:hover { color: var(--tk-black); }

/* ---------- 顶部导航：胶囊悬浮条 ---------- */
.header {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 22px 0 16px;
}

.header > .container {
    border: none;
    outline: 1px solid rgba(224, 225, 230, 0.95);
    outline-offset: -1px;
    border-radius: var(--tk-radius-lg);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--tk-shadow-soft);
    padding: 10px 16px;
}

/* 顶部导航内容：桌面端左对齐 */
.tk-navbar {
    width: 100%;
    padding: 0;
    justify-content: flex-start !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

.tk-navbar-brand {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin-right: 10px;
    text-decoration: none !important;
}

.tk-navbar-brand img {
    height: 36px !important;
    width: 36px !important;
    object-fit: contain;
    border-radius: var(--tk-radius-pill);
}

.tk-navbar-brand span {
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--tk-black);
    font-size: 1.05rem;
}

.tk-navbar-collapse {
    flex-grow: 0 !important;
    flex-basis: auto !important;
}

.tk-navbar-nav {
    flex-direction: row !important;
    align-items: center;
    gap: 4px;
}

.tk-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tk-muted) !important;
    font-weight: 700;
    font-size: 14px !important;
    line-height: 1.2;
    border-radius: var(--tk-radius-pill);
    padding: 6px 18px !important;
    min-height: 35px;
    height: 35px;
    box-sizing: border-box;
    text-decoration: none;
    white-space: nowrap;
    transition: all .18s ease;
}

.tk-nav-link:hover {
    color: var(--tk-black) !important;
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.tk-nav-link.active {
    color: #fff !important;
    background: var(--tk-text) !important;
    padding: 6px 18px !important;
    min-height: 35px;
    height: 35px;
    border-radius: var(--tk-radius-pill) !important;
}

/* 搜索框 */
.tk-navbar-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.tk-navbar-search-input {
    border: 1px solid var(--tk-border-strong);
    border-radius: var(--tk-radius-pill);
    background: var(--tk-surface);
    padding: 7px 14px;
    font-size: 14px;
    outline: none;
    min-width: 160px;
    transition: border-color .18s ease;
}

.tk-navbar-search-input:focus { border-color: var(--tk-text); }

.tk-navbar-search-btn {
    border-radius: var(--tk-radius-pill);
    background: var(--tk-text);
    border: none;
    color: #fff;
    padding: 7px 14px;
    cursor: pointer;
    transition: background .18s ease;
}

.tk-navbar-search-btn:hover { background: var(--tk-black); }

/* 移动端折叠按钮 */
.tk-navbar-toggler {
    border: none;
    padding: 4px 8px;
    margin-left: auto;
}

.tk-navbar-toggler:focus { box-shadow: none; }

.tk-navbar-toggler-icon {
    width: 1.2em;
    height: 1.2em;
}

/* ---------- 移动端汉堡菜单 ---------- */
.tk-mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--tk-border);
    border-radius: 50%;
    background: var(--tk-surface);
    color: var(--tk-text);
    box-shadow: var(--tk-shadow-soft);
    cursor: pointer;
    outline: none;
    transition: all .18s ease;
}

.tk-mobile-menu-toggle:hover {
    background: var(--tk-bg);
    border-color: var(--tk-border-strong);
}

.tk-mobile-menu-toggle.open {
    background: var(--tk-text);
    color: #fff;
    border-color: var(--tk-text);
}

.tk-mobile-menu {
    display: none;
    width: 100%;
    padding: 8px 0 12px;
    animation: tkMobileMenuIn .2s ease;
}

@keyframes tkMobileMenuIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tk-mobile-menu.open {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tk-mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--tk-radius-md);
    background: var(--tk-surface);
    border: 1px solid var(--tk-border);
    box-shadow: var(--tk-shadow-soft);
    color: var(--tk-text);
    font-weight: 600;
    text-decoration: none !important;
    transition: all .18s ease;
}

.tk-mobile-menu-item:hover {
    background: var(--tk-bg);
    color: var(--tk-black);
    text-decoration: none;
}

.tk-mobile-menu-item i {
    font-size: 1.1rem;
    color: var(--tk-muted);
}

.tk-mobile-menu-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.tk-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 14px;
    border-radius: var(--tk-radius-pill);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none !important;
    border: 1px solid var(--tk-border-strong);
    transition: all .18s ease;
    cursor: pointer;
}

.tk-mobile-menu-btn i { font-size: 1rem; }

.tk-mobile-btn-login {
    background: var(--tk-surface);
    color: var(--tk-text);
}

.tk-mobile-btn-login:hover {
    background: var(--tk-bg);
    color: var(--tk-black);
}

.tk-mobile-btn-register {
    background: var(--tk-text);
    color: #fff;
    border-color: var(--tk-text);
}

.tk-mobile-btn-register:hover {
    background: var(--tk-black);
    color: #fff;
}

.tk-mobile-menu-btn button {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    cursor: pointer;
    outline: none;
}

/* ---------- 公告卡片 ---------- */
.notice .card {
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-lg);
    background: var(--tk-surface);
    box-shadow: var(--tk-shadow-soft);
}

.notice .card h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 1.05rem;
}

.notice .lead { font-size: 0.95rem; color: var(--tk-muted); }

/* ---------- 分类标题区 ---------- */
.category h3 {
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--tk-black);
    margin-top: 24px;
}

.category .separator {
    width: 54px;
    height: 3px;
    margin: 12px auto;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(28,32,36,.9), rgba(28,32,36,.18));
    border: none;
}

.category .lead {
    color: var(--tk-muted);
    font-size: 0.95rem;
}

/* 分类胶囊按钮 */
.category-menus .btn {
    border-radius: var(--tk-radius-pill) !important;
    border: 1px solid var(--tk-border-strong) !important;
    background: var(--tk-surface);
    color: var(--tk-muted);
    font-weight: 600;
    padding: 8px 18px;
    margin: 4px;
    transition: all .18s ease;
    box-shadow: none !important;
}

.category-menus .btn:hover {
    color: var(--tk-black);
    border-color: var(--tk-text) !important;
    background: var(--tk-surface);
}

.category-menus .btn.active {
    background: var(--tk-text) !important;
    border-color: var(--tk-text) !important;
    color: #fff !important;
}

/* ---------- 商品卡片 ---------- */
.goods .card {
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-md);
    background: var(--tk-surface);
    box-shadow: var(--tk-shadow-soft);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.goods .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tk-shadow-elevated);
}

.goods .card .badge {
    border-radius: var(--tk-radius-pill);
    font-weight: 600;
    margin: 8px;
    padding: 5px 10px;
    z-index: 2;
}

.goods .card .badge.bg-success { background: var(--tk-text) !important; }
.goods .card .badge.bg-warning { background: #b45309 !important; color: #fff; }

.goods .card-title {
    font-weight: 700;
    color: var(--tk-text);
}

/* 价格按钮 → 文字化 */
.goods .btn-outline-success {
    border: none !important;
    background: transparent !important;
    color: var(--tk-black) !important;
    font-size: 1.05rem;
    padding-left: 0;
    cursor: default;
}

.goods .btn-outline-warning {
    border-radius: var(--tk-radius-pill);
    border-color: var(--tk-border-strong) !important;
    color: var(--tk-muted) !important;
    background: var(--tk-bg) !important;
    font-size: 12px;
}

/* 购买按钮：黑色胶囊 */
.btn-primary {
    background: var(--tk-text) !important;
    border: none !important;
    border-radius: var(--tk-radius-pill) !important;
    font-weight: 600;
    padding: 6px 16px;
    box-shadow: none !important;
    transition: all .18s ease;
}

.btn-primary:hover {
    background: var(--tk-black) !important;
    transform: translateY(-1px);
}

/* ---------- 通用卡片（购买页/订单页） ---------- */
.card {
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-md);
}

.main-container .card,
#pjax-container .card {
    box-shadow: var(--tk-shadow-soft);
}

.form-control, .form-select {
    border-radius: var(--tk-radius-sm);
    border-color: var(--tk-border-strong);
}

.form-control:focus, .form-select:focus {
    border-color: var(--tk-text);
    box-shadow: none;
}

.btn-secondary, .btn-success, .btn-info {
    border-radius: var(--tk-radius-pill) !important;
}

/* ---------- 购买页 / 详情页 ---------- */
.good-card .card {
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-lg);
    box-shadow: var(--tk-shadow-soft);
    overflow: hidden;
    background: var(--tk-surface);
}

/* 主图：圆角填充铺满 */
.good-card .tk-buy-cover {
    position: relative;
    width: calc(100% - 24px);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 18px;
    background: var(--tk-bg);
    margin: 12px;
}

.good-card .card-img-top,
.good-card .tk-buy-cover-img,
.good-card .tk-buy-cover img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 18px !important;
    display: block !important;
    background: var(--tk-bg);
    box-sizing: border-box !important;
}

.good-card .tk-buy-cover .badge,
.good-card .tk-buy-cover .position-absolute {
    z-index: 2;
}

/* 验证码 */
.good-card .tk-captcha-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.good-card .tk-captcha-group .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.good-card .tk-captcha-img {
    flex: 0 0 auto;
    height: 40px;
    width: 110px;
    border-radius: 10px;
    border: 1px solid var(--tk-border);
    background: #f3f4f6;
    cursor: pointer;
    object-fit: cover;
}

.good-card .card-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--tk-black);
    font-size: 1.25rem;
}

.good-card .badge {
    border-radius: var(--tk-radius-pill);
    font-weight: 600;
    padding: 6px 10px;
}

.good-card .badge.bg-success {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
}

.good-card .badge.bg-warning {
    background: #fff3e0 !important;
    color: #b45309 !important;
}

.good-card .badge.bg-danger {
    background: #ffebee !important;
    color: #c62828 !important;
}

.good-card .buy-form .form-control,
.good-card .buy-form .form-control-sm {
    border-radius: var(--tk-radius-sm);
    border-color: var(--tk-border-strong);
    padding: 10px 12px;
    min-height: 42px;
}

.good-card .buy-form label {
    font-weight: 600;
    color: var(--tk-text);
    font-size: 0.9rem;
}

.good-card .btn-outline-primary,
.good-card #submit {
    border-radius: var(--tk-radius-pill) !important;
    background: var(--tk-text) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700;
    padding: 10px 20px;
    width: 100%;
}

.good-card .btn-outline-primary:hover,
.good-card #submit:hover {
    background: var(--tk-black) !important;
    color: #fff !important;
}

.good-card .position-absolute.top-0.start-0 {
    top: 12px !important;
    left: 12px !important;
    z-index: 2;
}

/* ---------- 页脚 ---------- */
.footer {
    background: transparent !important;
    color: var(--tk-muted-soft);
    font-size: 13px;
    padding: 32px 12px 40px !important;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

/* 防止 Bootstrap .row 负边距把页面撑宽 */
.footer .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
}

.footer .row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.footer a {
    color: var(--tk-muted);
    font-weight: 600;
}

.footer a:hover { color: var(--tk-black); }

/* 隐藏 Powered by 独角数卡 */
.footer .author { display: none !important; }

/* ---------- 弹窗公告 ---------- */
.tokyo-notice-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 16px;
}

.tokyo-notice-card {
    width: 100%;
    max-width: 460px;
    background: var(--tk-surface);
    border-radius: var(--tk-radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 28px 26px 22px;
    animation: tokyoNoticeIn .35s cubic-bezier(.22, .61, .36, 1);
}

@keyframes tokyoNoticeIn {
    from { opacity: 0; transform: translateY(18px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes tokyoNoticeSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.tokyo-notice-header {
    margin-bottom: 16px;
}

.tokyo-notice-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--tk-muted-soft);
    margin-bottom: 6px;
}

.tokyo-notice-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--tk-black);
    margin: 0;
}

.tokyo-notice-title i {
    font-size: 1.1rem;
    margin-right: 6px;
    vertical-align: middle;
}

.tokyo-notice-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--tk-text);
    margin-bottom: 22px;
    max-height: 55vh;
    overflow-y: auto;
}

.tokyo-notice-body p { margin-bottom: .6em; }
.tokyo-notice-body p:last-child { margin-bottom: 0; }

.tokyo-notice-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tokyo-notice-actions .btn {
    width: 100%;
    border-radius: var(--tk-radius-pill);
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all .18s ease;
}

.tokyo-notice-actions .btn i {
    font-size: .85rem;
    margin-right: 5px;
}

.tokyo-btn-confirm {
    background: var(--tk-black) !important;
    color: #fff !important;
    border: 1px solid var(--tk-black) !important;
}

.tokyo-btn-confirm:hover {
    background: var(--tk-text) !important;
    border-color: var(--tk-text) !important;
}

.tokyo-btn-cancel {
    background: #fff !important;
    color: var(--tk-text) !important;
    border: 1px solid var(--tk-border-strong) !important;
}

.tokyo-btn-cancel:hover {
    border-color: var(--tk-text) !important;
    background: #f8f8f9 !important;
}

.tokyo-notice-hint {
    text-align: center;
    font-size: 12px;
    color: var(--tk-muted-soft);
    margin: 14px 0 0;
}

/* ---------- 首页：左右分类表格布局 ---------- */
.tk-shop-layout { padding: 22px 0 50px; }

.tk-layout-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
    align-items: start;
}

.tk-sidebar-panel,
.tk-catalog-panel {
    background: var(--tk-surface);
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-lg);
    box-shadow: var(--tk-shadow-soft);
    overflow: hidden;
}

.tk-panel-header {
    padding: 22px 22px 16px;
    border-bottom: 1px solid var(--tk-border);
}

.tk-panel-kicker {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--tk-muted-soft);
    margin-bottom: 4px;
}

.tk-panel-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--tk-black);
    margin: 0;
}

.tk-panel-body { padding: 14px; }

/* 分类抽屉头部 */
.tk-sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tk-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--tk-border);
    border-radius: 50%;
    background: var(--tk-bg);
    color: var(--tk-text);
    cursor: pointer;
    outline: none;
    transition: all .18s ease;
    flex: 0 0 auto;
}

.tk-sidebar-close:hover {
    background: var(--tk-border);
}

/* 分类树 */
.tk-category-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tk-cat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--tk-radius-md);
    cursor: pointer;
    transition: all .18s ease;
    margin-bottom: 6px;
}

.tk-cat-item:hover {
    background: var(--tk-bg);
}

.tk-cat-item.active {
    background: var(--tk-surface);
    color: var(--tk-text);
    border: 1px solid var(--tk-border-strong);
    box-shadow: var(--tk-shadow-soft);
}

.tk-cat-item.active .tk-cat-icon {
    background: var(--tk-bg);
    color: var(--tk-text);
}

.tk-cat-item.active .tk-cat-count {
    background: rgba(255,255,255,.18);
    color: #fff;
}

.tk-cat-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--tk-bg);
    color: var(--tk-muted);
    font-size: 15px;
    transition: all .18s ease;
}

.tk-cat-icon i { line-height: 1; }

.tk-cat-name {
    flex: 1 1 auto;
    font-weight: 600;
    font-size: 0.95rem;
}

.tk-cat-count {
    flex: 0 0 auto;
    min-width: 26px;
    text-align: center;
    padding: 3px 8px;
    border-radius: var(--tk-radius-pill);
    background: var(--tk-bg);
    color: var(--tk-muted);
    font-size: 12px;
    font-weight: 700;
    transition: all .18s ease;
}

/* 右侧目录 */
.tk-catalog-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tk-catalog-header > .tk-panel-kicker,
.tk-catalog-header > .tk-panel-title {
    flex: 0 0 auto;
}

.tk-catalog-tools {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.tk-mobile-filter-trigger {
    display: none;
    border-radius: var(--tk-radius-pill);
    border: 1px solid var(--tk-border-strong);
    background: var(--tk-surface);
    color: var(--tk-text);
    font-weight: 600;
    padding: 8px 16px;
}

.tk-search-combo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tk-searchbox {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--tk-border-strong);
    border-radius: var(--tk-radius-pill);
    background: var(--tk-surface);
    padding: 8px 14px;
    min-width: 220px;
}

.tk-searchbox i { color: var(--tk-muted-soft); font-size: 14px; }

.tk-search-input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    font-size: 14px;
    color: var(--tk-text);
    width: 100%;
}

.tk-search-input::placeholder { color: var(--tk-muted-soft); }

.tk-search-btn {
    border-radius: var(--tk-radius-pill);
    background: var(--tk-text);
    color: #fff;
    border: none;
    padding: 8px 18px;
    font-weight: 600;
}

.tk-search-btn:hover { background: var(--tk-black); color: #fff; }

/* 商品表格 */
.tk-table-wrap { overflow-x: auto; }

.tk-commodity-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

.tk-commodity-table thead th {
    padding: 14px 16px;
    font-weight: 600;
    color: var(--tk-muted);
    border-bottom: 1px solid var(--tk-border);
    white-space: nowrap;
    font-size: 0.9rem;
}

.tk-commodity-table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--tk-border);
    vertical-align: middle;
}

.tk-commodity-table tbody tr:last-child { border-bottom: none; }
    .tk-commodity-table tbody tr:last-child td { border-bottom: none; }

.tk-col-main { width: auto; min-width: 240px; }
.tk-col-price { width: 120px; text-align: left; }
.tk-col-stock { width: 90px; text-align: left; }
.tk-col-sold { width: 90px; text-align: left; }
.tk-col-action { width: 110px; text-align: right; }

.tk-goods-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tk-goods-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--tk-border);
    background: var(--tk-bg);
}

.tk-goods-meta { display: flex; flex-direction: column; gap: 6px; }

.tk-goods-name {
    font-weight: 700;
    color: var(--tk-text);
    line-height: 1.35;
}

.tk-goods-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 10px;
    border-radius: var(--tk-radius-pill);
    font-size: 11px;
    font-weight: 700;
}

.tk-tag-auto {
    background: #e8f5e9;
    color: #2e7d32;
}

.tk-tag-manual {
    background: #fff3e0;
    color: #b45309;
}

.tk-mobile-status,
.tk-goods-progress,
.tk-goods-mobile-meta { display: none; }

.tk-goods-price {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--tk-black);
}

.tk-buy-btn {
    border-radius: var(--tk-radius-pill) !important;
    background: var(--tk-text) !important;
    color: #fff !important;
    border: none !important;
    padding: 7px 18px;
    font-weight: 600;
    font-size: 0.9rem;
}

.tk-buy-btn:hover { background: var(--tk-black) !important; }

.tk-empty-row td {
    text-align: center;
    color: var(--tk-muted);
    padding: 40px 16px;
}

/* ---------- 移动端 ---------- */
@media (max-width: 991px) {
    /* 锁死横向滚动，固定视口宽度 */
    html {
        overflow-x: clip !important;
        max-width: 100vw;
        width: 100%;
    }

    body {
        overflow-x: clip !important;
        max-width: 100vw;
        width: 100%;
        position: relative;
        overscroll-behavior-x: none;
        touch-action: pan-y;
    }

    .header {
        z-index: 1030;
        /* 外层统一左右边距，让导航白卡与下方内容白卡同宽 */
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box;
    }

    /* 导航白卡：铺满 header 内可用宽度 */
    .header > .container {
        width: 100% !important;
        max-width: none !important;
        padding: 10px 12px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* 下方内容：与导航同一侧边距 */
    .tk-shop-layout,
    .main-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: hidden;
    }

    .tk-shop-layout > .container,
    .main-container > .container,
    #pjax-container .container {
        width: 100% !important;
        max-width: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .tk-mobile-menu > .container,
    .footer .container {
        width: 100% !important;
        max-width: none !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box !important;
    }

    .tk-desktop-nav { display: none !important; }
    .tk-mobile-menu-toggle { display: inline-flex; flex-shrink: 0; }
    .tk-navbar {
        justify-content: space-between !important;
        width: 100% !important;
        max-width: 100%;
        flex-wrap: nowrap !important;
    }
    .tk-navbar-brand {
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
    }
    .tk-navbar-brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tk-layout-row {
        grid-template-columns: 1fr;
        max-width: 100%;
        min-width: 0;
        gap: 12px;
    }

    .tk-catalog-panel {
        max-width: 100%;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .tk-panel-body,
    .tk-panel-header,
    .tk-table-wrap {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* 分类抽屉完全移出视口，不参与横向滚动计算 */
    .tk-sidebar-panel {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 9990;
        width: min(320px, 85vw);
        max-width: 85vw;
        border-radius: 0 24px 24px 0;
        transform: translate3d(-105%, 0, 0);
        transition: transform .25s ease, visibility .25s ease;
        visibility: hidden;
        pointer-events: none;
        will-change: transform;
        overflow: hidden;
        contain: layout paint;
    }

    .tk-sidebar-panel.open {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        pointer-events: auto;
    }

    .footer {
        padding-left: 12px !important;
        padding-right: 12px !important;
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    .tk-sidebar-close { display: inline-flex; }

    .tk-catalog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .tk-catalog-title-wrap { width: 100%; }

    .tk-catalog-tools {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .tk-mobile-filter-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 12px 16px;
        border-radius: var(--tk-radius-pill);
        border: 1px solid var(--tk-border-strong);
        background: var(--tk-surface);
        color: var(--tk-text);
        font-weight: 600;
        font-size: 0.95rem;
    }

    .tk-search-combo {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .tk-searchbox {
        width: 100%;
        min-width: 0;
        padding: 12px 14px;
    }

    .tk-search-btn {
        width: 100%;
        padding: 12px 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    /* 商品列表卡片化 */
    .tk-table-wrap {
        overflow-x: hidden;
        max-width: 100%;
    }

    .tk-commodity-table,
    .tk-commodity-table thead,
    .tk-commodity-table tbody,
    .tk-commodity-table tr,
    .tk-commodity-table td {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .tk-commodity-table thead { display: none; }

    .tk-commodity-table tbody tr {
        display: block;
        padding: 12px 0;
        margin-bottom: 0;
        border: none;
        border-bottom: 1px solid var(--tk-border);
        border-radius: 0;
        background: transparent;
        cursor: pointer;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .tk-commodity-table tbody td {
        border-bottom: none;
        padding: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .tk-commodity-table tbody tr:last-child { border-bottom: none; }
    .tk-commodity-table tbody tr:last-child td { border-bottom: none; }

    .tk-col-main { min-width: 0; max-width: 100%; }

    /* 手机端商品卡片：左图 | 中信息 | 右标签 */
    .tk-goods-info {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr) auto;
        grid-template-rows: auto;
        gap: 0 10px;
        align-items: start;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
    }

    .tk-goods-thumb {
        grid-column: 1;
        grid-row: 1 / -1;
        width: 52px;
        height: 52px;
        border-radius: 12px;
        align-self: center;
        flex-shrink: 0;
    }

    .tk-goods-meta {
        grid-column: 2;
        grid-row: 1 / -1;
        display: flex;
        flex-direction: column;
        gap: 5px;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .tk-goods-name {
        font-size: 0.92rem;
        font-weight: 700;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 手机端隐藏 meta 里桌面状态标签 */
    .tk-goods-meta > .tk-goods-tag:not(.tk-mobile-status) { display: none; }

    .tk-goods-progress {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .tk-progress-track {
        width: 100%;
        height: 5px;
        border-radius: 999px;
        background: var(--tk-bg);
        overflow: hidden;
    }

    .tk-progress-fill {
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg, #e8d5b7 0%, #d4a574 100%);
        max-width: 100%;
    }

    .tk-goods-mobile-meta {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 3px 6px;
        font-size: 0.75rem;
        color: var(--tk-muted);
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .tk-goods-mobile-meta .tk-goods-price {
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        padding: 2px 6px;
        border-radius: 999px;
        background: #f5f0e6;
        color: #b8860b;
        font-size: 0.72rem;
        font-weight: 700;
    }

    .tk-goods-mobile-meta .tk-goods-stock,
    .tk-goods-mobile-meta .tk-goods-sold {
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* 右侧在线发货/人工处理标签 */
    .tk-goods-info > .tk-mobile-status {
        grid-column: 3;
        grid-row: 1 / -1;
        display: inline-flex;
        align-self: center;
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 10px;
        padding: 3px 8px;
        max-width: 72px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 隐藏桌面端价格/库存/销��/操作列 */
    .tk-commodity-table tbody td.tk-col-price,
    .tk-commodity-table tbody td.tk-col-stock,
    .tk-commodity-table tbody td.tk-col-sold,
    .tk-commodity-table tbody td.tk-col-action {
        display: none !important;
    }

    .tk-buy-btn { display: none; }
}

@media (max-width: 768px) {
    .header > .container {
        border-radius: var(--tk-radius-lg);
        padding: 10px 12px !important;
        position: relative;
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
    .tk-navbar { flex-wrap: nowrap; }
    .tk-navbar-brand span {
        display: inline-block;
        font-size: 1rem;
    }
    .tk-navbar-brand img { height: 34px !important; width: 34px !important; }

    /* 公告弹窗保持居中弹窗样式 */
    .tokyo-notice-card { max-width: 92vw; }
    .tokyo-notice-title { font-size: 1.15rem; }
    .tokyo-notice-body { font-size: 0.9rem; max-height: 50vh; }
    .tokyo-notice-actions .btn { padding: 13px 16px; font-size: 0.95rem; }
    .tk-panel-header { padding: 16px 14px 12px; }
    .tk-panel-title { font-size: 1.1rem; }
    .tk-shop-layout {
        padding-top: 10px !important;
        padding-bottom: 40px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .tk-panel-body { padding: 12px; }

    /* 购买页手机端布局 */
    .main-container {
        padding-top: 10px !important;
        padding-bottom: 40px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: hidden;
    }

    .main-container > .container {
        width: 100% !important;
        max-width: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .good-card .row.no-gutters,
    .good-card .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100%;
    }

    .good-card [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100%;
    }

    .good-card .card {
        margin-top: 0 !important;
    }

    .good-card .tk-buy-cover {
        margin: 12px;
        width: min(calc(100% - 24px), 220px);
        aspect-ratio: 1 / 1;
        border-radius: 16px;
    }

    .good-card .card-img-top,
    .good-card .tk-buy-cover-img,
    .good-card .tk-buy-cover img {
        border-radius: 16px !important;
        padding: 0 !important;
        max-height: none !important;
        object-fit: cover !important;
        width: 100% !important;
        height: 100% !important;
    }

    .good-card .tk-captcha-group {
        gap: 8px;
    }

    .good-card .tk-captcha-img {
        height: 40px;
        width: 100px;
    }

    .good-card .card-body {
        padding: 16px 14px 18px !important;
    }

    .good-card .card-title {
        font-size: 1.15rem;
        margin-bottom: 8px;
    }

    .good-card .buy-form .col-xs-12,
    .good-card .buy-form .col-md-6,
    .good-card .buy-form .col-md-4,
    .good-card .buy-form .col-12 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        margin-bottom: 8px;
    }

    .good-card #submit {
        margin-top: 8px;
        padding: 12px 16px;
    }

    .good-card .card-header {
        padding: 14px 16px;
        background: var(--tk-surface);
        border-bottom: 1px solid var(--tk-border);
    }

    .good-card .card-header h5 {
        margin: 0;
        font-weight: 800;
        font-size: 1rem;
    }
}

/* ---------- 顶部用户登录入口 ---------- */
.tk-navbar-auth {
    margin-left: auto;
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
}

/* 左右黑色胶囊统一尺寸/圆角/字号 */
.tk-nav-register,
.tk-nav-link.tk-nav-register,
.tk-nav-link.active {
    background: var(--tk-text) !important;
    color: #fff !important;
    padding: 6px 18px !important;
    min-height: 35px !important;
    height: 35px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.tk-nav-register:hover,
.tk-nav-link.active:hover {
    background: var(--tk-black) !important;
    color: #fff !important;
}

/* 桌面端：导航白卡与下方内容区外边缘完全对齐 */
@media (min-width: 992px) {
    .header {
        padding: 22px 0 14px;
    }

    .header > .container,
    .tk-shop-layout > .container,
    .main-container > .container,
    .footer .container {
        max-width: 1140px !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    .header > .container {
        padding: 10px 16px !important;
    }

    .tk-desktop-nav {
        display: flex !important;
        flex: 1 1 auto;
        align-items: center;
        width: auto;
        min-width: 0;
    }

    .tk-desktop-nav .tk-navbar-nav.mr-auto {
        margin-right: 0 !important;
    }

    .tk-navbar {
        display: flex !important;
        align-items: center !important;
        width: 100%;
    }

    .tk-layout-row {
        width: 100%;
        max-width: 100%;
    }
}

.tk-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--tk-bg);
    color: var(--tk-text);
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
}

.tk-dropdown-menu {
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-md);
    box-shadow: var(--tk-shadow-elevated);
    padding: 8px;
    min-width: 150px;
}

.tk-dropdown-menu .dropdown-item {
    border-radius: var(--tk-radius-sm);
    padding: 8px 12px;
    font-size: 0.95rem;
    color: var(--tk-text);
    transition: all .18s ease;
}

.tk-dropdown-menu .dropdown-item:hover {
    background: var(--tk-bg);
    color: var(--tk-black);
}

.tk-logout-btn {
    color: var(--tk-text) !important;
    text-decoration: none !important;
    padding: 0;
    font-size: 0.95rem;
    width: 100%;
    text-align: left;
}

.tk-logout-btn:hover { text-decoration: none !important; }

/* ---------- 登录/注册页面 ---------- */
.tk-auth-page {
    padding: 60px 0 80px;
}

.tk-auth-card {
    background: var(--tk-surface);
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-lg);
    box-shadow: var(--tk-shadow-soft);
    padding: 34px 32px 28px;
}

.tk-auth-header {
    text-align: center;
    margin-bottom: 26px;
}

.tk-auth-header h3 {
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--tk-black);
    margin-bottom: 6px;
}

.tk-auth-header p {
    color: var(--tk-muted);
    font-size: 0.95rem;
    margin: 0;
}

.tk-auth-card .form-group {
    margin-bottom: 18px;
}

.tk-auth-card label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--tk-text);
    margin-bottom: 6px;
}

.tk-auth-card .form-control {
    border-radius: var(--tk-radius-sm);
    border-color: var(--tk-border-strong);
    padding: 10px 14px;
    font-size: 0.95rem;
}

.tk-auth-card .form-control:focus {
    border-color: var(--tk-text);
    box-shadow: none;
}

.tk-auth-card .form-check {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: -4px;
}

.tk-auth-card .form-check-input {
    margin-top: 0;
}

.tk-auth-card .btn-dark {
    width: 100%;
    border-radius: var(--tk-radius-pill);
    background: var(--tk-text);
    border: none;
    padding: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 8px;
    transition: all .18s ease;
}

.tk-auth-card .btn-dark:hover {
    background: var(--tk-black);
    transform: translateY(-1px);
}

.tk-auth-footer {
    text-align: center;
    margin-top: 22px;
    color: var(--tk-muted);
    font-size: 0.9rem;
}

.tk-auth-footer a {
    color: var(--tk-text);
    font-weight: 700;
    text-decoration: none;
}

.tk-auth-footer a:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .tk-auth-page { padding: 30px 0 50px; }
    .tk-auth-card { padding: 26px 22px 22px; }
    .tk-navbar-auth .nav-item:first-child .nav-link { padding-right: 10px !important; }
    .tk-navbar-auth .nav-item:last-child .nav-link { padding-left: 10px !important; }
}

