/**
 * Japanese Products Archive Page - Premium Design
 * 日本站点产品归档页 - 高级设计
 * 
 * Target: http://silica-fume.local/ja/products/
 * 
 * Color Scheme - Deep Blue (与产品详情页一致):
 * - Primary: #1e88e5 (深蓝色 - Deep Blue)
 * - Primary Dark: #1e3c72 (最深蓝)
 * - Primary Mid: #2a5298 (中蓝)
 * - Hover: #1565c0 (深蓝悬停)
 * - Accent: #42a5f5 (浅蓝强调)
 * 
 * Design Style - Japanese Market:
 * - Border radius: 20px (大圆角 - soft rounded)
 * - Shadows: Soft and elegant (柔和优雅的阴影)
 * - Gradients: Smooth transitions (平滑渐变)
 * 
 * Version: 1.3 - 移除重复的分类标签，优化卡片布局更加简洁美观
 */

/* ============================================================================
   1. PRODUCT CARD - 产品卡片整体优化（更加简洁美观）
   ============================================================================ */

html[lang="ja"] body.lang-ja .product-card-archive,
html[lang="ja-JP"] body.lang-ja .product-card-archive,
body.lang-ja.post-type-archive-product .product-card-archive,
body.lang-ja .product-card-archive {
    background: #ffffff !important;
    border: 1px solid rgba(30, 136, 229, 0.12) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 12px rgba(30, 60, 114, 0.06) !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

html[lang="ja"] body.lang-ja .product-card-archive:hover,
html[lang="ja-JP"] body.lang-ja .product-card-archive:hover,
body.lang-ja .product-card-archive:hover {
    border-color: rgba(30, 136, 229, 0.3) !important;
    box-shadow: 0 8px 28px rgba(30, 136, 229, 0.15) !important;
    transform: translateY(-6px) !important;
}

/* ============================================================================
   2. PRODUCT IMAGE WRAPPER - 产品图片容器（优化布局）
   ============================================================================ */

html[lang="ja"] body.lang-ja .product-image-wrapper,
html[lang="ja-JP"] body.lang-ja .product-image-wrapper,
body.lang-ja .product-image-wrapper {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 20px 20px 0 0 !important;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.03) 0%, rgba(30, 136, 229, 0.03) 100%) !important;
    padding: 0 !important;
    min-height: 280px !important;
    height: 280px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html[lang="ja"] body.lang-ja .product-image-wrapper img,
html[lang="ja-JP"] body.lang-ja .product-image-wrapper img,
body.lang-ja .product-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08)) !important;
}

html[lang="ja"] body.lang-ja .product-card-archive:hover .product-image-wrapper img,
html[lang="ja-JP"] body.lang-ja .product-card-archive:hover .product-image-wrapper img,
body.lang-ja .product-card-archive:hover .product-image-wrapper img {
    transform: scale(1.08) !important;
}

/* ============================================================================
   3. PRODUCT CATEGORY TAG - 产品分类标签（完全隐藏，避免重复显示）
   ============================================================================ */

/* 使用最高优先级选择器隐藏所有产品分类标签 - 覆盖 japanese-archive-pages.css */
html[lang="ja"] body.lang-ja .product-image-wrapper > .product-category-tag,
html[lang="ja-JP"] body.lang-ja .product-image-wrapper > .product-category-tag,
body.lang-ja .product-image-wrapper > .product-category-tag,
html[lang="ja"] body.lang-ja .product-card-archive .product-image-wrapper .product-category-tag,
html[lang="ja-JP"] body.lang-ja .product-card-archive .product-image-wrapper .product-category-tag,
body.lang-ja .product-card-archive .product-image-wrapper .product-category-tag,
html[lang="ja"] body.lang-ja span.product-category-tag,
html[lang="ja-JP"] body.lang-ja span.product-category-tag,
body.lang-ja span.product-category-tag,
html[lang="ja"] body.lang-ja .products-grid-archive .product-category-tag,
html[lang="ja-JP"] body.lang-ja .products-grid-archive .product-category-tag,
body.lang-ja .products-grid-archive .product-category-tag,
html[lang="ja"] body .product-category-tag,
html[lang="ja-JP"] body .product-category-tag,
body.lang-ja .product-category-tag,
.lang-ja .product-category-tag,
.post-type-archive-product.lang-ja .product-category-tag,
html[lang="ja"] body.lang-ja .product-card-archive .product-category-tag,
html[lang="ja-JP"] body.lang-ja .product-card-archive .product-category-tag {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    max-height: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

/* ============================================================================
   4. PRODUCT CONTENT - 产品内容区域（优化间距，移除标签后的调整）
   ============================================================================ */

html[lang="ja"] body.lang-ja .product-card-content,
html[lang="ja-JP"] body.lang-ja .product-card-content,
body.lang-ja .product-card-content {
    padding: 24px !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    flex: 1 !important;
}

/* 确保按钮始终在底部 */
html[lang="ja"] body.lang-ja .product-card-footer,
html[lang="ja-JP"] body.lang-ja .product-card-footer,
body.lang-ja .product-card-footer {
    margin-top: auto !important;
}

/* ============================================================================
   5. PRODUCT TITLE - 产品标题（优化样式，使用深蓝色系）
   ============================================================================ */

html[lang="ja"] body.lang-ja .product-card-title,
html[lang="ja-JP"] body.lang-ja .product-card-title,
body.lang-ja .product-card-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    line-height: 1.5 !important;
    transition: color 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
}

/* 只有当摘要存在时，标题才有下边距 */
html[lang="ja"] body.lang-ja .product-card-title:has(+ .product-card-excerpt:not(:empty)),
html[lang="ja-JP"] body.lang-ja .product-card-title:has(+ .product-card-excerpt:not(:empty)),
body.lang-ja .product-card-title:has(+ .product-card-excerpt:not(:empty)) {
    margin-bottom: 12px !important;
}

html[lang="ja"] body.lang-ja .product-card-title a,
html[lang="ja-JP"] body.lang-ja .product-card-title a,
body.lang-ja .product-card-title a {
    color: #1a1a1a !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    display: block !important;
}

html[lang="ja"] body.lang-ja .product-card-title a:hover,
html[lang="ja-JP"] body.lang-ja .product-card-title a:hover,
body.lang-ja .product-card-title a:hover {
    color: #1e88e5 !important;
}

/* ============================================================================
   6. PRODUCT EXCERPT - 产品摘要（优化样式）
   ============================================================================ */

html[lang="ja"] body.lang-ja .product-card-excerpt,
html[lang="ja-JP"] body.lang-ja .product-card-excerpt,
body.lang-ja .product-card-excerpt {
    font-size: 14px !important;
    color: #666 !important;
    line-height: 1.7 !important;
    margin-bottom: 18px !important;
    margin-top: 0 !important;
    /* 移除 min-height，避免空摘要时占据空间 */
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* 如果摘要为空，不显示也不占据空间 */
html[lang="ja"] body.lang-ja .product-card-excerpt:empty,
html[lang="ja-JP"] body.lang-ja .product-card-excerpt:empty,
body.lang-ja .product-card-excerpt:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* ============================================================================
   7. PRODUCT FEATURES PREVIEW - 产品特性预览
   ============================================================================ */

html[lang="ja"] body.lang-ja .product-features-preview,
html[lang="ja-JP"] body.lang-ja .product-features-preview,
body.lang-ja .product-features-preview {
    margin-bottom: 20px !important;
}

html[lang="ja"] body.lang-ja .product-features-preview ul,
html[lang="ja-JP"] body.lang-ja .product-features-preview ul,
body.lang-ja .product-features-preview ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

html[lang="ja"] body.lang-ja .product-features-preview li,
html[lang="ja-JP"] body.lang-ja .product-features-preview li,
body.lang-ja .product-features-preview li {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    color: #666 !important;
}

html[lang="ja"] body.lang-ja .product-features-preview li .dashicons,
html[lang="ja-JP"] body.lang-ja .product-features-preview li .dashicons,
body.lang-ja .product-features-preview li .dashicons {
    color: #1e88e5 !important;
    font-size: 18px !important;
    flex-shrink: 0 !important;
}

/* ============================================================================
   8. VIEW DETAILS BUTTON - 查看详情按钮（优化样式）
   ============================================================================ */

html[lang="ja"] body.lang-ja .product-card-link,
html[lang="ja-JP"] body.lang-ja .product-card-link,
body.lang-ja .product-card-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%) !important;
    color: #ffffff !important;
    padding: 13px 28px !important;
    border-radius: 25px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 10px rgba(30, 136, 229, 0.25) !important;
    border: none !important;
    width: 100% !important;
    justify-content: center !important;
    margin-top: auto !important;
}

html[lang="ja"] body.lang-ja .product-card-link:hover,
html[lang="ja-JP"] body.lang-ja .product-card-link:hover,
body.lang-ja .product-card-link:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%) !important;
    box-shadow: 0 5px 14px rgba(30, 136, 229, 0.35) !important;
    transform: translateY(-2px) !important;
}

html[lang="ja"] body.lang-ja .product-card-link .dashicons,
html[lang="ja-JP"] body.lang-ja .product-card-link .dashicons,
body.lang-ja .product-card-link .dashicons {
    color: #ffffff !important;
    font-size: 17px !important;
}

/* ============================================================================
   9. FILTER LABEL - 筛选标签标题
   ============================================================================ */

html[lang="ja"] body.lang-ja .filter-label,
html[lang="ja-JP"] body.lang-ja .filter-label,
body.lang-ja .filter-label {
    background: transparent !important;
    color: #333 !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
}

html[lang="ja"] body.lang-ja .filter-label .dashicons,
html[lang="ja-JP"] body.lang-ja .filter-label .dashicons,
body.lang-ja .filter-label .dashicons {
    color: #1e88e5 !important;
    font-size: 28px !important;
    width: 28px !important;
    height: 28px !important;
}

html[lang="ja"] body.lang-ja .filter-label:hover,
html[lang="ja-JP"] body.lang-ja .filter-label:hover,
body.lang-ja .filter-label:hover {
    background: transparent !important;
    color: #333 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ============================================================================
   10. PRODUCTS GRID - 产品网格布局
   ============================================================================ */

html[lang="ja"] body.lang-ja .products-grid-archive,
html[lang="ja-JP"] body.lang-ja .products-grid-archive,
body.lang-ja .products-grid-archive {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 32px !important;
    padding: 40px 0 !important;
}

/* ============================================================================
   11. RESPONSIVE DESIGN - 响应式设计
   ============================================================================ */

@media (max-width: 1024px) {
    html[lang="ja"] body.lang-ja .products-grid-archive,
    html[lang="ja-JP"] body.lang-ja .products-grid-archive,
    body.lang-ja .products-grid-archive {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        gap: 24px !important;
    }
}

@media (max-width: 768px) {
    html[lang="ja"] body.lang-ja .products-grid-archive,
    html[lang="ja-JP"] body.lang-ja .products-grid-archive,
    body.lang-ja .products-grid-archive {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    html[lang="ja"] body.lang-ja .product-category-tag,
    html[lang="ja-JP"] body.lang-ja .product-category-tag,
    body.lang-ja .product-category-tag {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
    
    html[lang="ja"] body.lang-ja .product-card-title,
    html[lang="ja-JP"] body.lang-ja .product-card-title,
    body.lang-ja .product-card-title {
        font-size: 16px !important;
    }
}

/* ============================================================================
   12. ACCESSIBILITY - 无障碍支持
   ============================================================================ */

/* 高对比度模式 */
@media (prefers-contrast: high) {
    html[lang="ja"] body.lang-ja .product-card-archive,
    html[lang="ja-JP"] body.lang-ja .product-card-archive,
    body.lang-ja .product-card-archive {
        border-width: 3px !important;
    }
    
    html[lang="ja"] body.lang-ja .product-category-tag,
    html[lang="ja-JP"] body.lang-ja .product-category-tag,
    body.lang-ja .product-category-tag {
        border: 2px solid #1e88e5 !important;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    html[lang="ja"] body.lang-ja .product-card-archive,
    html[lang="ja"] body.lang-ja .product-category-tag,
    html[lang="ja"] body.lang-ja .product-card-link,
    html[lang="ja-JP"] body.lang-ja .product-card-archive,
    html[lang="ja-JP"] body.lang-ja .product-category-tag,
    html[lang="ja-JP"] body.lang-ja .product-card-link,
    body.lang-ja .product-card-archive,
    body.lang-ja .product-category-tag,
    body.lang-ja .product-card-link {
        transition: none !important;
        transform: none !important;
    }
}

/* ============================================================================
   13. LOADING STATES - 加载状态
   ============================================================================ */

html[lang="ja"] body.lang-ja .product-card-archive.loading,
html[lang="ja-JP"] body.lang-ja .product-card-archive.loading,
body.lang-ja .product-card-archive.loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

/* ============================================================================
   14. EMPTY STATE - 空状态
   ============================================================================ */

html[lang="ja"] body.lang-ja .no-products-found,
html[lang="ja-JP"] body.lang-ja .no-products-found,
body.lang-ja .no-products-found {
    text-align: center !important;
    padding: 60px 20px !important;
    color: #666 !important;
}

html[lang="ja"] body.lang-ja .no-products-found .dashicons,
html[lang="ja-JP"] body.lang-ja .no-products-found .dashicons,
body.lang-ja .no-products-found .dashicons {
    font-size: 64px !important;
    color: #1e88e5 !important;
    opacity: 0.3 !important;
    margin-bottom: 20px !important;
}

/* ============================================================================
   15. FINAL OVERRIDE - 最终覆盖（最高优先级）
   ============================================================================ */

/* 使用最高优先级强制隐藏产品分类标签 - 放在文件末尾确保最后加载 */
html[lang="ja"] body.post-type-archive-product.lang-ja .product-image-wrapper > span.product-category-tag,
html[lang="ja-JP"] body.post-type-archive-product.lang-ja .product-image-wrapper > span.product-category-tag,
body.post-type-archive-product.lang-ja .product-image-wrapper > span.product-category-tag,
html[lang="ja"] body.lang-ja .product-card-archive .product-image-wrapper > span.product-category-tag,
html[lang="ja-JP"] body.lang-ja .product-card-archive .product-image-wrapper > span.product-category-tag,
body.lang-ja .product-card-archive .product-image-wrapper > span.product-category-tag,
html[lang="ja"] body.lang-ja .products-grid-archive .product-card-archive .product-image-wrapper span.product-category-tag,
html[lang="ja-JP"] body.lang-ja .products-grid-archive .product-card-archive .product-image-wrapper span.product-category-tag,
body.lang-ja .products-grid-archive .product-card-archive .product-image-wrapper span.product-category-tag {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    max-height: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

/* ============================================================================
   16. HIDE ALL ICONS IN PRODUCT CARDS - 隐藏产品卡片中的所有图标
   ============================================================================ */

/* 隐藏产品卡片标题中的所有图标和伪元素 */
html[lang="ja"] body.lang-ja .product-card-title::before,
html[lang="ja-JP"] body.lang-ja .product-card-title::before,
body.lang-ja .product-card-title::before,
html[lang="ja"] body.lang-ja .product-card-title::after,
html[lang="ja-JP"] body.lang-ja .product-card-title::after,
body.lang-ja .product-card-title::after,
html[lang="ja"] body.lang-ja .product-card-title .dashicons,
html[lang="ja-JP"] body.lang-ja .product-card-title .dashicons,
body.lang-ja .product-card-title .dashicons,
html[lang="ja"] body.lang-ja .product-card-title a::before,
html[lang="ja-JP"] body.lang-ja .product-card-title a::before,
body.lang-ja .product-card-title a::before,
html[lang="ja"] body.lang-ja .product-card-title a::after,
html[lang="ja-JP"] body.lang-ja .product-card-title a::after,
body.lang-ja .product-card-title a::after {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
}

/* 隐藏产品卡片内容区域的所有图标 */
html[lang="ja"] body.lang-ja .product-card-content .dashicons,
html[lang="ja-JP"] body.lang-ja .product-card-content .dashicons,
body.lang-ja .product-card-content .dashicons {
    display: none !important;
}

/* 只保留查看详情按钮中的图标 */
html[lang="ja"] body.lang-ja .product-card-link .dashicons,
html[lang="ja-JP"] body.lang-ja .product-card-link .dashicons,
body.lang-ja .product-card-link .dashicons {
    display: inline-flex !important;
}
