/* Category listing page — keep out of Beetl templates to avoid @media / escape issues */

.category-page {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: 20px;
    margin-top: 0;
}

/* 与 product-detail / vendor historical 通栏头图一致 */
.category-filter-bleed {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('/img/bckg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 36px 0 40px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.category-filter-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    box-sizing: border-box;
}

.category-top {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(0, 3fr);
    gap: 18px;
    width: 100%;
    overflow: hidden;
}

.category-filter-bleed .top-panel {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 16px;
    min-width: 0;
    box-sizing: border-box;
}

.category-filter-bleed .top-panel-title {
    color: #a6c95a;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.category-search-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
}

.category-search {
    width: 100%;
    border: 1px solid #d7d7d7;
    border-radius: 2px;
    padding: 8px 36px 8px 10px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}

.category-search:focus {
    outline: none;
    border-color: #2a72de;
}

.category-search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #3a3a3a;
    font-size: 18px;
    line-height: 1;
}

.category-search-icon::before {
    content: "🔍";
}

.category-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.category-chip {
    width: auto;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #f3f5f8;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.category-chip.is-active {
    background: #ffffff;
    border-color: #ffffff;
    color: #222;
}

.category-main {
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: 12px;
    min-height: 200px;
    background: #fff;
}

.category-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.category-page .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px 18px;
}

.category-page .product-card {
    border: 0;
    border-bottom: 1px solid #d7d7d7;
    border-radius: 0;
    padding: 8px 0 10px 0;
    background: transparent;
    min-height: 0;
}

.category-page .product-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    line-height: 1.35;
    color: #2d2d2d;
    margin-bottom: 2px;
    font-weight: 600;
    letter-spacing: 0.1px;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-page a.product-card-title:hover {
    color: #2a72de;
}

.category-page .product-card-title::before {
    content: "›";
    display: inline-block;
    color: #2f2f2f;
    font-size: 18px;
    line-height: 1;
    transform: translateY(-1px);
}

.category-page .product-card-category {
    display: none;
}

.category-page .product-empty {
    display: none;
    color: #666;
    font-size: 14px;
    padding: 16px 0;
}

@media (max-width: 900px) {
    .category-filter-inner {
        padding: 0 20px;
    }

    .category-top {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .category-filter-bleed {
        padding: 24px 0 28px;
    }
}
