/* Source: Additional CSS, lines 635-650 and 1715-1973. Headers / menus only. */
@media screen and (max-width: 768px) {
  #header,
  #header-container,
  .header,
  .header-container {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .logo-image,
  .site-logo-image,
  .header-logo img,
  .logo-header img {
    width: auto;
    max-height: 58px;
  }

}
/* ===================================
   ROZANICA PCヘッダー統一
   PCでもモバイル用メニューを使用
=================================== */

@media screen and (min-width: 1024px) {

  /* 元のPCヘッダーとナビを非表示 */
  #header-container {
    display: none !important;
  }

  /* モバイル用ヘッダーをPC全幅に表示 */
  .mobile-header-menu-buttons {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 60px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    box-sizing: border-box;
    align-items: center !important;
    justify-content: space-between !important;
    background: #fff;
  }

  /* 左右ボタンの幅を揃える */
  .mobile-header-menu-buttons
  > .menu-button:not(.logo-menu-button) {
    width: 70px !important;
    flex: 0 0 70px !important;
  }

  /* ロゴを画面中央へ */
  .mobile-header-menu-buttons
  > .logo-menu-button {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0;
    text-align: center;
  }

  /* ロゴ画像のサイズ */
  .mobile-header-menu-buttons
  .logo-menu-button img {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 42px;
    margin: 0 auto;
    object-fit: contain;
  }

  /* 固定ヘッダーと本文の重なりを防止 */
  body.mblt-header-mobile-buttons {
    margin-top: 60px !important;
  }
}

/* =====================================
   ROZANICA | Slide-in Menu Design
   PC / SP 共通
===================================== */

/* メニューパネル本体 */
#navi-menu-content {
  box-sizing: border-box;
  width: 92vw !important;
  max-width: 420px !important;
  height: 100vh;
  height: 100dvh;
  padding: 0 22px 28px;
  background: #f5f6f7 !important;
  box-shadow: 10px 0 36px rgba(0, 0, 0, 0.12);
  overscroll-behavior: contain;
}

/* 見出し */
#navi-menu-content::before {
  content: "カテゴリー";
  display: block;
  padding: 34px 56px 18px 0;
  margin-bottom: 18px;
  border-bottom: 1px solid #d7dbe0;
  color: #111111;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* 閉じるボタン */
#navi-menu-content .navi-menu-close-button {
  position: absolute;
  top: 20px;
  right: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  background: transparent;
  color: #111111;
  border: none;
  border-radius: 0;
  font-size: 28px;
  line-height: 1;
  box-shadow: none;
  transition: opacity .2s ease;
}

#navi-menu-content .navi-menu-close-button:hover {
  opacity: 0.65;
}

/* リスト全体 */
#navi-menu-content .menu-drawer {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #d7dbe0;
}

/* 各項目 */
#navi-menu-content .menu-drawer > li {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid #d7dbe0;
}

/* リンク本体 */
#navi-menu-content .menu-drawer > li > a {
  display: block;
  padding: 20px 34px 20px 0;
  background: transparent !important;
  color: #111111 !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  transition: background .2s ease, color .2s ease, padding-left .2s ease;
}

/* 右矢印 */
#navi-menu-content .menu-drawer > li > a::after {
  content: "→";
  position: absolute;
  right: 0;
  top: 20px;
  color: #0b79b7;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

/* 番号は出さない */
#navi-menu-content .menu-drawer > li > a::before {
  content: none !important;
}

/* ホバー */
#navi-menu-content .menu-drawer > li > a:hover,
#navi-menu-content .menu-drawer > li > a:focus-visible {
  background: #eef4f8 !important;
  color: #111111 !important;
  padding-left: 8px;
  outline: none;
}

/* 説明文を表示・整形
   ※ヘッダー横並び部分では非表示のまま */
#navi-menu-content .menu-drawer .sub-caption {
  display: block !important;
  margin-top: 8px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
}

/* サブメニューがある場合 */
#navi-menu-content .menu-drawer .sub-menu {
  margin: 0 0 12px 0;
  padding: 0 0 0 16px;
  border-left: 2px solid #d7dbe0;
}

#navi-menu-content .menu-drawer .sub-menu li a {
  display: block;
  padding: 10px 0;
  color: #1f2937 !important;
  font-size: 14px;
  text-decoration: none;
}

/* 横並びヘッダーの説明文は引き続き非表示 */
.navi .sub-caption {
  display: none !important;
}

/* アニメーション控えめ設定 */
@media (prefers-reduced-motion: reduce) {
  #navi-menu-content .menu-drawer > li > a,
  #navi-menu-content .navi-menu-close-button {
    transition: none;
  }
}


/* =====================================
   ROZANICA | Mobile Header Spacing
===================================== */

@media screen and (max-width: 1023px) {

  /* ヘッダーの高さ */
  :root {
    --cocoon--mobile-header-menu-buttons--height: 70px;
  }

  .mobile-header-menu-buttons {
    height: 70px !important;
    min-height: 70px !important;
    align-items: center !important;
    background: #fff !important;
    box-shadow: none !important;
    border-bottom: 1px solid #e5e5e5;
  }

  /* 各ボタンの縦位置を中央に */
  .mobile-header-menu-buttons .menu-button {
    height: 70px !important;
    align-items: center !important;
    justify-content: center;
  }

  /* ロゴサイズを抑えて余白を確保 */
  .mobile-header-menu-buttons
  .logo-menu-button img {
    width: auto !important;
    height: auto !important;
    max-width: min(190px, 48vw) !important;
    max-height: 40px !important;
    margin: 0 auto !important;
    object-fit: contain;
  }

}
