/* =========================================================
   山东恒昇环保 —— 产品列表页专属样式
   文件：css/productslist.css
   依赖：css/style.css、css/aboutus.css（复用 .sub-banner）
   ========================================================= */

/* ========== 页面主布局 ========== */
.pl-wrap {
    padding: 80px 20px 100px;
    background: var(--bg-white);
}
.pl-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: block;
}

/* ========== 左侧三级栏目 ========== */
.pl-sider {
    position: sticky;
    top: calc(var(--nav-h) + 20px);
    z-index: 10;
    backface-visibility: hidden;
    will-change: transform;
}
.pl-sider-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 18px 22px;
    border-radius: 12px 12px 0 0;
    letter-spacing: 1px;
    box-shadow: 0 4px 16px rgba(26,95,160,0.25);
    display: flex; align-items: center; gap: 10px;
}
.pl-sider-title i { font-size: 16px; color: #70b52c; }

.pl-cats {
    background: #fff;
    border: 1px solid #eef0f5;
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

/* 一级项（可展开） */
.pl-cat-l1 { border-bottom: 1px solid #f0f3f8; backface-visibility: hidden; }
.pl-cat-l1:last-child { border-bottom: none; }

.pl-cat-l1-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 22px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    background: #fafbfd;
    transition: color 0.2s ease;
    position: relative;
    will-change: background-color;
}
.pl-cat-l1-head:hover { background: #f2f5fa; }
.pl-cat-l1-head .pl-cat-l1-text {
    display: flex; align-items: center; gap: 10px;
}
.pl-cat-l1-head .pl-cat-l1-text i {
    width: 22px; height: 22px;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    font-size: 11px;
    display: flex; align-items: center; justify-content: center;
}
.pl-cat-l1-head .pl-cat-toggle {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

/* 一级展开态 */
.pl-cat-l1.is-open > .pl-cat-l1-head {
    background: #fff;
    color: var(--primary);
}
.pl-cat-l1.is-open > .pl-cat-l1-head .pl-cat-l1-text i {
    background: #70b52c;
}
.pl-cat-l1.is-open > .pl-cat-l1-head .pl-cat-toggle {
    transform: rotate(90deg);
    color: #70b52c;
}

/* ========== 当前选中高亮态 ========== */
.pl-cat-l1.is-current > .pl-cat-l1-head {
    background: linear-gradient(90deg, rgba(26,95,160,0.08) 0%, rgba(112,181,44,0.06) 100%);
    color: var(--primary);
    font-weight: 700;
}
.pl-cat-l1.is-current > .pl-cat-l1-head::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary) 0%, #70b52c 100%);
    border-radius: 0 2px 2px 0;
}
.pl-cat-l1.is-current.is-open > .pl-cat-l1-head {
    background: #fff;
}
.pl-cat-l1-head { position: relative; }

/* 二级列表 */
.pl-cat-l2 {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.pl-cat-l1.is-open > .pl-cat-l2 { max-height: 800px; }

.pl-cat-l2-item { border-top: 1px dashed #eef0f5; }

.pl-cat-l2-head {
    position: relative;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0 12px 22px;
    font-size: 13.5px;
    color: #4b5563;
    cursor: default;
    transition: color 0.2s ease;
}
.pl-cat-l2-link {
    display: flex; align-items: center; gap: 0;
    color: inherit;
    text-decoration: none;
    flex: 1;
    cursor: pointer;
    position: relative;
    padding-left: 12px;
}
.pl-cat-l2-link::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 5px; height: 5px;
    background: #d0d5dd;
    border-radius: 50%;
    transition: background 0.2s ease;
}
.pl-cat-l2-link:hover { color: var(--primary); text-decoration: none; }
.pl-cat-l2-link:hover::before { background: var(--primary); }

.pl-cat-l2-head .pl-cat-toggle {
    font-size: 9px;
    color: #b5bcc8;
    padding: 8px 18px;
    cursor: pointer;
    transition: transform 0.25s ease, color 0.2s ease;
}

.pl-cat-l2-item.is-open > .pl-cat-l2-head .pl-cat-toggle {
    transform: rotate(90deg);
    color: #70b52c;
}
.pl-cat-l2-item.is-open > .pl-cat-l2-head .pl-cat-l2-link::before { background: #70b52c; }

/* 二级当前选中态 */
.pl-cat-l2-item.is-current > .pl-cat-l2-head .pl-cat-l2-link {
    color: var(--primary);
    font-weight: 600;
    background: linear-gradient(90deg, rgba(26,95,160,0.05) 0%, transparent 100%);
    margin-right: 0;
}
.pl-cat-l2-item.is-current > .pl-cat-l2-head .pl-cat-l2-link::before {
    background: var(--primary);
    width: 6px; height: 6px;
    box-shadow: 0 0 0 2px rgba(26,95,160,0.15);
}

/* 三级列表 */
.pl-cat-l3 {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.pl-cat-l2-item.is-open > .pl-cat-l3 { max-height: 500px; }

.pl-cat-l3 a {
    display: block;
    padding: 10px 22px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
}
.pl-cat-l3 a::before {
    content: '';
    position: absolute;
    left: 10px; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 14px;
    background: transparent;
    border-radius: 2px;
    transition: background 0.2s ease;
}
.pl-cat-l3 a:hover {
    color: var(--primary);
    padding-left: 22px;
}
.pl-cat-l3 a:hover::before { background: #70b52c; }

/* 当前选中的三级项 */
.pl-cat-l3 a.is-current {
    color: var(--primary);
    font-weight: 500;
    padding-left: 22px;
    background: #f2f5fa;
}
.pl-cat-l3 a.is-current::before { background: #70b52c; }

/* ========== 右侧产品区 ========== */
.pl-main { min-width: 0; }

/* 顶部标题条 + 筛选提示 */
.pl-main-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 28px;
    gap: 20px;
    flex-wrap: wrap;
}
.pl-main-title {
    font-size: clamp(22px, 2.6vw, 28px);
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.3px;
}
.pl-main-title small {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #70b52c;
    letter-spacing: 3px;
    margin-bottom: 8px;
}
.pl-main-count {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 8px 16px;
    border-radius: 20px;
}
.pl-main-count b { color: var(--primary); font-weight: 600; }

/* 3x3 网格 */
.pl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
/* 不足 3 个时自动居中铺满，避免右侧大片空白 */
.pl-grid:has(> *:nth-child(1):last-child) {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
}
.pl-grid:has(> *:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    max-width: 760px;
    margin: 0 auto;
}

.pl-card {
    position: relative;
    background: #fff;
    border: 1px solid #eef0f5;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.3s ease;
}
.pl-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    border-color: rgba(26,95,160,0.2);
}
.pl-card.is-hidden { display: none; }

.pl-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #e6ebf3 center/cover no-repeat;
    overflow: hidden;
}
.pl-card-img::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.15) 100%);
}
.pl-card:hover .pl-card-img {
    transform: scale(1.02);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pl-card-body {
    padding: 18px 20px 22px;
}
.pl-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: var(--primary);
    background: #e8f1fc;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.pl-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}
.pl-card:hover .pl-card-title { color: var(--primary); }

.pl-card-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}
.pl-card-meta .pl-card-link {
    color: #70b52c;
    font-weight: 500;
    display: inline-flex; align-items: center; gap: 4px;
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.25s ease;
}
.pl-card:hover .pl-card-meta .pl-card-link {
    opacity: 1;
    transform: translateX(0);
}

/* 空状态 */
.pl-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.pl-empty i {
    font-size: 40px;
    color: #d0d5dd;
    margin-bottom: 14px;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .pl-wrap { padding: 64px 20px 80px; }
    .pl-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (max-width: 768px) {
    .pl-wrap { padding: 48px 16px 64px; }
    .pl-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .pl-card-title { font-size: 14.5px; }
    .pl-main-head { margin-bottom: 20px; }
}
@media (max-width: 480px) {
    .pl-grid { grid-template-columns: 1fr; }
}

/* ========== 减少动效偏好 ========== */
@media (prefers-reduced-motion: reduce) {
    .pl-cat-l1-head,
    .pl-cat-l2-head,
    .pl-cat-l2-link,
    .pl-cat-l2-head .pl-cat-toggle,
    .pl-cat-l1-head .pl-cat-toggle {
        transition: none !important;
    }
    .pl-cat-l2,
    .pl-cat-l3 {
        transition: none !important;
        max-height: none !important;
    }
}

/* ========== 产品列表页底部 CTA ========== */
.fw-cta {
    position: relative;
    padding: 96px 20px;
    background: url('/uploads/20261110/3a6e9392f82a9618a9218ec12f8bf9a0.jpg') center/cover no-repeat fixed;
    overflow: hidden;
}
.fw-cta::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgb(94 169 97 / 88%) 0%, rgb(117 188 255 / 18%) 50%, rgb(55 115 133) 100%);
}
.fw-cta-inner {
    position: relative; z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
}
.fw-cta-icon {
    width: 72px; height: 72px;
    background: #70b52c;
    border-radius: 50%;
    margin: 0 auto 28px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 32px rgba(112,181,44,0.5);
    animation: fwFloat 3s ease-in-out infinite;
}
@keyframes fwFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.fw-cta h2 {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}
.fw-cta-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    line-height: 1.9;
    margin-bottom: 36px;
}
.fw-cta-buttons {
    display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}
.fw-cta-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 15px 36px;
    font-size: 15px; font-weight: 600;
    border-radius: 50px;
    cursor: pointer; border: none;
    text-decoration: none;
    transition: all 0.3s ease;
}
.fw-cta-btn--primary {
    background: #70b52c;
    color: #fff;
    box-shadow: 0 6px 24px rgba(112,181,44,0.45);
}
.fw-cta-btn--primary:hover {
    background: #5c9a23;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(112,181,44,0.55);
}
.fw-cta-btn--ghost {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}
.fw-cta-btn--ghost:hover {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
    transform: translateY(-2px);
}
/* CTA 按钮实际跳转链接 */
.fw-cta-btn[href="#"] { cursor: pointer; }

/* fw-cta 响应式 */
@media (max-width: 1024px) {
    .fw-cta { padding: 72px 20px; }
}
@media (max-width: 768px) {
    .fw-cta { padding: 64px 20px; }
    .fw-cta-icon { width: 56px; height: 56px; font-size: 22px; margin-bottom: 20px; }
    .fw-cta h2 { font-size: 24px; }
    .fw-cta-btn { padding: 12px 26px; font-size: 14px; }
}
