@charset "UTF-8";
/*
 * ファイル名: camper-compare.css
 * 更新日: 2026-01-13 (アコーディオンUI対応版)
 */

/* =========================================
   共通・ラッパー
   ========================================= */
.camper-compare-wrapper {
    width: 100%;
    margin: 0 auto;
}

/* =========================================
   絞り込みエリア
   ========================================= */
.filter-area {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    border-radius: 5px;
}
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.filter-label {
    font-weight: bold;
    color: #333;
	font-size: 16px;
}
.filter-reset-btn {
    background: none;
    border: 1px solid #ccc;
    font-size: 12px;
    padding: 3px 8px;
    cursor: pointer;
    border-radius: 4px;
    color: #666;
}
.filter-reset-btn:hover { background: #f0f0f0; }

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-btn {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.filter-btn:hover { background: #f9f9f9; border-color: #aaa; }
.filter-btn.active {
    background: #0056b3;
    color: #fff;
    border-color: #0056b3;
    font-weight: bold;
}

/* =========================================
   リスト表示エリア（選択画面）
   ========================================= */

.compare-tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}
.compare-tab {
    padding: 10px 20px;
    border: none;
    background: #f4f4f4;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px !important;
    color: #666;
}
.compare-tab.active { 
    background: #333; 
    color: #fff; 
}



.compare-list { display: none; }
.compare-list.active { display: block; }
.compare-header-row {
    display: flex;
    background: #eee;
    padding: 10px;
    font-weight: bold;
    font-size: 14px;
}
.compare-item-row {
    display: flex;
    border-bottom: 1px solid #ddd;
    padding: 10px;
    align-items: center;
    transition: background 0.2s;
}
.compare-item-row:hover { background: #f9f9f9; }

.model-base-name { font-size: 17px; font-weight: bold; color: #333; display: block; }
.var-name { font-size: 16px; font-weight: bold; color: #0056b3; margin-top: 3px; }
.builder-name { font-size: 14px; color: #666; margin-top: 2px; }
.col-check { width: 50px; text-align: center; }
.col-img { width: 100px; padding: 0 10px; }
.col-img img { width: 100%; height: auto; border-radius: 4px; }
.col-name { flex: 2; padding: 0 10px; }
.col-price { width: 140px; text-align: right;font-size: 17px;  font-weight: bold; color: #ff5722; }
.col-spec { width: 120px; text-align: center; font-size: 14px; }
.col-size { flex: 1.5; text-align: center;font-size: 16px; }
.col-base { width: 150px; font-size: 14px; }
.price-val { font-size: 17px;  font-weight: bold; color: #ff5722;}
.model-link { text-decoration: none; color: inherit; display: block; margin-bottom: 2px; }

/* =========================================
   フローティングバー
   ========================================= */
.compare-floating-bar {
    position: fixed; bottom: -100px; left: 0; width: 100%;
    background: rgba(0,0,0,0.9); color: #fff; 
	box-sizing: border-box;
	padding: 15px 60px 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
    transition: bottom 0.3s; z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}
.compare-floating-bar.active { bottom: 0; }
.btn-compare-exec {
    background: #0056b3; color: #fff; border: none; padding: 10px 25px;
    font-size: 16px; font-weight: bold; border-radius: 4px; cursor: pointer;
}
.btn-compare-exec:disabled { background: #555; cursor: not-allowed; opacity: 0.7; }
.selected-names { font-size: 15px; color: #ccc; margin-left: 10px; }
#clear-compare-btn {
    padding: 4px 20px; /* 上下10px、左右40px */
 font-size: 16px;
}


/* =========================================
   比較表（AJAX生成部分）
   ========================================= */
.comp-main-title {
    text-align: center !important; margin-bottom: 20px; border-bottom: 3px solid #ff5722 !important;
   display: inline-block;
 /*text-indent: 20px;*/
	padding: 10px 20px !important; color: #fff; background:#333;font-size: 17px !important; font-weight: bold;
}
.table-scroll-container {
    overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 30px;
}
.multi-compare-table {
    width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 600px;
}
.multi-compare-table th, .multi-compare-table td {
    border: 1px solid #ddd; vertical-align: middle; word-wrap: break-word;
}
.multi-compare-table th { background: #f9f9f9; text-align: center; vertical-align: top; padding: 10px; }
.multi-compare-table td:not(.cell-img) { padding: 10px; }
.multi-compare-table td.cell-img { padding: 0; }

/* ヘッダー */
.label-col { width: 120px; font-weight: bold; background: #f4f4f4; color: #555; font-size: 15px; }
.data-col { text-align: center; background: #fff; }
.model-col { min-width: 180px; }
.comp-model-name { font-size: 16px; font-weight: bold; color: #333; display: block; margin-bottom: 2px; }
.comp-var-name { font-size: 15px; font-weight: bold; color: #0056b3; display: block; margin-bottom: 2px; }
.comp-builder { font-size: 14px; color: #888; }
.price-text { color: #ff5722; font-weight: bold !important; font-size: 17px !important; }
.badge-drive { display: inline-block; background: #eee; padding: 2px 6px; font-size: 14px; border-radius: 4px; margin-top: 4px; color:#555; }

/* リンクボタン群 */
.comp-btn-group {
    display: flex; justify-content: center; gap: 5px; margin-top: 5px; flex-wrap: wrap;
}
.comp-btn-link {
    display: inline-block; padding: 4px 10px; font-size: 14px; border-radius: 4px;
    text-decoration: none; color: #fff; background: #6c757d; transition: opacity 0.2s;
}
.comp-btn-link.official { background: #17a2b8; } /* 水色 */
.comp-btn-link.detail { background: #0056b3; }   /* 青 */
.comp-btn-link:hover { opacity: 0.8; color: #fff; }

/* --- アコーディオン (開閉エリア) --- */
.accordion-section {
    border: 1px solid #ddd; margin-top: -1px; /* 重なり防止 */
}
.accordion-header {
    background: #e9ecef; padding: 15px; cursor: pointer; font-weight: bold; color: #333;font-size:16px;
    display: flex; justify-content: space-between; align-items: center; transition: background 0.2s;
}
.accordion-header:hover { background: #dde2e6; }
.accordion-header::after {
    content: "▼"; font-size: 15px; transition: transform 0.3s;
}
.accordion-header.active::after {
    transform: rotate(180deg);
}
.accordion-content {
    display: none; /* 初期状態は非表示 */
    padding: 0; background: #fff; animation: slideDown 0.3s ease-out;
}
.accordion-content.open { display: block; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* サブ見出し（アコーディオン内の区切り） */
.sub-header-row td {
    background: #f0f8ff; font-weight: bold; text-align: left; padding-left: 15px; color: #003366;
}

/* --- 安全装備タグ --- */
.safety-tag {
    display: inline-block; background: #e8f5e9; color: #2e7d32;
    padding: 2px 6px; border-radius: 4px; font-size: 0.8em;
    margin: 2px; border: 1px solid #c8e6c9;
}

/* Swiper */
.swiper.mySwiper { width: 100%; height: 100%; padding-bottom: 30px; }
.swiper-slide { text-align: center; font-size: 18px; background: #fff; display: flex; justify-content: center; align-items: center; }
.swiper-slide img { display: block; width: 100%; height: auto; aspect-ratio: 16/10; object-fit: contain; }
.swiper-pagination-bullet-active { background: #0056b3; }

/* Lightbox モーダル */
.camp-lb-modal { display: none; position: fixed; z-index: 99999; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); }
.camp-lb-content { margin: auto; display: block; width: 80%; max-width: 900px; max-height: 85vh; object-fit: contain; animation-name: zoom; animation-duration: 0.3s; }
.camp-lb-close { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; }
@keyframes zoom { from {transform:scale(0)} to {transform:scale(1)} }


.comp-icon-circle {
    color:#ff5722; font-size:15px; line-height:1;
}

.data-col spec-detail-tex {
    font-size:15px;
}

.btn-clear {
padding:10px 40px; background:#666; color:#fff; font-size: 16px;text-decoration:none; border-radius:30px; font-weight:bold; border:none; cursor:pointer;
}

.selected-info { font-size: 16px;}





/* --- 履歴エリア (Recent History) --- */
.history-area {
    margin-top: 50px;
    padding: 20px;
    background: #f8f9fa;
    border-top: 2px solid #ddd;
}
.history-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px;
}
.history-header h4 {
    margin: 0; font-size: 16px; font-weight: bold; color: #555;
}
.history-clear-btn {
    background: transparent; border: 1px solid #ccc; color: #888; font-size: 11px; padding: 3px 8px; border-radius: 4px; cursor: pointer;
}
.history-clear-btn:hover { background: #eee; }

.history-list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}
.history-item {
    min-width: 120px; max-width: 120px;
    background: #fff; border: 1px solid #eee; border-radius: 4px;
    padding: 8px; text-align: center;
    transition: box-shadow 0.2s;
}
.history-item:hover { box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.history-link { text-decoration: none; color: inherit; display: block; }
.history-img img {
    width: 100%; height: 70px; object-fit: cover; border-radius: 3px; margin-bottom: 5px;
}
.history-name {
    font-size: 11px; line-height: 1.3; height: 2.6em; overflow: hidden; color: #333;
}


/* --- 件数表示 --- */
.filter-count-label {
    margin-left: 20px;
    font-weight: bold;
    font-size: 14px;
    color: #555;
}
.filter-count-val {
    color: #0056b3;
    font-size: 15px;
    font-weight: bold;
    margin: 0 3px;
}

/* --- 履歴済みマーカー (★) --- */
.viewed-icon {
    display: inline-block;
    color: #ccc; 
    margin-left: 8px;   /* ← 左側に余白 */
    font-size: 13px;   /* 少し小さくすると上品です（お好みで調整） */
    vertical-align: middle;
}
.camper-row.is-viewed-history {
    background-color: #fafbfd; 
}



@media (max-width: 768px) {
    .compare-item-row { flex-wrap: wrap; }
    .col-img { width: 80px; }
    .col-price, .col-spec { width: 100%; text-align: left; padding-left: 60px; margin-top: 5px; }
    .col-name { width: calc(100% - 140px); }
    .compare-header-row { display: none; }
    .filter-btn { font-size: 11px; padding: 5px 10px; }
    .label-col { width: 90px; font-size: 14px; }
    .multi-compare-table { font-size: 14px; }
	
	/* フローティングバー全体を縦並びにする */
    .compare-floating-bar {
        flex-direction: column; 
        align-items: stretch;   /* 横幅いっぱいに広げる */
        gap: 10px;              /* テキストとボタンの間隔 */
        padding: 15px;          /* 少し余白を広げる */
        height: auto;           /* 高さ制限を解除 */
    }

    /* テキスト部分 */
    .compare-floating-bar .selected-info {
        text-align: center;     /* 中央揃え */
        margin-right: 0;        /* PC用の右余白を削除 */
        font-size: 14px;
        width: 100%;
    }

    /* スマホではモデル名リスト（〇〇, △△...）まで表示すると邪魔なので隠す */
    /* 「選択中: 3台」のみ表示させる */
    .compare-floating-bar .selected-names {
        display: none; 
    }

    /* ボタンエリアを横幅いっぱいに */
    .compare-floating-bar .compare-actions {
        display: flex;          /* ボタン同士は横並び */
        gap: 10px;              /* ボタン間の隙間 */
        width: 100%;
    }

    /* 各ボタンの調整 */
    .compare-floating-bar .btn-compare-exec,
    .compare-floating-bar .btn-clear {
        height: auto;           /* 高さ自動 */
        padding: 12px 0;        /* タップしやすいよう上下に余白 */
        font-size: 14px;        /* 文字サイズ調整 */
        white-space: nowrap;    /* 改行させない */
    }
    
    /* 「比較表を作成」ボタンをメインに広く（2:1の比率） */
    .compare-floating-bar .btn-compare-exec {
        flex: 2; 
    }
    /* 「クリア」ボタン */
    .compare-floating-bar .btn-clear {
        flex: 1; 
    }
	
	
}
