/**
 * WooCommerce 商店页面样式
 * 参考首页产品展示区域设计
 */

/* ==========================================================================
   商店页面头部
   ========================================================================== */
.shop-header {
    background: linear-gradient(135deg, #00247D 0%, #1a3a8a 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 50px;
}

.shop-header .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px;
    color: white;
    text-align: center;
}

.shop-header .term-description {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================================================
   商店容器
   ========================================================================== */
.shop-container {
    padding: 0 20px 80px;
}

/* ==========================================================================
   工具栏（排序、结果计数）
   ========================================================================== */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
    margin-top: 50px;
    padding: 20px 0;
    background: #f8f9fa;
    border-radius: 12px;
}

.woocommerce-notices-wrapper {
    display: none;
}
.woocommerce-result-count {
    font-size: 15px;
    color: #666;
    margin: 0;
}

.woocommerce-ordering {
    margin: 0;
}

.woocommerce-ordering select {
    padding: 10px 35px 10px 15px;
    border: 1px solid #E8EBED;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat, repeat;
    background-size: 15px auto, 100%;
    background-position: right 10px top 50%, 0 0;
}

.woocommerce-ordering select:hover {
    border-color: #00247D;
}

.woocommerce-ordering select:focus {
    outline: none;
    border-color: #00247D;
    box-shadow: 0 0 0 3px rgba(0, 36, 125, 0.1);
}

/* ==========================================================================
   产品网格布局
   ========================================================================== */
.woocommerce .products,
ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ==========================================================================
   产品卡片样式 - 与首页一致
   ========================================================================== */
.product-card-shop {
    background: white;
    border: 1px solid #E8EBED;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-shop:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: #00247D;
}

/* 产品图片 */
.product-card-shop .product-image-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 100%;
    overflow: hidden;
    background: #f8f9fa;
    border-bottom: 1px solid #E8EBED;
}

.product-card-shop .product-image-wrapper a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-shop .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease;
}

.product-card-shop:hover .product-image {
    transform: scale(1.08);
}

.placeholder-img {
    opacity: 0.4;
}

/* 促销标签 */
.onsale-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #C8102E;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 2;
}

/* 产品内容 */
.product-card-shop .product-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.product-card-shop .product-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
}

.product-card-shop .product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-card-shop .product-title a:hover {
    color: #00247D;
}

.product-card-shop .product-price {
    font-size: 24px;
    font-weight: 700;
    color: #00247D;
    margin: 4px 0;
}

.product-card-shop .product-price del {
    font-size: 18px;
    color: #999;
    font-weight: 400;
    margin-right: 8px;
}

.product-card-shop .product-price ins {
    text-decoration: none;
}

.product-card-shop .product-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.product-card-shop .product-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 8px 0;
}

.product-card-shop .product-actions {
    margin-top: auto;
    padding-top: 12px;
}
.badge-primary {
    background: rgba(0, 36, 125, 0.1);
    color: #00247D;
}
.badge-verified {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    white-space: nowrap;
}
.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}
/* ==========================================================================
   分页
   ========================================================================== */
.shop-pagination {
    margin-top: 60px;
}

.woocommerce-pagination {
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-pagination ul li {
    margin: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #E8EBED;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.woocommerce-pagination ul li a:hover {
    background: #00247D;
    color: white;
    border-color: #00247D;
}

.woocommerce-pagination ul li span.current {
    background: #00247D;
    color: white;
    border-color: #00247D;
}

/* ==========================================================================
   无产品提示
   ========================================================================== */
.no-products-found {
    text-align: center;
    padding: 80px 20px;
}

.no-products-found svg {
    color: #ccc;
    margin-bottom: 24px;
}

.no-products-found h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.no-products-found p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 32px;
}

/* ==========================================================================
   响应式布局
   ========================================================================== */
@media (max-width: 1024px) {
    .woocommerce .products,
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .shop-header .page-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .shop-header {
        padding: 40px 0;
        margin-bottom: 30px;
    }
    
    .shop-header .page-title {
        font-size: 1.75rem;
    }
    
    .shop-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .woocommerce-result-count,
    .woocommerce-ordering {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .woocommerce .products,
    ul.products {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .shop-container {
        padding: 0 15px 60px;
    }
    
    .product-card-shop .product-content {
        padding: 20px;
    }
    
    .product-card-shop .product-title {
        font-size: 16px;
    }
    
    .product-card-shop .product-price {
        font-size: 20px;
    }
    
    .woocommerce-pagination ul li a,
    .woocommerce-pagination ul li span {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }
}
