@charset "utf-8";
/* CSS Document */

/******************************************************
 ** ヘッダー商品検索CSS
******************************************************/
body.modal-open {
  overflow: hidden;
}

#searchModal {
  display: none;
}

#searchModal.active {
  display: block;
}

.searchOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9998;
}

.searchHeader {
  flex-shrink: 0;
  padding: 20px 30px;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

.searchBody {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
}

.searchFooter {
  flex-shrink: 0;
  padding: 20px;
  border-top: 1px solid #ddd;
  background: #fff;
  text-align: center;
}

.searchPanel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1200px, 90vw);
  height: 85vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  z-index: 9999;
}

.searchClose {
  position: absolute;
  top: 15px;
  right: 20px;
  border: none;
  background: none;
  font-size: 32px;
  cursor:pointer;
}

/* ===================================
   セクション
=================================== */
.searchSection {
  margin-bottom: 40px;
}

.searchTitle {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: bold;
}

/* ===================================
   グリッド
=================================== */
.optionGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ===================================
   共通カード
=================================== */
.optionItem {
  display: flex !important;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  background: #fff;
  cursor: pointer;
  transition: .3s;
}

.optionItem:hover {
  border-color: #1d3f82;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
}

/* ===================================
   チェックボックス
=================================== */
.optionItem input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}

/* ===================================
   ラジオボタン
=================================== */
.radioItem input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
}

/* ===================================
   サムネイルあり
=================================== */
.optionThumb {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.optionThumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===================================
   テキスト
=================================== */
.optionText{
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
}

/* ===================================
   サムネなし
=================================== */
.optionItem.noThumb {
  min-height: 60px;
  justify-content: flex-start;
}

.optionItem.noThumb .optionText {
  font-weight: 500;
}

/* ===================================
   選択時
=================================== */
.optionItem.checked {
  border: 2px solid #1d3f82;
  background: #f5f8ff;
}

/* ===================================
   タブレット
=================================== */
@media (max-width:1024px) {
  .optionGrid {
    grid-template-columns: repeat(3,1fr);
  }
}

/* ===================================
   スマホ
=================================== */
@media (max-width:736px) {
  .optionGrid {
    grid-template-columns: repeat(2,1fr);
    gap: 10px;
  }

  .optionItem {
    padding: 10px;
    gap: 8px;
  }

  .optionThumb {
    width: 45px;
    height: 45px;
  }

  .optionText {
    font-size: 12px;
    line-height: 1.4;
  }
}

.searchFooter button {
  width: 320px;
  height: 60px;
  border: 2px solid #888;
  background: #fff;
  color: #000;
  font-size: 18px;
  cursor: pointer;
  transition: .3s;
}

.searchFooter button:hover {
  background: #888;
  color: #fff;
}