/*4列にする*/
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

/*列の間隔*/
.footer-column {
  max-width: 200px;
}

/*中段デザイン*/
.footer-column ul {
  list-style: none;
  margin-left: 0.5em;
}

/*中段文字色とサイズ*/
.footer-column p,
.footer-column a,
.footer-column h4,
.footer-column h4 a {
  color: #333;
  font-size: 0.8rem;
}

/*ホバー時下線*/
.footer-column a:hover {
  text-decoration: underline;
}

/*中段上と下の空白*/
.site-primary-footer-wrap,
.site-footer-section {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

/*スマホ対応*/
@media (max-width: 768px) {
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }

  .footer-column {
    margin: 0 auto;
  }

  /* スマホの時だけ空の見出しを消す */
  .mobile-hide-title {
    display: none;
  }

  /* リスト同士の距離を縮める調整 */
  /* 「製品カテゴリ」の列（2番目のdiv）の下マージンを消す */
  .footer-links-grid .footer-column:nth-child(2) {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  /* 「在庫モジュール」の列（3番目のdiv）の上マージンを消す */
  /* ※gap:16pxがあるので、それ以上に詰めたい場合はマイナスマージンを使う */
  .footer-links-grid .footer-column:nth-child(3) {
    margin-top: -8px; /* 好みで調整（-16pxにすると完全にくっつきます） */
  }
}

/* 下段全体の上下余白を詰める (Cookieウィンドウは除外)*/
.site-footer *:not(#cookie-notice):not(#cookie-notice *) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
