/* 产品分类页面高端美化设计 */

/* 页面整体容器 */
.category-page-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.category-page-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(102,126,234,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(118,75,162,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(102,126,234,0.03)"/><circle cx="10" cy="60" r="0.5" fill="rgba(118,75,162,0.03)"/><circle cx="90" cy="40" r="0.5" fill="rgba(102,126,234,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
    pointer-events: none;
}

/* 分类页面头部 */
.category-page-header {
    position: relative;
    z-index: 2;
}

/* 分类英雄区域 */
.category-hero-section {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
    margin-bottom: 3rem;
}

.category-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.7);
}

.category-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
}

.category-hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
    color: #fff;
}

.category-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: -1px;
}

.category-description {
    font-size: 1.3rem;
    margin: 0 0 2rem 0;
    max-width: 600px;
    line-height: 1.6;
    opacity: 0.9;
}

.category-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 商店英雄区域 */
.shop-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 0 0 30px 30px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.shop-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.shop-hero-content {
    position: relative;
    z-index: 2;
}

.shop-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 1rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: -1px;
}

.shop-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
}

/* 产品网格容器 */
.products-grid-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.products-grid-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.grid-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-switcher {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 45px;
    height: 45px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.view-btn:hover,
.view-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.custom-sort-select {
    padding: 0.8rem 1.2rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.custom-sort-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 产品网格 */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce ul.products.list-view {
    grid-template-columns: 1fr;
}

/* 产品卡片 */
.product-card-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
}

.product-card-wrapper:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.product-card-wrapper .woocommerce-loop-product__link {
    text-decoration: none;
    color: inherit;
}

/* 产品图片 */
.product-card-wrapper .attachment-woocommerce_thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-wrapper:hover .attachment-woocommerce_thumbnail {
    transform: scale(1.05);
}

/* 产品徽章 */
.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sale-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.featured-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.out-of-stock-badge {
    background: rgba(108, 117, 125, 0.9);
    color: #fff;
    backdrop-filter: blur(5px);
}

/* 产品操作按钮 */
.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.product-card-wrapper:hover .product-actions {
    opacity: 1;
}

.quick-view-btn,
.wishlist-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.quick-view-btn:hover,
.wishlist-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* 产品内容 */
.product-card-wrapper .woocommerce-loop-product__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 1rem 1.5rem 0.5rem;
    line-height: 1.4;
}

.product-card-wrapper .price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #667eea;
    margin: 0 1.5rem 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.product-card-wrapper .price del {
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.product-card-wrapper .price ins {
    text-decoration: none;
    color: #ff6b6b;
}

/* 添加到购物车按钮 */
.product-card-wrapper .button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 1.5rem 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: block;
    text-align: center;
    text-decoration: none;
}

.product-card-wrapper .button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.product-card-wrapper .button:hover::before {
    left: 100%;
}

.product-card-wrapper .button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: #fff;
}

/* 快速查看模态框 */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.quick-view-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2), 
                0 0 0 1px rgba(255,255,255,0.3) inset;
    border: 1px solid rgba(255,255,255,0.4);
    opacity: 1 !important;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    border: none;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 50%;
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.modal-close:hover {
    background: rgba(255, 107, 107, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.modal-body {
    padding: 2rem;
    background: transparent !important;
    opacity: 1 !important;
}

.quick-view-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    background: transparent !important;
}

.quick-view-product .product-images {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    padding: 1rem;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
}

.quick-view-product .product-images img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.quick-view-product .product-info {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    opacity: 1 !important;
}

.quick-view-product .product-info h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a1a1a !important;
    margin: 0 0 1rem 0;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    opacity: 1 !important;
}

.quick-view-product .product-info .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #667eea !important;
    margin-bottom: 1rem;
    text-shadow: none;
    opacity: 1 !important;
}

.quick-view-product .product-info .description {
    color: #333333 !important;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 1 !important;
}

.quick-view-product .product-info .actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-view-product .add-to-cart-btn,
.quick-view-product .view-details-btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.quick-view-product .add-to-cart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.quick-view-product .view-details-btn {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.quick-view-product .add-to-cart-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.quick-view-product .view-details-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

/* 分页美化 */
.pagination-wrapper {
    margin-top: 3rem;
    text-align: center;
}

.woocommerce nav.woocommerce-pagination {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.woocommerce nav.woocommerce-pagination ul {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce nav.woocommerce-pagination li {
    margin: 0;
}

.woocommerce nav.woocommerce-pagination a,
.woocommerce nav.woocommerce-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.woocommerce nav.woocommerce-pagination a {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.2);
}

.woocommerce nav.woocommerce-pagination a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.woocommerce nav.woocommerce-pagination span.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 列表视图样式 */
.woocommerce ul.products.list-view .product-card-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 1.5rem;
}

.woocommerce ul.products.list-view .product-card-wrapper .attachment-woocommerce_thumbnail {
    width: 300px;
    height: 200px;
    border-radius: 15px;
}

.woocommerce ul.products.list-view .product-card-wrapper .woocommerce-loop-product__title {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
}

.woocommerce ul.products.list-view .product-card-wrapper .price {
    font-size: 1.8rem;
    margin: 0 0 1rem 0;
}

.woocommerce ul.products.list-view .product-card-wrapper .button {
    margin: 0;
    min-width: 150px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .products-grid-container {
        padding: 0 1.5rem;
    }
    
    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .category-hero-section {
        height: 300px;
        border-radius: 0 0 20px 20px;
    }
    
    .category-title {
        font-size: 2.5rem;
    }
    
    .category-description {
        font-size: 1.1rem;
    }
    
    .shop-hero-section {
        padding: 3rem 1.5rem;
        border-radius: 0 0 20px 20px;
    }
    
    .shop-title {
        font-size: 2.5rem;
    }
    
    .products-grid-container {
        padding: 0 1rem;
    }
    
    .products-grid-header {
        padding: 1rem 1.5rem;
    }
    
    .grid-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .custom-sort-select {
        min-width: auto;
        width: 100%;
    }
    
    .woocommerce ul.products {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-card-wrapper .attachment-woocommerce_thumbnail {
        height: 200px;
    }
    
    .quick-view-product {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .woocommerce ul.products.list-view .product-card-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .woocommerce ul.products.list-view .product-card-wrapper .attachment-woocommerce_thumbnail {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .category-hero-section {
        height: 250px;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .shop-title {
        font-size: 2rem;
    }
    
    .category-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .product-actions {
        opacity: 1;
        position: static;
        flex-direction: row;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .quick-view-btn,
    .wishlist-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card-wrapper {
    animation: fadeInUp 0.6s ease forwards;
}

.product-card-wrapper:nth-child(1) { animation-delay: 0.1s; }
.product-card-wrapper:nth-child(2) { animation-delay: 0.2s; }
.product-card-wrapper:nth-child(3) { animation-delay: 0.3s; }
.product-card-wrapper:nth-child(4) { animation-delay: 0.4s; }
.product-card-wrapper:nth-child(5) { animation-delay: 0.5s; }
.product-card-wrapper:nth-child(6) { animation-delay: 0.6s; }

/* 滚动条美化 */
.quick-view-modal .modal-content::-webkit-scrollbar {
    width: 8px;
}

.quick-view-modal .modal-content::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
}

.quick-view-modal .modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.quick-view-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
} 


.review-rating{
    display: none;
}

/* 产品卡片标题去下划线并美化悬停 */
.product-card-wrapper .woocommerce-loop-product__title a,
.product-card-wrapper .woocommerce-loop-product__title a:visited,
.product-card-wrapper .woocommerce-loop-product__title a:active,
.product-card-wrapper .woocommerce-loop-product__title a:focus {
    text-decoration: none !important;
    box-shadow: none !important;
    border-bottom: none !important;
    color: #2c3e50 !important;
}

.product-card-wrapper .woocommerce-loop-product__title a:hover {
    color: #667eea !important;
    text-decoration: none !important;
    box-shadow: 0 2px 0 #667eea !important; /* 可选高亮线 */
    border-bottom: none !important;
}



.woocommerce-products-header{
    display: none !important;
}

.woocommerce-breadcrumb{
    display: none !important;
}

.ast-woo-product-category{
    display: none!important;
}

