/* ========================================
   メニューページ専用CSS
======================================== */
.fwd-page-menu {
    min-height: 100vh;
    background-color: #FCFCF2;
    background-image: url('../../images/background_pattern.png');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto;
}

/* ナビゲーションメニュー - ヘッダーの下に配置 */
.fwd-page-menu .fwd-main-menu {
    position: static;
    /* frontend.cssのposition: absoluteを上書き */
}

/* ナビゲーションメニュー */
.fwd-page-menu .fwd-nav {
    background: #000000;
    padding: 0;
}

.fwd-page-menu .nav-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
}

.fwd-page-menu .nav-item {
    flex: 1;
    text-align: center;
    border-bottom: 5px solid transparent;
    transition: all 0.3s ease;
}

.fwd-page-menu .nav-item.active {
    background: #333333;
    border-bottom-color: #a2000d;
}

.fwd-page-menu .nav-item a {
    display: block;
    padding: 20px;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Zen Old Mincho', serif;
    font-size: 16px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.fwd-page-menu .nav-item:hover {
    background: #333333;
}

.fwd-page-menu .nav-item a:hover {
    opacity: 0.8;
}

/* メインコンテンツ */
.fwd-page-menu .fwd-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* メニューセクション */
.menu-popular {
    max-width: 1004px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-popular h1 {
    font-family: 'Zen Old Mincho', serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 24px;
    color: #000000;
    text-align: center;
    margin: 0 0 58px 0;
}

/* 大きい画像グリッド（320x320） - 横3列 */
.menu-grid-large {
    display: grid;
    grid-template-columns: repeat(3, 320px);
    gap: 22px;
    margin: 0 auto 40px;
    max-width: 1004px;
    justify-content: center;
}

/* 小さい画像グリッド（192x192） - 横5列 */
.menu-grid-small {
    display: grid;
    grid-template-columns: repeat(5, 192px);
    gap: 11px;
    margin: 0 auto 60px;
    max-width: 1004px;
    justify-content: center;
}

/* メニューアイテム共通 */
.menu-item {
    position: relative;
}

/* 大きいメニューアイテム */
.menu-item--large .menu-image {
    width: 320px;
    height: 320px;
    background: #d9d9d9;
    position: relative;
    margin-bottom: 8px;
}

/* 小さいメニューアイテム */
.menu-item--small .menu-image {
    width: 192px;
    height: 192px;
    background: #d9d9d9;
    position: relative;
    margin-bottom: 8px;
}

.menu-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* デフォルト画像プレースホルダー（画像がない場合） */
.menu-image .post-image--default {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* NEWバッジ */
.new-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    padding: 13px 0 0 8px;
    background: #a2000d;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Noto Sans', sans-serif;
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: flex-start;
    clip-path: polygon(
        0 0,        /* 左上角 */
        100% 0,     /* 右上角 */
        0 100%      /* 左下角 */
    );
}

/* メニュー名 */
.menu-name {
    font-family: 'Zen Old Mincho', serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 24px;
    color: #000000;
    text-align: left;
}

/* 価格表示 */
.menu-price {
    font-family: 'Zen Old Mincho', serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 24px;
    color: #000000;
    text-align: left;
}

/* タブレット・モバイル（1024px以下）- Figma SP_メニュー_01 仕様 */
@media (max-width: 1024px) {
    .fwd-page-menu .fwd-main {
        padding: 40px 0;
    }

    .fwd-page-menu .nav-items {
        flex-direction: column;
    }

    .fwd-page-menu .nav-item {
        border-bottom: 1px solid #333333;
    }

    .fwd-page-menu .nav-item.active {
        border-left: 5px solid #a2000d;
        border-bottom: 1px solid #333333;
    }

    .menu-popular {
        max-width: 710px;
    }

    /* タイトル: Figma 42px (@2x) → 21px (@1x) */
    .menu-popular h1 {
        font-size: 21px;
        line-height: 24px;
        margin-bottom: 40px;
    }

    /* PC版3カラム用（large）: モバイルでは全幅表示 710x394 (@2x) */
    .menu-grid-large {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 30px;
        max-width: 710px;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    /* Large: 710x394 (@2x) → 355x197 (@1x), aspect-ratio 710/394 ≈ 1.8 */
    .menu-item--large .menu-image {
        width: 100%;
        height: auto;
        aspect-ratio: 710 / 394;
        margin: 0 0 8px 0;
    }

    /* Large用NEWバッジ: 130px (@2x) → 65px (@1x) */
    .menu-item--large .new-badge {
        width: 65px;
        height: 65px;
        padding: 16px 0 0 10px;
        font-size: 14px;
    }

    /* PC版5カラム用（small）: モバイルでは2カラムで正方形表示 350x350 (@2x) */
    .menu-grid-small {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 40px;
        max-width: 710px;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    /* Small: 350x350 (@2x) → 175x175 (@1x), 正方形 */
    .menu-item--small .menu-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        margin: 0 0 8px 0;
    }

    /* Small用NEWバッジ: 60px (@2x) → 30px (@1x) */
    .menu-item--small .new-badge {
        width: 30px;
        height: 30px;
        padding: 6px 0 0 4px;
        font-size: 8px;
    }

    /* メニュー名: Figma 26px / 40px (@2x) → 13px / 20px (@1x) */
    .menu-name {
        font-size: 13px;
        font-weight: 600;
        line-height: 20px;
        text-align: left;
    }

    .menu-price {
        font-size: 13px;
        line-height: 20px;
    }
}

/* 小型スマホ（375px以下）- 全て1カラム表示 */
@media (max-width: 375px) {
    .menu-grid-large,
    .menu-grid-small {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    /* Large: 全幅、アスペクト比維持 */
    .menu-item--large .menu-image {
        aspect-ratio: 710 / 394;
    }

    /* Small: 全幅、正方形維持 */
    .menu-item--small .menu-image {
        aspect-ratio: 1;
    }

    .menu-popular h1 {
        font-size: 18px;
    }

    .menu-name {
        font-size: 12px;
        line-height: 18px;
    }

    .menu-price {
        font-size: 12px;
        line-height: 18px;
    }
}

/* ========================================
   全メニュー一覧 - Figma仕様
======================================== */
.menu-all {
    max-width: 1004px;
    margin: 0 auto;
    padding: 0;
}

.menu-all__container {
    background: #FFFFFF;
    padding: 24px;
}

.menu-all__title {
    font-family: 'Zen Old Mincho', serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 24px;
    color: #000000;
    text-align: center;
    margin: 0 0 60px 0;
}

.menu-all__container {
    display: grid;
    grid-template-columns: 50% 50%;
}

/* カテゴリー（お食事・お飲みもの） */
.menu-category {
}

.menu-category__header {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-category__title {
    font-family: 'Zen Old Mincho', serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    color: #000000;
    margin: 0 0 8px 0;
    text-align: center;
}

.menu-category__line {
    width: 100px;
    height: 2px;
    background: #a2000d;
    margin: 0 auto;
}

/* カテゴリー内の2列グリッドレイアウト */
.menu-category__grid {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 14px 0;
    padding-left: 50px;
}

/* サブカテゴリー */
.menu-subcategory {
    margin-bottom: 0;
}

.menu-subcategory__title {
    font-family: 'Zen Old Mincho', serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    color: #000000;
    margin: 0 0 10px 0;
}

.menu-subcategory__items {
    font-family: 'Zen Old Mincho', serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 26px;
    color: #000000;
}

.menu-subcategory__items p {
    margin: 0;
}

/* タブレット・モバイル（1024px以下）- 全メニュー一覧 */
@media (max-width: 1024px) {
    .menu-all {
        max-width: 710px;
        padding: 0 20px;
        margin-top: 60px;
    }

    .menu-all__title {
        font-size: 36px;
        font-weight: 700;
        line-height: 24px;
        margin-bottom: 40px;
    }

    .menu-all__container {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .menu-category {
        width: 100%;
        max-width: 710px;
    }

    .menu-category__header {
        margin-bottom: 30px;
    }

    .menu-category__title {
        font-size: 28px;
        font-weight: 700;
        line-height: 24px;
        margin-bottom: 10px;
    }

    .menu-category__line {
        width: 85px;
        height: 4px;
    }

    .menu-category__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        padding-left: 0;
    }

    .menu-subcategory__title {
        font-size: 16px;
        font-weight: 700;
        line-height: 20px;
        margin-bottom: 15px;
    }

    .menu-subcategory__items {
        font-size: 14px;
        font-weight: 700;
        line-height: 26px;
        height: auto;
    }
}

/* 小型スマホ（375px以下）- 全メニュー一覧 */
@media (max-width: 375px) {
    .menu-all__title {
        font-size: 18px;
    }

    .menu-category__title {
        font-size: 14px;
    }

    .menu-subcategory__title {
        font-size: 14px;
    }

    .menu-subcategory__items {
        font-size: 12px;
        line-height: 20px;
    }
}
