/* オーバーレイ */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 999;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ドロワーメニュー本体 */
.drawer-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 85vw;
  height: 100%;
  background: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transform: translateX(-100%);
  transition: transform 0.3s ease-out;
  z-index: 1000;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.drawer-menu.active {
  transform: translateX(0);
}

/* ドロワーヘッダー */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.drawer-title {
  font-size: 24px;
  font-weight: bold;
  margin: 0;
  color: #000;
}

.drawer-clear-all {
  font-size: 18px;
  color: #68bedf;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: auto;
  margin-right: 12px;
  transition: opacity 0.3s;
}

.drawer-clear-all:hover {
  opacity: 0.7;
}

.drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.drawer-close:hover {
  opacity: 0.7;
}

/* ドロワーコンテンツ */
.drawer-content {
  padding: 20px 0;
  flex: 1;
  overflow-y: auto;
}

.drawer-section {
  margin-bottom: 24px;
}

.drawer-section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  padding: 8px 16px;
  background: #c4e9fb;
  color: #000;
  border-radius: 4px;
}

.drawer-facet {
  padding-left: 20px;
  padding-right: 20px;

  .facetwp-facet {
    margin-bottom: 10px;
  }
}

/* ドロップダウン */
.drawer-dropdown {
  margin-bottom: 12px;
}

.drawer-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  transition: border-color 0.3s;
}

.drawer-select:hover,
.drawer-select:focus {
  border-color: #00bcd4;
  outline: none;
}

/* Body scroll lock when drawer is open */
body.drawer-open {
  overflow: hidden;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .drawer-menu {
    width: 100%;
    max-width: 80vw;
  }
}
