/**
 * Archive Purchase Styles V3
 * 買取実績アーカイブページ専用CSS
 * Design: New Site V2準拠（モノクロベース + ベージュ差し色）
 * 修正: 型番表示追加、タグを長方形に変更、抜粋テキスト追加、READMOREボタン追加
 */

/* ========================================
   基本設定
======================================== */
.ap-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 120px;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #2c2c2c;
    font-weight: 400;
}

/* ========================================
   ページヘッダー
======================================== */
.ap-archive-header {
    text-align: center;
    margin-bottom: 60px;
}

.ap-archive-title {
    font-size: 36px;
    font-weight: 400;
    color: #2c2c2c;
    margin: 0 0 16px 0;
    letter-spacing: 0.05em;
}

.ap-archive-description {
    font-size: 16px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* ========================================
   検索エリア
======================================== */
.ap-search-area {
    background: #f8f5f0;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 60px;
}

.ap-search-form {
    max-width: 800px;
    margin: 0 auto;
}

.ap-search-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.ap-search-input {
    width: 100%;
    padding: 16px 56px 16px 20px;
    border: 1px solid #d0d0d0;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s ease;
    background: white;
}

.ap-search-input:focus {
    outline: none;
    border-color: #2d5016;
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.ap-search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #2d5016;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ap-search-button:hover {
    background: #1f3810;
    transform: translateY(-50%) scale(1.05);
}

/* 絞り込み表示エリア */
.ap-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.ap-filter-label {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.ap-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #2d5016;
    color: white;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 400;
}

.ap-filter-remove {
    color: white;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
    transition: opacity 0.2s;
}

.ap-filter-remove:hover {
    opacity: 0.7;
}

.ap-filter-clear {
    margin-left: auto;
    padding: 6px 16px;
    background: white;
    color: #2d5016;
    border: 1px solid #2d5016;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 400;
}

.ap-filter-clear:hover {
    background: #2d5016;
    color: white;
}

/* ========================================
   実績一覧
======================================== */
.ap-results-container {
    position: relative;
}

.ap-results-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    font-weight: 400;
}

/* グリッドレイアウト */
.ap-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

/* ========================================
   実績カード
======================================== */
.ap-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
}

.ap-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #2d5016;
}

.ap-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* カード画像 */
.ap-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.ap-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.ap-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ccc;
}

/* カードコンテンツ */
.ap-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* メタ情報（タグ） - 長方形に変更 */
.ap-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.ap-tag {
    display: inline-block;
    padding: 5px 12px;
    font-size: 11px;
    border-radius: 4px; /* 楕円から長方形に変更 */
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 400;
}

.ap-tag-category {
    background: #f0f0f0;
    color: #2c2c2c;
    border: 1px solid #d0d0d0;
}

.ap-tag-category:hover {
    background: #e0e0e0;
    border-color: #c0c0c0;
}

/* ブランドタグ：黒背景・白文字・長方形 */
.ap-tag-brand {
    background: #2c2c2c;
    color: white;
    border: 1px solid #2c2c2c;
}

.ap-tag-brand:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.ap-card-title {
    font-size: 15px;
    font-weight: 500;
    color: #2c2c2c;
    margin: 0 0 8px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 型番表示 */
.ap-card-model {
    font-size: 12px;
    color: #999;
    margin: 0 0 12px 0;
    font-weight: 400;
}

/* 抜粋テキスト */
.ap-card-excerpt {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* READMOREボタン */
.ap-card-readmore {
    display: inline-block;
    padding: 8px 20px;
    background: transparent;
    color: #2d5016;
    border: 1px solid #2d5016;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-top: auto;
    align-self: flex-start;
}

.ap-card:hover .ap-card-readmore {
    background: #2d5016;
    color: white;
}

/* ========================================
   検索結果なし
======================================== */
.ap-no-results {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.ap-no-results svg {
    color: #ccc;
    margin-bottom: 24px;
}

.ap-no-results-text {
    font-size: 16px;
    margin: 0 0 24px 0;
    font-weight: 400;
}

.ap-btn-reset {
    display: inline-block;
    padding: 12px 32px;
    background: #2d5016;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 400;
}

.ap-btn-reset:hover {
    background: #1f3810;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
}

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

.ap-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ap-pagination .page-numbers li {
    list-style: none;
}

.ap-pagination .page-numbers a,
.ap-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #2c2c2c;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 400;
}

.ap-pagination .page-numbers a:hover {
    background: #f8f5f0;
    border-color: #2d5016;
    color: #2d5016;
}

.ap-pagination .page-numbers .current {
    background: #2d5016;
    color: white;
    border-color: #2d5016;
    font-weight: 400;
}

/* ========================================
   レスポンシブ対応
======================================== */

/* タブレット（768px〜1023px） */
@media (max-width: 1023px) {
    .ap-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .ap-archive-container {
        padding: 60px 20px 80px;
    }
    
    .ap-archive-title {
        font-size: 32px;
    }
}

/* スマートフォン（767px以下） */
@media (max-width: 767px) {
    .ap-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .ap-archive-container {
        padding: 40px 16px 60px;
    }
    
    .ap-archive-title {
        font-size: 28px;
    }
    
    .ap-archive-description {
        font-size: 14px;
    }
    
    .ap-search-area {
        padding: 24px 16px;
    }
    
    .ap-active-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .ap-filter-clear {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
    
    .ap-card-title {
        font-size: 14px;
    }
    
    .ap-pagination .page-numbers a,
    .ap-pagination .page-numbers span {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* 小型スマートフォン（480px以下） */
@media (max-width: 480px) {
    .ap-archive-title {
        font-size: 24px;
    }
    
    .ap-search-input {
        font-size: 14px;
        padding: 14px 50px 14px 16px;
    }
    
    .ap-search-button {
        width: 36px;
        height: 36px;
    }
    
    .ap-card-content {
        padding: 12px;
    }
}