/* === メニューページ モバイル スペーシング調整 (スマホ表示時のみ) === */
@media (max-width: 781px) {
  /* カテゴリ名 (例: 一品料理, ドリンクメニュー など) */
  .menu-sp-fix h2.has-theme-1-color,
  .wp-block-group.alignwide.is-layout-flow > h2.has-theme-1-color {
    font-size: 2rem !important;
    margin-top: 3.5rem !important;
    margin-bottom: 1.25rem !important;
    padding-top: 1rem !important;
  }

  /* 最初のカテゴリ名は上余白を抑える */
  .menu-sp-fix h2.has-theme-1-color:first-of-type,
  .wp-block-group.alignwide.is-layout-flow > h2.has-theme-1-color:first-of-type {
    margin-top: 1rem !important;
  }

  /* サブセクション見出し (トッピング など) — 上は広く、下は狭く */
  .is-menu-section-name {
    margin-top: 3rem !important;
    margin-bottom: 0.25rem !important;
  }

  /* トッピング見出し直後のグループの上 padding を詰める */
  .is-menu-section-name + .wp-block-group {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* 画像ギャラリーが入っているカラム (flex-basis: 1000px) の下 padding を詰める。
     スマホで縦積みになると、ギャラリー下の余白がメニューとの間に大きな空白を作るため。 */
  .wp-block-columns .wp-block-column[style*="flex-basis:1000px"],
  .wp-block-columns .wp-block-column[style*="flex-basis: 1000px"] {
    padding-bottom: 0.5rem !important;
  }
}


/* === ハニートースト画像だけ大きくなるを修正 === */
/* PC ・ タブレット: 4カラム */
.wp-block-gallery .gallery-fix-last,
.wp-block-gallery .gallery-fix-last.wp-block-image{
  flex-grow: 0 !important;
  flex-basis: calc(25% - 19px) !important;
  max-width: calc(25% - 19px) !important;
}
/* スマホ: 599px以下だと2カラム */
@media (max-width: 599px){
  .wp-block-gallery .gallery-fix-last,
  .wp-block-gallery .gallery-fix-last.wp-block-image{
    flex-basis: calc(50% - 8px) !important;
    max-width: calc(50% - 8px) !important;
  }
}


/* === ヘッダーナビゲーションの縦位置調整 === */
/* サイトタイトルのベースラインに合わせてナビ項目を下げる */
.wp-block-template-part header .wp-block-navigation,
header .wp-block-navigation {
  align-self: flex-end;
}
