/*
 * shop-archive.css
 * 加盟店一覧ページ専用スタイルシート
 * archive-shop.php と合わせて使用
 *
 * カラートークン（shop-detail.css・イベントカードと統一）
 * #8b4513  primary（ブラウン）
 * #5c3317  primary-dark
 * #d4a373  accent（キャメル）
 * #f9f3ed  bg-warm
 * #e0d5c9  border
 */


/* ===================================
   1. ページヘッダー
   =================================== */
.shop-archive-header {
    background: linear-gradient(135deg, #5c3317 0%, #8b4513 50%, #d4a373 100%);
    padding: 4rem 0 3rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.shop-archive-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    margin: 0 0 0.5rem;
}

.shop-archive-title {
    font-size: 2.25rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 1rem;
    line-height: 1.2;
}

.shop-archive-lead {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}


/* ===================================
   2. 業態フィルター
   =================================== */
.shop-filter-wrap {
    margin-bottom: 2.5rem;
}

.shop-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    background: #ffffff;
    border: 2px solid #e0d5c9;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1;
}

.filter-btn:hover {
    border-color: #8b4513;
    color: #8b4513;
    background: #f9f3ed;
}

.filter-btn.is-active {
    background: #8b4513;
    border-color: #8b4513;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(139, 69, 19, 0.3);
}

/* フィルターアイコン（SVG） */
.filter-icon {
    display: inline-flex;
    align-items: center;
}

.filter-icon svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* カウントバッジ */
.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0 5px;
    line-height: 1;
}

.filter-btn.is-active .filter-count {
    background: rgba(255, 255, 255, 0.25);
}


/* ===================================
   3. カードグリッド
   =================================== */
.shop-archive-content {
    margin-bottom: 4rem;
}

.shop-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

/* フィルター：非表示 */
.shop-card.is-hidden {
    display: none;
}

/* 該当なし */
.shop-no-results {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-size: 1rem;
    border: 1px dashed #e0d5c9;
    border-radius: 8px;
    background: #f9f3ed;
}


/* ===================================
   4. 店舗カード
   =================================== */
.shop-card {
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e0d5c9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 69, 19, 0.15);
    border-color: #d4a373;
}

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

.shop-card-link:hover {
    text-decoration: none;
    color: inherit;
}


/* ===================================
   5. カード上部ビジュアル
   =================================== */
.shop-card-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f9f3ed;
    flex-shrink: 0;
}

/* アイキャッチ画像あり */
.shop-card-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.shop-card:hover .shop-card-thumbnail {
    transform: scale(1.05);
}

.shop-card-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(44, 28, 14, 0.35) 100%
    );
}

/* アイキャッチ画像なし → SVGイラスト */
.shop-card-illust-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff8f2 0%, #f9f0e6 100%);
}

.shop-card-illust {
    width: 100px;
    height: 100px;
    display: block;
    opacity: 0.85;
}

/* 業態バッジ（左上） */
.shop-card-badges {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    z-index: 1;
}

.shop-card-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 20px;
    border: 1.5px solid transparent;
}

/* 業態別バッジカラー（shop-detail.css と統一） */
.shop-card-badge.business-type-yogashi {
    background: rgba(255, 240, 230, 0.92);
    color: #8b4513;
    border-color: #d4a373;
}
.shop-card-badge.business-type-wagashi {
    background: rgba(240, 245, 237, 0.92);
    color: #4a7c59;
    border-color: #88b09a;
}
.shop-card-badge.business-type-pan {
    background: rgba(255, 251, 230, 0.92);
    color: #7a6000;
    border-color: #c9a227;
}
.shop-card-badge.business-type-cafe {
    background: rgba(253, 240, 238, 0.92);
    color: #9e3a26;
    border-color: #cc7060;
}
.shop-card-badge.business-type-default {
    background: rgba(240, 240, 240, 0.92);
    color: #555;
    border-color: #ccc;
}


/* ===================================
   6. カードボディ
   =================================== */
.shop-card-body {
    flex: 1;
    padding: 1.25rem 1.25rem 0.75rem;
}

.shop-card-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 0.85rem;
    line-height: 1.4;
}

/* メタ情報 */
.shop-card-meta {
    margin: 0 0 0.85rem;
    padding: 0;
}

.shop-card-meta-row {
    display: grid;
    grid-template-columns: 1.25rem 1fr;
    gap: 0 0.5rem;
    margin-bottom: 0.35rem;
    align-items: start;
}

.shop-card-meta-icon {
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
}

.shop-card-meta-text {
    font-size: 0.82rem;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
    /* 長い住所は1行に収める */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* NSB参加商品タグ */
.shop-card-nsb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.shop-card-nsb-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #f9f3ed;
    border: 1px solid #e0d5c9;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #8b4513;
    line-height: 1.4;
}

.shop-card-nsb-more {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    background: #e0d5c9;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6c757d;
}


/* ===================================
   7. カードフッター
   =================================== */
.shop-card-footer {
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid #f0ebe4;
    margin-top: auto;
}

.shop-card-cta {
    font-size: 0.85rem;
    font-weight: 700;
    color: #8b4513;
    transition: color 0.2s ease;
}

.shop-card:hover .shop-card-cta {
    color: #5c3317;
}


/* ===================================
   8. 下部CTA
   =================================== */
.shop-archive-cta {
    margin-bottom: 4rem;
}

.shop-archive-cta-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #8b4513 0%, #d4a373 100%);
    border-radius: 12px;
    text-align: center;
}

.shop-archive-cta-text {
    width: 100%;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.btn-to-events-archive {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    background: #ffffff;
    color: #8b4513;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-to-events-archive:hover {
    background: #fff8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #5c3317;
    text-decoration: none;
}


/* ===================================
   9. サイドバー非表示
   =================================== */
.post-type-archive-shop #sidebar,
.post-type-archive-shop .sidebar {
    display: none !important;
}

.post-type-archive-shop #main,
.post-type-archive-shop .main {
    width: 100% !important;
    max-width: 100% !important;
}


/* ===================================
   10. パンくずリスト
       shop-detail.css と同一の設計。
       一覧ページ（archive-shop.php）でも同じ
       .shop-breadcrumb クラスを使用するため、
       このファイルにも同内容を記載しています。
   =================================== */
.shop-breadcrumb {
    padding: 0.75rem 1.5rem;
    margin-bottom: 0;
}

/* 独自実装（フォールバック）のスタイル */
.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.82rem;
    color: #6c757d;
}

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

.breadcrumb-link {
    color: #8b4513;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #5c3317;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #e0d5c9;
    font-size: 0.9rem;
    user-select: none;
}

.breadcrumb-current {
    color: #6c757d;
    font-weight: 600;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cocoon のパンくずが出力される場合の上書き調整 */
.shop-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.82rem;
}


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

/* タブレット（〜1024px） */
@media (max-width: 1024px) {
    .shop-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* スマートフォン（〜640px） */
@media (max-width: 640px) {

    .shop-archive-header {
        padding: 2.5rem 0 2rem;
    }

    .shop-archive-title {
        font-size: 1.6rem;
    }

    .shop-filter-buttons {
        gap: 0.4rem;
    }

    .filter-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.82rem;
    }

    .shop-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .shop-card-visual {
        aspect-ratio: 16 / 9;
    }

    .shop-archive-cta-inner {
        padding: 2rem 1.5rem;
    }

    .btn-to-events-archive {
        width: 100%;
        text-align: center;
    }
}