/* ベース設定 */
html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  color: #444;
  margin: 0;
  background: #fff;
  text-align: left;
}

.container {
  max-width: 950px;
  margin: 0 auto;
  padding: 3rem 1rem;
  box-sizing: border-box;
}

/* サイトナビゲーションの余白調整 */
.site-navigation .container {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* 「お知らせ」セクションの余白調整 */
.announcement .container {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* 下段メニューの余白調整 */
.site-navigation:last-of-type .container {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* セクション余白 */
.section {
  margin-bottom: 3rem;
}

/* ヘッダー */
.site-header {
  background: #09357c;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  text-align: center;
  overflow: hidden;
}

/* ヘッダー画像：中央寄せ（元に戻す） */
.header-image {
  display: block;
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  margin: 30px auto;
}

/* ナビゲーション1（上段：横並び固定＋折り返し） */
.nav-row.nav-row-large {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.3rem;
  padding: 0 1rem;
}

.nav-row.nav-row-large a {
  flex: 1 1 auto;
  max-width: 170px;
  height: auto;
  min-height: 90px;
  font-size: 1rem;
  font-weight: bold;
  background: #fff;
  color: #333;
  border: 0.5px solid #ccc;
  box-sizing: border-box;
  transition: background 0.3s, color 0.3s;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  padding: 0.5rem;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-row.nav-row-large a:hover {
  background: #333;
  color: #fff;
}

/* ナビゲーション2（グリッドボタン） */
.nav-row.nav-row-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.3rem;
  padding: 0 1rem;
  overflow-x: auto;
}

.nav-row.nav-row-grid a {
  flex: 0 0 auto;
  width: 140px;
  font-size: 1rem;
  font-weight: bold;
  background: #fff;
  color: #333;
  border: 0.5px solid #ccc;
  box-sizing: border-box;
  transition: background 0.3s, color 0.3s;
  height: 80px;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-row.nav-row-grid a:hover {
  background: #333;
  color: #fff;
}

/* 小画面対応：グリッドボタン（下段） */
@media (max-width: 950px) {
  .nav-row.nav-row-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
  }

  .nav-row.nav-row-grid a {
    width: 100%;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    height: 80px;
  }
}

/* 小画面対応：上段ボタンの文字サイズ調整＋エリア非表示 */
@media (max-width: 768px) {
  .nav-row.nav-row-large a {
    font-size: 1rem;
    font-weight: bold;
    min-height: 70px;
  }

  .nav-row.nav-row-large .area-label {
    display: none;
  }
}

/* h2 の文字サイズを一回り小さく */
h2 {
  font-size: 1.75rem !important;
  font-weight: 600;
  margin-bottom: 1rem;
}

h2 small {
  font-size: 0.6em;
}

/* 通常テキスト */
.container p {
  font-size: 1.1rem;
}

/* お知らせ：折り返し表示（省略せず全文表示） */
.announcement p {
  border-bottom: 1px dotted #333;
  line-height: 1.7;
  word-break: break-word;
  padding-bottom: 0.5rem;
  white-space: normal;  /* 折り返し許可 */
  overflow: visible;    /* 隠さない */
  text-overflow: unset; /* 省略記号を無効化 */
}

/* フッター */
.site-footer {
  background: #09357c;
  color: #fff;
  text-align: center;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer-nav {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: #ddd;
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem; /* ← コピーライトの文字を小さく */
  color: #fff;       /* ← 白のまま */
}

/* レスポンシブ画像 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ヘッダーの高さ調整 */
@media (max-width: 1200px) {
  .site-header {
    height: 160px;
  }
}

@media (max-width: 950px) {
  .site-header {
    height: 130px;
  }
}

@media (max-width: 600px) {
  .site-header {
    height: 100px;
  }
}

/* ============================= */
/* 横並び画像の追加スタイル      */
/* ============================= */

.image-row {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  margin: 0;
  padding: 0;
}

.image-row img {
  width: 50%;
  height: auto;
  display: block;
  object-fit: cover;
  margin: 0;
  padding: 0;
}

/* 1200px以下で002.jpgを非表示・001.jpgを100%に */
@media (max-width: 1200px) {
  .image-002 {
    display: none !important;
  }

  .image-001 {
    width: 100% !important;
  }
}

#catalog_info {
  font-weight: bold;
}

/* ============================= */
/* ヘッダー直後の最初の見出し位置を統一 */
/* ============================= */
:root {
  --header-first-gap: 2.5rem; /* ← ここを変えれば全ページ調整可能 */
}

/* header の直後が .container の場合（hokkaido.html など） */
.site-header + .container {
  padding-top: var(--header-first-gap) !important;
}

/* header の直後が nav 等で、その中の最初の .container の場合（index.html など） */
.site-header + * > .container:first-child {
  padding-top: var(--header-first-gap) !important;
}

/* ===================================== */
/* 600px以下：h2やpの余白は維持しつつ、 */
/*            ボタン行だけ左右余白なし   */
/* ===================================== */
@media (max-width: 600px) {
  /* 上段ボタン（エリア） */
  .nav-row.nav-row-large {
    flex-wrap: nowrap;               /* 横並び維持 */
    justify-content: space-between;  /* 均等配置 */
    gap: 0.3rem;                     /* ボタン間は少し空ける */
    padding-left: 0;                 /* ← ボタン行だけ左右余白をなくす */
    padding-right: 0;
  }

  .nav-row.nav-row-large a {
    flex: 1 1 0;                     /* 均等幅 */
    max-width: none;                 /* 170px制限を解除 */
  }

  /* 下段ボタン（ホーム・会社情報など） */
  .nav-row.nav-row-grid {
    display: grid;                   /* 600pxでもグリッド */
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
    padding-left: 0;                 /* ← ボタン行だけ左右余白をなくす */
    padding-right: 0;
  }

  .nav-row.nav-row-grid a {
    width: 100%;                     /* 各セルで幅いっぱい */
  }

  /* ▼ スマホ時に余白を狭める調整 ▼ */

  /* 「入荷・発送情報」の上余白（header直後の最初のcontainer） */
  .site-header + * > .container:first-child {
    padding-top: 1rem !important;  /* 2.5rem → 1rem */
  }

  /* メイン画像の上余白（main直下の最初のcontainerが作るスペース） */
  main > .container {
    padding-bottom: 1rem;  /* 3rem → 1rem */
  }
}
