@charset "utf-8";

/* ========================================================================== 
   header.css - 最終解決版 (Anti-Jitter & Absolute Layout)
   - 修正：メニュー開閉時のロゴの「数ピクセルのカクつき」を物理的に封じる
   - 手法：flexをSP時に解除し、ロゴをスクロールバーの影響を受けない絶対座標に固定
   - 更新：PCナビゲーション内に「西川グループ」ボタンを統合（和モダン・プレミアム装飾）
   - 調整：通常メニューホバー時のゴールド下線を 1px に変更
   - 整合：SPナビ内のボタン角丸をPC版と統一 (2px)
   - 変更：SP展開メニューを上部開始配置へ変更し、各項目をアンダーバーで区切り
   - 解決：下位要素の position: sticky; を破壊しないよう overflow の指定方法を適正化
   - 解決：固定ヘッダーの下にメインスライダーを含む要素が潜り込む問題を完全解消
   - 改善：客観的評価に基づき、SPヘッダーを90pxから世界基準の70pxへ軽量化。圧迫感を完全解消。
   - 変更：SP・タブレット時をロゴ中央配置・右側に2ボタン（お品書き＋バーガー）へ最適化
   - 追加：メニューページ（menu/）滞在時は「お品書き」ボタンを自動で非表示化
   - 更新：ハンバーガー開閉時に「お品書き」ボタンが同期して滑らかに消えるアニメーションを追加
   ========================================================================== */

/* --- 0. 全体構造の強制リセット --- */
html, body {
    margin: 0 !important;
    padding: 0 !important;
}

/* スクロールバー消失によるガタつきを根本から防ぐ（推奨設定） */
html {
    overflow-y: scroll;
}

/* 
    【重要】ヘッダーが固定（position: fixed）されたことで浮いた分の高さを
    最外殻の共通コンテナ（#wrapper）の余白として完全に確保し、要素の潜り込みを防止。
*/
#wrapper {
    padding-top: 120px !important; /* PC版ヘッダーの通常時の高さ */
    transition: padding-top 0.3s ease; /* ヘッダー縮小時のガタつき・段差防止 */
}

main,
.hero-slider,
#js-hero-slider {
    margin-top: 0 !important;
    padding-top: 0 !important;
    display: block;
}

/* 各セクションへ飛んだ際の、見出しの被り防止（ヘッダー高＋αの余白） */
section {
    scroll-margin-top: 140px !important;
}

@media (max-width: 768px) {
    #wrapper {
        padding-top: 70px !important; /* 💡 SP版ヘッダーの軽量化（70px）に合わせて余白を適正化 */
    }
    section {
        scroll-margin-top: 90px !important; /* 💡 追従して調整 */
    }
}

/* --- 0.5 レスポンシブ表示制御 --- */
.sp-only {
    display: none !important;
}

@media (max-width: 768px) {
    .pc-only {
        display: none !important;
    }
    .sp-only {
        display: block !important;
    }
    .pc-nav {
        display: none !important;
    }
}

/* --- 1. 全体設定 --- */
.site-header {
    width: 100%;
    /* ⬇️ ここにこの1行を追記して、ヘッダー内のフォントを強制的にゴシックに固定します */
    font-family: "Noto Sans JP", sans-serif;
    
    background: rgba(255, 255, 255, 0.92); /* 元の美しいホワイト透過に戻す */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    border-bottom: 1px solid rgba(26, 61, 50, 0.08); /* 元の薄い境界線に戻す */
    height: 120px;
    /* カクつき防止のためtransitionを高さと色に限定 */
    transition: height 0.3s ease, background 0.3s ease;
    margin: 0 !important;
}

.site-header.is-scrolled {
    height: 90px;
    background: rgba(255, 255, 255, 0.98); /* 元のスクロール後背景に戻す */
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: relative;
}

/* --- 2. ロゴエリア --- */
.logo {
    position: relative;
    z-index: 1000001 !important; 
    /* 配置に関するtransitionを消してガタつきを防止 */
    transition: opacity 0.3s ease; 
}

.logo a {
    display: flex !important;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.logo img.logo-img {
    display: block !important;
    width: auto !important;
    height: 90px !important;
    object-fit: contain !important;
    transition: height 0.3s ease, filter 0.3s ease;
    /* 白背景の上でも「白丸のロゴ」の輪郭が優しく識別できるよう、極薄の影を配置 */
    filter: drop-shadow(0 2px 8px rgba(26, 61, 50, 0.08));
}

.is-scrolled .logo img.logo-img {
    height: 65px !important;
}

/* --- 3. PCナビゲーション --- */
.pc-nav ul {
    display: flex;
    align-items: center; /* メニューテキストとボタンを縦中央で揃える */
    list-style: none;
    gap: clamp(15px, 2.5vw, 35px);
    margin: 0;
    padding: 0;
}

.pc-nav a {
    color: #333; /* 元の読みやすい濃色に戻す */
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.05em;
    position: relative;
    padding: 10px 0;
    transition: 0.4s;
    white-space: nowrap;
}

/* 通常リンクホバー時の下線演出（1pxへ調整） */
.pc-nav a:not(.nav-btn):not(.nav-insta-icon)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #d4af37;
    transition: width 0.3s ease;
}

/* 通常リンクのみホバー時の色変更とライン伸長 */
.pc-nav a:not(.nav-btn):not(.nav-insta-icon):hover {
    color: #d4af37;
}

.pc-nav a:not(.nav-btn):not(.nav-insta-icon):hover::after {
    width: 100%;
}

/* ★PC用：Instagramアイコンリンクの個別装飾 */
.pc-nav a.nav-insta-icon {
    font-size: 22px;
    color: #1a3d32; /* 元の深緑アイコンに戻す */
    display: flex;
    align-items: center;
    padding: 10px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.pc-nav a.nav-insta-icon:hover {
    color: #d4af37 !important;
    transform: translateY(-2px);
}

/* ★PCナビ内に統合された西川グループボタン - プレミアム装飾版 */
.pc-nav a.nav-btn {
    position: relative;
    background: linear-gradient(135deg, #1a3d32 0%, #0d251e 100%);
    color: #ffffff !important;
    padding: 12px 30px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.15em;
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d4af37;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    line-height: 1;
}

/* 擬似要素で「流れる光」を演出 */
.pc-nav a.nav-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.6s;
}

/* ホバー時の挙動（白系のシンプルでクリーンなスタイルへ） */
.pc-nav a.nav-btn:hover {
    background: #ffffff !important; /* 白背景へ変更 */
    color: #1a3d32 !important; /* テキストはブランドカラーの深緑に */
    transform: translateY(-2px);
    /* ドロップシャドウを極限まで薄くし、軽やかさを演出 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #1a3d32; /* 枠線を深緑にして引き締める */
}

/* ホバー時の光エフェクトの動き */
.pc-nav a.nav-btn:hover::before {
    left: 100%;
}

/* テキストの横にさりげないアイコン（矢arrow）を付与 */
.pc-nav a.nav-btn::after {
    content: "〉";
    font-size: 10px;
    margin-left: 8px;
    transition: transform 0.3s ease, color 0.3s ease;
    /* ボタン専用のafterなので、下線用の設定をリセット */
    position: static;
    width: auto;
    height: auto;
    background: none;
}

/* 矢印の動きと色変更（ゴールド） */
.pc-nav a.nav-btn:hover::after {
    transform: translateX(2px);
    color: #d4af37 !important;
}

/* --- 4. ヘッダーコントロール --- */
.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 共通ボタンスタイル（SPナビや他パーツとの互換性を保持） */
.btn-contact {
    display: inline-block;
    background: #1a3d32;
    color: #ffffff !important;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: 4px;
    text-decoration: none;
    transition: 0.3s ease;
}

/* --- 5. スマホ用展開メニュー（上部開始・スクロール対応・アンダーバー付） --- */
.sp-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999999; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 上配置 */
    align-items: center;
    padding-top: 70px; /* 💡 SPヘッダー高（70px）に完全に同期 */
    overflow-y: auto; /* スクロール対応 */
    -webkit-overflow-scrolling: touch;

    opacity: 0;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.sp-nav.is-open {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.sp-nav-inner {
    width: 100%;
    padding: 20px 0 60px; /* 下部に少し余裕を持たせる */
    text-align: center;
}

.sp-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.sp-nav li {
    width: 85%; /* 線の長さを調整 */
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    /* 各項目の区切り線 */
    border-bottom: 1px solid rgba(26, 61, 50, 0.1);
}

/* 最後の項目（通常はボタン類）の線は消す */
.sp-nav li:last-child {
    border-bottom: none;
}

/* メメニューが開いた際にリストが順番に浮き上がる演出 */
.sp-nav.is-open li {
    opacity: 1;
    transform: translateY(0);
}
.sp-nav.is-open li:nth-child(1) { transition-delay: 0.1s; }
.sp-nav.is-open li:nth-child(2) { transition-delay: 0.15s; }
.sp-nav.is-open li:nth-child(3) { transition-delay: 0.2s; }
.sp-nav.is-open li:nth-child(4) { transition-delay: 0.25s; }
.sp-nav.is-open li:nth-child(5) { transition-delay: 0.3s; }

.sp-nav a {
    display: block;
    padding: 22px 0; /* タップ領域の確保 */
    font-size: 18px;
    font-weight: 600;
    color: #1a3d32;
    text-decoration: none;
    letter-spacing: 0.1em;
}

/* SPナビ内の西川グループボタン（PC版と角丸を整合：2px） */
.sp-nav .btn-contact {
    display: inline-block;
    margin-top: 25px;
    padding: 15px 45px;
    border-radius: 2px;
    border: 1px solid #d4af37;
    font-size: 14px;
}

/* --- 6. ハンバーガーボタン --- */
.menu-btn {
    width: 54px;
    height: 54px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 0;
    position: relative;
    z-index: 1000001 !important; 
    isolation: isolate;
}

@media (max-width: 768px) {
    .menu-btn {
        display: flex;
    }
}

.menu-btn-box {
    position: relative;
    width: 28px;
    height: 20px;
}

.menu-btn-box span {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background: #1a3d32; /* ハンバーガーの線を元の深緑に戻す */
    left: 0;
    border-radius: 2px;
    transition: transform 0.3s, top 0.3s, opacity 0.3s, background 0.3s;
}

.menu-btn-box span:nth-child(1) { top: 0; }
.menu-btn-box span:nth-child(2) { top: 9px; }
.menu-btn-box span:nth-child(3) { top: 18px; }

.is-menu-open .menu-btn-box span { background: #d4af37 !important; }
.is-menu-open .menu-btn-box span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.is-menu-open .menu-btn-box span:nth-child(2) { opacity: 0; }
.is-menu-open .menu-btn-box span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

/* --- 7. スマホ・タブレット(縦)時：【ロゴ中央・右側に2ボタン最適配置レイアウト】 --- */
@media (max-width: 768px) {
    .site-header {
        height: 70px; /* 💡 客観的ベストプラクティスに基づき、90pxから70pxへスリム化 */
        /* スマホ時のすりガラスホワイト背景に戻す */
        backdrop-filter: blur(6px) !important;
        -webkit-backdrop-filter: blur(6px) !important;
        background: rgba(255, 255, 255, 0.96) !important; 
    }

    .header-inner {
        padding: 0 8px; /* 右側に並ぶボタン領域を確保するため余白を微調整 */
        display: block !important; /* 絶対座標制御のためblock化 */
        position: relative; 
    }

    /* 
       【中央固定】ロゴを完全に中央配置。
       メニュー開閉時やスクロールバーによるガタつき（ジッター）を物理的に排除する絶対座標指定。
    */
    .logo {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        z-index: 1000001 !important;
        width: auto !important;
        display: flex !important;
        justify-content: center;
        align-items: center;
    }

    .logo img.logo-img {
        height: 40px !important; /* 💡 70pxのヘッダーに対して美しく収まるサイズ */
    }

    /* 
       【右側エリア】お品書き ＋ ハンバーガー を一括管理（インスタボタンを完全廃止）
    */
    .header-right-controls {
        position: absolute !important;
        top: 50% !important;
        right: 12px; /* 💡 ボタンが押しやすいよう右端の余白を適正化 */
        transform: translateY(-50%) !important;
        display: flex !important;
        align-items: center;
        gap: 8px; /* 💡 誤タップを防止するため、配置間隔をゆったり確保 */
        z-index: 1000001;
    }

    /* ★SPヘッダー内：お品書きボタンの装飾 */
    .sp-header-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: #1a3d32; /* ブランド深緑 */
        color: #ffffff !important;
        border: 1px solid #d4af37; /* ゴールドの枠線 */
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.05em;
        padding: 0 14px; /* 💡 タップ領域向上のため少し横幅を広く調整 */
        height: 38px; /* 💡 ハンバーガーの高さと綺麗に揃うよう微調整 */
        border-radius: 2px; /* PC版プレミアムボタンと統一 */
        text-decoration: none;
        white-space: nowrap;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        
        /* ⬇️ アニメーション用の初期設定を統合 */
        opacity: 1;
        transform: scale(1);
        visibility: visible;
        pointer-events: auto;
        /* メニュー開閉時の変化を滑らかにつなぐ */
        transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                    visibility 0.35s;
    }

    /* ⬇️ ハンバーガーメニューが開いたときのアニメーション挙動 */
    .is-menu-open .sp-header-menu-btn {
        opacity: 0;                               /* 不透明度を0にしてフェードアウト */
        transform: scale(0.85);                   /* ほんの少し縮小しながら奥に消える演出 */
        visibility: hidden;                       /* 完全に消えた後にタップ判定を物理的に消す */
        pointer-events: none;                     /* 非表示中の誤タップを完全に防止 */
    }
    
    /* タップ時のフィードバック */
    .sp-header-menu-btn:not(.is-menu-open .sp-header-menu-btn):active {
        opacity: 0.6;
    }

    .btn-contact.pc-only {
        display: none !important;
    }
}

/* --- SPナビ内の住所エリア --- */
.sp-address {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #1a3d32;
    opacity: 0.9;
    line-height: 1.8;
}

.sp-address .shop-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #1a3d32;
}

.sp-address .tel {
    font-weight: 700;
    margin-top: 5px;
}

/* ★スマホ用：Instagramリンクボタン装飾 */
.sp-insta-wrapper {
    margin: 0 auto 25px;
    width: 85%;
}

.sp-insta-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    color: #1a3d32 !important;
    border: 1px solid rgba(26, 61, 50, 0.2);
    padding: 14px 0 !important;
    font-size: 15px !important;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sp-insta-btn i {
    font-size: 19px;
    color: #8b5e3c; /* アクセントのブラウンゴールド */
}

.sp-insta-btn:active {
    background: rgba(26, 61, 50, 0.05);
    border-color: #1a3d32;
}

/* --- 8. 【自動切替】メニューページ専用非表示設定 --- */
/* 
   メニューページの「body」または「html」タグに、メニュー専用のクラス（例: class="page-menu"）
   もしくは、下位コンテナに固有のID（例: #menu-page）等が存在する場合、自動判別してボタンを完全に消し去ります。
*/
.page-menu .sp-header-menu-btn,
#menu-page .sp-header-menu-btn,
body[class*="menu"] .sp-header-menu-btn {
    display: none !important;
}