/* 共通UI機能のCSS - ヘッダーとフローティングボタンの統一動作 */

/* 全体フォント統一設定 */
* {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif !important;
}

body, html {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif !important;
}

/* フローティングボタンの基本設定とスクロール表示設定 */
.floating-buttons {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 15px;
  z-index: 1000;
  width: auto;
  max-width: 90vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.6s ease;
}

@media (max-width: 768px) {
  .floating-buttons {
    /* モバイル版の調整 - 画面中央に確実に配置 */
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    gap: 15px;
    justify-content: center;
    align-items: center;
    width: auto;
    max-width: calc(100vw - 40px); /* 左右20pxずつ余白 */
  }
  
  .floating-buttons a {
    /* 統一されたボタンサイズ（products.htmlに合わせる） */
    width: 120px;
    min-width: 120px;
    max-width: 140px;
    height: 44px;
    min-height: 44px;
    font-size: 1.08rem;
    font-weight: 700;
    border-radius: 22px;
    padding: 0;
    margin-bottom: 0;
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    letter-spacing: 0.02em;
  }
  
  .floating-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  
  /* ボタンの色設定 */
  .floating-buttons .btn-primary {
    background: #ffad2b;
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,173,43,0.18), 0 2px 8px rgba(0,0,0,0.10);
  }
  
  .floating-buttons .btn-line {
    background: #06C755;
    color: #fff;
    box-shadow: 0 4px 16px rgba(6,199,85,0.18), 0 2px 8px rgba(0,0,0,0.10);
  }
  
  .floating-buttons .btn-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }
  
  .floating-buttons .btn-text {
    width: 100%;
    text-align: center;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1;
    padding: 0;
  }
}

.floating-buttons.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
}

.floating-buttons.hide-for-footer {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
}

/* メインナビゲーション固定機能 */

/* ヘッダー全体を固定（PC版のみ） */
@media (min-width: 769px) {
  .header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #fff;
  }
  body.header-fixed {
    padding-top: 0 !important;
  }
}

/* 固定時の上部緑色エリア */


.main-nav.sticky .container {
  background: var(--green);
  margin: 0 auto;
  padding: 0 1rem;
  border: none;
}

.main-nav.sticky .nav-links {
  background: var(--green);
  margin: 0;
  padding: 0;
  border: none;
}

.main-nav.sticky .nav-link {
  color: white;
  background: var(--green);
  padding: 15px 20px;
  margin: 0;
  border: none;
}

.main-nav.sticky .nav-link:hover {
  background: var(--green-dark);
  color: white;
}

.main-nav-placeholder {
  height: 0;
  transition: height 0.3s ease;
  background: transparent;
}

.main-nav-placeholder.active {
  height: 50px; /* メインナビの実際の高さに合わせて調整 */
}

/* 固定時の上部余白調整 */


/* PC版でフローティングボタンを非表示 */
@media (min-width: 769px) {
  .floating-buttons {
    display: none !important;
  }
}

/* 全サイズでのボタン統一スタイル */
.floating-buttons .btn {
  flex: 0 0 auto;
  width: 120px;
  min-width: 120px;
  max-width: 140px;
  height: 44px;
  min-height: 44px;
  font-size: 1.08rem;
  font-weight: 700;
  border-radius: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  padding: 0;
  justify-content: center;
  align-items: center;
  text-align: center;
  letter-spacing: 0.02em;
  transition: box-shadow 0.2s;
  border: none;
  text-decoration: none;
  display: flex;
}

.floating-buttons .btn .btn-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.floating-buttons .btn .btn-text {
  width: 100%;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.floating-buttons .btn-primary {
  background: #ffad2b;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,173,43,0.18), 0 2px 8px rgba(0,0,0,0.10);
}

.floating-buttons .btn-line {
  background: #06C755;
  color: #fff;
  box-shadow: 0 4px 16px rgba(6,199,85,0.18), 0 2px 8px rgba(0,0,0,0.10);
}

.floating-buttons .btn:active {
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

/* ナビゲーションのフォーカスアウトライン削除 */
.logo {
  outline: none !important;
}

.logo:focus {
  outline: none !important;
  box-shadow: none !important;
}

.logo img {
  outline: none !important;
}

.logo-img:focus {
  outline: none !important;
  box-shadow: none !important;
}

.nav-link {
  outline: none !important;
}

.nav-link:focus {
  outline: none !important;
  box-shadow: none !important;
}