/*
 Theme Name:   wl3d
 Theme URI:    https://example.com/wl3d
 Description:  wl3d 子主题，3D打印模型站内容页定制
 Author:       Your Name
 Author URI:   https://example.com
 Template:     pio
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  wl3d
*/

/* ========== 主题色覆盖 ========== */
:root {
    --ri-yellow: #264653;
}

/* ========== 图片轮播 + 灯箱 ========== */
.gallery-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    flex: 1;
    aspect-ratio: 16 / 9;
}

@media (min-width: 992px) {
    .gallery-carousel {
        aspect-ratio: auto;
    }
}

.gallery-carousel .carousel-slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-carousel .carousel-slide.active {
    display: block;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: calc(50% - 40px);
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    width: 2.3rem;
    height: 2.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    line-height: 1;
    z-index: 2;
}

.gallery-carousel:hover .carousel-prev,
.gallery-carousel:hover .carousel-next {
    opacity: 1;
}

.carousel-prev {
    left: 0.5rem;
}

.carousel-next {
    right: 0.5rem;
}

.carousel-dots {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 0.4rem;
    padding: 0.3rem 0.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
    -webkit-overflow-scrolling: touch;
}

.carousel-dots::-webkit-scrollbar {
    height: 4px;
}

.carousel-dots::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
}

.carousel-dot {
    width: 64px;
    height: 46px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: opacity 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.carousel-dot.active {
    opacity: 1;
    border-color: #fff;
}

.carousel-dot:hover {
    opacity: 0.85;
}

/* 灯箱 */
.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.open {
    display: flex;
}

.gallery-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.gallery-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
}

.archive-shop .article-meta {
    background: rgba(33,70,83, .06);

}

.ri-down-warp .down-msg {
    background: #e76f51;
}



.archive-shop .article-meta li {
    width: 100%;
    padding-left: 0.5rem;
    line-height: 2;

}

.archive-shop .article-meta-params li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.tooltip-bubble {
    position: fixed;
    max-width: 280px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 0.4rem 0.7rem;
    border-radius: 0.35rem;
    font-size: 0.8rem;
    line-height: 1.5;
    z-index: 99999;
    pointer-events: none;
    word-break: break-all;
}

.archive-shop .article-meta .meta-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 0.25rem;
    color: #264653;
}

.archive-shop .article-meta .meta-title-heat {
    font-weight: 400;
    font-size: 0.875rem;
    color: #9499a5;
}

.post-title-text {
    position: relative;
}

.article-header .ai-tag {
    position: absolute;
    top: -0.8rem;
    right: 0;
    transform: translateX(calc(100% + 0.2rem));
    width: 2rem;
    height: 2rem;
}

.article-header .ai-tag img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ========== 文件树 ========== */
.file-tree {
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.tree-node {
    line-height: 1.9;
}

.tree-line {
    color: #999;
}

.tree-icon {
    margin-right: 0.35rem;
}

.tree-name {
    color: inherit;
}

.tree-root {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.tree-root .tree-icon {
    font-size: 1.05rem;
}

/* ========== 声明小工具 ========== */
.xjbt-auth-widget a {
    display: block;
    text-align: left;
}

.xjbt-auth-widget a img {
    max-width: 100%;
    height: auto;
    border: 0;
    background: #fff;
    border-radius: 2px;
    display: inline-block;
}

.xjbt-auth-widget .license-badge {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 3px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
}

.xjbt-auth-widget hr {
    margin: 0.5rem 0;
}

.xjbt-auth-widget .list-group-item {
    padding: 0.35rem 0;
    border: 0;
    font-size: 0.8rem;
    color: #888;
}


.xjbt-auth-widget .list-group-item span:first-child {
    font-weight: 500;
}

.xjbt-auth-widget .list-group-item+.list-group-item {
    border-top: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.xjbt-auth-widget>p:last-child {
    margin-top: 2rem;
    padding-bottom: 0.3rem;
}

/* 声明小工具标题颜色变淡 */
.widget.widget_xjbt_authorization .widget-title {
    color: #888;
}

/* 分类页 hero 高度增加，文字偏上 1/3，文字阴影悬浮效果 */
.archive-hero {
    padding-top: 3rem;
    padding-bottom: 12rem;
}

.archive-hero.text-center {
    text-align: right !important;
}

.archive-hero .archive-title {
    text-align: right !important;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0.25rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.archive-hero .archive-title::after {
    content: "";
    display: block;
    margin-top: 4px;
    width: 100%;
    border-bottom: 3px solid var(--hero-color, #005f73);
}

.archive-hero .archive-desc {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    text-align: left;
    max-width: 25%;
    margin-left: auto;
    word-wrap: break-word;
    text-indent: 2em;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0.25rem;
    color: #fff;
}






/* 筛选器上移与 hero 重叠，圆角 + 悬浮阴影 */
.filter-warp {
    position: relative;
    z-index: 2;
    margin-top: -12rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem !important;
    box-shadow: 0 14px 20px rgba(0, 0, 0, 0.1);
}

/* 筛选每个分类区块一种颜色 - 6 分类循环 */
/* 分类1: 工艺 */
.filter-warp .filter-item:nth-child(6n+1) .filter-link.active>a,
.filter-warp .filter-item:nth-child(6n+1) .filter-link>a:hover {
    background: rgba(0,95,115, .06) !important;
    color: #005f73 !important;
}
.filter-warp .filter-item:nth-child(6n+1) .filter-link.active>a::after,
.filter-warp .filter-item:nth-child(6n+1) .filter-link>a:hover::after {
    border-bottom-color: #005f73;
}
/* 分类2: 耗材 */
.filter-warp .filter-item:nth-child(6n+2) .filter-link.active>a,
.filter-warp .filter-item:nth-child(6n+2) .filter-link>a:hover {
    background: rgba(10,147,150, .06) !important;
    color: #0a9396 !important;
}
.filter-warp .filter-item:nth-child(6n+2) .filter-link.active>a::after,
.filter-warp .filter-item:nth-child(6n+2) .filter-link>a:hover::after {
    border-bottom-color: #0a9396;
}
/* 分类3: 结构 */
.filter-warp .filter-item:nth-child(6n+3) .filter-link.active>a,
.filter-warp .filter-item:nth-child(6n+3) .filter-link>a:hover {
    background: rgba(148,210,189, .06) !important;
    color: #94d2bd !important;
}
.filter-warp .filter-item:nth-child(6n+3) .filter-link.active>a::after,
.filter-warp .filter-item:nth-child(6n+3) .filter-link>a:hover::after {
    border-bottom-color: #94d2bd;
}
/* 分类4: 五金 */
.filter-warp .filter-item:nth-child(6n+4) .filter-link.active>a,
.filter-warp .filter-item:nth-child(6n+4) .filter-link>a:hover {
    background: rgba(233,216,166, .06) !important;
    color: #e9d8a6 !important;
}
.filter-warp .filter-item:nth-child(6n+4) .filter-link.active>a::after,
.filter-warp .filter-item:nth-child(6n+4) .filter-link>a:hover::after {
    border-bottom-color: #e9d8a6;
}
/* 分类5: AI */
.filter-warp .filter-item:nth-child(6n+5) .filter-link.active>a,
.filter-warp .filter-item:nth-child(6n+5) .filter-link>a:hover {
    background: rgba(238,155,0, .06) !important;
    color: #ee9b00 !important;
}
.filter-warp .filter-item:nth-child(6n+5) .filter-link.active>a::after,
.filter-warp .filter-item:nth-child(6n+5) .filter-link>a:hover::after {
    border-bottom-color: #ee9b00;
}
/* 分类6: 价格 */
.filter-warp .filter-item:nth-child(6n+6) .filter-link.active>a,
.filter-warp .filter-item:nth-child(6n+6) .filter-link>a:hover {
    background: rgba(202,103,2, .06) !important;
    color: #ca6702 !important;
}
.filter-warp .filter-item:nth-child(6n+6) .filter-link.active>a::after,
.filter-warp .filter-item:nth-child(6n+6) .filter-link>a:hover::after {
    border-bottom-color: #ca6702;
}

/* 黑暗模式下保留区块循环颜色 */
[data-bs-theme="dark"] .filter-warp .filter-item .filter-link.active>a,
[data-bs-theme="dark"] .filter-warp .filter-item .filter-link>a:hover {
    background: rgba(33,70,83, .06);
}

/* 选中/划过底部横杠基础样式 */
.filter-warp .filter-item .filter-link.active>a,
.filter-warp .filter-item .filter-link>a:hover {
    position: relative;
}
.filter-warp .filter-item .filter-link.active>a::after,
.filter-warp .filter-item .filter-link>a:hover::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 16px;
    margin-left: -8px;
    border-bottom: 2px solid;
    border-radius: 1px;
}

/* hover 圆角 */
.filter-warp .filter-item .filter-link>a:hover {
    border-radius: 0.25rem;
}



/* 筛选标题和选项颜色对调 */
.filter-warp .filter-item .filter-name {
    color: #5d616e !important;
}

/* 筛选标题按分类区块配色 */
.filter-warp .filter-item:nth-child(6n+1) .filter-name {
    color: #005f73 !important;
}
.filter-warp .filter-item:nth-child(6n+2) .filter-name {
    color: #0a9396 !important;
}
.filter-warp .filter-item:nth-child(6n+3) .filter-name {
    color: #94d2bd !important;
}
.filter-warp .filter-item:nth-child(6n+4) .filter-name {
    color: #e9d8a6 !important;
}
.filter-warp .filter-item:nth-child(6n+5) .filter-name {
    color: #ee9b00 !important;
}
.filter-warp .filter-item:nth-child(6n+6) .filter-name {
    color: #ca6702 !important;
}

.filter-warp .filter-item .filter-link>a {
    color: #9499a5 !important;
}

/* 修复标题和选项垂直不对齐 */
.filter-warp .filter-item .filter-name,
.filter-warp .filter-item .filter-link {
    display: inline-flex !important;
    align-items: center;
}

/* 筛选行间距减小 */
.filter-warp .filter-item {
    padding: 2px 0 !important;
}

/* 清空筛选按钮 */
.filter-warp .filter-item.filter-clear {
    justify-content: flex-end;
    padding-top: 0.5rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: none !important;
}
.filter-warp .filter-item.filter-clear .filter-link>a {
    color: #9499a5 !important;
    font-size: 0.75rem;
    border: 1px solid rgba(33,70,83, .18);
    border-radius: 0.25rem !important;
    padding: 4px 12px !important;
    transition: all .2s ease;
}
.filter-warp .filter-item.filter-clear .filter-link>a:hover {
    color: #bb3e03 !important;
    border-color: #bb3e03 !important;
    background: rgba(187,62,3, .06) !important;
}
.filter-warp .filter-item.filter-clear .filter-link>a::after {
    display: none !important;
}

/* 文章列表分类圆点颜色 - 与菜单 6 色循环一致 */
.entry-cat-dot>a:nth-child(6n+1)::before,
.entry-cat-dot>a:first-child::before {
    background-color: #005f73 !important;
}
.entry-cat-dot>a:nth-child(6n+2)::before {
    background-color: #0a9396 !important;
}
.entry-cat-dot>a:nth-child(6n+3)::before {
    background-color: #94d2bd !important;
}
.entry-cat-dot>a:nth-child(6n+4)::before {
    background-color: #e9d8a6 !important;
}
.entry-cat-dot>a:nth-child(6n+5)::before {
    background-color: #ee9b00 !important;
}
.entry-cat-dot>a:nth-child(6n+6)::before {
    background-color: #ca6702 !important;
}

/* 顶部导航选中菜单项底部横杠 */
.nav-list>.menu-item.current-menu-item>a {
    position: relative;
}

.nav-list>.menu-item.current-menu-item>a::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 15px;
    left: 50%;
    width: 32px;
    margin-left: -16px;
    border-bottom: 3px solid #2a9d8f;
    border-radius: 1px;

}

.archive-hero .archive-hero-bg::before {

    background: linear-gradient(to bottom, rgba(240, 242, 245, 0), rgba(240, 242, 245, 1)) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    ;
    backdrop-filter: blur(5px) !important;
    ;
}


[data-bs-theme="dark"] .archive-hero .archive-hero-bg::before {
    background: linear-gradient(to bottom, rgba(26, 29, 36, 0), rgba(26, 29, 36, 1)) !important;

}


/* 顶部导航选中菜单项 - 6 分类循环配色（首页不参与） */
.nav-list>.menu-item:nth-child(6n+2).current-menu-item>a {
    color: #005f73 !important;
}
.nav-list>.menu-item:nth-child(6n+2).current-menu-item>a::after {
    border-bottom-color: #005f73;
}
.nav-list>.menu-item:nth-child(6n+3).current-menu-item>a {
    color: #0a9396 !important;
}
.nav-list>.menu-item:nth-child(6n+3).current-menu-item>a::after {
    border-bottom-color: #0a9396;
}
.nav-list>.menu-item:nth-child(6n+4).current-menu-item>a {
    color: #94d2bd !important;
}
.nav-list>.menu-item:nth-child(6n+4).current-menu-item>a::after {
    border-bottom-color: #94d2bd;
}
.nav-list>.menu-item:nth-child(6n+5).current-menu-item>a {
    color: #e9d8a6 !important;
}
.nav-list>.menu-item:nth-child(6n+5).current-menu-item>a::after {
    border-bottom-color: #e9d8a6;
}
.nav-list>.menu-item:nth-child(6n+6).current-menu-item>a {
    color: #ee9b00 !important;
}
.nav-list>.menu-item:nth-child(6n+6).current-menu-item>a::after {
    border-bottom-color: #ee9b00;
}
.nav-list>.menu-item:nth-child(6n+7).current-menu-item>a {
    color: #ca6702 !important;
}
.nav-list>.menu-item:nth-child(6n+7).current-menu-item>a::after {
    border-bottom-color: #ca6702;
}

/* 顶部导航菜单项鼠标划过效果 - 6 分类循环（首页不参与） */
.nav-list>.menu-item:nth-child(6n+2)>a:hover {
    color: #005f73 !important;
}
.nav-list>.menu-item:nth-child(6n+3)>a:hover {
    color: #0a9396 !important;
}
.nav-list>.menu-item:nth-child(6n+4)>a:hover {
    color: #94d2bd !important;
}
.nav-list>.menu-item:nth-child(6n+5)>a:hover {
    color: #e9d8a6 !important;
}
.nav-list>.menu-item:nth-child(6n+6)>a:hover {
    color: #ee9b00 !important;
}
.nav-list>.menu-item:nth-child(6n+7)>a:hover {
    color: #ca6702 !important;
}

[data-bs-theme="dark"] .archive-shop .article-meta .meta-title {
    color: rgba(255, 255, 255, .7);
}



[data-bs-theme="dark"] .entry-copyright {
    background: linear-gradient(135deg, rgba(33,70,83, .06), rgba(33,70,83, .04));
    font-size: .875rem;
    color: rgba(255, 255, 255, .5);
    border-left: 3px solid var(--ri-yellow);
}


[data-bs-theme="dark"] .entry-navigation .entry-page-icon {
    color: var(--ri-yellow);
    background: linear-gradient(135deg, rgba(33,70,83, .12), rgba(33,70,83, .08))
}





.list-group-item-info {
    --ri-list-group-color: var(--ri-yellow);
    --ri-list-group-bg: rgba(33,70,83, .06);
    --ri-list-group-border-color: rgba(33,70,83, .1);
}


.entry-navigation .entry-page-next:hover .entry-page-icon,
.entry-navigation .entry-page-prev:hover .entry-page-icon {
    background: linear-gradient(135deg, rgba(33,70,83, 1), rgba(33,70,83, 1))
}

.entry-navigation .entry-page-icon {
    color: var(--ri-yellow);
    background: linear-gradient(135deg, rgba(33,70,83, .12), rgba(33,70,83, .08))
}


.entry-navigation .entry-page-next::before,
.entry-navigation .entry-page-prev::before {

    background: rgb(38,70,83);
    border-radius: 3px;
}


.entry-copyright {
    background: linear-gradient(135deg, rgba(33,70,83, .06), rgba(33,70,83, .04));
    font-size: .875rem;
    color: #5d616e;
    border-left: 3px solid var(--ri-yellow);
}

/* 下载模块颜色 + 缩小字体 */
.ri-down-warp .down-buy-warp .buy-title {
    color: rgba(42, 157, 143, 1);
}
.ri-down-warp .d-grid .btn-group .btn-success {
    background: rgba(42, 157, 143, 1) !important;
    border-color: rgba(42, 157, 143, 1) !important;
    box-shadow: none !important;
    font-size: 0.75rem !important;
}
.ri-down-warp .d-grid .btn-group .btn-success:hover {
    background: rgba(42, 157, 143, .8) !important;
    border-color: rgba(42, 157, 143, .8) !important;
    box-shadow: none !important;
    transform: none !important;
}

.sidebar .widget .widget-title::after {
    background: -webkit-gradient(linear, left top, right top, from(#264653), to(rgba(38, 70, 83, .2)));
    background: linear-gradient(90deg, #264653, rgba(38, 70, 83, .2));
}

/* 分享/收藏/点赞按钮颜色 */
.entry-social .btn-info-soft {
    background-color: #2a9d8f !important;
    color: #fff !important;
}
.entry-social .btn-success-soft {
    background-color: #e9c46a !important;
    color: #fff !important;
}
.entry-social .btn-danger-soft {
    background-color: #f4a261 !important;
    color: #fff !important;
}

/* 文章标签鼠标划过循环配色 */
.entry-tags > a:nth-child(4n+2):hover {
    background-color: #2a9d8f !important;
    color: #fff !important;
}
.entry-tags > a:nth-child(4n+3):hover {
    background-color: #e9c46a !important;
    color: #fff !important;
}
.entry-tags > a:nth-child(4n+4):hover {
    background-color: #f4a261 !important;
    color: #fff !important;
}
.entry-tags > a:nth-child(4n+5):hover {
    background-color: #e76f51 !important;
    color: #fff !important;
}

/* 详情介绍/文件明细/常见问题 tab 循环配色 */
.single-content-nav .nav-item .nav-link {
    color: #9499a5 !important;
}
.single-content-nav .nav-item .nav-link:hover {
    border-color: rgba(33,70,83,.18);
}
/* 3 个 tab 循环：第 1 详情，第 2 文件，第 3 常见问题 */
.single-content-nav .nav-item:nth-child(3n+1) .nav-link.active,
[data-bs-theme="dark"] .single-content-nav .nav-item:nth-child(3n+1) .nav-link.active {
    background: linear-gradient(135deg, #0a9396, #087a7d) !important;
    border-color: transparent !important;
    box-shadow: 0 4px 15px rgba(10, 147, 150, 0.35) !important;
    color: #fff !important;
}
.single-content-nav .nav-item:nth-child(3n+2) .nav-link.active,
[data-bs-theme="dark"] .single-content-nav .nav-item:nth-child(3n+2) .nav-link.active {
    background: linear-gradient(135deg, #ee9b00, #cc8500) !important;
    border-color: transparent !important;
    box-shadow: 0 4px 15px rgba(238, 155, 0, 0.35) !important;
    color: #fff !important;
}
.single-content-nav .nav-item:nth-child(3n+3) .nav-link.active,
[data-bs-theme="dark"] .single-content-nav .nav-item:nth-child(3n+3) .nav-link.active {
    background: linear-gradient(135deg, #bb3e03, #993202) !important;
    border-color: transparent !important;
    box-shadow: 0 4px 15px rgba(187, 62, 3, 0.35) !important;
    color: #fff !important;
}
.single-content-nav .nav-item .nav-link.active::before,
[data-bs-theme="dark"] .single-content-nav .nav-item .nav-link.active::before {
    background: transparent !important;
}
/* 常见问题标题颜色 */
#pills-faq .fw-bold {
    color: #9499a5;
}
/* 常见问题序号颜色 */
#pills-faq .list-group-numbered > .list-group-item::before {
    color: #9499a5;
}

/* 回到顶部按钮颜色（随机色由 JS 控制） */
.back-top:hover {
    transform: translateY(-3px) !important;
}

/* tab 边框/阴影/伪类全面覆盖，避免蓝色闪现 */
.single-content-nav .nav-item .nav-link {
    border-color: rgba(33, 70, 83, 0.18) !important;
}
.single-content-nav .nav-item .nav-link:hover {
    border-color: rgba(33, 70, 83, 0.3) !important;
    background-color: transparent !important;
}
.single-content-nav .nav-item .nav-link::before {
    background: transparent !important;
    opacity: 0 !important;
    transition: none !important;
}
.single-content-nav .nav-item .nav-link:hover::before {
    background: transparent !important;
}
[data-bs-theme="dark"] .single-content-nav .nav-item .nav-link {
    border-color: rgba(255, 255, 255, 0.15) !important;
}
[data-bs-theme="dark"] .single-content-nav .nav-item .nav-link:hover {
    border-color: rgba(255, 255, 255, 0.3) !important;
}
