/* =========================================================
   BCR FITMENT - COMPACT & REFINED LAYOUT (ULTIMATE FIX)
   ========================================================= */

/* 1. 全体エリア */
.bcr-fitment-wide {
    display: block !important;
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 20px 0 !important;
}
.bcr-fitment-wide .swell-block-fullWide__inner {
    width: 100% !important;
    max-width: 98% !important;
    margin: 0 auto !important;
}

/* 2. テーブル枠 */
.bcr-fitment-wide .fitment-wrap {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    border: 0 !important;
    box-shadow: 0 0 0 1px #111 inset !important;
    border-radius: 6px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

/* 3. テーブル本体 */
.bcr-fitment .fitment-table {
    width: 100% !important;
    min-width: 1750px !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
}

/* 4. ヘッダー */
.bcr-fitment .fitment-table thead th {
    background: #111 !important;
    color: #fff !important;
    padding: 8px 2px !important;
    font-size: 12px !important;
    text-align: center !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    border-right: 1px solid #444 !important;
    border-bottom: 1px solid #444 !important;
    background-clip: padding-box;
}

/* 5. ボディ */
.bcr-fitment .fitment-table tbody td {
    padding: 6px 8px !important;
    font-size: 12.5px !important;
    color: #444 !important;
    text-align: center;
    border-right: 1px solid #ddd !important;
    border-bottom: 1px solid #ddd !important;
    line-height: 1.2 !important;
}

/* =========================================================
   6. 【最重要】列幅の完全固定（1行目のヘッダーで親玉を制御）
   ========================================================= */

.bcr-fitment .fitment-table thead tr:first-child th:nth-child(1) { width: 140px !important; } /* 車種 */
.bcr-fitment .fitment-table thead tr:first-child th:nth-child(2) { width: 150px !important; } /* 型式 */
.bcr-fitment .fitment-table thead tr:first-child th:nth-child(3) { width: 100px !important; } /* 年式 */
.bcr-fitment .fitment-table thead tr:first-child th:nth-child(4) { width: 80px !important;  } /* 品番 */

/* 🎯 スプリングレート（F・Rの親玉）🎯 
   ここの幅を110pxに絞ることで、強制的にFとRが「55pxずつ」の激狭になります */
.bcr-fitment .fitment-table thead tr:first-child th:nth-child(5) {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    white-space: nowrap; /* 文字の改行を防ぐ */
}

/* BRシリーズ（RS・RA・RH・RNの親玉） */
.bcr-fitment .fitment-table thead tr:first-child th:nth-child(6) {
    width: 440px !important; /* 110px × 4列分 */
}

/* RMシリーズ（MA・MHの親玉） */
.bcr-fitment .fitment-table thead tr:first-child th:nth-child(7) {
    width: 220px !important; /* 110px × 2列分 */
}

/* 🎯 ER / HM / ZR （twクラス）🎯 
   ここも1行目にいるので直接 45px に絞り込みます */
.bcr-fitment .fitment-table thead tr:first-child th.tw {
    width: 45px !important;
    min-width: 45px !important;
    max-width: 45px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
}

/* =========================================================
   7. 備考欄と装飾
   ========================================================= */

/* 備考欄（1行目最後列のヘッダー）に残りの全幅を割り当て */
.bcr-fitment .fitment-table thead tr:first-child th:last-child {
    width: auto !important;
}

/* 備考欄（データセル） */
.bcr-fitment .fitment-table tbody tr td:last-child {
    color: #e60012 !important;
    font-weight: 500;
    text-align: left !important;
    white-space: normal !important;
    width: auto !important;
    min-width: 400px !important;
    font-size: 11px !important;
}

.bcr-fitment .fitment-table tbody tr:nth-child(even) td { background: #f9f9f9 !important; }
.bcr-fitment .fitment-table tbody tr:hover td { background: #f0f7ff !important; }
.bcr-fitment .fitment-table .sub { display: block; font-size: 10px; color: #999; margin-top: 1px; }

.fitment-top { display: flex; justify-content: center; align-items: center; margin-bottom: 20px; }

/* =========================================================
   備考欄内のすべての文字（2段目や補足タグ）を赤色に強制統一
   ========================================================= */
.bcr-fitment .fitment-table tbody tr td:last-child * {
    color: #e60012 !important;
}

/* =========================================================
   検索窓とブランドボタンの装飾・アニメーション
   ========================================================= */

/* 検索窓とボタン全体を並べるレイアウト */
.bcr-fitment .fitment-top {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px; /* 検索窓とボタンの隙間 */
    margin-bottom: 25px;
}

/* --- 1. 検索窓（入力欄）の装飾 --- */
.bcr-fitment .fitment-search {
    padding: 10px 18px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 100%;
    max-width: 280px;
    background-color: #fcfcfc;
    color: #333;
    outline: none; /* デフォルトの青枠を消す */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* なめらかなアニメーション */
}

/* 検索窓：カーソルを乗せた時・入力中の動き */
.bcr-fitment .fitment-search:hover,
.bcr-fitment .fitment-search:focus {
    border-color: #111;
    background-color: #fff;
    /* 黒枠になり、薄い影が出てフワッと浮き上がる */
    box-shadow: 0 0 0 1px #111, 0 4px 10px rgba(0,0,0,0.08); 
}

/* --- 2. ブランドボタンのベース装飾 --- */
.bcr-fitment .fitment-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* ボタン同士の隙間 */
}

.bcr-fitment .fitment-brands button {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #ddd;
    background: #fff;
    color: #444 !important;
    border-radius: 999px; /* 角丸のピルシェイプ */
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02); /* 初期状態のわずかな影 */
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

/* --- 3. ブランドボタン：カーソルを合わせた時の動き（ホバー） --- */
.bcr-fitment .fitment-brands button:hover {
    border-color: #111;
    color: #111 !important;
    transform: translateY(-2px); /* 少しだけ上にフワッと浮く */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* 影を濃くして立体感を出す */
}

/* --- 4. ブランドボタン：クリックした瞬間の動き --- */
.bcr-fitment .fitment-brands button:active {
    transform: translateY(1px); /* 押し込まれたように下がる */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* 影が小さくなる */
}

/* --- 5. ブランドボタン：選択中（アクティブ）の装飾 --- */
.bcr-fitment .fitment-brands button.is-active {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* 選択中であることが目立つ濃い影 */
    transform: translateY(-1px); /* 常に少し浮かせた状態 */
}

/* =========================================================
   「備考」のヘッダー（見出し）を左寄せにする
   ========================================================= */
.bcr-fitment .fitment-table thead tr:first-child th:last-child {
    text-align: left !important;
    padding-left: 12px !important; /* 左の線から少し離して見やすくする */
}

