/* =================================
   PC：常設サイドバー
================================ */

.layout-wrapper {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 120px); /* ヘッダー分を除く高さ */
}

/* PC用サイドバー */
.sidebar {
  width: 260px;
  padding: 20px;
  box-sizing: border-box;
  background: inherit;     /* ← body と同じ色にする */
  position: relative;       /* ← fixed を完全に解除 */
}

/* メインコンテンツ */
.main-content {
  flex: 1;
  padding: 20px;
}

/* 各ボックス */
.sidebar-box {
  margin-bottom: 30px;
}

/* 見出し */
.sidebar-title {
  font-size: 15px;
  font-weight: bold;
  padding-bottom: 6px;
  border-bottom: 1px solid #ccc;
  margin-bottom: 12px;
}

/* 入力 */
.sidebar-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.price-range input {
  width: 80px;
  padding: 6px;
  height: 32px;
  box-sizing: border-box;
}

/* スイッチ */
.switch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  cursor: pointer;
  font-size: 14px;
}

.switch-item input {
  display: none;
}

.switch {
  width: 40px;
  height: 20px;
  background: #ccc;
  border-radius: 999px;
  position: relative;
}

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

.switch-item input:checked + .switch {
  background: #091f43;
}

.switch-item input:checked + .switch::before {
  transform: translateX(20px);
}



/* =================================
   スマホ：スライド式サイドバー
================================ */
@media screen and (max-width: 768px) {

  .layout-wrapper {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 120px;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - 120px);
    background: #f5f2ed;
    z-index: 9999;
    transition: left 0.3s ease;
    box-shadow: 4px 0 12px rgba(0,0,0,0.2);
  }

  .sidebar.active {
    left: 0;
  }

  .main-content {
    padding: 15px;
  }
}
