/**
 * カテゴリドロップダウン追加CSS
 * 既存のheader.cssに影響を与えず、自然に統合
 */

/* ===================================
   カテゴリドロップダウンのスタイル
   既存の検索フォームに合わせる
   =================================== */

/* カテゴリドロップダウン */
.tp-category-select {
  flex: 0 0 auto;
  min-width: 140px;
  width: auto;
  max-width: 180px;
  height: 42px;
  padding: 0 28px 0 10px;
  border: 2px solid #00367c;
  border-right: 1px solid #d0d0d0;
  border-radius: 8px 0 0 8px;
  background-color: #fafafa;
  background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"%3E%3Cpath fill="%23333" d="M0.8 0L5 4.2 9.2 0 10 0.8l-5 5-5-5z"/%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.2s ease;
  line-height: 1;
}

.tp-category-select:hover {
  background-color: #f0f0f0;
}

.tp-category-select:focus {
  box-shadow: 0 0 0 3px rgba(0, 54, 124, 0.15);
  background-color: #ffffff;
}

/* カテゴリ選択時のスタイル（JavaScriptで動的に適用） */
.tp-category-select.selected {
  background-color: #e7f3ff;
  color: #00367c;
  font-weight: 600;
  border-right-color: #00367c;
}

/* optionのスタイル */
.tp-category-select option {
  padding: 8px;
  font-size: 13px;
}

.tp-category-select option[value=""] {
  font-weight: 600;
  color: #00367c;
}

/* 既存の検索入力の調整（左端の角丸を削除） */


.tp-search-form .tp-search-input {
  border-radius: 0;
  border-left: none;
}

/* 検索ボタンはそのまま（右端の角丸を維持） */
/* .tp-search-button は既存CSSのまま */

/* ===================================
   レスポンシブ対応
   =================================== */

/* PC表示：横並び */
@media (min-width: 599px) {
  .tp-category-select {
    min-width: 140px;
    max-width: 180px;
  }
}

/* スマホ表示：縦並び */
@media screen and (max-width: 599px) {

  /* 検索フォームを縦並びに */
  .tp-search-form {
    flex-direction: column;
  }

  /* カテゴリドロップダウン */
  .tp-category-select {
    border-radius: 8px 8px 0 0;
    border-right: 2px solid #00367c;
    border-bottom: 1px solid #d0d0d0;
    width: 100%;
    min-width: 100%;
  }

  /* 検索入力欄 */
  .tp-search-input {
    border-radius: 0;
    border-top: none;
    border-left: 2px solid #00367c;
    border-bottom: 1px solid #d0d0d0;
    width: 100%;
  }

  /* 検索ボタン */
  .tp-search-button {
    border-radius: 0 0 8px 8px;
    border-top: none;
    width: 100%;
  }
}

/* タブレット */
@media (min-width: 600px) and (max-width: 768px) {
  .tp-category-select {
    min-width: 120px;
    max-width: 160px;
    font-size: 12px;
    padding-right: 26px;
  }
}

/* ===================================
   フォーカス時のハイライト統一
   =================================== */
.tp-category-select:focus,
.tp-search-input:focus,
.tp-search-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 54, 124, 0.15);
}

/* ===================================
   ドロップダウンの矢印アイコン調整
   ブラウザ間の一貫性を保つ
   =================================== */
.tp-category-select::-ms-expand {
  display: none;
}

/* Firefox用 */
@-moz-document url-prefix() {
  .tp-category-select {
    padding-right: 28px;
  }
}

/* Safari用 */
@supports (-webkit-appearance: none) {
  .tp-category-select {
    -webkit-appearance: none;
  }
}


@media (min-width: 599px) {

  .item_serch_wrap {

    margin-top: 10px;
  }

}