/* =========================================
   archive-town.css
   店舗（town）アーカイブ・フィルター結果ページ
   style.css の変数・共通クラスを継承して使用
   ========================================= */
/* ------------------------------------------
   1. ページヘッダー
   既存の .page-header を継承しつつ town 専用装飾
------------------------------------------ */
.page-header {
    padding: 50px 0 40px;
    background-color: var(--osumi-bg);
    border-bottom: 4px solid var(--osumi-orange);
    text-align: center;
    margin-bottom: 0; /* レイアウトとの間隔は town-archive-layout で管理 */
}

/* 絞り込み条件バッジ（ヘッダー内） */
.archive-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 0.92rem;
    color: var(--osumi-navy);
    font-weight: 700;
}

/* 条件クリアリンク */
.filter-clear-link {
    font-size: 0.82rem;
    color: var(--color-sub);
    font-weight: 400;
    border-bottom: 1px solid currentColor;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.filter-clear-link:hover {
    color: var(--accent-red);
    opacity: 1; /* 既存の a:hover opacity を上書き */
}

@media (max-width: 768px) {
    .page-header {
        padding: 36px 0 28px;
    }
    .archive-filter-badge {
        flex-direction: column;
        gap: 6px;
        border-radius: 8px;
        text-align: center;
    }
}

/* ------------------------------------------
   2. メインレイアウト（2カラム）
   既存の .post-layout-wrapper と同構造
------------------------------------------ */
.town-archive-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    padding: 40px 0 80px;
}

/* メインエリア */
.town-archive-main {
    flex: 1;
    min-width: 0; /* グリッドのはみ出し防止 */
}

/* サイドバー */
.town-archive-sidebar {
    width: 300px;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .town-archive-layout {
        flex-direction: column;
        padding: 30px 0 60px;
    }
    .town-archive-sidebar {
        width: 100%;
    }
}

/* ------------------------------------------
   3. 件数表示
------------------------------------------ */
.archive-result-count {
    font-size: 0.9rem;
    color: var(--color-sub);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
}

.archive-result-count strong {
    color: var(--osumi-navy);
    font-size: 1.1rem;
}

/* ------------------------------------------
   4. カードグリッド
   既存の .archive-grid・.news-card を継承
------------------------------------------ */
.town-archive-main .archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}

@media (max-width: 768px) {
    .town-archive-main .archive-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ------------------------------------------
   5. ページネーション
   既存の .pagination を継承
------------------------------------------ */
.town-archive-main .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 4px;
    border: 1px solid #e2e8f0;
    color: var(--osumi-navy);
    border-radius: 4px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.town-archive-main .page-numbers.current,
.town-archive-main .page-numbers:hover {
    background-color: var(--osumi-navy);
    color: #fff;
    border-color: var(--osumi-navy);
    opacity: 1;
}

.town-archive-main nav.pagination,
.town-archive-main .pagination {
    margin-top: 50px;
    text-align: center;
}

/* ------------------------------------------
   6. 該当なし表示
------------------------------------------ */
.no-results-box {
    text-align: center;
    padding: 70px 40px;
    background: #fff;
    border: 1px dashed #d0d7de;
    border-radius: 12px;
}

.no-results-icon {
    font-size: 3.5rem;
    margin-bottom: 18px;
    opacity: 0.45;
    line-height: 1;
}

.no-results-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--osumi-navy);
    margin-bottom: 18px;
}

/* 検索条件の表示 */
.no-results-condition {
    display: inline-block;
    font-size: 0.92rem;
    color: var(--color-sub);
    background: var(--bg-light-gray);
    padding: 10px 24px;
    border-radius: 4px;
    margin-bottom: 18px;
    line-height: 1.7;
}

.no-results-condition strong {
    color: var(--osumi-navy);
}

.no-results-text {
    font-size: 0.95rem;
    color: var(--color-sub);
    line-height: 1.9;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .no-results-box {
        padding: 50px 20px;
    }
    .no-results-title {
        font-size: 1.2rem;
    }
}

/* ------------------------------------------
   7. サイドバー：フィルターウィジェット
   既存の .widget・.widget-title を継承
------------------------------------------ */
.town-archive-sidebar .widget.town-filter-widget {
    background: #fff;
    border: 1px solid #eee;
    border-top: 4px solid var(--osumi-navy); /* トップにアクセントライン */
    padding: 24px 20px;
    border-radius: 4px;
    position: sticky;
    top: 80px; /* ヘッダー高さ分オフセット */
}

/* フィルターアイテム */
.town-archive-sidebar .filter-item {
    margin-bottom: 18px;
}

.town-archive-sidebar .filter-item label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-sub);
    margin-bottom: 6px;
    letter-spacing: 0.03em;
}

/* wp_dropdown_categories が出力する <select> */
.town-archive-sidebar .filter-item select {
    width: 100%;
    padding: 10px 36px 10px 12px; /* 右側に矢印アイコン分の余白 */
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 0.92rem;
    color: var(--osumi-text);
    background-color: #fff;
    /* カスタム矢印アイコン */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231A365D' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.town-archive-sidebar .filter-item select:focus {
    outline: none;
    border-color: var(--osumi-navy);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* 検索ボタン（既存の .btn-primary と同スタイル） */
.town-archive-sidebar .lp-search-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: var(--osumi-navy);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-top: 4px;
}

.town-archive-sidebar .lp-search-btn:hover {
    background-color: #397cbe;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

/* SP時は sticky を解除 */
@media (max-width: 1024px) {
    .town-archive-sidebar .widget.town-filter-widget {
        position: static;
    }
}