/* ==========================================================
   Middle Menu 2 – 아이콘(상단) + 제목(하단) 세로 배치
   PC: 8열 정사각형 / 모바일: 4열 정사각형
   배경: #f6f7f8 (기본), 글자: #111 (기본)
   ========================================================== */

/* ── PC/모바일 노출 제어 ─────────────────────────────────── */
.mm2-hide-pc {
    display: none !important;
}
/* .mm2-hide-mobile: 아래 @media (max-width: 767px) 에서 처리 */

/* ── 래퍼 ─────────────────────────────────────────────────── */
#winit-mm2-wrap {
    width: 100%;

    background: #fff;
}

/* ── 컨테이너: PC 8열 ────────────────────────────────────── */
.mm2-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1px;

    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
}

/* ── 개별 아이템 링크 ────────────────────────────────────── */
.mm2-item {
    text-decoration: none;
    display: block;
    outline: none;
}

/* ── 아이템 내부 박스: 정사각형 + 세로 중앙 정렬 ─────────── */
.mm2-item-inner {
    background-color: #f6f7f8; /* 사용자정의 인라인 CSS로 덮어씀 */
    border: 2px solid #D4AF37; /* 황금색 기본 / 인라인 CSS로 border-color 덮어씀 */
    border-radius: 12px;

    /* 정사각형 */
    aspect-ratio: 1 / 1;

    /* 세로 배치: 아이콘(상) + 제목(하) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 10px 6px;
    box-sizing: border-box;

    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

/* ── 아이콘 공통 ─────────────────────────────────────────── */
.mm2-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 이모지 */
.mm2-item-emoji {
    font-size: 32px;
    line-height: 1;
    width: 44px;
    height: 44px;
    text-align: center;
}

/* 이미지 */
.mm2-item-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

/* 둘 다 없는 경우 빈 공간 유지 */
.mm2-item-empty {
    width: 44px;
    height: 44px;
}

/* ── 라벨: 하단 ──────────────────────────────────────────── */
.mm2-item-label {
    color: #111111; /* 사용자정의 인라인 CSS로 덮어씀 */
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    word-break: keep-all;
    line-height: 1.3;
    width: 100%;
}

/* ── 호버 효과 ───────────────────────────────────────────── */
.mm2-item:hover .mm2-item-inner {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.10);
}

/* ── 태블릿 ( 768px ~ 1024px ) ───────────────────────────── */
@media (min-width: 768px) and (max-width: 1024px) {
    .mm2-container {
        grid-template-columns: repeat(8, 1fr);
        gap: 7px;
    }

    .mm2-item-emoji {
        font-size: 26px;
        width: 36px;
        height: 36px;
    }

    .mm2-item-img {
        width: 36px;
        height: 36px;
    }

    .mm2-item-label {
        font-size: 11px;
    }
}

/* ── 모바일 ( ≤ 767px ) ──────────────────────────────────── */
@media (max-width: 767px) {

    /* 모바일 숨기기 */
    .mm2-hide-mobile {
        display: none !important;
    }

    /* PC 숨기기 클래스 → 모바일에서는 다시 표시 */
    .mm2-hide-pc {
        display: block !important;
    }

    /* 모바일: 4열 정사각형 */
    .mm2-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 7px;
        padding: 0 0px;
    }

    .mm2-item-inner {
        border-radius: 10px;
        gap: 6px;
        padding: 8px 4px;
    }

    .mm2-item-emoji {
        font-size: 28px;
        width: 38px;
        height: 38px;
    }

    .mm2-item-img {
        width: 38px;
        height: 38px;
    }

    .mm2-item-empty {
        width: 38px;
        height: 38px;
    }

    .mm2-item-label {
        font-size: 12px;
    }
}