/*
 * 메뉴 3종(케이터링·도시락·샌드위치) 리뉴얼 본문 스타일
 * - 모든 규칙은 .jm-page 및 메뉴 장바구니(#custom_menu_box_cover.jm-cart) 범위로 제한합니다.
 * - 글꼴은 기존 사이트 글꼴을 그대로 상속합니다. (font-family 미지정)
 */
.jm-page,
.jm-cart,
.jm-floating-selection,
.jm-toast {
    --jm-paper: #f6f3ed;
    --jm-white: #fffefa;
    --jm-ink: #242c28;
    --jm-muted: #74796f;
    --jm-line: #dddcd2;
    --jm-green: #193c34;
    --jm-green-hover: #2e5147;
    --jm-gold: #a3895b;
    --jm-notice: #e9e9df;
}

.jm-page {
    background: var(--jm-paper);
    color: var(--jm-ink);
    font-size: 15px;
    line-height: 1.8;
    letter-spacing: -0.035em;
    /* hidden 은 스크롤 컨테이너가 되어 문의 페이지 sticky 가 동작하지 않으므로 clip 사용 */
    overflow-x: clip;
}

.jm-page *,
.jm-page *::before,
.jm-page *::after {
    box-sizing: border-box;
}

.jm-page a {
    color: inherit;
    text-decoration: none;
}

.jm-page h1,
.jm-page h2,
.jm-page h3,
.jm-page p {
    margin: 0;
}

.jm-page h1,
.jm-page h2,
.jm-page h3 {
    color: var(--jm-ink);
    font-weight: 500;
    line-height: 1.5;
}

.jm-page img {
    display: block;
    max-width: 100%;
    height: auto;
}

.jm-page button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.jm-page [hidden] {
    display: none !important;
}

.jm-wrap {
    width: 100%;
    max-width: 1376px;
    margin: 0 auto;
    padding: 0 72px;
}

.jm-eyebrow {
    display: block;
    margin-bottom: 20px;
    color: var(--jm-gold);
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.jm-muted {
    color: var(--jm-muted);
    font-size: 13px;
}

/* 상단 소개 */
.jm-intro {
    padding-top: 55px;
    padding-bottom: 45px;
}

.jm-breadcrumbs {
    margin-bottom: 37px;
    color: var(--jm-muted);
    font-size: 10px;
    letter-spacing: 0.08em;
}

.jm-breadcrumbs span {
    margin: 0 6px;
}

.jm-page .jm-intro-title {
    font-size: 44px;
    letter-spacing: -0.07em;
}

.jm-intro-lead {
    max-width: 700px;
    margin-top: 20px !important;
    color: var(--jm-muted);
    font-size: 15px;
    line-height: 2;
}

/* 탭 */
.jm-tabs {
    display: flex;
    gap: 35px;
    margin-bottom: 35px;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid var(--jm-line);
    -webkit-overflow-scrolling: touch;
}

.jm-tabs a {
    padding: 15px 0;
    border-bottom: 2px solid transparent;
    font-size: 14px;
}

.jm-tabs a:hover,
.jm-tabs a.is-active {
    color: var(--jm-green);
}

.jm-tabs a.is-active {
    border-color: var(--jm-green);
    font-weight: 600;
}

.jm-content {
    padding-bottom: 85px;
}

/* 버튼 */
.jm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    min-height: 51px;
    padding: 13px 23px;
    border: 1px solid var(--jm-green);
    border-radius: 0;
    background: var(--jm-green);
    color: #fff !important;
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: -0.02em;
    text-transform: none;
    transition: background-color 0.2s;
}

.jm-btn:hover {
    background: var(--jm-green-hover);
}

.jm-btn.is-selected {
    background: transparent;
    color: var(--jm-green) !important;
}

.jm-btn--light {
    border-color: var(--jm-paper);
    background: var(--jm-paper);
    color: var(--jm-ink) !important;
}

.jm-btn--light:hover {
    background: #fff;
}

.jm-btn--line {
    border-color: var(--jm-line);
    background: transparent;
    color: var(--jm-ink) !important;
}

.jm-btn--line:hover {
    border-color: var(--jm-green);
    background: transparent;
}

.jm-textlink {
    display: inline-flex;
    align-items: center;
    gap: 35px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--jm-gold);
    font-size: 13px;
}

.jm-center {
    text-align: center;
}

.jm-notice {
    margin: 20px 0;
    padding: 15px 20px;
    background: var(--jm-notice);
    color: #656e60;
    font-size: 12px;
}

.jm-notice strong {
    color: var(--jm-ink);
}

.jm-notice--minimum {
    margin: 0 0 28px;
}

.jm-empty {
    padding: 60px 20px;
    border: 1px dashed var(--jm-line);
    color: var(--jm-muted);
    text-align: center;
}

.jm-page-note {
    margin-top: 35px !important;
}

/* 카드 공통 */
.jm-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 33px 25px;
}

.jm-card {
    display: block;
    min-width: 0;
    text-align: left;
}

.jm-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e8e7df;
}

.jm-card-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.4s;
}

.jm-card:hover .jm-card-image img {
    transform: scale(1.025);
}

.jm-corner {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    color: var(--jm-ink);
    font-size: 15px;
    line-height: 1;
}

.jm-tag {
    display: block;
    margin-top: 15px;
    color: var(--jm-gold);
    font-size: 10px;
    letter-spacing: 0.05em;
}

.jm-page .jm-card h3,
.jm-page .jm-card h4 {
    margin: 5px 0 0;
    color: var(--jm-ink);
    font-size: 17px;
    /* NanumSquare 에는 500 굵기가 없어 시안(Noto Sans 500)과 비슷한 700 사용 */
    font-weight: 700;
    line-height: 1.6;
    text-align: left;
}

.jm-card p {
    margin-top: 8px;
    color: var(--jm-muted);
    font-size: 13px;
}

/* 도시락·샌드위치 카드 */
.jm-card--product {
    padding-bottom: 23px;
    background: var(--jm-white);
}

.jm-card--product .jm-card-image {
    aspect-ratio: 1;
}

/* 도시락: 7:5 틀에 이미지 전체를 표시합니다. 비율이 다른 원본은 잘리지 않고 여백이 생깁니다. */
.jm-card--lunchbox .jm-card-image {
    aspect-ratio: 7 / 5;
    background: var(--jm-white);
}

.jm-card--lunchbox .jm-card-image img {
    object-fit: contain;
}

.jm-card--lunchbox:hover .jm-card-image img {
    transform: none;
}

.jm-card--product .jm-card-body {
    padding: 0 22px;
}

.jm-card--product .jm-card-main {
    min-height: 45px;
}

/* 참고 시안: 카드 하단 최소 수량 문구 아래 여백 */
.jm-card--product .jm-min-label {
    min-height: 45px;
    margin: 8px 0 24px !important;
}

.jm-card-selected {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    padding: 4px 10px;
    background: var(--jm-green);
    color: #fff;
    font-size: 11px;
}

.jm-card.is-selected .jm-card-image {
    outline: 2px solid var(--jm-green);
    outline-offset: -2px;
}

.jm-price {
    display: block;
    margin-top: 12px;
    color: var(--jm-green);
    font-size: 22px;
    line-height: 1.4;
}

.jm-price small {
    margin-left: 2px;
    font-size: 12px;
}

.jm-product-price small {
    font-size: 0.83em;
}

.jm-min-label {
    margin: 12px 0 24px !important;
    color: var(--jm-green) !important;
    font-size: 13px;
    font-weight: 600;
}

.jm-card .jm-min-label {
    margin: 6px 0 0 !important;
}

/* 상세 */
.jm-product-head {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 65px;
}

.jm-product-image img {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
    object-fit: cover;
}

.jm-product-image--lunchbox img {
    aspect-ratio: 7 / 5;
    object-fit: contain;
}

.jm-product-info {
    align-self: center;
}

.jm-page .jm-product-name {
    font-size: 34px;
}

.jm-product-price {
    margin: 15px 0 25px;
    color: var(--jm-green);
    font-size: 35px;
    line-height: 1.3;
}

.jm-page .jm-product-info h3 {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.jm-page .jm-product-info h3.jm-gap {
    margin-top: 25px;
}

.jm-product-info > p {
    color: var(--jm-muted);
    font-size: 14px;
    line-height: 2;
}

.jm-product-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    margin-top: 25px;
}

/* 참고 시안: 상세 정보의 최소 수량 문구는 본문과 같은 회색 */
.jm-product-info > .jm-min-label {
    color: var(--jm-muted) !important;
    font-size: 14px;
}

.jm-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.jm-info-grid--product {
    margin: 40px 0;
}

.jm-info-cell {
    padding: 25px 5px;
    border-top: 1px solid var(--jm-gold);
}

.jm-page .jm-info-cell h3 {
    font-size: 17px;
    font-weight: 600;
}

.jm-info-cell p {
    margin-top: 12px !important;
    color: var(--jm-muted);
    font-size: 13px;
}

.jm-detail-art {
    max-width: 760px;
    margin: 50px auto;
}

.jm-detail-art img {
    width: 100%;
}

/* 하단 상담 영역 */
.jm-cta {
    padding: 85px 24px;
    background: var(--jm-green);
    color: #eee8dc;
    text-align: center;
}

.jm-cta .jm-eyebrow {
    color: #c5b88d;
}

.jm-page .jm-cta h2 {
    color: #eee8dc;
    font-size: 36px;
    line-height: 1.7;
}

.jm-cta p {
    margin: 23px 0 30px !important;
    color: #c4c9b9;
    font-size: 14px;
}

.jm-cta-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

/* 플로팅 상담 링크 · 알림 */
.jm-floating-selection {
    position: fixed;
    right: 125px;
    bottom: 25px;
    z-index: 40;
    padding: 15px 24px;
    background: var(--jm-green);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.13);
    color: #fff !important;
    font-size: 13px;
    text-decoration: none !important;
}

.jm-floating-selection[hidden] {
    display: none;
}

.jm-toast {
    position: fixed;
    left: 50%;
    bottom: 35px;
    z-index: 300;
    max-width: 90vw;
    padding: 14px 25px;
    background: #243e32;
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 20px);
    transition: 0.2s;
}

.jm-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ===== 케이터링 메뉴 ===== */
.jm-categories {
    display: flex;
    gap: 9px;
    padding: 5px 0 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.jm-category {
    flex: 1 0 77px;
    min-width: 77px;
    padding: 11px 5px;
    border-bottom: 2px solid transparent;
    color: var(--jm-ink);
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
    word-break: keep-all;
}

.jm-category:hover {
    color: var(--jm-green);
}

.jm-category.is-active {
    border-color: var(--jm-green);
    font-weight: 600;
}

.jm-category-icon {
    display: grid;
    place-items: center;
    height: 42px;
    margin-bottom: 8px;
}

.jm-category-icon img {
    width: auto;
    max-width: 56px;
    height: 42px !important;
    object-fit: contain;
}

.jm-category-icon--all {
    font-size: 24px;
    letter-spacing: 0;
}

.jm-searchbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin: 24px 0;
}

.jm-searchbox {
    position: relative;
    width: 100%;
    max-width: 460px;
}

.jm-searchbox input[type="search"] {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 13px 70px 13px 0;
    border: 0;
    border-bottom: 1px solid #a3a998;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--jm-ink);
    font-size: 13px;
    -webkit-appearance: none;
}

.jm-searchbox input[type="search"]:focus {
    border-bottom-color: var(--jm-green);
    outline: none;
}

.jm-searchbox button {
    position: absolute;
    right: 0;
    top: 50%;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    transform: translateY(-50%);
}

.jm-searchbox .jm-search-clear[hidden] {
    display: none;
}

.jm-searchbox .jm-search-clear {
    right: 34px;
    color: var(--jm-muted);
    font-size: 16px;
}


.jm-result-count {
    color: var(--jm-muted);
    font-size: 12px;
    white-space: nowrap;
}


.jm-guide {
    margin-bottom: 25px !important;
    color: var(--jm-muted);
    font-size: 13px;
}

.jm-vegan-note {
    margin-bottom: 25px;
}

.jm-menu-grid .menu_box {
    position: relative;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    cursor: pointer;
}

/* assets/css/custom.css 의 .menu_box 기본 규칙(33% 폭·가운데 정렬) 재정의 */
.jm-menu-grid .menu_box > p,
.jm-menu-grid .menu_box h4 {
    width: auto;
    text-align: left;
}

.jm-menu-grid .menu-box-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e8e7df;
}

.jm-menu-grid .menu-box-img > img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.4s;
}

.jm-menu-grid .menu_box:hover .menu-box-img > img {
    transform: scale(1.025);
}

.jm-menu-grid .menu-info-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(25, 60, 52, 0.72);
    opacity: 0;
    transition: opacity 0.3s;
    word-break: keep-all;
}

.jm-menu-grid .menu-info-cover p {
    margin: 0;
    color: #fff;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
}

.jm-menu-grid .menu_box:hover .menu-info-cover {
    opacity: 1;
}

.jm-menu-grid .jm-vegan-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 0;
    color: var(--jm-muted);
    font-size: 12px;
}

.jm-menu-grid .jm-vegan-badge img {
    width: 18px;
    height: 18px !important;
    object-fit: contain;
}

/* 기존 menu.js 의 선택 상태(menuImgActive) */
.jm-menu-grid .menuImgActive .menu-box-img::before {
    content: attr(data-added-label);
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    background: rgba(25, 60, 52, 0.62);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.jm-menu-grid .menuImgActive .jm-corner {
    background: var(--jm-green);
    color: #fff;
}

.jm-loadmore {
    margin-top: 45px;
    text-align: center;
}

/* 기존 시즌·카드형 특수 카테고리는 기존 마크업을 사용하되 여백만 맞춥니다. */
.jm-menu-special {
    margin-bottom: 20px;
}

/* 케이터링 메뉴 장바구니(기존 기능) */
/* 오른쪽 기존 퀵메뉴(#quick)와 겹치지 않도록 기존 장바구니 위치(right:125px)를 유지 */
#custom_menu_box_cover.jm-cart {
    position: fixed;
    right: 125px;
    bottom: 25px;
    z-index: 40;
    display: none;
    width: 300px;
    padding: 20px;
    border: 1px solid var(--jm-line);
    border-radius: 0;
    background: var(--jm-white);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.13);
    color: var(--jm-ink);
}

#custom_menu_box_cover.jm-cart .jm-cart-title {
    margin: 0 0 10px;
    color: var(--jm-gold);
    font-size: 11px;
    letter-spacing: 0.15em;
}

#custom_menu_box_cover.jm-cart .custom_menu_box {
    max-height: 220px;
    margin-bottom: 14px;
    overflow-y: auto;
}

#custom_menu_box_cover.jm-cart .custom_menu_box_list p {
    margin: 0;
    padding: 7px 0;
    border-bottom: 1px solid var(--jm-line);
    font-size: 13px;
    line-height: 1.5;
}

#custom_menu_box_cover.jm-cart #custom_menu_box_button {
    display: flex;
    gap: 8px;
}

#custom_menu_box_cover.jm-cart #custom_menu_box_button button {
    flex: 1;
    min-height: 42px;
    padding: 8px 6px;
    line-height: 1.3;
    word-break: keep-all;
    border: 1px solid var(--jm-green);
    border-radius: 0;
    background: transparent;
    color: var(--jm-green);
    font-size: 12px;
}

#custom_menu_box_cover.jm-cart #custom_menu_box_button button:last-child {
    background: var(--jm-green);
    color: #fff;
}

/* ===== 반응형 ===== */
@media (max-width: 1250px) {
    .jm-wrap {
        padding-left: 45px;
        padding-right: 45px;
    }
}

@media (max-width: 990px) {
    #custom_menu_box_cover.jm-cart {
        display: none !important;
    }
}

@media (max-width: 760px) {
    .jm-page {
        font-size: 14px;
    }

    .jm-wrap {
        padding-left: 22px;
        padding-right: 22px;
    }

    .jm-intro {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .jm-breadcrumbs {
        margin-bottom: 25px;
        font-size: 9px;
    }

    .jm-eyebrow {
        margin-bottom: 14px;
        font-size: 9px;
    }

    .jm-page .jm-intro-title {
        font-size: 32px;
    }

    .jm-intro-lead {
        margin-top: 15px !important;
        font-size: 13px;
    }

    .jm-tabs {
        gap: 25px;
        margin-bottom: 25px;
    }

    .jm-tabs a {
        font-size: 12px;
    }

    .jm-content {
        padding-bottom: 55px;
    }

    .jm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 14px;
    }

    .jm-grid--products {
        grid-template-columns: 1fr;
    }

    .jm-page .jm-card h3,
    .jm-page .jm-card h4 {
        font-size: 14px;
    }

    .jm-card p {
        font-size: 12px;
    }

    .jm-tag {
        font-size: 9px;
    }

    .jm-card--product .jm-card-body {
        padding: 0 20px;
    }

    .jm-page .jm-card--product h3 {
        font-size: 19px;
    }

    .jm-card--product .jm-card-main {
        min-height: 0;
        font-size: 13px;
    }

    .jm-card--product .jm-min-label {
        min-height: 0;
    }

    .jm-price {
        font-size: 20px;
    }

    .jm-product-head {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .jm-page .jm-product-name {
        font-size: 28px;
    }

    .jm-product-price {
        font-size: 30px;
    }

    .jm-info-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .jm-info-cell {
        padding: 20px 0;
    }

    .jm-detail-art {
        margin: 35px auto;
    }

    .jm-cta {
        padding: 60px 22px;
    }

    .jm-page .jm-cta h2 {
        font-size: 26px;
    }

    .jm-cta p {
        font-size: 13px;
    }

    .jm-btn {
        min-height: 47px;
        font-size: 12px;
    }

    .jm-categories {
        margin-right: -22px;
        padding-right: 22px;
    }

    .jm-category {
        flex-basis: 70px;
        min-width: 70px;
    }

    .jm-searchbar {
        gap: 12px;
    }

    .jm-searchbox {
        max-width: none;
    }


    .jm-result-count {
        font-size: 10px;
    }

    /* 모바일 퀵메뉴 버튼(오른쪽 아래)을 피해 왼쪽부터 배치 */
    .jm-floating-selection {
        left: 15px;
        right: 85px;
        bottom: 20px;
        padding: 12px 16px;
        font-size: 12px;
        text-align: center;
    }

    .jm-toast {
        bottom: 75px;
        width: max-content;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .jm-product-actions .jm-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jm-page *,
    .jm-toast {
        transition: none !important;
    }
}

/* 세 메뉴에서 동일하게 사용하는 검색 후보 목록 */
.jm-page .jm-searchbar--fixed {
    margin: 22px 0 24px;
}
.jm-page .jm-unified-suggestions[hidden],
.jm-page [data-inline-empty][hidden] {
    display: none !important;
}
.jm-page .jm-unified-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d5d8d1;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .1);
    z-index: 30;
}
.jm-page .jm-unified-suggestion {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    color: var(--jm-ink);
    text-decoration: none;
}
.jm-page .jm-unified-suggestion:hover,
.jm-page .jm-unified-suggestion.is-focused {
    background: #f1f3ee;
}
.jm-page .jm-unified-suggestion small {
    color: var(--jm-muted);
    flex: 0 0 auto;
}
