/* ヘッダー全体としては固定せず、通常のドキュメントフローに置く */
.ff-header {
  width: 100%;
}

li.block-headernav--shop {
  background: #000;
  border-radius: 5px;
  padding: 0 15px;
  margin-right: 40px;
}

li.block-headernav--shop a {
  color: #fff;
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .block-header-logo {
    width: 100%;
    display: flex;
    vertical-align: middle;
    justify-content: space-between;
    height: 100%;
    align-items: center;

    a {
      margin: 0;
    }

    .block-headernav--shop {
      border-radius: 5px;
      padding: 0 15px;
      text-decoration: none;
      height: 75%;
    }

    .block-headernav--shop a {
      color: #fff;
      letter-spacing: 0.1em;
    }

  }
}

/* ==========================================================================
    2段目 (ボトム - カルーセル) - スクロールで追従せず消える
    ========================================================================== */
.ff-bottom {
  background-color: #1a1a1a;
  color: #fff;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* .ff-top-wrapper が fixed なので、この要素はページの一番上(bodyのpadding分空いた場所)に描画されます */
}

.ff-news-carousel {
  width: 100%;
  max-width: 800px;
  padding: 0 40px;
  /* 矢印用の余白 */
}


/* Splideの上書きスタイル */
.ff-bottom .splide__slide {
  text-align: center;
  font-size: 13px;
  line-height: 40px;
  /* 高さの中央揃え用 */
}

.ff-bottom .splide__slide a {
  display: inline-block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.ff-bottom .splide__slide a:hover {
  text-decoration: underline;
}

.splide__pagination {
  bottom: -1.5em;
}

.splide__pagination__page {
  border: 1px solid #1a1a1a;
}

.splide__pagination__page.is-active {
  background: #1a1a1a;
}

.ff-news-badge {
  background-color: #0056b3;
  color: #fff;
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 3px;
  margin-right: 8px;
  font-weight: bold;
  vertical-align: middle;
}

.ff-news-badge.important {
  background-color: #e60012;
}

.ff-bottom .splide__arrow {
  background: transparent;
}

.ff-bottom .splide__arrow svg {
  fill: #fff;
}

.ff-bottom .splide__pagination {
  display: none;
  /* ドットナビゲーション非表示 */
}

/* ==========================================================================
    モバイル検索＆メニューオーバーレイ
    ========================================================================== */
.ff-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.98);
  z-index: 2000;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-sizing: border-box;
  padding: 80px 20px 40px;
}

.ff-overlay.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ff-overlay-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  color: #555;
  background: none;
  border: none;
  cursor: pointer;
}

.ff-overlay-content {
  max-width: 500px;
  margin: 0 auto;
}

/* オーバーレイ内の検索フォーム用スタイル調整 */
.ff-overlay-content .ff-search-desktop {
  width: 100%;
  display: block;
  /* 強制表示 */
  margin-bottom: 40px;
}

.ff-overlay-content .block-global-search--keyword {
  padding: 14px 45px 14px 20px;
  font-size: 16px;
  /* モバイルでのズーム防止 */
}

/* オーバーレイ内のメニュー */
.ff-menu-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.ff-menu-section {
  flex: 1;
  min-width: 150px;
}

.ff-menu-title {
  font-size: 16px;
  font-weight: bold;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.ff-menu-list li {
  margin-bottom: 12px;
}

.ff-menu-list a {
  font-size: 14px;
  color: #555;
  display: block;
}

.ff-menu-list a:hover {
  color: #0056b3;
}

/* ==========================================================================
    レスポンシブ (モバイル表示)
    ========================================================================== */
@media (max-width: 768px) {
  .ff-top {
    padding: 0 15px;
  }

  .ff-actions {
    gap: 15px;
  }

  /* デスクトップ用検索窓を非表示 */
  .ff-search-desktop {
    display: none;
  }

  /* モバイル用検索ボタンを表示 */
  .ff-search-mobile-btn {
    display: flex;
  }

  .ff-logo a {
    font-size: 20px;
  }

  .wrapper:has(.ff-bottom) .pane-main {
    padding-top: 55px;
  }

}

/* ==========================================================================
    プレビュー用メインエリア
    ========================================================================== */
.preview-main {
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.preview-box {
  background: #f0f0f0;
  border-radius: 8px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #888;
  font-size: 1.2rem;
}


@media screen and (min-width:767px) {
  .wrapper {
    padding-top: 150px;
  }
}


/* ===== dynamic-category flyout ===== */
/* 左メニューを主コンテンツ(.pane-main)より前面に。
   .pane-main は DOM 上で後＆既定では上に描画されるため、
   フライアウトが隠れないよう左メニュー側を positioned + z-index で持ち上げる。
   body.page-top でこのページ限定にスコープ（layout.css は無変更）。 */
body.page-top .pane-left-menu {
  position: relative;
  z-index: 5;
}

/* フライアウトの起点（カテゴリ行 と OUTLET） */
#block_of_leftmenu_top .block-dynamic-category--row,
#block_of_leftmenu_top .leftmenu_outlet {
  position: relative;
}

/* 子カテゴリを持つ場合の矢印（&#9654;） */
#block_of_leftmenu_top .block-dynamic-category--row.has-children>a,
#block_of_leftmenu_top .leftmenu_outlet.has-children {
  padding-right: 24px;
}

#block_of_leftmenu_top .block-dynamic-category--row.has-children>a::after,
#block_of_leftmenu_top .leftmenu_outlet.has-children::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  opacity: .45;
}

/* フライアウトパネル（右にカスケード） */
#block_of_leftmenu_top .block-dynamic-category--sub {
  position: absolute;
  top: -1px;
  left: 100%;
  min-width: 220px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateX(6px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

/* ホバー / フォーカスで表示（カテゴリ行・OUTLET 共通） */
#block_of_leftmenu_top .block-dynamic-category--row:hover>.block-dynamic-category--sub,
#block_of_leftmenu_top .block-dynamic-category--row:focus-within>.block-dynamic-category--sub,
#block_of_leftmenu_top .leftmenu_outlet:hover>.block-dynamic-category--sub,
#block_of_leftmenu_top .leftmenu_outlet:focus-within>.block-dynamic-category--sub {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

#block_of_leftmenu_top .block-dynamic-category--sub-row>a {
  display: block;
  padding: 8px 20px;
  white-space: nowrap;
  text-decoration: none;
  color: #333;
  line-height: 1.4;
}

#block_of_leftmenu_top {

  h2 {
    font-size: 20px;
    padding: 0 0 10px;
    margin-bottom: 10px;
  }

  h2:nth-of-type(n+2) {
    margin-top: 20px;
  }

  ul {
    padding: 0;

    >li {
      padding: 10px;
      cursor: pointer;

      &:hover {
        background-color: #46454a;

        >a {
          color: #fff;
        }
      }

      a {
        text-decoration: none;
        display: block;
        width: 100%;
      }

    }

    li.brand_history {
      /* display: none; */
    }

  }

  .leftmenu_outlet.has-children {
    /* margin-bottom: 30px; */
    padding: 10px;
    cursor: pointer;


    &:hover {
      background-color: #46454a;
      color: #fff;

      >a {
        color: #000;

        &:hover {
          color: #fff;
        }
      }
    }
  }
}