/**
 * 店舗一覧ページ用CSS
 * archive.css
 * 
 * 共通パーツ（page-header, breadcrumb, pagination）は common.css を参照
 */

/* ============================================
   アーカイブページレイアウト
   ============================================ */
.archive-page {
    padding: 40px 0 80px;
}

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

.archive-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* ============================================
   サイドバー：検索フィルター
   ============================================ */
.archive-sidebar {
    align-self: start;
}

.search-filters {
    border: 1px solid var(--color-border);
}

.filter-section {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.filter-section:last-of-type {
    border-bottom: none;
}

.filter-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-number {
    font-family: var(--font-en);
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: 0.05em;
}

.filter-title {
    font-family: var(--font-en);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 0;
}

.filter-group {
    margin-bottom: 0;
}

.filter-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    font-size: 14px;
    font-family: var(--font-jp);
    background: var(--color-white);
    transition: border-color 0.2s;
}

.filter-input:focus {
    outline: none;
    border-color: var(--color-text);
}

.filter-input::placeholder {
    color: var(--color-text-light);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--color-white);
}

.filter-chip:hover {
    background: var(--color-bg);
}

.filter-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-chip:has(input:checked) {
    background: var(--color-text);
    color: var(--color-white);
    border-color: var(--color-text);
}

/* チェック時のスタイル（:has非対応ブラウザ用フォールバック） */
.filter-chip input:checked + span,
.filter-chip.checked {
    background: var(--color-text);
    color: var(--color-white);
}

.filter-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    background: var(--color-text);
    color: var(--color-white);
    border: 1px solid var(--color-text);
    font-family: var(--font-jp);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.filter-submit:hover {
    opacity: 0.8;
}

.filter-submit .btn-arrow {
    font-family: var(--font-en);
    transition: transform 0.2s;
}

.filter-submit:hover .btn-arrow {
    transform: translateX(3px);
}

/* ============================================
   メインエリア
   ============================================ */
.archive-main {
    min-width: 0;
}

.archive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.archive-count {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.count-label {
    font-family: var(--font-en);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
}

.count-number {
    font-family: var(--font-en);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.count-unit {
    font-size: 12px;
    color: var(--color-text-light);
}

.sort-select {
    padding: 8px 30px 8px 12px;
    border: 1px solid var(--color-border);
    font-size: 13px;
    font-family: var(--font-jp);
    background: var(--color-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E") no-repeat right 10px center;
    cursor: pointer;
    appearance: none;
    color: #000;
}

.sort-select:focus {
    outline: none;
    border-color: var(--color-text);
}

/* ============================================
   店舗カード（横型）
   ============================================ */
.shop-list {
    display: flex;
    flex-direction: column;
}

.shop-card-h {
    border: 1px solid var(--color-border);
    background: var(--color-white);
    transition: box-shadow 0.2s;
    margin-bottom: 20px;
}

.shop-card-h:last-child {
    border-bottom: 1px solid var(--color-border);
}

.shop-card-h:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.shop-card-h-main {
    display: grid;
    grid-template-columns: 260px 1fr auto;
    gap: 0;
    padding: 20px;
    align-items: center;
}

/* 画像エリア - 上1枚・下2枚レイアウト */
.shop-card-h-images {
    position: relative;
    display: flex;
    flex-direction: column;
}

.shop-card-h-image-main {
    display: block;
    aspect-ratio: 16 / 13;
    overflow: hidden;
}

.shop-card-h-image-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.shop-card-h:hover .shop-card-h-image-main img {
    transform: scale(1.05);
}

.shop-card-h-image-subs {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.shop-card-h-image-sub {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.shop-card-h-image-sub img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.shop-card-h:hover .shop-card-h-image-sub img {
    transform: scale(1.05);
}

/* アクションボタン（画像右上に配置） */
.shop-card-h-actions-top {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.shop-card-h-actions-top .action-btn {
    width: 33px;
    height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 100%;
}

.shop-card-h-actions-top .action-btn:hover {
    background: var(--color-white);
    transform: scale(1.05);
}

.shop-card-h-actions-top .action-btn svg {
    width: 16px;
    height: 16px;
}

.shop-card-h-actions-top .action-favorite:hover svg,
.shop-card-h-actions-top .action-favorite.active svg {
    fill: #e53935;
    stroke: #e53935;
}

/* コンテンツ */
.shop-card-h-content {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shop-card-h-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-card-h-category {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid var(--color-border);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.shop-card-h-new {
    display: inline-block;
    padding: 3px 8px;
    background: var(--color-text);
    color: var(--color-white);
    font-family: var(--font-en);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.shop-card-h-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

.shop-card-h-name a {
    color: var(--color-text);
    text-decoration: none;
}

.shop-card-h-name a:hover {
    text-decoration: underline;
}

.shop-card-h-location {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12px;
    color: var(--color-text-light);
}

.location-icon {
    display: flex;
    align-items: center;
    color: var(--color-text-light);
    margin-right: 2px;
}

.location-icon svg {
    width: 14px;
    height: 14px;
}

.location-area {
    font-weight: 500;
    color: var(--color-text);
}

.location-access {
    font-size: 12px;
    color: var(--color-text-light);
}

.shop-card-h-catch {
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 評価・統計 */
.shop-card-h-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
}

.stats-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stats-rating .stars {
    color: #f5a623;
    font-size: 11px;
    letter-spacing: -1px;
}

.stats-rating .score {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 14px;
}

.stats-counts {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-light);
}

.stats-counts .count-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.stats-counts svg {
    opacity: 0.7;
}

.stats-budget {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-budget .budget-item {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--color-text-light);
}

.stats-budget svg {
    opacity: 0.7;
}

/* 特徴タグ */
.shop-card-h-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.shop-card-h-features .feature-tag {
    padding: 3px 8px;
    background: var(--color-bg);
    font-size: 10px;
    border-radius: 2px;
}

/* クーポン */
.shop-card-h-coupon {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    background: #fffde7;
    border: 1px dashed #f5a623;
    margin-top: 5px;
}

.shop-card-h-coupon .coupon-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #f5a623;
    color: var(--color-white);
    font-size: 10px;
    font-weight: 700;
}

.shop-card-h-coupon .coupon-badge svg {
    width: 10px;
    height: 10px;
}

.shop-card-h-coupon .coupon-title {
    font-size: 12px;
    font-weight: 500;
}

.shop-card-h-coupon .coupon-discount {
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 700;
    color: #e53935;
}

.shop-card-h-coupon .coupon-deadline {
    font-size: 10px;
    color: var(--color-text-light);
}

/* 旧アクションボタン（右端）- 非表示 */
.shop-card-h-actions {
    display: none;
}

/* ============================================
   ページネーション
   ============================================ */
/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 968px) {
    .archive-layout {
        grid-template-columns: 1fr;
        gap: 0px;
    }


    .search-filters {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-section:nth-child(1) {
        grid-column: 1 / -1;
    }

    .filter-submit {
        grid-column: 1 / -1;
    }
}

/* ============================================
   検索モーダル（PC: 非表示）
   ============================================ */
.search-modal-trigger {
    display: none;
}

.search-modal-overlay {
    display: none;
}

.search-modal-header {
    display: none;
}

/* ============================================
   レスポンシブ（768px以下）
   ============================================ */
@media (max-width: 768px) {
    .archive-page {
        padding: 25px 0 60px;
    }

    .archive-page .container {
        padding: 0 15px;
    }

    /* 検索モーダルトリガー */
    .search-modal-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 15px 20px;
        background: var(--color-white);
        border: 1px solid var(--color-border);
        font-family: var(--font-jp);
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        margin-bottom: 20px;
        transition: all 0.2s;
        color: #000;
    }

    .search-modal-trigger:hover {
        background: var(--color-text);
        color: var(--color-white);
    }

    .search-modal-trigger .trigger-arrow {
        margin-left: auto;
    }

    /* モーダルオーバーレイ */
    .search-modal-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    body.search-modal-open .search-modal-overlay {
        display: block;
    }

    /* サイドバーをモーダル化 */
    .archive-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 400px;
        height: 100vh;
        background: var(--color-white);
        z-index: 1000;
        overflow-y: auto;
        transition: right 0.3s ease;
        display: flex;
        flex-direction: column;
    }

    body.search-modal-open .archive-sidebar {
        right: 0;
    }

    /* モーダルヘッダー */
    .search-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        border-bottom: 1px solid var(--color-border);
        background: var(--color-white);
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .modal-title {
        font-family: var(--font-jp);
        font-size: 16px;
        font-weight: 700;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-close:hover {
        opacity: 0.6;
    }

    /* 検索フォーム調整 */
    .search-filters {
        grid-template-columns: 1fr;
        flex: 1;
        overflow-y: auto;
    }

    .filter-section {
        padding: 15px;
    }

    .filter-submit {
        position: sticky;
        bottom: 0;
        margin: 0;
        border-radius: 0;
    }

    .archive-header {
        align-items: center;
        gap: 15px;
    }

    .count-number {
        font-size: 24px;
    }

    /* 店舗カード（モバイル） */
    .shop-card-h-main {
        grid-template-columns: 1fr;
    }

    .shop-card-h {
        border-bottom: 1px solid var(--color-border);
        margin-bottom: 20px;
    }

    .shop-card-h-images {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .shop-card-h-image-main {
        aspect-ratio: 16 / 13;
    }

    .shop-card-h-image-subs {
        grid-template-columns: 1fr 1fr;
    }

    .shop-card-h-image-sub:first-child {
        border-right: 1px solid var(--color-border);
    }

    .shop-card-h-content {
        padding: 20px 0 0;
    }

    .shop-card-h-name {
        font-size: 16px;
    }

    .shop-card-h-stats {
        gap: 10px;
    }

    /* モバイル用アクションボタン */
    .shop-card-h-actions-top .action-btn {
        width: 32px;
        height: 32px;
    }

    .shop-card-h-actions-top .action-btn svg {
        width: 14px;
        height: 14px;
    }

    /* ページネーション（モバイル） */
}
