/* ── 重置主题干扰 ──────────────────────────────────── */
.woocommerce-notices-wrapper,
.woocommerce-result-count,
.woocommerce-ordering,
ul.products { display: none !important; }

/* ── 页面容器 ──────────────────────────────────────── */
.pft-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 16px 48px;
    font-size: 13px;
    color: #333;
    box-sizing: border-box;
}
.pft-cat-title {
    font-size: 22px;
    font-weight: 600;
    margin: 8px 0 16px;
}

/* ── 工具栏 ────────────────────────────────────────── */
.pft-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
#pft-search {
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 13px;
    width: 220px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
}
#pft-search:focus { border-color: #555; }
.pft-total { flex: 1; color: #666; font-size: 13px; }
#pft-reset {
    padding: 8px 18px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
#pft-reset:hover { background: #000; }

/* ── 表格滚动容器 ──────────────────────────────────── */
.pft-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

/* ── 表格基础 ──────────────────────────────────────── */
.pft-table {
    background-color: #fff;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 13px;
    width: max-content;
    min-width: 100%;
}
.pft-table th,
.pft-table td {
    border-right: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
}
.pft-table th:last-child,
.pft-table td:last-child { border-right: none; }

/* ── 列宽 ──────────────────────────────────────────── */
.pft-table th:first-child,
.pft-table td:first-child { width: 180px; }
.pft-table th:nth-child(n+2),
.pft-table td:nth-child(n+2) { width: 160px; }

/* ── 第一列 sticky ─────────────────────────────────── */
.pft-table th:first-child,
.pft-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
}
.pft-row-labels th:first-child     { background: #f4f4f4; }
.pft-row-filters th:first-child    { background: #fafafa; z-index: 4; }
.pft-table tbody tr td:first-child { background: #fff; }
.pft-table tbody tr:nth-child(even) td:first-child { background: #f9f9f9; }
.pft-table tbody tr:hover td:first-child { background: #eef4ff; }

.pft-table th:first-child::after,
.pft-table td:first-child::after {
    content: '';
    position: absolute;
    top: 0; right: -6px;
    width: 6px; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,.07), transparent);
    pointer-events: none;
}

/* ── 列标题行 ──────────────────────────────────────── */
.pft-row-labels th {
    background: #f4f4f4;
    padding: 11px 14px;
    text-align: center;
    font-weight: 600;
    white-space: normal;
    word-break: break-word;
    max-width: 160px;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
}
.pft-row-labels th:hover { background: #e6e6e6; }

.si::after            { content: ' \21C5'; color: #bbb; font-size: 11px; }
.sort-asc  .si::after { content: ' \2191'; color: #333; }
.sort-desc .si::after { content: ' \2193'; color: #333; }

/* ── 筛选控件行 ────────────────────────────────────── */
.pft-row-filters th {
    background: #fafafa;
    padding: 10px 12px;
    vertical-align: top;
    border-bottom: 2px solid #ccc;
}

/* 复选框组 */
.pft-pkg {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 160px;
    overflow-y: auto;
}
.pft-pkg label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
}
.pft-pkg em { color: #aaa; font-style: normal; font-size: 11px; }

/* ── 竖版双滑块（轨道左 + 数字框右） ─────────────── */
.pft-slider {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    box-sizing: border-box;
    min-height: 120px;
    width: 100%;
    justify-content: center;
}

/* 左：竖向轨道 */
.sl-track {
    position: relative;
    width: 6px;
    min-height: 110px;
    background: #e0e0e0;
    border-radius: 3px;
    flex-shrink: 0;
    align-self: stretch;
    cursor: pointer;
}

/* 蓝色填充柱（top/height 由 JS 控制） */
.sl-fill {
    position: absolute;
    left: 0;
    width: 100%;
    background: #4a90e2;
    border-radius: 3px;
    pointer-events: none;
    transition: top .05s, height .05s;
}

/* 方形蓝色拖动把手 */
.sl-thumb {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #4a90e2;
    border-radius: 2px;
    cursor: grab;
    box-shadow: 0 1px 4px rgba(74,144,226,.5);
    z-index: 2;
    box-sizing: border-box;
    touch-action: none;
    transition: transform .1s, box-shadow .1s;
}
.sl-thumb:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 0 4px rgba(74,144,226,.2);
}
.sl-thumb:active { cursor: grabbing; }

/* 右：数字框容器（上=最大值，下=最小值） */
.sl-vals {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    /*flex: 1;*/
    min-height: 110px;
}

.sl-vals input{
    width:80px;
}

.sl-vhi,
.sl-vlo {
    width: 100%;
    padding: 4px 5px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    font-size: 12px;
    text-align: center;
    box-sizing: border-box;
    transition: border-color .15s;
    -moz-appearance: textfield;
}
.sl-vhi:focus,
.sl-vlo:focus { border-color: #4a90e2; outline: none; }
.sl-vhi::-webkit-inner-spin-button,
.sl-vlo::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── 数据行 ────────────────────────────────────────── */
.pft-table tbody tr:nth-child(even) { background: #f9f9f9; }
.pft-table tbody tr:hover           { background: #eef4ff; }
.pft-table td {
    padding: 10px 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pft-table td:first-child {
    white-space: normal;
    word-break: break-word;
}
.pft-table td a { color: #0073aa; text-decoration: none; }
.pft-table td a:hover { text-decoration: underline; }
.pft-msg {
    text-align: center;
    color: #999;
    padding: 40px 0 !important;
    white-space: normal;
}

/* ── 分页 ──────────────────────────────────────────── */
.pft-pager {
    display: flex;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.pft-pg {
    min-width: 34px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}
.pft-pg:hover  { border-color: #4a90e2; color: #4a90e2; }
.pft-pg.active { background: #4a90e2; color: #fff; border-color: #4a90e2; }

/* ── 响应式 ────────────────────────────────────────── */
@media (max-width: 768px) {
    html, body,
    #page, #content, #primary, #main,
    .site, .site-content, .content-area,
    .ast-container, .ast-row, .ast-flex,
    .entry-content, .woocommerce,
    .woocommerce-page #primary,
    .woocommerce-page .content-area {
        overflow-x: unset !important;
        max-width: 100% !important;
    }
    .pft-toolbar { flex-direction: column; align-items: stretch; }
    #pft-search  { width: 100%; box-sizing: border-box; }
    #pft-reset   { width: 100%; text-align: center; }
    .pft-total   { text-align: center; }
    .pft-wrap    { padding: 10px 8px 32px; overflow: visible; }
    .pft-scroll  {
        display: block;
        width: 100%;
        max-width: calc(100vw - 16px);
        overflow-x: scroll !important;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #bbb #f0f0f0;
    }
    .pft-scroll::-webkit-scrollbar       { height: 5px; }
    .pft-scroll::-webkit-scrollbar-track { background: #f0f0f0; }
    .pft-scroll::-webkit-scrollbar-thumb { background: #bbb; border-radius: 3px; }
    .pft-table th:first-child,
    .pft-table td:first-child    { width: 110px; }
    .pft-table th:nth-child(n+2),
    .pft-table td:nth-child(n+2) { width: 130px; }
}
@media (max-width: 480px) {
    .pft-scroll { max-width: calc(100vw - 16px); }
    .pft-table th:first-child,
    .pft-table td:first-child    { width: 100px; }
    .pft-table th:nth-child(n+2),
    .pft-table td:nth-child(n+2) { width: 120px; }
}