﻿/* ==============================
   Goods Category Head
   主色：#e886ae
   副色：#d8759e
================================= */

.goods-category-head {
    width: 98%;
    padding: 42px 0 26px;
}

    .goods-category-head h1 {
        position: relative;
        margin: 0 0 18px;
        padding-left: 16px;
        color: #111111;
        font-size: 2rem;
        line-height: 42px;
        font-weight: bold;
    }

        .goods-category-head h1:before {
            content: "";
            position: absolute;
            left: 0;
            top: 11px;
            width: 4px;
            height: 20px;
            background: #e886ae;
            border-radius: 4px;
        }

.goods-category-content {
    color: #555555;
    font-size: 0.98rem;
    line-height: 28px;
}

    .goods-category-content p {
        margin-bottom: 12px;
    }


/* ==============================
   Parts List Table
================================= */

.parts-list {
    width: 98%;
    padding: 10px 0 60px;
}

    .parts-list .jss187 {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        background: #ffffff;
        border: 1px solid #f5d6e3;
        border-radius: 16px;
        box-shadow: 0 14px 34px rgba(216, 117, 158, 0.08);
    }

    .parts-list table {
        width: 100%;
        min-width: 1250px;
        border-collapse: separate;
        border-spacing: 0;
        background: #ffffff;
    }

        .parts-list table th,
        .parts-list table td {
            box-sizing: border-box;
        }

        .parts-list table thead {
            background: linear-gradient(180deg, #fff8fb 0%, #fff1f7 100%);
        }

        .parts-list table th {
            padding: 15px 14px;
            color: #111111;
            font-size: 0.92rem;
            line-height: 22px;
            font-weight: bold;
            text-align: left;
            white-space: nowrap;
            border-bottom: 1px solid #f5d6e3;
            background: linear-gradient(180deg, #fff8fb 0%, #fff1f7 100%);
        }

            .parts-list table th.th-photo {
                width: 115px;
                min-width: 115px;
                max-width: 115px;
                text-align: center;
            }

            .parts-list table th.th-part {
                width: 260px;
                min-width: 260px;
                max-width: 260px;
            }

        .parts-list table td {
            padding: 16px 14px;
            color: #44566c;
            font-size: 0.9rem;
            line-height: 23px;
            vertical-align: middle;
            border-bottom: 1px solid #f5e3eb;
            background: #ffffff;
        }

        .parts-list table tbody tr {
            transition: all .25s ease;
        }

            .parts-list table tbody tr:hover {
                background: #fff8fb;
            }

                .parts-list table tbody tr:hover td {
                    background: #fff8fb;
                }

            .parts-list table tbody tr:last-child td {
                border-bottom: none;
            }


    /* ==============================
   Photo
================================= */

    .parts-list td.image {
        width: 115px;
        min-width: 115px;
        max-width: 115px;
        text-align: center;
    }

        .parts-list td.image a {
            display: inline-flex;
            width: 86px;
            height: 86px;
            align-items: center;
            justify-content: center;
            background: #ffffff;
            border: 1px solid #f5d6e3;
            border-radius: 12px;
            padding: 8px;
        }

            .parts-list td.image a:hover {
                border-color: #e886ae;
                box-shadow: 0 10px 22px rgba(216, 117, 158, 0.12);
            }

        .parts-list td.image img {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
        }


    /* ==============================
   Part Info
================================= */

    .parts-list td.parts {
        width: 260px;
        min-width: 260px;
        max-width: 260px;
    }

        .parts-list td.parts h2 {
            max-width: 230px;
            margin: 0 0 7px;
            font-size: 1rem;
            line-height: 24px;
            font-weight: bold;
            overflow: hidden;
            text-overflow: ellipsis;
        }

            .parts-list td.parts h2 a {
                color: #111111;
                text-decoration: none;
            }

                .parts-list td.parts h2 a:hover {
                    color: #e886ae;
                }

        .parts-list td.parts p {
            max-width: 230px;
            margin: 0 0 5px;
            color: #667085;
            font-size: 0.86rem;
            line-height: 21px;
            overflow: hidden;
            text-overflow: ellipsis;
        }

            .parts-list td.parts p a {
                color: #e886ae;
                text-decoration: none;
            }

                .parts-list td.parts p a:hover {
                    color: #d8759e;
                    text-decoration: underline;
                }


    /* ==============================
   Stock / Price
================================= */

    .parts-list td.stock {
        color: #111111;
        font-weight: 600;
        white-space: nowrap;
    }

    .parts-list td.price {
        color: #e886ae;
        white-space: nowrap;
    }


    /* ==============================
   Quantity + RFQ
================================= */

    .parts-list td.quantity {
        min-width: 130px;
    }

.selectnum {
    width: 100%;
    margin-bottom: 8px;
}

    .selectnum input {
        width: 86px;
        height: 36px;
        line-height: 36px;
        padding: 0 10px;
        border: 1px solid #f5d6e3;
        border-radius: 8px;
        background: #fff8fb;
        color: #111111;
        font-size: 0.9rem;
        text-align: center;
    }

        .selectnum input:focus {
            border-color: #e886ae;
            background: #ffffff;
            box-shadow: 0 0 0 3px rgba(232, 134, 174, 0.12);
            outline: none;
        }

.selectbtn .view {
    display: inline-flex;
    width: 86px;
    height: 36px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(270deg, #d8759e 0%, #e886ae 100%);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    transition: all .25s ease;
}

    .selectbtn .view:hover {
        background: linear-gradient(270deg, #e886ae 0%, #d8759e 100%);
        color: #ffffff;
        box-shadow: 0 10px 22px rgba(216, 117, 158, 0.22);
        transform: translateY(-2px);
    }


/* ==============================
   PDF
================================= */

.parts-list td.pdf-cell {
    min-width: 130px;
}

.pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 12px;
    color: #e886ae;
    background: #fff8fb;
    border: 1px solid #f5d6e3;
    border-radius: 8px;
    font-size: 0.88rem;
    text-decoration: none;
    white-space: nowrap;
}

    .pdf-link i {
        color: #e886ae;
        font-size: 1rem;
    }

    .pdf-link:hover {
        color: #ffffff;
        background: #e886ae;
        border-color: #e886ae;
    }

        .pdf-link:hover i {
            color: #ffffff;
        }


/* ==============================
   Spec Columns
================================= */

.parts-list td.spec {
    min-width: 120px;
    color: #44566c;
}


/* ==============================
   PC：前两列左右固定
================================= */

@media screen and (min-width: 769px) {

    /* 第一列 Photo 固定 */
    .parts-list table th.th-photo,
    .parts-list table td.image {
        position: sticky;
        left: 0;
        z-index: 20;
        width: 115px;
        min-width: 115px;
        max-width: 115px;
        background: #ffffff;
    }

    /* 第二列 Mfr. Part # 固定 */
    .parts-list table th.th-part,
    .parts-list table td.parts {
        position: sticky;
        left: 115px;
        z-index: 20;
        width: 260px;
        min-width: 260px;
        max-width: 260px;
        background: #ffffff;
        box-shadow: 8px 0 14px rgba(216, 117, 158, 0.08);
    }

    /* 原始表头固定列层级 */
    .parts-list table thead th.th-photo,
    .parts-list table thead th.th-part {
        z-index: 30;
        background: linear-gradient(180deg, #fff8fb 0%, #fff1f7 100%);
    }

    /* hover 时固定列也跟着变色 */
    .parts-list table tbody tr:hover td.image,
    .parts-list table tbody tr:hover td.parts {
        background: #fff8fb;
    }
}


/* ==============================
   页面滚动固定表头：JS 克隆出来的表头
================================= */

#partsFixedThead {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9997;
    display: none;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #f5d6e3;
    border-bottom: none;
    box-shadow: 0 10px 26px rgba(216, 117, 158, 0.14);
    pointer-events: none;
}

    #partsFixedThead .parts-fixed-scroll {
        width: 100%;
        overflow: hidden;
    }

    #partsFixedThead table {
        width: 100%;
        min-width: 1250px;
        border-collapse: separate;
        border-spacing: 0;
        background: #ffffff;
    }

    #partsFixedThead thead {
        background: linear-gradient(180deg, #fff8fb 0%, #fff1f7 100%);
    }

    #partsFixedThead th {
        padding: 15px 14px;
        color: #111111;
        font-size: 0.92rem;
        line-height: 22px;
        font-weight: bold;
        text-align: left;
        white-space: nowrap;
        border-bottom: 1px solid #f5d6e3;
        background: linear-gradient(180deg, #fff8fb 0%, #fff1f7 100%);
        box-sizing: border-box;
    }

        /* 克隆表头第一列固定 */
        #partsFixedThead th.th-photo {
            position: sticky;
            left: 0;
            z-index: 60;
            width: 115px;
            min-width: 115px;
            max-width: 115px;
            text-align: center;
            background: linear-gradient(180deg, #fff8fb 0%, #fff1f7 100%);
        }

        /* 克隆表头第二列固定 */
        #partsFixedThead th.th-part {
            position: sticky;
            left: 115px;
            z-index: 60;
            width: 260px;
            min-width: 260px;
            max-width: 260px;
            background: linear-gradient(180deg, #fff8fb 0%, #fff1f7 100%);
            box-shadow: 8px 0 14px rgba(216, 117, 158, 0.08);
        }


/* ==============================
   Sticky Bottom Scrollbar
================================= */

#partsStickyScrollbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    display: none;
    height: 20px;
    padding: 4px 0;
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid #f5d6e3;
    box-shadow: 0 -8px 22px rgba(216, 117, 158, 0.10);
}

    #partsStickyScrollbar .psb-track {
        width: calc(100% - 40px);
        height: 12px;
        margin: 0 auto;
        overflow-x: auto;
        overflow-y: hidden;
    }

    #partsStickyScrollbar .psb-spacer {
        height: 1px;
    }

    #partsStickyScrollbar .psb-track::-webkit-scrollbar {
        height: 8px;
    }

    #partsStickyScrollbar .psb-track::-webkit-scrollbar-track {
        background: #fff1f7;
        border-radius: 10px;
    }

    #partsStickyScrollbar .psb-track::-webkit-scrollbar-thumb {
        background: #e8a5c1;
        border-radius: 10px;
    }

        #partsStickyScrollbar .psb-track::-webkit-scrollbar-thumb:hover {
            background: #e886ae;
        }


/* ==============================
   表格本身滚动条
================================= */

.parts-list .jss187::-webkit-scrollbar {
    height: 8px;
}

.parts-list .jss187::-webkit-scrollbar-track {
    background: #fff1f7;
    border-radius: 10px;
}

.parts-list .jss187::-webkit-scrollbar-thumb {
    background: #e8a5c1;
    border-radius: 10px;
}

    .parts-list .jss187::-webkit-scrollbar-thumb:hover {
        background: #e886ae;
    }


/* ==============================
   Mobile
================================= */

@media screen and (max-width: 768px) {

    .goods-category-head {
        width: 94%;
        padding: 30px 0 18px;
    }

        .goods-category-head h1 {
            margin-bottom: 14px;
            font-size: 1.45rem;
            line-height: 34px;
        }

            .goods-category-head h1:before {
                top: 8px;
                height: 18px;
            }

    .goods-category-content {
        font-size: 0.9rem;
        line-height: 25px;
    }

    .parts-list {
        width: 94%;
        padding: 8px 0 42px;
    }

        .parts-list .jss187 {
            border-radius: 12px;
            overflow-x: auto;
            overflow-y: hidden;
        }

        .parts-list table {
            min-width: 1100px;
        }

            .parts-list table th {
                padding: 12px 10px;
                font-size: 0.84rem;
            }

            .parts-list table td {
                padding: 12px 10px;
                font-size: 0.82rem;
                line-height: 21px;
            }

        .parts-list td.image a {
            width: 72px;
            height: 72px;
            border-radius: 10px;
        }

        .parts-list td.parts h2 {
            font-size: 0.92rem;
            line-height: 22px;
        }

        .parts-list td.parts p {
            font-size: 0.8rem;
            line-height: 20px;
        }

    .selectnum input,
    .selectbtn .view {
        width: 78px;
        height: 34px;
        line-height: 34px;
        font-size: 0.82rem;
    }

    .pdf-link {
        min-height: 34px;
        padding: 0 10px;
        font-size: 0.8rem;
    }

    /* 手机端隐藏底部固定滚动条 */
    #partsStickyScrollbar {
        display: none !important;
    }

    /* 手机端隐藏克隆固定表头 */
    #partsFixedThead {
        display: none !important;
    }

    /* 手机端取消前两列固定 */
    .parts-list table thead th,
    .parts-list table th.th-photo,
    .parts-list table th.th-part,
    .parts-list table td.image,
    .parts-list table td.parts {
        position: static;
        left: auto;
        top: auto;
        z-index: auto;
        box-shadow: none;
    }
}
