/* AnyPopMart 分类列表页样式 */

/* ========== 面包屑 ========== */
.breadcrumb-bar {
    background: linear-gradient(180deg, white 0%, #FFF5F8 100%);
    padding: 18px 0;
    border-bottom: 2px solid rgba(255, 107, 157, 0.1);
    position: sticky;
    top: 76px;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.08);
    backdrop-filter: blur(10px);
}

.breadcrumb-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--gray);
    transition: all 0.3s ease;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 600;
    position: relative;
}

/* 面包屑链接下划线效果 */
.breadcrumb a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
    background: rgba(255, 107, 157, 0.08);
}

.breadcrumb a:hover::after {
    transform: scaleX(1);
}

.breadcrumb .separator {
    color: #FFB3D1;
    font-size: 12px;
    font-weight: bold;
}

.breadcrumb .current {
    color: var(--primary);
    font-weight: 700;
    background: rgba(255, 107, 157, 0.1);
    padding: 8px 14px;
    border-radius: 20px;
}

.result-count {
    font-size: 14px;
    background: var(--gradient-primary);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.25);
    animation: pulse 2s ease-in-out infinite;
}

/* ========== 分类页面布局 ========== */
.category-page {
    padding: 50px 0 80px;
    min-height: 60vh;
}

.category-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 36px;
}

/* ========== 侧边栏 ========== */
.category-sidebar {
    flex-shrink: 0;
}

.sidebar-section {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(255, 107, 157, 0.08);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 3px solid;
    border-image: var(--gradient-primary) 1;
    color: var(--dark);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== 分类导航 ========== */
.category-nav > a {
    display: block;
    padding: 14px 20px;
    color: var(--gray);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 600;
    margin-bottom: 6px;
}

.category-nav > a:hover,
.category-nav > a.active {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(6px);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.cat-group {
    margin-bottom: 12px;
}

.cat-main {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 15px;
}

.cat-main:hover,
.cat-main.active {
    background: rgba(255, 107, 157, 0.1);
    color: var(--primary);
}

.cat-subs {
    padding-left: 16px;
    margin-top: 6px;
}

.cat-subs a {
    font-size: 14px;
    color: var(--gray);
    padding: 10px 18px;
    display: block;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}

.cat-subs a:hover,
.cat-subs a.active {
    color: var(--primary);
    background: rgba(255, 107, 157, 0.08);
    transform: translateX(4px);
}

/* ========== 搜索表单 ========== */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.search-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #FFE4EC;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    background: #FFF5F8;
    box-sizing: border-box;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.search-form button {
    width: 100%;
    padding: 12px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
    box-sizing: border-box;
}

.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

/* ========== 分类内容区 ========== */
.category-content {
    min-width: 0;
}

/* ========== 筛选栏 ========== */
.filter-bar {
    background: white;
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(255, 107, 157, 0.08);
}

.filter-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-info strong {
    font-size: 22px;
    color: var(--dark);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-keyword {
    background: var(--gradient-accent);
    color: #92400e;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
}

.sub-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-size: 14px;
}

.sub-filter span {
    color: var(--gray);
    margin-right: 4px;
    font-weight: 600;
}

.sub-filter a {
    padding: 10px 20px;
    border: 2px solid #FFE4EC;
    border-radius: 25px;
    color: var(--gray);
    font-weight: 600;
    transition: var(--transition);
}

.sub-filter a:hover,
.sub-filter a.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 0;
    gap: 10px;
}

.pagination a,
.pagination span {
    padding: 14px 20px;
    border: 2px solid #FFE4EC;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--gray);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    min-width: 48px;
    text-align: center;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 107, 157, 0.08);
    transform: translateY(-2px);
}

.pagination .active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.pagination span {
    border: none;
    background: transparent;
}

.btn-clear {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: var(--gray);
    color: white !important;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.btn-clear:hover {
    background: var(--dark);
    transform: translateY(-2px);
}

/* ========== 商品网格动画 ========== */
.category-content .product-grid .product-card {
    animation: cardFadeIn 0.5s ease backwards;
}

.category-content .product-grid .product-card:nth-child(1) { animation-delay: 0.05s; }
.category-content .product-grid .product-card:nth-child(2) { animation-delay: 0.1s; }
.category-content .product-grid .product-card:nth-child(3) { animation-delay: 0.15s; }
.category-content .product-grid .product-card:nth-child(4) { animation-delay: 0.2s; }
.category-content .product-grid .product-card:nth-child(5) { animation-delay: 0.25s; }
.category-content .product-grid .product-card:nth-child(6) { animation-delay: 0.3s; }
.category-content .product-grid .product-card:nth-child(7) { animation-delay: 0.35s; }
.category-content .product-grid .product-card:nth-child(8) { animation-delay: 0.4s; }
.category-content .product-grid .product-card:nth-child(9) { animation-delay: 0.45s; }
.category-content .product-grid .product-card:nth-child(10) { animation-delay: 0.5s; }
.category-content .product-grid .product-card:nth-child(11) { animation-delay: 0.55s; }
.category-content .product-grid .product-card:nth-child(12) { animation-delay: 0.6s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .category-layout {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        order: 2;
    }

    .category-content {
        order: 1;
    }

    .sidebar-section {
        padding: 20px;
    }

    .breadcrumb-bar {
        top: 76px;
    }
}

@media (max-width: 600px) {
    .breadcrumb-bar .container {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .category-page {
        padding: 30px 0 50px;
    }

    .filter-info strong {
        font-size: 18px;
    }

    .pagination {
        gap: 6px;
    }

    .pagination a,
    .pagination span {
        padding: 12px 16px;
        font-size: 13px;
        min-width: 40px;
    }

    .category-layout {
        gap: 24px;
    }

    .sidebar-section {
        padding: 20px;
    }

    .sub-filter {
        gap: 8px;
    }

    .sub-filter a {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ========== 加载状态 ========== */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
