/* PFP 行业筛选 - 圆形横向滚动（仅 PFP 站点加载） */

.industry-wrap {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 0 0 30px;
    overflow: hidden;
}

.industry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.industry-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.industry-title em {
    font-style: normal;
    font-weight: 700;
}

.industry-hint {
    font-size: 14px;
    white-space: nowrap;
    opacity: 0.85;
    flex-shrink: 0;
    display: none;
}

.industry-wrap.is-scrollable .industry-hint {
    display: inline;
}

/* 少于 9 个：居中全适应，不滑动 */
.industry-wrap.is-fit .industry-track {
    justify-content: center;
    overflow-x: hidden;
    cursor: default;
    gap: clamp(16px, 3.5vw, 48px);
    touch-action: auto;
}

.industry-wrap.is-fit .industry-item {
    flex: 1 1 0;
    width: auto;
    max-width: 120px;
    min-width: 0;
}

.industry-wrap.is-fit .industry-img {
    width: min(88px, 100%);
    height: auto;
    aspect-ratio: 1;
}

.industry-slider {
    position: relative;
}

.industry-nav {
    display: none;
    position: absolute;
    top: 44px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.2s, background 0.2s, transform 0.2s, visibility 0.2s;
}

.industry-wrap.is-scrollable .industry-nav {
    display: flex;
}

.industry-nav:hover {
    background: #f5f5f5;
}

.industry-nav:active {
    transform: scale(0.94);
}

.industry-nav-prev {
    left: -6px;
}

.industry-nav-next {
    right: -6px;
}

.industry-nav.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.industry-track {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
    touch-action: pan-y;
}

.industry-track::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.industry-track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.industry-track.is-dragging a {
    pointer-events: none;
}

.industry-item {
    flex: 0 0 auto;
    width: 100px;
    text-align: center;
    text-decoration: none !important;
    transition: transform 0.25s ease;
    color: #000 !important;
}

.industry-item:hover {
    transform: translateY(-4px);
}

.industry-img {
    width: 88px;
    height: 88px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    background: #3a3a3a;
    border: 2px solid rgba(255, 255, 255, 0.12);
}

.industry-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.industry-name {
    font-size: 16px;
    line-height: 1.35;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

@media screen and (max-width: 767px) {
    .industry-wrap {
        padding: 18px 12px 20px;
        margin-bottom: 20px;
        border-radius: 0;
    }

    .industry-title {
        font-size: 15px;
    }

    .industry-hint {
        font-size: 12px;
    }

    .industry-nav {
        display: none !important;
    }

    .industry-track {
        /* 一屏约 4 个完整 + 半个，提示可左右滑 */
        --industry-gap: 12px;
        gap: var(--industry-gap);
        padding: 4px 0;
        cursor: default;
    }

    .industry-item {
        width: calc((100% - 4 * var(--industry-gap)) / 4.5);
        max-width: none;
    }

    .industry-img {
        width: 78%;
        height: auto;
        aspect-ratio: 1;
        max-width: 68px;
    }

    .industry-name {
        font-size: 12px;
    }

    /* 手机：>4 个时不强制挤一行，保留 4.5 个可视 + 滑动 */
    .industry-wrap.is-fit .industry-track {
        justify-content: flex-start;
        overflow-x: auto;
        gap: var(--industry-gap);
        cursor: grab;
    }

    .industry-wrap.is-fit .industry-item {
        flex: 0 0 auto;
        width: calc((100% - 4 * var(--industry-gap)) / 4.5);
        max-width: none;
    }

    .industry-wrap.is-fit .industry-img {
        width: 78%;
        max-width: 68px;
    }

    /* ≤4 个仍居中适配 */
    .industry-wrap.is-fit.is-few .industry-track {
        justify-content: center;
        overflow-x: hidden;
        cursor: default;
    }

    .industry-wrap.is-fit.is-few .industry-item {
        flex: 1 1 0;
        width: auto;
        max-width: 78px;
        min-width: 0;
    }
}
