/* =============================================================
   PSN Product Sidebar Nav  |  psn-style.css  |  v1.0.0
   ============================================================= */

/* ---- 外层容器 ---- */
.psn-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    width: 100%;
    background: #fff;
    box-sizing: border-box;
}

/* ---- 顶级列表 ---- */
.psn-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ---- 顶级条目 ---- */
.psn-item {
    border-bottom: 1px solid #e5e5e5;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.psn-item:first-child {
    border-top: 1px solid #e5e5e5;
}

/* ---- 标题行（分类名 + 图标） ---- */
.psn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* ---- 分类链接 ---- */
.psn-link {
    display: inline;
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #333 !important;
    text-decoration: none !important;
    line-height: 1.5;
    flex: 1;
    transition: color 0.2s ease;
}

.psn-link:hover,
.psn-link:focus {
    color: #c0392b !important;
    text-decoration: none !important;
}

/* ---- 产品数量 ---- */
.psn-count {
    font-size: 18px;
    color: inherit;
    font-weight: 400;
}

/* ---- 展开/折叠图标 ---- */
.psn-toggle {
    font-size: 22px;
    font-weight: 300;
    color: #333;
    line-height: 1;
    width: 32px;
    text-align: right;
    flex-shrink: 0;
    user-select: none;
    transition: color 0.2s ease;
}

/* ---- 激活状态：父分类变红 ---- */
.psn-item.psn-active > .psn-header > .psn-link {
    color: #c0392b !important;
}

.psn-item.psn-active > .psn-header > .psn-link .psn-count {
    color: #c0392b !important;
}

.psn-item.psn-active > .psn-header > .psn-toggle {
    color: #c0392b;
}

/* ---- 子分类列表 ---- */
.psn-sublist {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 0 14px 0 !important;
    display: none;
    overflow: hidden;
}

/* ---- 子分类条目 ---- */
.psn-subitem {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.psn-subitem a {
    display: block;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #666 !important;
    text-decoration: none !important;
    padding: 12px 0;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.psn-subitem a:hover,
.psn-subitem a:focus {
    color: #c0392b !important;
    text-decoration: none !important;
}

/* ---- 激活子分类 ---- */
.psn-subitem.psn-active > a {
    color: #c0392b !important;
}

/* ---- 空状态提示 ---- */
.psn-empty {
    color: #999;
    font-size: 14px;
    padding: 12px 0;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .psn-link,
    .psn-count {
        font-size: 16px !important;
    }

    .psn-subitem a {
        font-size: 14px !important;
    }

    .psn-header {
        padding: 18px 0;
    }
}
