/* ==========================================================================
   Catalog 分类页 — 独立样式（不依赖 style.css）
   模板: taxonomy-catalog.php   类名前缀: cat2-
   设计参照: 分类.JPG — 左侧分类树 + 右侧属性筛选行
   ========================================================================== */

/* ---------------- 顶部满屏横幅 ---------------- */
.cat2-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0d1a44;
}
.cat2-hero img {
    display: block;
    width: 100%;
    height: clamp(220px, 32vw, 460px);
    object-fit: cover;
    object-position: center;
}

/* ---------------- 页面主体 ---------------- */
.cat2-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px 60px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    background: #ffffff;
}

/* ---------------- 左侧：分类列表 ---------------- */
.cat2-side {
    width: 250px;
    flex-shrink: 0;
}

.cat2-side-title {
    font-size: 26px;
    font-weight: 400;
    color: #1d1d1d;
    letter-spacing: 0.5px;
    margin: 4px 0 26px;
}

.cat2-search {
    display: flex;
    align-items: center;
    border: 1px solid #dddddd;
    border-radius: 22px;
    padding: 9px 16px;
    margin-bottom: 26px;
    background: #fff;
}
.cat2-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    font-size: 14px;
    color: #333;
    background: transparent;
}
.cat2-search input::placeholder { color: #999; }
.cat2-search button {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #bbbbbb;
    display: flex;
    align-items: center;
    padding: 0;
}
.cat2-search button:hover { color: #2b9ac9; }

.cat2-tree {
    list-style: none;
    margin: 0;
    padding: 22px 0 0;
    border-top: 1px solid #e5e5e5;
}
.cat2-branch { margin-bottom: 8px; }

.cat2-parent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}
.cat2-parent {
    font-size: 20px;
    color: #333333;
    text-decoration: none;
    line-height: 1.4;
}
.cat2-parent:hover { color: #2b9ac9; }
.cat2-parent.current-parent { font-weight: 600; color: #2b9ac9; }

.cat2-chev {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    padding: 4px 6px;
    transition: transform 0.2s ease;
    transform: rotate(180deg);
}
.cat2-branch.open .cat2-chev { transform: rotate(0deg); }

.cat2-kids {
    list-style: none;
    margin: 0;
    padding: 0 0 6px 8px;
    display: none;
}
.cat2-branch.open .cat2-kids { display: block; }

.cat2-kids li {
    padding: 7px 0;
}
.cat2-kids li a {
    font-size: 15px;
    color: #555555;
    text-decoration: none;
    line-height: 1.4;
}
.cat2-kids li a:hover { color: #2b9ac9; }
.cat2-kids li.current a { color: #2b9ac9; font-weight: 600; }

/* ---------------- 右侧：主内容 ---------------- */
.cat2-main {
    flex: 1;
    min-width: 0;
    padding: 0 24px;
}

.cat2-title {
    text-align: center;
    font-size: 34px;
    font-weight: 400;
    color: #1d1d1d;
    margin: 6px 0 16px;
}

.cat2-desc {
    max-width: 860px;
    margin: 0 auto 30px;
    text-align: center;
    font-size: 14px;
    line-height: 1.7;
    color: #666666;
}
.cat2-desc p { margin: 0 0 8px; }
.cat2-desc p:last-child { margin-bottom: 0; }

/* 属性筛选行 */
.cat2-filters {
    background: #f2f2f2;
}
.cat2-frow {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 13px 18px;
    border-bottom: 2px solid #ffffff;
}
.cat2-frow:last-child { border-bottom: 0; }

.cat2-flabel {
    width: 130px;
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 700;
    color: #333333;
    padding-top: 2px;
}
.cat2-fopts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}
.cat2-fopt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555555;
    cursor: pointer;
    line-height: 1.5;
}
.cat2-fopt input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #2b9ac9;
    cursor: pointer;
    margin: 0;
}

/* 产品卡片网格 */
.cat2-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 30px;
}
.cat2-grid .product-card {
    border: 1px solid #ececec;
    background: #fff;
    padding: 14px;
    text-align: center;
    transition: box-shadow 0.2s ease;
}
.cat2-grid .product-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.cat2-card-img img {
    max-width: 100%;
    height: auto;
}
.cat2-card-title {
    font-size: 15px;
    font-weight: 500;
    margin: 10px 0 2px;
}
.cat2-card-title a {
    color: #333;
    text-decoration: none;
}
.cat2-card-title a:hover { color: #2b9ac9; }

#no-products-msg {
    display: none;
    padding: 18px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    margin-top: 20px;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 992px) {
    .cat2-hero img { height: clamp(150px, 40vw, 240px); }
    .cat2-page {
        flex-direction: column;
        gap: 24px;
    }
    .cat2-side { width: 100%; }
    .cat2-title { font-size: 26px; margin-bottom: 24px; }
    .cat2-frow { flex-direction: column; gap: 8px; }
    .cat2-flabel { width: auto; }
    .cat2-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .cat2-grid { grid-template-columns: 1fr; }
}
