#.accordion-container {
  display: flex; /* 横並びにする */
  gap: 20px; /* 各アコーディオン間の余白 */
  justify-content: space-between; /* アコーディオン間の空間を調整 */
}

.accordion-section {
  flex: 1; /* 各アコーディオンの幅を均等に設定 */
  min-width: 300px; /* 各セクションの最小幅 */
  border: 1px solid #ccc; /* 境界線（オプション） */
  border-radius: 5px; /* コーナーを丸くする（オプション） */
  padding: 10px; /* 内側の余白 */
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); /* シャドウ（オプション） */
}

hideImages {
  display: none;
}

#hideImages + .switch {
  width: 30px;
  height: 16px;
  background: #ccc;
  border-radius: 16px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

#hideImages + .switch:before {
  content: "";
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: transform 0.3s;
}

#hideImages:checked + .switch {
  background: #4caf50;
}

#hideImages:checked + .switch:before {
  transform: translateX(14px);
}

#resultsCount {
  text-align: center;
  margin-bottom: 20px;
}

#resultsCount h2 {
  font-size: 18px;
  font-weight: normal;
  color: #555;
}

#resultsCountNumber {
  font-size: 30px;
  font-weight: bold;
  color: #dc3545;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-btn {
  background-color: #28a745;
  color: white;
}

.search-btn:hover {
  background-color: #218838;
}

.clear-btn {
  background-color: #dc3545;
  color: white;
}

.clear-btn:hover {
  background-color: #c82333;
}

.filter-options {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.toggle-switch input[type="checkbox"] {
  display: none;
}

.toggle-switch .switch {
  width: 30px;
  height: 16px;
  background: #ccc;
  border-radius: 16px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-switch .switch:before {
  content: "";
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: transform 0.3s;
}

.toggle-switch input[type="checkbox"]:checked + .switch {
  background: #4caf50;
}

.toggle-switch input[type="checkbox"]:checked + .switch:before {
  transform: translateX(14px);
}

.search-conditions-container {
  margin-top: 15px;
}

.search-conditions {
  font-size: 12px;
  color: #555;
}

.accordion-header {
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  background-color: #f5f5f5;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.3s ease-in-out;
}

.accordion-header:hover {
  background-color: #e0e0e0;
}

.accordion-content {
  display: none;
  overflow: hidden;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  margin-top: -5px;
}

.accordion-content.active {
  display: block;
}

.accordion-header i {
  font-size: 16px;
  transition: transform 0.3s ease-in-out;
}

.accordion-header i.rotate {
  transform: rotate(180deg);
}

#searchKeyword {
  flex: 2;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.content-section {
  margin: 20px;
}

.content-section h2 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
}

.results-container h2 {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.category-container {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  justify-content: flex-start;
  align-items: flex-end;
}

.category-search {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

select {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  width: 100%;
  height: 2.5em;
  padding: 0.4em 2em 0.4em 0.8em;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

select:focus {
  border-color: #666;
  box-shadow: 0 0 5px rgba(102, 102, 102, 0.5);
  outline: none;
}

select:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  border-color: #ddd;
}

.price-range-container {
  display: flex; /* フレックスボックスを使用 */
  flex-wrap: wrap; /* 折り返しを許可 */
  gap: 5px; /* ボタン間のスペース */
  justify-content: space-between; /* 均等に配置 */
}

.price-range-button {
  flex: 1 1 calc(33.333% - 5px); /* 幅を均等に（3列構成） */
  max-width: calc(33.333% - 5px); /* 最大幅の設定 */
  padding: 5px 5px;
  font-size: 14px;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin: 0; /* マージンを削除してグリッドに委ねる */
  color: #333;
  text-align: center; /* テキストを中央揃え */
  box-sizing: border-box; /* ボーダーを含めて幅を計算 */
}

.price-range-button:hover {
  background-color: #e0e0e0;
  transform: scale(1.05);
}


@media screen and (max-width: 1024px) and (min-width: 768px) {
  .category-container {
    flex-wrap: nowrap;
    gap: 15px;
  }

  select {
    max-width: none;
  }

  .price-range-button {
    font-size: 11px;
  }
}

@media screen and (max-width: 767px) {
  .category-container {
    display: block;
  }

  .category-search {
    width: 100%;
    margin-bottom: 15px;
  }

  select {
    width: 100%;
  }

  .price-range-button {
    font-size: 10px;
  }
}

@media screen and (max-width: 480px) {
  .price-range-container {
    gap: 5px;
  }

  .price-range-button {
    font-size: 10px;
    padding: 5px 6px;
  }
}

.category-name {
  display: block;
  text-align: left;
  background-color: #f0f0f0;
  padding: 5px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  border-radius: 3px;
  margin-bottom: 10px;
}

#resultsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 20px auto;
  max-width: 100%;
  box-sizing: border-box;
}

.results-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-align: center;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

.results-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.results-item img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
  background: none;
  border: none;
}


.discount-tag {
  position: absolute;
  bottom: -10px;   
  right: -5px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: red;
  color: white;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 10;
  line-height: 1;
}

.discount-rate {
  font-size: 21px;
  font-weight: bold;
}

.discount-tag span {
  display: block;
}

.sold-out {
  font-size: 12px;
  color: #e63946;
  font-weight: bold;
}

.stock-info {
  margin-top: 5px;
  font-size: 12px;
  color: #333;
  font-weight: bold;
}

@media screen and (max-width: 1024px) and (min-width: 768px) {
  #resultsContainer {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 100%;
  }


  .discount-tag {
    width: 60px;
    height: 60px;
    font-size: 12px;
    top: 50px;
    right: 5px;
  }
}

@media screen and (max-width: 767px) {
  #resultsContainer {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    max-width: 100%;
  }

  .results-item {
    padding: 8px;
  }



  .discount-tag {
    width: 60px;
    height: 60px;
    font-size: 10px;
    top: 40px;
    right: 5px;
  }

  .product-price {
    font-size: 12px;
  }

  .stock-info {
    font-size: 10px;
  }

.search-form {
  flex-wrap: wrap;
  gap: 10px;
  position: relative; /* マイクボタンの位置調整に使用 */
}

  #searchForm button {
    flex: 1;
    width: calc(50% - 10px);
    padding: 10px;
    margin-top: 15px;
  }

  #searchForm {
      position: relative;
    gap: 5px;
  }
}
@media (max-width: 600px) {
  #suggestList {
    width: 100% !important;  /* フォーム親の幅にピッタリ */
    left: 0 !important;      /* input左端ピッタリ */
    min-width: 100px;
    max-width: none;
  }
}

@media screen and (max-width: 767px) {
  .search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
  }

  #searchKeyword {
    flex: none;
    width: 100%;
    padding-right: 40px;
    box-sizing: border-box;
  }

  #searchForm button {
    flex: 1;
    width: calc(10% - 5px);
    padding: 10px;
    margin-top: 0;
  }
}

/* マイクボタン */
.voice-input-btn {
  position: absolute;
  right:3%; /* 入力フィールド内右端からの距離 */
  top: 20%;
  transform: translateY(-50%);
  width:10px
  height: 24px; /* ボタンの縦幅 */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: none; /* デフォルトで非表示 */
  z-index: 10;
  display: inline-flex; /* 必要なサイズだけ占有 */
    box-sizing: border-box; /* ボタンのサイズを正確に制御 */

}
.voice-input-btn i {
  font-size: 20px; /* アイコンのサイズ */
  color: #666;
  transition: color 0.3s;
}

.voice-input-btn:hover i {
  color: #333; /* ホバー時 */
}

.voice-input-btn.recording i {
  animation: blink 1s infinite;
  color: red; /* 録音中は赤色 */
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* スマホでのみマイクボタンを表示 */
@media screen and (max-width: 767px) {
  .voice-input-btn {
    display: block; /* スマホで表示 */
  }

  .search-form {
    flex-wrap: wrap; /* ボタンが折り返される */
  }

  .search-btn,
  .clear-btn {
    flex: 1; /* スマホではボタンが均等に並ぶ */
    width: calc(50% - 5px); /* 横並びでバランス調整 */
  }

  #searchKeyword {
    width: 100%; /* 入力フィールドを全幅に */
    margin-bottom: 10px;
  }
}

.keyword-buttons-container {
  display: flex;
  flex-wrap: wrap; /* 折り返しを有効に */
  gap: 10px; /* ボタン間の余白 */
  justify-content: flex-start; /* 左詰めに配置 */
  margin: 0 auto; /* コンテナ全体を中央揃え */
  max-width: 100%; /* 必要なら幅を制限 */
}

.keyword-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px; /* 内側の余白 */
  font-size: 10px; /* フォントサイズ */
  border: 1px solid #ccc; /* 枠線 */
  border-radius: 4px; /* 角丸 */
  background-color: #f5f5f5; /* 背景色 */
  color: #333; /* 文字色 */
  cursor: pointer; /* ポインターカーソル */
  box-sizing: border-box; /* サイズ計算をボックス内で */
  white-space: nowrap; /* 改行を防ぐ */
  flex-grow: 1; /* 横幅を拡張して余ったスペースを埋める */
  flex-shrink: 0; /* 縮小を無効化 */
  flex-basis: auto; /* 自動幅 */
  transition: background-color 0.3s, transform 0.2s;
}

.keyword-button:last-child {
  flex-grow: 2; /* 右端のボタンを広げて調整する */
}

.keyword-button:hover {
  background-color: #e0e0e0; /* ホバー時の背景色 */
  transform: scale(1.05); /* ホバー時の拡大効果 */
}

@media screen and (min-width: 768px) {
  #voiceInputBtn {
    display: none !important;
  }
}

.c-topic-path__item {
  margin-bottom: 5px; /* 下方向にスペースを確保 */
}

.c-topic-path__item a {
  font-weight: bold;
  font-size: 1.2em;
  background: #EBEBEA;
  border-radius: 3px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 8px 5px 8px;
  color: #000;
  transition: 0.3s ease-in-out;
  text-decoration: none;
  position: relative;
}
.c-topic-path__item a:hover {
  background: #eee; /* ホバー時の背景色 */
  color: #313131; /* ホバー時の文字色 */
}

.c-topic-path {
  display: block; /* 大枠をブロック要素に設定 */
  margin: 20px 0; /* 上下にスペースを確保 */
  padding: 0; /* 余白のリセット */
  width: 95%; /* 親要素の幅いっぱいに設定 */
  position: relative; /* 他要素とのレイヤー管理を容易に */
  z-index: 1; /* 必要ならレイヤー優先度を指定 */
}

@media screen and (max-width: 768px) {
  .c-topic-path {
    padding-left: 15px; /* スマホ時の左余白 */
  }
}

@media (max-width: 600px) {
  .results-container {
    padding: 0 10px;
  }
}
.results-item {
  position: relative;
}


/* 共通タグスタイル */
.tag {
  position: absolute;
  bottom: -5px;         /* 画像の一番下から 5px はみ出し */
  left: 50%;            /* 横中央に寄せ */
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.85em;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  white-space: nowrap;
  z-index: 10;
}

/* 「急上昇」タグ */
.tag-trending {
  background: linear-gradient(135deg, #e60012, #ff4455);
}
.tag-trending::before {
  content: "↑";
  font-size: 1.2em;
  line-height: 1;
}

/* 「人気商品」タグ */
.tag-popular {
  background: linear-gradient(135deg, #333, #555);
}
.tag-popular::before {
  content: "★";
  font-size: 1em;
  line-height: 1;
}

.discounted-price {
  color: red;
  font-weight: bold;
}
#suggestList {
  position: absolute;
  z-index: 100;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  width: 94%;
  max-width: 500px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: none;
}

#suggestList ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#suggestList li {
  padding: 8px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f2f2f2;
}

#suggestList li:hover,
#suggestList li.active {
  background: #f0f7ff;
}

#searchForm, .search-form {
  padding: 0;
  margin: 0;
  border: none;
  box-sizing: border-box;
  position: relative;
}

