/* 
 * 加工実績ページ専用スタイル
 * ファイル: page-product.css
 * 対象: page-templates/page-product.php
 */

/* ==========================================================================
   ページヘッダー
   ========================================================================== */
/* 確実に適用されるよう具体的なセレクタを使用 */
body.page-template-page-product .page-header-section {
    background: #f8f9fa !important;
    padding: 80px 0 40px !important;
    border-bottom: 1px solid #e9ecef !important;
}

/* WordPressのbodyクラスを使用してpage-header.cssより優先度を上げる */
body.page-template-page-product .page-header-content {
    /* page-header.cssのスタイルをリセット */
    position: static !important;
    z-index: auto !important;
    max-width: 100% !important;
    padding: 0 !important;
    
    /* 独自のスタイルを適用 */
    text-align: center !important;
    margin: 0 auto 30px auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

body.page-template-page-product .page-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin: 0 0 16px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    width: 100% !important;
    text-shadow: none !important;
    letter-spacing: normal !important;
}

body.page-template-page-product .page-subtitle {
    font-size: 1.1rem !important;
    color: #6c757d !important;
    margin: 0 !important;
    line-height: 1.6 !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 600px !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}

/* パンくずナビゲーション */
.page-breadcrumb {
    background: #ffffff;
    padding: 16px 0;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.page-breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.breadcrumb {
    font-size: 14px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: ">";
    margin-left: 8px;
    color: #6c757d;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #0056b3;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* ==========================================================================
   フィルターセクション
   ========================================================================== */
.filter-section {
    background: white;
    padding: 30px 0;
    border-bottom: 1px solid #e9ecef;
}

.filter-controls {
    display: flex;
    justify-content: center;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

/* ==========================================================================
   製品グリッド
   ========================================================================== */
.products-grid-section {
    background: white;
    padding: 40px 0 60px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f3f4;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    color: #adb5bd;
}

.no-image-placeholder i {
    font-size: 2rem;
    margin-bottom: 8px;
}

.no-image-placeholder span {
    font-size: 12px;
    font-weight: 500;
}

.product-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-specs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.spec-label {
    color: #6c757d;
    font-weight: 500;
}

.spec-value {
    color: #2c3e50;
    font-weight: 600;
}

/* ==========================================================================
   ページネーション
   ========================================================================== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination-wrapper .page-numbers {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.pagination-wrapper .page-numbers li {
    display: flex;
}

.pagination-wrapper .page-numbers a,
.pagination-wrapper .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    border: 1px solid #e9ecef;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-wrapper .page-numbers a:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

.pagination-wrapper .page-numbers .current {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

.pagination-wrapper .page-numbers .dots {
    background: transparent;
    border: none;
    color: #6c757d;
}

/* ==========================================================================
   No Works Message
   ========================================================================== */
.no-works-message {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    text-align: center;
}

.no-works-content {
    max-width: 400px;
}

.no-works-content i {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 20px;
}

.no-works-content h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0 0 12px;
    font-weight: 600;
}

.no-works-content p {
    color: #6c757d;
    margin: 0 0 24px;
    line-height: 1.6;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e74c3c;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-contact:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* ==========================================================================
   CTAセクション
   ========================================================================== */
/* CTAセクションのスタイルはstyle.cssで統一管理 */

/* ==========================================================================
   レスポンシブ対応
   ========================================================================== */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    body.page-template-page-product .page-title {
        font-size: 2rem !important;
    }
}

@media (max-width: 768px) {
    body.page-template-page-product .page-header-section {
        padding: 60px 0 30px !important;
    }
    
    body.page-template-page-product .page-title {
        font-size: 1.8rem !important;
    }
    
    body.page-template-page-product .page-subtitle {
        font-size: 1rem !important;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body.page-template-page-product .page-header-section {
        padding: 40px 0 20px !important;
    }
    
    .products-grid-section {
        padding: 30px 0 40px;
    }
    
    .product-info {
        padding: 16px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .filter-section {
        padding: 20px 0;
    }
    
    .pagination-wrapper .page-numbers a,
    .pagination-wrapper .page-numbers span {
        min-width: 35px;
        height: 35px;
        font-size: 13px;
    }
}

/* フィルター用アニメーション（JavaScriptで制御） */
.product-card.hidden {
    display: none;
}

.product-card.show {
    display: block;
    animation: fadeInUp 0.3s ease forwards;
}

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