/* ============================================
   SP固定フッターバー（4分割）
   表示: max-width 767px のみ
   ============================================ */

.p-sp-footer-bar {
  display: none;
}

@media only screen and (max-width: 767px) {

  .p-sp-footer-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-top: 1px solid #000;
    box-sizing: border-box;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }

  .p-sp-footer-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* ---- 各ボタン共通 ---- */
  .p-sp-footer-bar__item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border: none;
    border-right: 1px solid #000;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.03em;
    box-sizing: border-box;
    cursor: pointer;
    text-align: center;
    padding: 6px 4px;
  }

  .p-sp-footer-bar__item:last-child {
    border-right: none;
  }

  /* ---- 1. 電話（幅20%・#303030） ---- */
  .p-sp-footer-bar__item--phone {
    flex: 0 0 20%;
    background-color: #303030;
    color: #fff !important;
    font-size: 22px;
    border-left: none;
  }

  /* ---- 2. イベント & 3. モデルハウス（均等幅・金色） ---- */
  .p-sp-footer-bar__item--gold {
    flex: 1 1 0;
    background-color: #dbd08d;
    color: #000 !important;
  }

  /* ---- 4. トップへ戻る（固定50px・#ebebeb） ---- */
  .p-sp-footer-bar__item--top {
    flex: 0 0 50px;
    background-color: #ebebeb;
    color: #555;
    font-size: 10px;
    padding: 0;
  }

  .p-sp-footer-bar__top-arrow {
    display: block;
    width: 10px;
    height: 10px;
    border-top: 2px solid #555;
    border-right: 2px solid #555;
    transform: rotate(-45deg);
    margin-top: 4px;
  }

  /* ---- body に下部余白を追加（バーの裏にコンテンツが隠れないように） ---- */
  body {
    padding-bottom: 50px;
  }

  /* ---- 既存のTOPへ戻るボタンを非表示 ---- */
  #js-pagetop.p-pagetop {
    display: none !important;
  }

}
