/* ===================================================================
 * 共通: グローバル設定
 * =================================================================== */
:root {
  --color-primary: #3498db;
  --color-secondary: #2c3e50;
  --color-accent: #e74c3c;
  --color-text-light: #ecf0f1;
  --color-background-light: #ffffff;
  --font-family-sans: "Helvetica Neue", Arial, sans-serif;
}

body.release-body,
body.shop-body {
  margin: 0;
  padding: 0;
  background-color: #f4f7f9;
  font-family: var(--font-family-sans);
  line-height: 1.6;
}

@media screen and (max-width: 768px) {
  body.release-body,
  body.shop-body {
    padding-top: 60px;
  }
}

/* ===================================================================
 * 共通: トップエリア (デスクトップ)
 * =================================================================== */
.release-top-area,
.shop-top-area {
  background-color: var(--color-background-light);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 10px 0 0 0;
  z-index: 1001;
  display: block;
}

.release-header,
.shop-header {
  background-color: var(--color-background-light);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.release-header-inner,
.shop-header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.release-header-title,
.shop-header-title {
  font-size: 1.5rem;
  margin: 0;
  font-weight: bold;
}

.release-header-title a,
.shop-header-title a {
  color: var(--color-secondary);
  white-space: nowrap;
  padding: 5px 0;
  display: block;
}

.release-header-title a:hover,
.shop-header-title a:hover {
  color: var(--color-primary);
}

/* ===================================================================
 * 共通: ナビゲーションバー (デスクトップ)
 * =================================================================== */
.release-nav-fixed-bar,
.shop-nav-fixed-bar {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: var(--color-background-light);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.release-nav-content,
.shop-nav-content {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 5px 0;
}

.release-nav__static-items,
.shop-nav__static-items {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0 0 0 20px;
  margin: 0;
  gap: 20px;
}

.release-nav__list,
.shop-nav__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.release-nav__list li,
.shop-nav__list li {
  margin-left: 20px;
  padding: 5px 0;
}

.release-nav__list .menu-link,
.shop-nav__list .menu-link {
  display: inline-block;
  padding: 5px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-secondary);
  position: relative;
}

/* ホバー/アクティブ時のアンダーライン */
.release-nav__list .menu-link::after,
.shop-nav__list .menu-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.release-nav__list .menu-link:hover::after,
.release-nav__list .menu-link[aria-current="page"]::after,
.shop-nav__list .menu-link:hover::after,
.shop-nav__list .menu-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ===================================================================
 * 共通: 検索フォーム
 * =================================================================== */
.search-bar-item {
  margin-left: 20px !important;
}

.search-form {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 20px;
  overflow: hidden;
  background-color: #fff;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  padding-right: 1px;
}

.search-form:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.search-label {
  display: contents;
}

input.search-field {
  border: none;
  padding: 8px 15px;
  font-size: 0.9rem;
  outline: none;
  width: 250px;
}

input.search-field:focus {
  border-style: none;
}

.search-submit {
  background-color: var(--color-primary);
  border: none;
  cursor: pointer;
  height: 35px;
  width: 35px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.search-submit:hover {
  background-color: #2980b9;
}

.search-icon {
  width: 18px;
  height: 18px;
  stroke: var(--color-text-light);
}

/* 検索結果ドロップダウン - デスクトップ */
.searchwp-live-search-results {
  position: fixed !important;
  top: var(--header-bottom, 53px) !important;
  left: 83% !important;
  transform: translateX(-50%) !important;
  width: 300px !important;
  max-width: none !important;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 0 0 8px 8px;
}

/* ===================================================================
 * 共通: モバイルメニュー要素 (デフォルトで非表示)
 * =================================================================== */
.mobile-release-header-title,
.mobile-shop-header-title {
  display: none;
}

.menu-toggle-input,
.menu-toggle-label {
  display: none;
}

/* ハンバーガーアイコン */
.hamburger-icon {
  display: inline-block;
  width: 24px;
  height: 3px;
  background-color: #333;
  position: relative;
  vertical-align: middle;
  transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 3px;
  background-color: #333;
  left: 0;
  transition: transform 0.3s ease, top 0.3s ease, background-color 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

/* ===================================================================
 * 共通: タブレット (1024px以下)
 * =================================================================== */
@media (max-width: 1024px) {
  .release-header-inner,
  .shop-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .release-header-title,
  .shop-header-title {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }
}

/* ===================================================================
 * 共通: モバイル (768px以下)
 * =================================================================== */
@media screen and (max-width: 768px) {
  /* トップエリアを非表示 */
  .release-top-area,
  .shop-top-area {
    display: none;
  }

  /* モバイルヘッダータイトル表示 */
  .mobile-release-header-title,
  .mobile-shop-header-title {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    order: 1;
  }

  .mobile-release-header-title a,
  .mobile-shop-header-title a {
    color: var(--color-secondary);
    text-decoration: none;
  }

  /* ナビゲーションバーを固定 */
  .release-nav-fixed-bar,
  .shop-nav-fixed-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  /* ハンバーガーメニューボタン表示 */
  .menu-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    order: 2;
  }

  /* ナビゲーションコンテンツの構造リセット */
  .release-nav-content,
  .shop-nav-content {
    display: contents;
  }

  /* スライドメニューコンテナ */
  .release-nav,
  .shop-nav {
    position: fixed;
    top: 60px;
    right: 0;
    width: 80%;
    max-width: 400px;
    height: calc(100vh - 60px);
    background-color: #f4f7f9;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  /* メニュー展開時 */
  .menu-toggle-input:checked ~ .release-nav-content .release-nav,
  .menu-toggle-input:checked ~ .shop-nav-content .shop-nav {
    transform: translateX(0);
  }

  /* ハンバーガーアイコンを×に変形 */
  .menu-toggle-input:checked ~ .menu-toggle-label .hamburger-icon {
    background-color: transparent;
  }

  .menu-toggle-input:checked ~ .menu-toggle-label .hamburger-icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .menu-toggle-input:checked ~ .menu-toggle-label .hamburger-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  /* メニューリストを縦並び */
  .release-nav__list,
  .shop-nav__list {
    display: flex;
    flex-direction: column;
    padding: 20px;
    list-style: none;
    width: 100%;
    align-items: stretch;
  }

  .release-nav__list li,
  .shop-nav__list li {
    margin-left: 0;
    width: 100%;
    border-bottom: 1px dashed #ddd;
    padding: 0;
  }

  .release-nav__list .menu-link,
  .shop-nav__list .menu-link {
    display: block;
    padding: 15px 0;
    text-align: left;
    text-decoration: none;
    color: var(--color-secondary);
  }

  .release-nav__list .menu-link::after,
  .shop-nav__list .menu-link::after {
    content: none;
  }

  /* サブメニューの制御 */
  .release-nav__list .sub-menu,
  .shop-nav__list .sub-menu {
    display: none;
    list-style: none;
    padding-left: 20px !important;
  }

  .release-nav__list .menu-item-has-children.is-open > .sub-menu,
  .shop-nav__list .menu-item-has-children.is-open > .sub-menu {
    display: block !important;
  }

  .release-nav__list .menu-item-has-children > a,
  .shop-nav__list .menu-item-has-children > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .release-nav__list .menu-item-has-children > a::after,
  .shop-nav__list .menu-item-has-children > a::after {
    content: '\25BC';
    font-size: 10px;
    transition: transform 0.3s ease;
  }

  .release-nav__list .menu-item-has-children.is-open > a::after,
  .shop-nav__list .menu-item-has-children.is-open > a::after {
    transform: rotate(180deg);
  }

  /* 静的アイテム（アカウント・カート等）を右上に固定 */
  .release-nav__static-items,
  .shop-nav__static-items {
    display: flex !important;
    position: fixed !important;
    right: 60px;
    top: 30px;
    transform: translateY(-50%);
    gap: 15px;
    z-index: 1001;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
  }

  .release-nav__static-items svg,
  .shop-nav__static-items svg {
    width: 24px;
    height: 24px;
    fill: var(--color-secondary);
  }

  /* 検索フォーム */
  .search-bar-item {
    margin-left: 0 !important;
    padding: 10px 0 0 0 !important;
    border-bottom: none !important;
  }

  .search-form {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }

  .search-field {
    flex-grow: 1;
    width: auto;
  }

  /* 検索結果ドロップダウン - モバイル */
  .searchwp-live-search-results {
    position: fixed !important;
    top: 100px !important;
    left: 250px !important;
  }

  /* リストの順序調整 */
  .release-nav__list li,
  .shop-nav__list li {
    order: 10;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .release-nav__list .search-bar-item,
  .shop-nav__list .search-bar-item {
    order: -1;
  }

  .release-nav__list,
  .shop-nav__list {
    padding-bottom: 60px !important;
  }

  .release-nav-content ul,
  .shop-nav-content ul {
    flex-direction: row !important;
    padding-top: 5px !important;
  }

  .release-nav-content .release-nav__list li,
  .shop-nav-content .shop-nav__list li {
    text-align: left !important;
  }
}
