/* レスポンシブ対応の基本設定 */
:root {
  --mobile-breakpoint: 600px;
  --tablet-breakpoint: 1024px;
}

/* コンテナの最大幅を画面サイズに応じて調整 */
.container {
  max-width: min(95vw, 2400px);
  margin: 0 auto;
  padding: clamp(8px, 2vw, 16px);
}

/* 画像のレスポンシブ対応を強化 */
img {
  max-width: 100%;
  height: auto;
  max-height: clamp(100px, 20vw, 150px);
  object-fit: contain;
  border-radius: 4px;
}

/* テーブルのレスポンシブ対応 */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

/* モバイル表示時の調整 */
@media screen and (max-width: 600px) {
  .mobile-table .main-row td {
    padding: clamp(6px, 2vw, 8px);
    font-size: clamp(12px, 3.5vw, 14px);
  }

  .mobile-table .accordion-content td {
    padding: clamp(10px, 3vw, 15px);
  }

  /* タッチターゲットのサイズを適切に */
  .manual-icon, 
  .searchBtn,
  .back-to-top {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* モバイルでのスクロールパフォーマンス向上 */
  .table-scroll {
    will-change: transform;
    transform: translateZ(0);
  }
}

/* タブレット表示時の調整 */
@media screen and (min-width: 601px) and (max-width: 1024px) {
  .desktop-table th, 
  .desktop-table td {
    padding: clamp(8px, 1.5vw, 12px);
    font-size: clamp(13px, 2vw, 15px);
  }
}

/* 高DPIディスプレイ対応 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* アニメーションの最適化 */
.accordion-content {
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: max-height;
}

/* アクセシビリティ改善 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 共通スタイル */
body {
  font-family: sans-serif;
  font-size: 14px;
  width: 100%;
  min-height: 100vh;
  background-color: #f7f9fc;
  color: #333;
  margin: 0;
  padding: 0;
}
.container {
  max-width: 2400px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
h1 {
  text-align: center;
  font-size: 1.7em;
  margin: 1.4em 0;
}
.container .searchContainer {
  max-width: 100%; 
  padding: 10px;
  margin-bottom: 20px; 
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
}
.searchBox {
  flex: 1;
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}
.searchBtn {
  background: transparent;
  border: 1px solid #ccc;
  padding: 10px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 5px;
  box-sizing: border-box;
}
#searchResetBtn {
  padding-top: 8px;
  padding-bottom: 8px;
}
.searchBtn i.icon-search {
pointer-events: none; /* iタグはクリック無効 */
}
.searchInputWrapper { position: relative; flex: 1; }
.search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  background: #fff;
  border: 1px solid #e1e1e1;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  z-index: 10002;
  display: none;
}
.search-suggestions.visible { display: block; }
.search-suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-suggestion-item:hover,
.search-suggestion-item[aria-selected="true"] {
  background: #f5f5f5;
}
.search-suggestion-tag { color: #333; font-size: 14px; }
.no-results-message {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  margin-top: 10px;
  color: #999;
  /*font-size: 14px;*/
  text-align: center;
}
/* 表示時に付与 */
.no-results-message.visible {
opacity: 1;
max-height: 50px;
}
.cache-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.cache-info span {
  font-size: 12px;
  color: #555;
}
.cache-info button {
  padding: 10px 15px;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  background-color: #2ecc71;
  color: white;
  cursor: pointer;
}
/* トップナビゲーション：各大カテゴリのドロップダウン（ブラウザ標準） */
.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  padding: 10px;
  margin-bottom: 20px;
}
.top-nav .dropdown {
  display: flex;
  align-items: center;
  background: #2A2A2A;
  padding: 10px;
  border-radius: 4px;
}
.top-nav .dropdown select {
  font-size: 12px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
}
/* グループ表示 */
.group {
  margin-bottom: 30px;
  scroll-margin-top: 88px;  /* major-tabs-bar(44px) + minor-category(44px) */
}
/* 大カテゴリ：背景なし、黒の下線 */
.major-category {
  background: none;
  border-bottom: 2px solid #000;
  color: #000;
  padding: 10px 0;
  font-weight: bold;
}
.minor-category {
  background: #fff;
  border-bottom: 2px solid #000;
  color: #000;
  padding: 10px 0;
  font-weight: bold;
  font-size: 1em;
  margin-top: 10px;
  margin-bottom: 5px;
  position: sticky;
  top: 42px;  /* major-tabs-barに2px重複させて隙間を防ぐ */
  z-index: 9998;
  cursor: pointer;
  /* 固定表示を確実にするための追加設定 */
  width: 100%;
  box-sizing: border-box;
  /* 上下の隙間を防ぐためのシャドウ追加 */
  box-shadow: 0 -2px 0 #fff, 0 2px 0 #fff;
}
/* 
.minor-category:hover {
  background: #3A3A3A;
  border-color: #FFBE00;
}
.minor-category .minor-dropdown-arrow {
  margin-left: auto;
  transition: transform 0.2s;
  font-size: 0.8em;
}
.minor-category .fa-tag {
  color: #FFBE00;
  font-size: 1.2em;
}
*/
/* デスクトップ版：従来のテーブル表示 */
.desktop-table table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  /* margin-top: 10px; */
  table-layout: fixed;
}
/*.desktop-table col { }*/
.desktop-table th, .desktop-table td {
  border-right: 1px solid #e1e1e1;
  border-bottom: 1px solid #e1e1e1;
  padding: 6px;
  text-align: left;
  word-wrap: break-word;
}
.desktop-table th:first-child, .desktop-table td:first-child {
  border-left: 1px solid #e1e1e1;
}
.desktop-table thead th {
  border-top: 1px solid #e1e1e1;
}
.desktop-table th {
  background-color: #FFBE00;
  color: #222;
  position: relative;
}
.desktop-table thead {
  position: sticky;
  top: 86px;  /* minor-categoryに2px重複させて隙間を防ぐ */
  z-index: 9999;  /* minor-categoryより上に */
  background: #FFBE00;
  border-bottom: 2px solid #e1e1e1; /* ヘッダー下部のボーダーを強化 */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* スクロール時の浮いた感じを演出 */
}
/* 付属品行用 */
.accessory-row {
  background-color: #f8f8f8;
}

/* スマホ版：アコーディオン形式のリスト表示 */
.mobile-table table {
  width: 100%;  /* コンテナ幅いっぱいに広げる */
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 0;
  margin-bottom: 20px;
  table-layout: fixed;
}
/* グループ間余白（minorカテゴリ間） */
.mobile-table {
  margin: 2em 0;
}
/* ヘッダー行を常に表示 */
.mobile-table thead {
  position: sticky;
  top: 86px;  /* デフォルトは86px（カテゴリ順用） */
  z-index: 9999;  /* minor-categoryより上に */
  background: #FFBE00;
  border-bottom: 2px solid #e1e1e1; /* ヘッダー下部のボーダーを強化 */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* スクロール時の浮いた感じを演出 */
}
.mobile-table th {
  background-color: #FFBE00;
  color: #222;
  border-right: 1px solid #e1e1e1;
  border-bottom: 1px solid #e1e1e1;
  border-top: 1px solid #e1e1e1;
  position: relative;
}
.mobile-table th:first-child {
  border-left: 1px solid #e1e1e1;
}
.mobile-table .main-row {
  min-height: 48px;
  cursor: pointer;
  position: relative;
}
.mobile-table .main-row td {
  border-right: 1px solid #e1e1e1;
  border-bottom: 1px solid #e1e1e1;
  padding: 8px;
  word-wrap: break-word;
  font-size: 14px;
}
.mobile-table .main-row td:first-child {
  border-left: 1px solid #e1e1e1;
}
.mobile-table .accordion-content {
  display: none;
  background: #f8f8f8;
  padding: 15px;
  border: 1px solid #e1e1e1;
  border-top: none;
  position: relative;
  margin-left: -1px;
  margin-right: -1px;
  width: calc(100% + 2px);
}
.mobile-table .accordion-content.open {
  display: table-row;
}
.mobile-table .accordion-content td {
  font-size: 13px;
  padding: 15px;
  border: none;
  border-bottom: 1px solid #eee;
  display: table-cell;
  width: 100%;
  box-sizing: border-box;
  background: #f8f8f8;
}
.mobile-table .accordion-content td[colspan="5"] {
  width: 100%;
  display: table-cell;
}
.mobile-table .accordion-content p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.6;
}
.mobile-table .accordion-content strong {
  display: inline-block;
  width: 90px;
  margin-right: 10px;
}
.mobile-table .accessory-detail td {
  padding: 0px;
}

/* 共通：画像 */
img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
  border-radius: 4px;
}
td.link-cell {
  text-align: center;
  /* white-space: nowrap; */
  padding: 6px;
  white-space: normal;
  max-width: 50px;
  min-width: 15px;
  /* overflow: hidden; */
  overflow: visible;
}
.manual-icon {
  padding: 0.3em;
  color: #555;
  font-size: 0.9em;
}
.manual-icon i {
  margin-bottom: 0.8em;
  pointer-events: none;
}
.manual-icon.disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}


.manual-icon[data-tooltip] {
  position: relative;
  z-index: 10;
}
.manual-icon[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10000; /* 埋もれないよう最前面へ */
}
.manual-icon[data-tooltip]:hover::after {
  opacity: 1;
}
/* トップに戻るボタン */
.back-to-top {
  position: fixed;
  z-index: 10000;
  bottom: 2rem;
  right: 2rem;
  background-color: #FFC107;
  color: #1A1A1A;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background-color: #FFB300;
  transform: translateY(-2px);
}
/* category-toast削除のためコメントアウト
#category-toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  min-width: 150px;
  max-width: 250px;
  padding: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

#category-toast.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
*/

.list-title {
  font-weight: bold;
  font-size: 1.1em;
  margin: 8px 0 4px 0;
  color: #333;
  padding-left: 4px;
}
.minor-dropdown-toast {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(42,42,42,0.95);
  color: #fff;
  padding: 0.8em 1.5em;
  border-radius: 1.5em;
  font-size: 1.1em;
  font-weight: 600;
  /* margin-bottom: 18px; */
  gap: 0.7em;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  cursor: pointer;
}
.minor-dropdown-toast:hover {
  cursor: pointer;
}
.minor-dropdown-toast select {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 0.95em;
  font-weight: 600;
  outline: none;
  margin-left: 0.5em;
  padding: 0.1em 0.6em;
  border-radius: 1em;
  /*appearance: none;*/
  min-width: 180px;
max-width: 200px;
}
.minor-dropdown-toast select option {
  color: #222;
  background: #fff;
}
.major-tabs-bar {
  margin-bottom: 1.5em;
  /* モバイル版でも固定表示と横スクロール機能を確実に有効化 */
  position: sticky;
  top: 0;
  z-index: 10001;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 2px 0 #fff;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

/* Webkit系ブラウザ用のスクロールバースタイル */
.major-tabs-bar::-webkit-scrollbar {
  height: 4px;
}

.major-tabs-bar::-webkit-scrollbar-track {
  background: transparent;
}

.major-tabs-bar::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.major-tabs-bar::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.major-tab {
  display: inline-block;
  background: none;
  color: #888;
  border: none;
  border-radius: 0;
  padding: 10px 16px 6px 16px;
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-bottom 0.2s;
  outline: none;
  white-space: nowrap;
}
.major-tab.active {
  color: #222;
  border-bottom: 3px solid #FFBE00;
  background: none;
}
.major-tab:focus {
  outline: none;
}

footer {
  text-align:center;
  margin-top: 2rem;
  margin-bottom: 4.5rem;
}
p.footer_content {
  font-size: 12px;
  color:#666;
}

.group-info {
  font-size: 0.8em;
  color: #666;
  margin-top: 2px;
}
.product-name-container {
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.1em;
  }
  
  th, td { 
    font-size: 10px; 
    padding: 6px; 
  }
  
  .cache-info span, .cache-info button { 
    font-size: 10px; 
  }
  
  .top-nav .dropdown select { 
    font-size: 10px; 
  }
  
  .back-to-top { 
    font-size: 10px; 
    width: 2.5rem; 
    height: 2.5rem; 
  }
  
  img {
    max-width: 100%;
    max-height: 80px;
    min-width: 30px;
    max-width: 50px;
    width: auto;
  }
  
  .minor-category {
    font-size: 0.9em;
    padding: 10px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.7em;
    border: 1.5px solid #444;
    background: #2A2A2A;
    color: #fff;
    margin-top: 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    letter-spacing: 0.03em;
  }
  
  .major-category {
    background: none;
    border-bottom: 2px solid #000;
    color: #000;
    padding: 10px 0;
    font-weight: bold;
    font-size: 1em;
    margin-top: 10px;
    margin-bottom: 5px;
    display: block;
  }
  
  .mobile-table th {
    background-color: #FFBE00;
    color: #222;
  }
  
  .mobile-table .main-row {
    background-color: #fff7e0;
    cursor: pointer;
    position: relative;
  }
  
  .mobile-table .main-row td {
    border: 1px solid #e1e1e1;
    background-color: #fff7e0;
  }
  
  .mobile-table .accordion-content {
    display: none;
    background: #f8f8f8;
    border: 1px solid #e1e1e1;
    border-top: none;
    transition: all 0.3s ease-in-out;
    white-space: normal;
    word-break: break-word;
  }
  
  .mobile-table .accordion-content td {
    padding: 15px;
    border: none;
  }
  
  .mobile-table .accordion-content.open {
    display: table-row;
    max-height: 1000px;
    opacity: 1;
  }
  
  .mobile-table .accordion-content:not(.open) {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
  }
  
  .mobile-table .accessory-row {
    background-color: #f8f8f8;
  }
  
  .mobile-table .accessory-detail {
    display: none;
    background: #f8f8f8;
  }
  
  .mobile-table .accessory-detail.open {
    display: table-row;
  }
  
  .mobile-table .accessory-detail td {
    padding: 0;
  }
  
  .mobile-table thead {
    position: static;
  }
  
  .mobile-table .group-space {
    height: 1.5em;
    background: transparent;
  }
  
  .mobile-table .group-space td {
    border: none;
    padding: 0;
    height: 1em;
    background: transparent;
  }
  
  .mobile-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2em 0;
  }
  
  .mobile-table table {
    min-width: 100%;
    width: 100%;
  }
  
  .minor-table-container {
    margin: 2em 0 3em;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* category-toast削除のためコメントアウト
  #category-toast {
    left: 0.5rem;
    bottom: 1.2rem;
    font-size: 1em;
    padding: 0.6em 1em;
  }
  */

  .major-tabs-bar {
    margin-bottom: 1.5em;
  }
  
  .major-tab {
    font-size: 1em;
    padding: 12px 16px 8px 16px;
  }
  
  .manual-icon {
    padding: 0.2em;
    font-size: 1em;
  }
  
  .manual-icon i {
    margin-bottom: 0.8em;
  }

  .minor-dropdown-toast {
    padding: 0.8em 1.2em;
    font-size: 0.9em;
    gap: 0.6em;
  }
  
  .minor-dropdown-toast select {
    font-size: 0.9em;
  }
  
  p.footer_content {
    font-size: 9px; 
  }
  
  .minor-category {
    top: 0px;  /* major-tabs-barに2px重複させて隙間を防ぐ */
  }
  
  .mobile-table thead {
    top: 86px;  /* minor-categoryに2px重複させて隙間を防ぐ */
    z-index: 9999;  /* minor-categoryより上に */
    border-bottom: 2px solid #e1e1e1; /* ヘッダー下部のボーダーを強化 */
  }
}

/* table だけをスクロールさせるラッパー 
.table-scroll {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.table-scroll table {
width: 100%;
min-width: 900px; */ /* 必要に応じて調整 
border-collapse: collapse;
}*/

/* アコーディオン関連のスタイル追加 */
.desktop-table .group-container {
  margin-bottom: 0;  /* 基本の下マージンは0 */
}

.desktop-table .group-container + .group-container {
  margin-top: 2em;  /* 2つ目以降のグループの上部に空白 */
  border-top: 1px solid #eee;  /* 区切り線を追加 */
  padding-top: 1em;  /* 上部の内側の空白 */
}

.desktop-table .accessory-row {
  background-color: #f8f8f8;
}

.desktop-table .accessory-row.collapsed {
  display: none;
}

.desktop-table .accessory-toggle {
  width: 100%;
  /* padding: 8px; */
  background: #f8f8f8;
  border: none;
  /* border-top: 1px solid #e1e1e1; */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 0.8em;
  transition: background-color 0.3s;
}

.desktop-table .accessory-toggle:hover {
  background: #f0f0f0;
}

.desktop-table .accessory-toggle i {
  margin-left: 8px;
  transition: transform 0.3s;
}

.desktop-table .accessory-toggle.collapsed i {
  transform: rotate(180deg);
}

.desktop-table .toggle-row.collapsed {
  border-top: 1px solid #e1e1e1;
}

.desktop-table .toggle-row {
  border-bottom: 1px solid #e1e1e1;
}

/* minorカテゴリごとのテーブルコンテナ */
.desktop-table .minor-table-container {
  margin-top: 2em;  /* minorカテゴリ間の上部空白 */
  margin-bottom: 3em;  /* minorカテゴリ間の下部空白 */
}

/* tbody要素のmarginとborderを無効化 */
.desktop-table tbody {
  border-top: none;
  margin-top: 0;
}

/* グループスペーサー行 */
.desktop-table tbody.group-space {
  background: transparent;
}
.desktop-table tbody.group-space td {
  border: none;
  height: 1.5em;
  padding: 0;
  background: transparent;
}

/* 本体行の背景色 */
.desktop-table tbody:not(.group-space) > tr:not(.accessory-row) > td {
  background-color: #fff7e0;
}

/* 付属品行のスタイル */
.desktop-table .accessory-row {
  background-color: #f8f8f8;
}

/* 付属品行の保管場所列を非表示 */
/* .desktop-table .accessory-row td:nth-child(8) {
  display: none;
} */

.desktop-table .accessory-row.collapsed {
  display: none;
}

/* アクセサリ用コンテナとアニメーション */
.accessory-container {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 100%;
}
.accessory-container.collapsed {
  max-height: 0;
}
.accessory-toggle {
  width: 100%;
  padding: 8px;
  background: #f8f8f8;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 0.8em;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.accessory-toggle i {
  margin-left: 8px;
  transition: transform 0.3s;
}
.accessory-toggle.collapsed i {
  transform: rotate(180deg);
}
/* 開閉ボタン */
.accessory-toggle-container {
  padding: 0;
  background-color: #f8f8f8;
}

/* .mobile-accessory-table td:nth-child(2),
.mobile-accessory-table td:nth-child(6) {
  display: none;
} */
/* モバイル版：本体行背景と画像最小幅 */
@media (max-width: 600px) {
 .mobile-table .main-row td {
   background-color: #fff7e0;
 }
 .mobile-table img {
   min-width: 30px;
   max-width: 50px;
   width: auto;
 }
 /* グループ間スペーサー */
 .mobile-table .group-space td {
   height: 1em;
   padding: 0;
   background: transparent;
   border: none;
 }
}

/* 追加CSS: デスクトップ用カテゴリ固定レイアウト */
@media (min-width: 601px) {
  .flex-minor-table {
    display: flex;
    align-items: flex-start;
  }
  /*
  .minor-category {
    background: #2A2A2A;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    display: flex;
    align-items: center;
    gap: 0.7em;
    border: 1.5px solid #444;
    letter-spacing: 0.03em;
    margin: 1.5em 0 0.8em 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
  }
  */
  
  .table-scroll {
    overflow-x: auto;
    width: 100%;
  }
  
  .table-scroll table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
  }
  
  .major-category {
    background: none;
    border-bottom: 2px solid #000;
    color: #000;
    padding: 10px 0;
    font-weight: bold;
    font-size: 1em;
    margin-top: 10px;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
  }
  
  .all-tables-scroll {
    width: 100%;
  }

  .all-tables-container {
    width: 100%;
  }

  .group.desktop-table {
    width: 100%;
  }

  .minor-table-container {
    margin: 2em 0 3em;
    width: 100%;
  }

  table {
    min-width: 900px;
    width: auto;
    border-collapse: separate;
    border-spacing: 0;
  }
}

/* 並び替えアイコンのスタイル追加 */
/* 削除：古いスタイル */

/* 並び替えオプションのコンテナ */
#sort-options-container {
  margin: 24px 0 16px 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  visibility: visible;
}

.sort-options-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  max-width: 600px;
  gap: 12px;
}

/* 表示切り替えボタンのスタイル */
.display-toggle-container {
  display: flex;
  align-items: center;
  /* gap: 4px; */
}

.display-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  user-select: none;
  min-width: 120px;
  justify-content: center;
  position: relative;
}

.display-toggle-btn:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.display-toggle-btn:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: none;
}

.display-toggle-btn:hover {
  background-color: #fffbf0;
  /* border-color: #FFBE00; */
  /* box-shadow: 0 4px 12px rgba(255, 190, 0, 0.1); */
}

.display-toggle-btn:focus {
  border-color: #FFBE00;
  box-shadow: 0 0 0 3px rgba(255, 190, 0, 0.2), 0 4px 12px rgba(255, 190, 0, 0.1);
}

.display-toggle-btn:active {
  transform: translateY(1px);
}

.display-toggle-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.display-toggle-btn i {
  font-size: 16px;
  color: #333;
}

.display-toggle-btn .toggle-text {
  font-weight: 500;
  white-space: nowrap;
}

/* アクティブ状態のスタイル */
.display-toggle-btn[aria-pressed="true"] {
  background-color: #FFBE00;
  border-color: #FFBE00;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 190, 0, 0.3);
  z-index: 1;
}

.display-toggle-btn[aria-pressed="true"] i {
  color: #fff;
}

.display-toggle-btn[aria-pressed="true"]:hover {
  background-color: #e6ab00;
  border-color: #e6ab00;
}

.sort-label {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  user-select: none;
}

.sort-dropdown {
  position: relative;
  min-width: 200px;
  flex: 1;
  max-width: 300px;
}

.sort-select {
  width: 100%;
  padding: 14px 20px 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #ffffff;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23666' d='M4.427 6.427L8 10l3.573-3.573a1 1 0 111.414 1.414l-4.28 4.28a1 1 0 01-1.414 0l-4.28-4.28a1 1 0 111.414-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.sort-select:hover {
  /* border-color: #FFBE00; */
  /* box-shadow: 0 4px 12px rgba(255, 190, 0, 0.1); */
  background-color: #fffbf0;
}

.sort-select:focus {
  /* border-color: #FFBE00;
  box-shadow: 0 0 0 3px rgba(255, 190, 0, 0.2), 0 4px 12px rgba(255, 190, 0, 0.1); */
  background-color: #fffbf0;
}

.sort-select:active {
  transform: translateY(1px);
}

.sort-select option {
  padding: 12px 16px;
  font-size: 14px;
  color: #333;
  background: #ffffff;
  border: none;
}

.sort-select option:hover {
  background: #fff7e0;
}

.sort-select option:checked {
  /* background: #FFBE00; */
  color: #222;
  font-weight: 600;
}

/* ローディング状態のスタイル */
.sort-options-wrapper.loading {
  pointer-events: none;
}

.sort-options-wrapper.loading .sort-select,
.sort-options-wrapper.loading .display-toggle-btn {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.sort-options-wrapper.loading .sort-select::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 40px;
  width: 16px;
  height: 16px;
  /* border: 2px solid #FFBE00; */
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: sort-spinner 0.8s linear infinite;
}

@keyframes sort-spinner {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* アクセシビリティ改善 
.sort-select:focus-visible {
  outline: 2px solid #FFBE00;
  outline-offset: 2px;
}*/

/* レスポンシブ対応 */
@media (max-width: 768px) {
  #sort-options-container {
    margin: 20px 0 24px 0;
  }
  
  .sort-options-wrapper {
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
  }
  
  .sort-label {
    font-size: 15px;
  }
  
  .display-toggle-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .display-toggle-btn i {
    font-size: 18px;
  }
  
  .sort-dropdown {
    min-width: auto;
    max-width: none;
    width: 100%;
  }
  
  .sort-select {
    padding: 12px 16px 12px 14px;
    font-size: 14px;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .sort-options-wrapper {
    padding: 0 12px;
  }
  
  .display-toggle-btn {
    padding: 16px 18px;
    font-size: 16px;
  }
  
  .sort-select {
    padding: 14px 18px 14px 16px;
    font-size: 15px;
  }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
  .sort-select {
    border-width: 3px;
    font-weight: 700;
  }
  
  .sort-select:focus {
    outline: 3px solid #000000;
    outline-offset: 2px;
  }
  
  .display-toggle-btn {
    border-width: 3px;
    font-weight: 700;
  }
  
  .display-toggle-btn:focus {
    outline: 3px solid #000000;
    outline-offset: 2px;
  }
}

/* 動作軽減モード対応 */
@media (prefers-reduced-motion: reduce) {
  .sort-select {
    transition: none;
  }
  
  .display-toggle-btn {
    transition: none;
  }
  
  .sort-options-wrapper.loading .sort-select::after {
    animation: none;
  }
  
  @keyframes sort-spinner {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  }
}

/* フォーカス表示の改善 */
.sort-option-button:focus-visible {
  outline: 3px solid #4f46e5;
  outline-offset: 2px;
  z-index: 1;
}

/* 選択状態のチェックマークアニメーション */
.sort-option-button.selected::after {
  animation: checkmark-appear 0.3s ease-out;
}

@keyframes checkmark-appear {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sort-option-button.selected::after {
    animation: none;
  }
}

/* テーブルヘッダーの固定表示 */
.desktop-table .minor-table-container {
  position: relative;
  margin: 2em 0 3em;
}

.desktop-table thead {
  position: sticky;
  top: 86px;  /* デフォルトは86px（カテゴリ順用） */
  z-index: 9999;  /* minor-categoryより上に */
  background: #FFBE00;
  border-bottom: 2px solid #e1e1e1; /* ヘッダー下部のボーダーを強化 */
}

.desktop-table th {
  background: #FFBE00;
  color: #222;
  padding: 8px;
  text-align: left;
  border: 1px solid #e1e1e1;
}

/* スクロール可能なコンテナ */
.all-tables-scroll {
  width: 100%;
}

.all-tables-container {
  width: 100%;
}

.mobile-table .accessory-detail {
  display: none;
  background: #f8f8f8;
}

.mobile-table .accessory-detail.open {
  display: table-row;
}

.mobile-table .accessory-detail td {
  padding: 0;
}

.mobile-accessory-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.mobile-accessory-table tr {
  background-color: #f8f8f8;
}

.mobile-accessory-table td {
  border: 1px solid #e1e1e1;
  padding: 6px;
  text-align: left;
  font-size: 11px;
}

.mobile-accessory-table img {
  max-width: 50px;
  max-height: 50px;
}

/* アコーディオン開閉時のアニメーション */
.mobile-table .accordion-content {
  transition: all 0.3s ease-in-out;
}

.mobile-table .accordion-content.open {
  max-height: 1000px; /* 十分な高さを設定 */
  opacity: 1;
}

.mobile-table .accordion-content:not(.open) {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

/* スピナーアニメーション */
@keyframes sort-spinner-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* アクセシビリティ - スクリーンリーダー専用テキスト */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* カテゴリヘッダーのスタイル */
.category-header {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.category-header.major-category {
  background-color: #e9ecef;
  font-weight: bold;
  font-size: 1.1em;
  color: #495057;
}

.category-header.minor-category {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #6c757d;
  padding-left: 20px;
}

.category-header td {
  padding: 8px 12px;
  border: none;
}

/* フラット表示用のカテゴリヘッダー - グループ表示と同じスタイル */
.flat-table-container .category-header {
  background: transparent !important;
  border: none !important;
}

.flat-table-container .category-header.minor-category {
  background: transparent !important;
  border: none !important;
}

/* リスト表示用のminor-categoryのmarginを0に */
.flat-table-container .category-header.minor-category .minor-category {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.flat-table-container .category-header td {
  padding: 0 !important;
  border: none !important;
}

/* フラット表示用のtheadスタイル - カテゴリ順以外でも適切な背景色を表示 */
.flat-table-container thead {
  background: #FFBE00 !important;
  border-bottom: 2px solid #e1e1e1 !important;
  position: sticky !important;
  top: 86px; /* デフォルトは86px（カテゴリ順用） */
  z-index: 9999 !important;
}

.flat-table-container thead th {
  background: #FFBE00 !important;
  color: #222 !important;
  padding: 8px !important;
  text-align: left !important;
  border: 1px solid #e1e1e1 !important;
}

/* モバイル表示でのフラット表示用カテゴリヘッダー - グループ表示と同じスタイル */
.flat-table-container.mobile-table .category-header {
  background: transparent !important;
  border: none !important;
}

.flat-table-container.mobile-table .category-header.minor-category {
  background: transparent !important;
  border: none !important;
}

/* リスト表示用のminor-categoryのmarginを0に（モバイル） */
.flat-table-container.mobile-table .category-header.minor-category .minor-category {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.flat-table-container.mobile-table .category-header td {
  padding: 0 !important;
  border: none !important;
}

/* モバイル表示でのフラット表示用theadスタイル */
.flat-table-container.mobile-table thead {
  background: #FFBE00 !important;
  border-bottom: 2px solid #e1e1e1 !important;
  position: sticky !important;
  top: 86px; /* デフォルトは86px（カテゴリ順用） */
  z-index: 9999 !important;
}

.flat-table-container.mobile-table thead th {
  background: #FFBE00 !important;
  color: #222 !important;
  padding: 8px !important;
  text-align: left !important;
  border: 1px solid #e1e1e1 !important;
}

