/* ==========================================================================
   product.html / productlist.html / col_list.html 共用样式
   主色 #167cba
   ========================================================================== */

/* ==========================================================================
   一、产品详情页
   ========================================================================== */
.pd-main {
    display: flex;
    gap: 40px;
    padding: 28px 0 40px;
    align-items: flex-start;
}

/* ---------- 图片区 ---------- */
.pd-gallery {
    flex: 0 0 46%;
    min-width: 0;
}

.pd-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 480px;
    padding: 20px;
    background: #f7f9fb;
    border: 1px solid #eef1f4;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    cursor: zoom-in;
}

.pd-stage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity .22s ease, transform .35s ease;
}

.pd-stage:hover img {
    transform: scale(1.03);
}

/* 放大按钮：带文字提示，避免误解为装饰圆点 */
.pd-zoom {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px 0 12px;
    font-size: 13px;
    font-family: inherit;
    color: #fff;
    background: rgba(22, 124, 186, .92);
    border: none;
    border-radius: 17px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .28s ease, transform .28s ease, background .28s ease;
    z-index: 2;
    white-space: nowrap;
}

.pd-zoom::after {
    content: '点击看大图';
}

.pd-stage:hover .pd-zoom {
    opacity: 1;
    transform: translateY(0);
}

.pd-zoom:hover {
    background: #0d5a8a;
}

.pd-zoom .layui-icon {
    font-size: 15px;
}

/* 触屏设备：不依赖 hover，常显但半透明，避免误以为异常 */
@media (hover: none) {
    .pd-zoom {
        opacity: .92;
        transform: none;
        height: 30px;
        font-size: 12px;
        padding: 0 12px;
    }

    .pd-zoom::after {
        content: '看大图';
    }
}

/* 缩略图 */
.pd-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.pd-thumbs::-webkit-scrollbar {
    height: 4px;
}

.pd-thumbs::-webkit-scrollbar-thumb {
    background: #cfd9e2;
    border-radius: 2px;
}

/* 移动端：右侧渐隐，提示可横向滑动 */
@media screen and (max-width: 768px) {
    .pd-thumbs {
        -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
        mask-image: linear-gradient(to right, #000 85%, transparent 100%);
    }

    .pd-thumbs::-webkit-scrollbar {
        display: none;
    }
}

.pd-thumb {
    flex: 0 0 78px;
    width: 78px;
    height: 78px;
    padding: 6px;
    background: #fff;
    border: 2px solid #eef1f4;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
    transition: all .25s ease;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pd-thumb:hover {
    border-color: #9ccbe8;
    transform: translateY(-2px);
}

.pd-thumb.is-active {
    border-color: #167cba;
    box-shadow: 0 0 0 3px rgba(22, 124, 186, .12);
}

/* ---------- 参数区 ---------- */
.pd-info {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.pd-title {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

.pd-subtitle {
    margin-top: 10px;
    font-size: 15px;
    color: #7a8794;
    line-height: 1.6;
}

.pd-desc {
    margin-top: 16px;
    padding-bottom: 20px;
    font-size: 15px;
    color: #666;
    line-height: 1.85;
    border-bottom: 1px dashed #e6eaee;
    text-align: justify;
}

/* 参数表 */
.pd-specs {
    margin: 20px 0;
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
}

.pd-specs li {
    display: flex;
    padding: 12px 18px;
    font-size: 14px;
    border-bottom: 1px solid #eef1f4;
}

.pd-specs li:last-child {
    border-bottom: none;
}

.pd-spec-label {
    flex: 0 0 92px;
    color: #8b95a1;
}

.pd-spec-value {
    flex: 1;
    color: #333;
    word-break: break-all;
}

/* 操作按钮 */
.pd-actions {
    display: flex;
    gap: 14px;
    margin-top: 24px;
}

.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 48px;
    padding: 0 30px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all .28s ease;
}

.pd-btn .layui-icon {
    font-size: 16px;
}

.pd-btn-ghost {
    color: #167cba;
    background: #fff;
    border: 1.5px solid #167cba;
}

.pd-btn-ghost:hover {
    color: #fff;
    background: #167cba;
}

.pd-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #167cba 0%, #0d5a8a 100%);
    border: none;
}

.pd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(22, 124, 186, .3);
}

/* 保障条 */
.pd-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed #e6eaee;
    font-size: 13px;
    color: #8b95a1;
}

.pd-trust .layui-icon {
    color: #167cba;
    margin-right: 4px;
}

/* ---------- 详情正文 ---------- */
.pd-detail {
    padding: 10px 0 20px;
}

.pd-detail-head {
    border-bottom: 1px solid #eef1f4;
    padding-bottom: 14px;
    margin-bottom: 4px;
}

.pd-detail-title {
    position: relative;
    font-size: 21px;
    font-weight: 600;
    color: #1a1a1a;
    padding-bottom: 12px;
}

.pd-detail-title .item-title-line {
    width: 46px;
    height: 3px;
    margin: 12px 0 0;
    background: #167cba;
}

.pd-detail-content {
    padding: 26px 0 10px;
    font-size: 16px;
    line-height: 1.9;
    color: #444;
    text-align: justify;
    word-break: break-word;
    overflow-x: auto;
}

.pd-detail-content img {
    max-width: 100%;
    height: auto;
    margin: 14px auto;
    border-radius: 6px;
}

.pd-detail-content p {
    padding: 8px 0;
}

.pd-detail-content h1,
.pd-detail-content h2,
.pd-detail-content h3,
.pd-detail-content h4 {
    font-weight: 600;
    padding: 18px 0 10px;
    color: #222;
}

.pd-detail-content table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
    font-size: 15px;
}

.pd-detail-content td,
.pd-detail-content th {
    padding: 11px 14px;
    border: 1px solid #e4e9ee;
}

.pd-detail-content th {
    background: #f7f9fb;
    font-weight: 600;
    color: #333;
}

.pd-detail-content tr:nth-child(even) td {
    background: #fbfcfd;
}

.pd-detail-content a {
    color: #167cba;
}

/* ---------- 相关产品 ---------- */
.pd-related {
    padding: 20px 0 60px;
}

.pd-related-title {
    position: relative;
    font-size: 21px;
    font-weight: 600;
    color: #1a1a1a;
    padding-bottom: 14px;
    margin-bottom: 26px;
    border-bottom: 1px solid #eef1f4;
}

.pd-related-title .item-title-line {
    width: 46px;
    height: 3px;
    margin: 12px 0 0;
    background: #167cba;
}

.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.pd-related-item {
    display: block;
    padding: 16px;
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 10px;
    text-decoration: none;
    transition: all .3s ease;
}

.pd-related-item:hover {
    border-color: #cfe4f3;
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(22, 124, 186, .14);
}

.pd-related-img {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f9fb;
    border-radius: 8px;
    overflow: hidden;
}

.pd-related-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform .35s ease;
}

.pd-related-item:hover .pd-related-img img {
    transform: scale(1.06);
}

.pd-related-name {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .25s ease;
}

.pd-related-item:hover .pd-related-name {
    color: #167cba;
}

/* ---------- 大图预览 ---------- */
.pd-preview {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(0, 0, 0, .88);
    cursor: zoom-out;
    z-index: 3000;
    animation: pdFade .22s ease;
}

.pd-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

@keyframes pdFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ==========================================================================
   二、产品列表页（productlist.html）
   ========================================================================== */
.pl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 22px 0 6px;
}

.pl-count {
    font-size: 14px;
    color: #8b95a1;
}

.pl-count strong {
    color: #167cba;
    font-weight: 600;
}

.pl-sorts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pl-sort-link {
    padding: 7px 18px;
    font-size: 14px;
    color: #555;
    background: #f6f8fa;
    border: 1px solid #eef1f4;
    border-radius: 20px;
    text-decoration: none;
    transition: all .25s ease;
}

.pl-sort-link:hover,
.pl-sort-link.is-current {
    color: #fff;
    background: #167cba;
    border-color: #167cba;
}

/* 注意：base.css 对 .pro-item 有 float/width:50% 的旧规则，
   这里用 .product-list .pro-item 提升优先级彻底覆盖 */
.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 20px 0 10px;
}

.product-list .pro-item {
    width: auto;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    float: none;
    display: flex;
    flex-direction: column;
}

.pro-item {
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    transition: all .32s ease;
}

.pro-item:hover {
    transform: translateY(-6px);
    border-color: #cfe4f3;
    box-shadow: 0 14px 32px rgba(22, 124, 186, .16);
}

.product-list .pro-item-img {
    float: none;
    width: 100%;
    flex: 0 0 auto;
    height: 210px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f9fb;
    overflow: hidden;
}

.pro-item-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform .38s ease;
}

.pro-item:hover .pro-item-img img {
    transform: scale(1.07);
}

.product-list .pro-item-info {
    float: none;
    width: auto;
    height: auto;
    flex: 1 1 auto;
    padding: 18px 20px 20px;
    overflow: visible;
}

.pro-info-title {
    font-size: 16px;
    font-weight: 600;
    padding: 0 0 10px;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pro-info-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color .25s ease;
}

.pro-item:hover .pro-info-title a {
    color: #167cba;
}

.pro-info-ext {
    padding: 3px 0;
    font-size: 13px;
    color: #8b95a1;
    line-height: 1.6;
}

.pro-contact {
    margin-top: 16px;
}

.pro-contact-btn {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    line-height: 38px;
    text-align: center;
    color: #167cba;
    background: #f2f8fd;
    border: 1px solid #cfe4f3;
    border-radius: 8px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all .28s ease;
}

.pro-contact-btn:hover {
    color: #fff;
    background: #167cba;
    border-color: #167cba;
}

/* ==========================================================================
   三、产品分类页（col_list.html）
   ========================================================================== */
.cate-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 24px 0 60px;
}

.cate-list .cate-item {
    width: auto;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    float: none;
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    transition: all .32s ease;
}

.cate-item:hover {
    transform: translateY(-6px);
    border-color: #cfe4f3;
    box-shadow: 0 14px 32px rgba(22, 124, 186, .16);
}

.cate-list .cate-item-img {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    box-sizing: border-box;
    background: #f7f9fb;
    overflow: hidden;
}

.cate-item-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform .38s ease;
}

.cate-item:hover .cate-item-img img {
    transform: scale(1.07);
}

.cate-list .cate-item-title {
    height: auto;
    padding: 16px 12px 18px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.cate-item-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color .25s ease;
}

.cate-item:hover .cate-item-title a {
    color: #167cba;
}

/* 分类页底部咨询引导 */
.cate-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0 0 60px;
    padding: 28px 32px;
    background: linear-gradient(135deg, #f2f8fd 0%, #e8f3fb 100%);
    border-radius: 12px;
}

.cate-cta-text h3 {
    font-size: 19px;
    font-weight: 600;
    color: #1a1a1a;
}

.cate-cta-text p {
    margin-top: 6px;
    font-size: 14px;
    color: #7a8794;
}

/* ==========================================================================
   四、响应式
   ========================================================================== */
@media screen and (max-width: 1240px) {
    .product-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .cate-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .pd-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .pd-main {
        flex-direction: column;
        gap: 24px;
        padding: 18px 0 30px;
    }

    .pd-gallery {
        flex: none;
        width: 100%;
    }

    .pd-stage {
        max-height: 380px;
        aspect-ratio: 4 / 3;
        cursor: default;
    }

    .pd-thumb {
        flex: 0 0 70px;
        width: 70px;
        height: 70px;
    }

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

    .pd-actions {
        flex-direction: column;
        gap: 12px;
    }

    .pd-btn {
        width: 100%;
        max-width: 100%;
        padding: 0 16px;
        box-sizing: border-box;
        justify-content: center;
    }

    .pd-related {
        padding-bottom: 40px;
    }
}

@media screen and (max-width: 768px) {
    /* 产品列表改单列，卡片横向排布，按钮有足够宽度 */
    .product-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cate-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .product-list .pro-item {
        flex-direction: row;
        align-items: stretch;
    }

    .product-list .pro-item-img {
        flex: 0 0 120px;
        width: 120px;
        height: auto;
        min-height: 120px;
        padding: 12px;
    }

    .product-list .pro-item-info {
        flex: 1;
        min-width: 0;
        padding: 14px 14px 14px 0;
        display: flex;
        flex-direction: column;
    }

    .pro-info-title {
        font-size: 15px;
    }

    .pro-info-ext {
        font-size: 12.5px;
        line-height: 1.6;
    }

    .pro-contact {
        margin-top: auto;
        padding-top: 10px;
    }

    .pro-contact-btn {
        height: 36px;
        line-height: 34px;
        font-size: 13px;
        padding: 0 14px;
    }

    .cate-list .cate-item-img {
        height: 140px;
        padding: 14px;
    }

    .cate-item-title {
        font-size: 14px;
        padding: 12px 8px 14px;
    }

    .pd-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .pd-related-img {
        height: 110px;
    }

    .pd-detail-content {
        font-size: 15px;
    }

    .cate-cta {
        padding: 22px 20px;
        margin-bottom: 40px;
    }

    .cate-cta-text h3 {
        font-size: 17px;
    }
}

@media screen and (max-width: 480px) {
    .pd-thumb {
        flex: 0 0 62px;
        width: 62px;
        height: 62px;
        padding: 4px;
    }

    .pd-specs li {
        padding: 10px 14px;
        font-size: 13px;
    }

    .pd-spec-label {
        flex: 0 0 78px;
    }

    .product-list .pro-item-img {
        height: 130px;
    }

    .cate-list .cate-item-img {
        height: 120px;
    }
}
