/* ========================================
 * EC-CUBE BtoB受注サイト - レイアウト
 * ======================================== */

/* ========================================
 * 2カラムレイアウト（サイドバー + メイン）
 * ======================================== */
.btob-layout {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--btob-header-height));
}

@media (min-width: 992px) {
  .btob-layout {
    flex-direction: row;
  }
}

.btob-main-area {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ========================================
 * サイドバー
 * ======================================== */
.btob-sidebar {
  background: var(--btob-bg-white);
  border-bottom: 1px solid var(--btob-border-light);
}

@media (min-width: 992px) {
  .btob-sidebar {
    flex-shrink: 0;
    width: 260px;
    border-bottom: none;
    border-right: 1px solid var(--btob-border-light);
    height: calc(100vh - var(--btob-header-height));
    overflow-y: auto;
    position: sticky;
    top: var(--btob-header-height);
  }
}

/* サイドバーセクション */
.btob-sidebar__section {
  border-bottom: 1px solid var(--btob-border-light);
}

.btob-sidebar__section:last-child {
  border-bottom: none;
}

.btob-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--btob-space-md) var(--btob-space-lg);
  background: var(--btob-bg);
  font-size: var(--btob-font-size-sm);
  font-weight: var(--btob-font-weight-bold);
  color: var(--btob-text);
  cursor: pointer;
  user-select: none;
}

.btob-sidebar__header:hover {
  background: var(--btob-border-light);
}

.btob-sidebar__toggle {
  font-size: var(--btob-font-size-xs);
  color: var(--btob-text-muted);
  transition: transform var(--btob-transition-fast);
}

.btob-sidebar__section.is-open .btob-sidebar__toggle {
  transform: rotate(180deg);
}

.btob-sidebar__content {
  display: none;
  padding: var(--btob-space-sm) 0;
}

.btob-sidebar__section.is-open .btob-sidebar__content {
  display: block;
}

@media (min-width: 992px) {
  .btob-sidebar__header {
    cursor: default;
  }

  .btob-sidebar__header:hover {
    background: var(--btob-bg);
  }

  .btob-sidebar__toggle {
    display: none;
  }

  .btob-sidebar__content {
    display: block;
  }
}

/* ========================================
 * カテゴリナビゲーション
 * ======================================== */
.btob-category-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.btob-category-nav__item {
  border-bottom: 1px solid var(--btob-border-light);
}

.btob-category-nav__item:last-child {
  border-bottom: none;
}

.btob-category-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--btob-space-sm) var(--btob-space-lg);
  font-size: var(--btob-font-size-sm);
  color: var(--btob-text);
  text-decoration: none;
  transition: all var(--btob-transition-fast);
}

.btob-category-nav__link:hover {
  background: var(--btob-bg);
  color: var(--btob-primary);
  text-decoration: none;
}

.btob-category-nav__link.is-active {
  background: var(--btob-primary-light);
  color: var(--btob-primary);
  font-weight: var(--btob-font-weight-bold);
  border-left: 3px solid var(--btob-primary);
}

.btob-category-nav__link.is-active:hover {
  background: var(--btob-primary-light);
  color: var(--btob-primary);
}

.btob-category-nav__count {
  font-size: var(--btob-font-size-xs);
  color: var(--btob-text-muted);
}

.btob-category-nav__link.is-active .btob-category-nav__count {
  color: var(--btob-primary);
}

/* サブカテゴリ */
.btob-category-nav__sub {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--btob-bg);
}

.btob-category-nav__sub .btob-category-nav__link {
  padding-left: var(--btob-space-2xl);
  font-size: var(--btob-font-size-xs);
}

/* ========================================
 * フィルターセクション
 * ======================================== */
.btob-filter-group {
  padding: var(--btob-space-sm) var(--btob-space-lg);
}

.btob-filter-group__title {
  font-size: var(--btob-font-size-xs);
  font-weight: var(--btob-font-weight-bold);
  color: var(--btob-text-muted);
  margin-bottom: var(--btob-space-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btob-filter-group__options {
  display: flex;
  flex-direction: column;
  gap: var(--btob-space-xs);
}

.btob-filter-option {
  display: flex;
  align-items: center;
  gap: var(--btob-space-sm);
  padding: var(--btob-space-xs) 0;
  font-size: var(--btob-font-size-sm);
  color: var(--btob-text);
  cursor: pointer;
}

.btob-filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--btob-primary);
  cursor: pointer;
}

.btob-filter-option:hover {
  color: var(--btob-primary);
}

/* ========================================
 * メインコンテンツエリア
 * ======================================== */
.btob-main {
  flex: 1;
  min-width: 0;
  background: var(--btob-bg);
}

/* ========================================
 * モバイル用サイドバー（非表示）
 * ======================================== */
@media (max-width: 991px) {
  .btob-sidebar {
    display: none;
  }

  .btob-sidebar-overlay {
    display: none;
  }
}

/* ========================================
 * パンくずリスト
 * ======================================== */
.btob-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--btob-space-xs);
  padding: var(--btob-space-sm) var(--btob-space-lg);
  background: var(--btob-bg);
  font-size: var(--btob-font-size-xs);
  color: var(--btob-text-muted);
  overflow-x: auto;
  white-space: nowrap;
}

.btob-breadcrumb__item {
  display: flex;
  align-items: center;
  gap: var(--btob-space-xs);
}

.btob-breadcrumb__link {
  color: var(--btob-text-secondary);
  text-decoration: none;
}

.btob-breadcrumb__link:hover {
  color: var(--btob-primary);
  text-decoration: underline;
}

.btob-breadcrumb__separator {
  color: var(--btob-border);
}

.btob-breadcrumb__current {
  color: var(--btob-text);
  font-weight: var(--btob-font-weight-medium);
}
