/* =========================================================
   日本腸活協会 会員専用画面：共通ヘッダー・フッター
   mu-plugins/agfl-association-rebate.php の会員専用画面と同じデザイン。
   テーマ style.css の汎用 header / footer / nav 指定
   （黒背景・白文字・padding !important 等）に負けないよう、
   ID セレクタと !important で指定しています。
   ========================================================= */
#agfl-site-header,
#agfl-site-footer,
#agfl-portal-header,
#agfl-portal-footer {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  position: relative !important;
  clear: both;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  color: #25333b !important;
  line-height: 1.5 !important;
  font-family: inherit;
  text-align: left;
  z-index: 2;
}
#agfl-site-header,
#agfl-portal-header { border-bottom: 1px solid #d8e0e4 !important; }
#agfl-site-footer,
#agfl-portal-footer { border-top: 1px solid #d8e0e4 !important; margin-top: 32px !important; background: #f7f9fa !important; }

#agfl-site-header .agfl-portal-inner,
#agfl-site-footer .agfl-portal-inner,
#agfl-portal-footer .agfl-portal-inner {
  box-sizing: border-box !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 18px 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}
#agfl-site-header .agfl-portal-title {
  font-size: clamp(17px, 2.4vw, 24px) !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  color: #25333b !important;
  text-decoration: none !important;
}
#agfl-site-footer .agfl-portal-footer-title { font-size: 14px !important; font-weight: 600 !important; color: #25333b !important; }

#agfl-site-header .agfl-portal-nav,
#agfl-site-footer .agfl-portal-nav {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}
#agfl-site-header .agfl-portal-nav a,
#agfl-site-footer .agfl-portal-nav a {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  border: 1px solid #d1dbe0 !important;
  border-radius: 6px !important;
  color: #25333b !important;
  background: #fff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
#agfl-site-header .agfl-portal-nav a[aria-current="page"],
#agfl-site-footer .agfl-portal-nav a[aria-current="page"] { color: #fff !important; background: #344e59 !important; border-color: #344e59 !important; }
#agfl-site-header .agfl-portal-nav a:hover,
#agfl-site-footer .agfl-portal-nav a:hover { text-decoration: underline !important; }
#agfl-site-header a:focus-visible,
#agfl-site-footer a:focus-visible { outline: 2px solid #344e59; outline-offset: 3px; }

/* フッター下段：法定表記・著作権 */
#agfl-site-footer .agfl-site-footer__legal,
#agfl-portal-footer .agfl-site-footer__legal {
  border-top: 1px solid #e3e9ec !important;
  padding: 14px 24px 20px !important;
}
#agfl-site-footer .agfl-site-footer__policy,
#agfl-portal-footer .agfl-site-footer__policy {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
#agfl-site-footer .agfl-site-footer__policy li,
#agfl-portal-footer .agfl-site-footer__policy li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
#agfl-site-footer .agfl-site-footer__policy a,
#agfl-portal-footer .agfl-site-footer__policy a { color: #4b5b63 !important; font-size: 12px !important; text-decoration: none !important; }
#agfl-site-footer .agfl-site-footer__policy a:hover,
#agfl-portal-footer .agfl-site-footer__policy a:hover { text-decoration: underline !important; }
#agfl-site-footer .agfl-site-footer__copy,
#agfl-portal-footer .agfl-site-footer__copy { margin: 0 !important; color: #6b7a81 !important; font-size: 11px !important; }

/* 旧ヘッダー用のスマホ固定配置（agfl-mobile-sticky-header）を打ち消す。
   ヘッダーのボタンにカート・マイページがあるため、スマホでは右上アイコンを出さない。 */
@media screen and (max-width: 1179px) {
  body article.my_account { display: none !important; }
}

@media (max-width: 600px) {
  #agfl-site-header .agfl-portal-inner,
  #agfl-site-footer .agfl-portal-inner,
  #agfl-portal-footer .agfl-portal-inner { padding: 14px 12px !important; gap: 10px !important; justify-content: center !important; text-align: center !important; }
  #agfl-site-header .agfl-portal-nav,
  #agfl-site-footer .agfl-portal-nav { width: 100% !important; justify-content: center !important; gap: 6px !important; }
  #agfl-site-header .agfl-portal-nav a,
  #agfl-site-footer .agfl-portal-nav a { flex: 1 1 0 !important; min-width: 0 !important; padding: 8px 3px !important; font-size: 13px !important; }
  #agfl-site-footer .agfl-site-footer__policy,
  #agfl-portal-footer .agfl-site-footer__policy { justify-content: center !important; }
}
