/* 料理頁 */

.menu_flex_div {
    position: absolute;
    display: flex;
    justify-content: center;
    top: 50px;
    left: 220px;
    right: 95px;
}

.menu_container {
    position: absolute;
    display: block;
    width: min(95%, 1000px);
}

.select_container {
    position: absolute;
    display: block;
    width: min(200px, 18vw);
}

#menu_button-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-auto-rows: calc(max(min(70px, 6vw), 40px));
    grid-gap: 8px;
    margin: 30px 0 30px 0;
}

.buttonContainer {
    display: flex;
    margin: 0;
    height: 50px;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.menu_btn {
    font-size: min(0.9em, 5vw);
    color: white;
    text-align: center;
    line-height: 25px;
    width: 20px;
    height: 20px;
    border-radius: 0px;
    display: inline-block;
    background-color: var(--btn-gray);
    margin: 5px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.menu_btn.active {
    background-color: var(--brand);
}

.sub_button-container {
    display: block;
    height: calc(max(min(70px, 6vw), 40px));
}

.menu_button {
    padding: 10px;
    margin: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    border: none;
    color: #000000;

    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
    transition-duration: 0.4s;
    text-align: center;
}

.menu_space {
    display: block;
    height: 50px;
}

.menu_button:hover {
    translate: 0px -2px;
    box-shadow: 0px 2px 0px rgba(0, 0, 0, 0.4);
}

.menu_button.active {
    background-color: var(--brand);
}

.menu_button span {
    letter-spacing: .2em;
    font-size: calc(max(min(1.8vw, 1.4em), 1.1em));
    font-weight: 400;
}

#menu_content-container {
    position: absolute;
    display: block;
    width: 100%;
}

.menu_content {
    display: block;
    width: min(100%, 800px);
}

.menu_image {
    width: 100%;
    height: auto;
}

.menu_content::after {
    content: "";
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e7e7e700;
    transition: 0.5s ease;
    pointer-events: none;
}

.menu_content.mask::after {
    content: "Loading...";
    line-height: 100px;

    letter-spacing: .1em;
    font-size: 1em;
    font-weight: 400;
    text-align: center;
    color: #000000;

    background-color: var(--bg-gray);
}

.menu_content.notransition::after {
    transition: none;
}

.menu_note {
    font-size: 0.9em;
    letter-spacing: .2em;
    padding: 5px;
    color: var(--text-light);
}

.menu_content_info {
    margin: 0;
    background-color: #fff;
}

.menu_content-p {
    margin: 0;
    padding: 20px;
    letter-spacing: .15em;
    font-size: 1em;
    color: var(--text-gray);
    word-break: break-word;
    white-space: pre-line;
}

.menu_content-p.include {
    font-weight: bolder;
    color: #000000;
}

.menu_content-p.wineTitle {
    font-weight: bolder;
    color: #000000;
    padding: 0px;
}

.menu_content-p.title {
    margin-top: 20px;
    font-size: 1.5em;
    font-weight: bolder;
    line-height: 1em;
}

.menu_content-p.wine {
    margin-top: 15px;
    line-height: 1em;
    padding: 0px;
}

.winebreak {
    position: relative;
    width: 30%;
    height: 1px;
    margin: 0 auto;
    background-color: #000000;
    display: block;
    margin-top: 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.menu_content-p.note {
    font-weight: lighter;
    font-size: 0.8em;
    color: var(--text-gray);
}

.menu_reservation {
    display: none;
    -webkit-tap-highlight-color: transparent;
}

/*Menu Item*/
.menu_grid {
    display: block;
    width: 100%;
    background-color: var(--bg-gray);
}

.menu-item {
    width: 100%;
    height: 220px;
    display: flex;
    background: white;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    margin-bottom: 10px;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.menu-item:active {
    background: rgba(0, 0, 0, 0.05);
}

.menu-item-image {
    width: 45%;
    height: 220px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-item-info {
    position: relative;
    /* 關鍵:讓子元素參考這個父容器 */
    right: 0px;
    width: 55%;
    padding: 0;
}

.menu-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    /* 與類型圖片間隔 */
    height: 40px;
    padding-left: 15px;
}

.menu-item-code {
    position: absolute;
    right: 0px;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    background-color: var(--btn-gray);
    color: white;
    font-size: 1em;
    letter-spacing: .2em;
    border-bottom-left-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.menu-item-types {
    left: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
}

.menu-type-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.menu-item-price {
    position: absolute;
    font-size: 1.1em;
    margin: 0;
    padding: 10px;
    height: 25px;
    bottom: 0px;
    right: 0px;
    letter-spacing: .2em;
    font-weight: bolder;
}

.menu-item-title {
    margin: 0;
    height: 135px;
    padding: 15px;
    letter-spacing: .15em;
    line-height: 1.5em;
    font-size: 1.2em;
    color: var(--text-gray);
    word-break: break-word;
    white-space: pre-line;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* 英文版 */
:where([lang="en"]) .menu-item-code {
    font-size: 0.8em;
}

:where([lang="en"]) .menu-item-title {
    font-size: 1.1em;
}

:where([lang="en"]) .menu-item-price {
    font-size: clamp(0.7em, 2.5vw, 1.0em);
    white-space: nowrap;
}

/*modal*/
.modal-container {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    margin: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    /* 作為關閉按鈕的定位參考 */
    width: 800px;
    max-height: 90vh;
    background: white;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    padding: 5px;
    margin: 5px;
}

.modal-body {
    max-height: 90vh;
    overflow-y: auto;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    cursor: pointer;
    background: rgb(0, 0, 0);
    color: var(--bg-gray);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.modal-text {
    margin: 0;
    padding: 10px;
    letter-spacing: .15em;
    font-size: 1em;
    color: var(--text-gray);
    word-break: break-word;
    white-space: pre-line;
}

.modal-text2 {
    font-weight: bolder;
    color: #000000;
}

.modal-text3 {
    font-weight: lighter;
    font-size: 0.8em;
    color: var(--text-gray);
}

.modal-text.include {
    font-weight: bolder;
    color: #000000;
}

.modal-title {
    margin: 0;
    letter-spacing: .15em;
    font-size: 1.5em;
    font-weight: bolder;
    line-height: 1.2em;
    color: var(--text-gray);
    word-break: break-word;
    white-space: pre-line;
}

.modal-price {
    color: var(--brand);
    font-weight: bold;
    font-size: 1.2em;
    margin: 0;
}

@media screen and (max-width: 1024px) {
    .menu_flex_div {
        left: 20vw;
    }

    .menu_space {
        height: 60px;
    }

    #menu_button-container {
        grid-template-columns: repeat(2, 1fr);
        margin: 8px 0 8px 0;
    }

    .select_container {
        position: relative;
        width: 100%;
        left: 50%;
        transform: translateX(-50%);
    }

    #menu_content-container {
        position: absolute;
        width: 100%;
        padding-bottom: 50px;
    }
}

@media screen and (max-width: 652px) {
    .select_container {
        width: 96%;
    }

    .menu_space {
        height: fit-content;
    }

    .menu_flex_div {
        top: 140px;
        left: 0px;
        right: 0px;
    }

    .menu_container {
        position: absolute;
        display: block;
        width: 100%;
    }

    .menu_reservation {
        position: fixed;
        bottom: 0;
        display: block;
        width: 100%;
        height: 50px;
        background-color: var(--brand);
        text-align: center;
        line-height: 50px;
        color: #000000;
        cursor: pointer;
    }

    .menu_content {
        margin-bottom: 0;
    }
}
