/* ============================================
   category.css - 分类页面独立样式
   参考主流英文鲜花网站风格
   ============================================ */

   .category-page {
    padding: 30px 0 40px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
    padding: 10px 0 25px;
    font-size: 13px;
    color: #888;
}

.breadcrumb a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #DD302D;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

/* ========== 页面标题区 ========== */
.category-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.category-header h1 {
    font-size: 34px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.category-header p {
    font-size: 16px;
    color: #666;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========== 商品网格 - 4列布局 ========== */
.category-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: #ddd;
}

.product-link {
    text-decoration: none;
    display: block;
}

.product-image {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 16px 14px 18px;
    text-align: center;
}

.product-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 19px;
    font-weight: 700;
    color: #DD302D;
}

/* ========== 分页样式 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 10px 0 20px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.page-link:hover {
    background: #f5f5f5;
    border-color: #DD302D;
    color: #DD302D;
}

.page-link.current {
    background: #DD302D;
    border-color: #DD302D;
    color: white;
    cursor: default;
}

.page-link.current:hover {
    background: #DD302D;
    color: white;
}

.page-link.prev,
.page-link.next {
    font-weight: 500;
    padding: 0 18px;
}

.page-dots {
    color: #999;
    padding: 0 4px;
    font-weight: 500;
}

/* ========== 分类描述区域（SEO友好） ========== */
.category-description {
    background: #f8f9fa;
    padding: 45px 0;
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
}

.category-description .text-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 18px;
}

.category-description .text-content p {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 16px;
    max-width: 900px;
}

.category-description .text-content p:last-child {
    margin-bottom: 0;
}

/* ========== 无商品提示 ========== */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #888;
    font-size: 16px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1200px) {
    .category-products {
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .category-products {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .category-header h1 {
        font-size: 28px;
    }
    
    .category-description .text-content h2 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .category-page {
        padding: 20px 0 30px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .category-header {
        margin-bottom: 25px;
        padding-bottom: 18px;
    }
    
    .category-header h1 {
        font-size: 24px;
    }
    
    .category-header p {
        font-size: 14px;
    }
    
    .category-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .product-name {
        font-size: 13px;
        min-height: 36px;
    }
    
    .product-price {
        font-size: 16px;
    }
    
    .product-info {
        padding: 12px 10px 14px;
    }
    
    .pagination {
        gap: 6px;
    }
    
    .page-link {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
        padding: 0 10px;
    }
    
    .category-description {
        padding: 30px 0;
    }
    
    .category-description .text-content h2 {
        font-size: 19px;
    }
    
    .category-description .text-content p {
        font-size: 14px;
        line-height: 1.7;
    }
    
    .breadcrumb {
        font-size: 12px;
        padding: 5px 0 15px;
    }
}

@media (max-width: 480px) {
    .category-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-name {
        font-size: 12px;
        min-height: auto;
        -webkit-line-clamp: 1;
    }
    
    .product-price {
        font-size: 14px;
    }
    
    .product-info {
        padding: 10px 8px 12px;
    }
    
    .category-header h1 {
        font-size: 20px;
    }
    
    .category-header p {
        font-size: 13px;
    }
    
    .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
        border-radius: 6px;
    }
    
    .page-link.prev,
    .page-link.next {
        padding: 0 12px;
        font-size: 12px;
    }
    
    .category-description .text-content h2 {
        font-size: 17px;
    }
    
    .category-description .text-content p {
        font-size: 13px;
    }
}