@charset "UTF-8";

/* =========================================================
   MIPLUS HEADER — 정리본

   PC
   · 상단 메뉴 14px / 300
   · 하위 메뉴 14px / 300
   · 불투명 헤더 배경
   · 개별 드롭다운 / 직각 모서리 / 그림자 유지
   · 항목 선택 배경 없음
   · 왼쪽 선 0.25px / 0.35초

   모바일
   · 기존 사이드 메뉴·아코디언 유지

   드롭다운 위치·너비는 common.js에서 계산
========================================================= */

:root {
    --header-height: 80px;
}

/* =========================================================
   01. 헤더
========================================================= */

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 10000;

    width: 100%;
    height: var(--header-height);

    border-bottom: 1px solid rgba(87, 78, 71, 0.1);

    background: rgba(246, 243, 238, 0.94);
    color: #3f3935;

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.site-header.is-scrolled {
    border-bottom-color: rgba(73, 66, 61, 0.12);
    background: #f6f3ee;
    box-shadow: 0 4px 18px rgba(48, 43, 40, 0.05);

    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.site-header.is-mega-open {
    border-bottom-color: rgba(73, 66, 61, 0.1);
    background: #f6f3ee;
    box-shadow: none;

    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.site-header__inner {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 150px;
    align-items: center;

    width: calc(100% - clamp(64px, 8vw, 240px));
    height: 100%;
    margin: 0 auto;
}

/* =========================================================
   02. 로고
========================================================= */

.site-logo {
    display: inline-flex;
    align-items: center;

    width: fit-content;
    line-height: 1;
}

.site-header .site-logo__image {
    display: block;
    width: clamp(120px, 9vw, 138px);
    height: auto;
}

/* =========================================================
   03. PC 상위 메뉴
========================================================= */

.site-nav {
    display: flex;
    justify-content: center;
    height: 100%;
}

.site-nav__list {
    display: flex;
    align-items: stretch;
    justify-content: center;

    height: 100%;
    margin: 0;
    padding: 0;

    list-style: none;
}

.site-nav__item {
    height: 100%;
}

body .site-header .site-nav .site-nav__link {
    position: relative;

    display: flex;
    align-items: center;

    box-sizing: border-box;
    height: 100%;
    margin: 0;
    padding: 0 17px;

    border: 0;
    border-radius: 0;

    background: transparent;
    color: #2f2a27 !important;

    font-family: "Miplus A2Z", sans-serif;
    font-size: 14px !important;
    font-weight: 300 !important;
    line-height: 1;
    letter-spacing: -0.02em !important;

    text-align: inherit;
    text-decoration: none !important;
    text-rendering: auto;
    white-space: nowrap;

    appearance: none;
    -webkit-appearance: none;

    cursor: pointer;
    transition: color 0.18s ease;
}

body .site-header .site-nav
.site-nav__link:is(
    .is-active,
    [aria-current],
    [aria-expanded="true"],
    :hover,
    :focus-visible
) {
    font-weight: 300 !important;
}

body .site-header .site-nav .site-nav__link:hover,
body .site-header .site-nav .site-nav__link:focus-visible {
    color: #79513e !important;
}

body .site-header .site-nav .site-nav__link::before {
    display: none !important;
    content: none !important;
}

/* 上位メニューではなく 상위 메뉴 밑줄 */
body .site-header .site-nav .site-nav__link::after {
    position: absolute;
    top: calc(50% + 12px);
    right: 17px;
    bottom: auto;
    left: 17px;

    display: block !important;
    height: 1px;

    background: #876b57;

    content: "";
    opacity: 0;
    pointer-events: none;

    transform: scaleX(0);
    transform-origin: left center;

    transition:
        opacity 0.32s ease,
        transform 0.32s ease;
}

body .site-header .site-nav
.site-nav__link[aria-expanded="true"]::after,
body .site-header .site-nav .site-nav__link:hover::after,
body .site-header .site-nav .site-nav__link:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

/* =========================================================
   04. 상담 버튼
========================================================= */

.site-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.header-consultation {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    min-width: 116px;
    height: 42px;
    padding: 0 20px;

    border: 1px solid #3f3935;

    background: transparent;
    color: #3f3935;

    font-size: 14px;
    font-weight: 300;

    transition:
        color 0.18s ease,
        background-color 0.18s ease;
}

.header-consultation:hover,
.header-consultation:focus-visible {
    background: #3f3935;
    color: #fff;
}

/* =========================================================
   05. PC 드롭다운 박스
========================================================= */

body .site-header #mega-menu {
    position: fixed;
    top: var(--dropdown-top, var(--header-height));
    right: auto;
    bottom: auto;
    left: var(--dropdown-left, 16px);

    display: block;

    box-sizing: border-box;
    width: var(--dropdown-width, 176px);
    max-width: calc(100vw - 32px);
    max-height: calc(
        100dvh - var(--dropdown-top, var(--header-height)) - 16px
    );

    overflow-x: hidden;
    overflow-y: auto;

    border: 0;
    border-top: 1px solid rgba(135, 107, 87, 0.22);
    border-radius: 0;

    background: #faf8f4;

    box-shadow:
        0 6px 14px rgba(35, 29, 24, 0.12),
        0 20px 40px rgba(35, 29, 24, 0.20) !important;

    visibility: hidden;
    pointer-events: none;

    /* 非表示ではなく 표시 여부는 visibility로만 관리 */
    opacity: 1;
    transform: none;

    -webkit-backdrop-filter: none;
    backdrop-filter: none;

    transition: none !important;
}

body .site-header.is-mega-open #mega-menu {
    visibility: visible;
    pointer-events: auto;
}

body .site-header #mega-menu .mega-menu__inner {
    display: block;

    box-sizing: border-box;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 11px 0;
}

body .site-header #mega-menu .mega-menu__panels {
    min-width: 0;
}

body .site-header #mega-menu .mega-menu__panel {
    display: none !important;

    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;

    animation: none !important;
    transform: none;
}

body .site-header #mega-menu .mega-menu__panel.is-active {
    display: block !important;
}

/* 이전 전체 너비 메뉴의 부가 영역 숨김 */
body .site-header #mega-menu :is(
    .mega-menu__category,
    .mega-menu__eyebrow,
    .mega-menu__title,
    .mega-menu__description,
    .mega-menu__main-link,
    .mega-consultation
) {
    display: none !important;
}

/* =========================================================
   06. PC 하위 메뉴
========================================================= */

body .site-header #mega-menu .mega-menu__list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;

    width: 100%;
    margin: 0;
    padding: 0;

    list-style: none;

    column-count: auto;
    column-gap: 0;
}

body .site-header #mega-menu .mega-menu__list--columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(var(--dropdown-rows, 6), auto);
    grid-auto-flow: column;
}

body .site-header #mega-menu .mega-menu__list > li {
    display: block;

    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;

    border: 0;
    break-inside: avoid;
}

body .site-header #mega-menu .mega-menu__list > li > a {
    position: relative;

    display: flex;
    align-items: center;
    gap: 6px;

    box-sizing: border-box;
    width: 100%;
    min-height: 39px;
    margin: 0;
    padding: 9px 20px !important;

    border: 0;
    border-radius: 0;

    background: transparent !important;
    color: #3b3531 !important;

    font-family: "Miplus A2Z", sans-serif !important;
    font-size: 13px !important;
    font-weight: 300 !important;
    line-height: 1.5 !important;
    letter-spacing: -0.02em !important;

    white-space: nowrap;
    text-decoration: none !important;

    transform: none !important;
    transition: color 0.18s ease;
}

/* 현재 페이지도 기본 상태와 동일 */
body .site-header #mega-menu
.mega-menu__list > li > a[aria-current] {
    background: transparent !important;
    color: #3b3531 !important;
    font-weight: 300 !important;
}

/* 마우스·키보드 선택 */
body .site-header #mega-menu
.mega-menu__list > li > a:hover,
body .site-header #mega-menu
.mega-menu__list > li > a:focus-visible {
    background: transparent !important;
    color: #876b57 !important;
    font-weight: 300 !important;
}

/* =========================================================
   07. 하위 메뉴 왼쪽 선
========================================================= */

body .site-header #mega-menu
.mega-menu__list > li > a::before {
    position: absolute;
    top: 50%;
    left: 0;

    display: block !important;

    width: 12px;
    height: 0.25px !important;
    margin: 0;

    border: 0;
    box-shadow: none;
    background: #503727;

    content: "" !important;
    opacity: 1;
    pointer-events: none;

    transform: translateY(-50%) scaleX(0);
    transform-origin: left center;

    transition: transform 0.35s ease;
}

body .site-header #mega-menu
.mega-menu__list > li > a:hover::before,
body .site-header #mega-menu
.mega-menu__list > li > a:focus-visible::before {
    transform: translateY(-50%) scaleX(1);
}

body .site-header #mega-menu
.mega-menu__list > li > a::after {
    display: none !important;
    content: none !important;
}

body .site-header #mega-menu .mega-menu__tag {
    display: inline-block;
    margin-left: 0;

    color: #9a8f87;

    font-family: var(--font-english, sans-serif);
    font-size: 8px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
}

/* =========================================================
   08. 모바일 메뉴 버튼
========================================================= */

.menu-toggle {
    position: relative;
    display: none;

    width: 42px;
    height: 42px;
    padding: 0;

    border: 0;
    background: transparent;
    color: #3f3935;
}

.menu-toggle__line {
    position: absolute;
    left: 9px;

    width: 24px;
    height: 1px;

    background: currentColor;

    transition:
        top 0.25s ease,
        opacity 0.2s ease,
        transform 0.25s ease;
}

.menu-toggle__line:nth-child(1) {
    top: 14px;
}

.menu-toggle__line:nth-child(2) {
    top: 21px;
}

.menu-toggle__line:nth-child(3) {
    top: 28px;
}

.menu-toggle.is-active .menu-toggle__line:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
}

.menu-toggle.is-active .menu-toggle__line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .menu-toggle__line:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
}

/* =========================================================
   09. 모바일 배경
========================================================= */

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 10900;

    visibility: hidden;
    pointer-events: none;

    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;

    border: 0;
    background: rgba(28, 24, 22, 0.4);

    opacity: 0;
    cursor: pointer;

    transition:
        visibility 0s linear 0.35s,
        opacity 0.35s ease;
}

.mobile-menu-overlay.is-visible {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;

    transition-delay: 0s;
}

/* =========================================================
   10. 모바일 패널
========================================================= */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 11000;

    visibility: hidden;
    pointer-events: none;

    transition: visibility 0s linear 0.4s;
}

.mobile-menu.is-open {
    visibility: visible;
    transition-delay: 0s;
}

.mobile-menu__panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;

    display: flex;
    flex-direction: column;

    width: 80vw;
    max-width: 420px;
    min-height: 100%;

    overflow-x: hidden;
    overflow-y: auto;

    pointer-events: auto;

    background: #fff;
    box-shadow: 12px 0 40px rgba(43, 37, 33, 0.15);

    transform: translateX(-100%);

    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);

    -webkit-overflow-scrolling: touch;
}

.mobile-menu.is-open .mobile-menu__panel {
    transform: translateX(0);
}

/* =========================================================
   11. 모바일 메뉴 상단
========================================================= */

.mobile-menu__header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;

    min-height: 70px;
    padding: 14px 22px;

    border-bottom: 1px solid #ede6de;
}

.mobile-menu__logo-image {
    display: block;
    width: 120px;
    height: auto;
}

.mobile-menu__close {
    position: relative;
    flex: 0 0 40px;

    width: 40px;
    height: 40px;
    padding: 0;

    border: 0;
    background: transparent;
}

.mobile-menu__close span {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 22px;
    height: 1px;

    background: #363636;
}

.mobile-menu__close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu__close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* =========================================================
   12. 모바일 아코디언
========================================================= */

.mobile-menu__accordion {
    flex: 1 0 auto;
    padding: 12px 22px 32px;
}

.mobile-menu__group {
    border-bottom: 1px solid #ede6de;
}

.mobile-menu__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 64px;
    color: #363636;

    font-size: 17px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: -0.03em;

    list-style: none;
    cursor: pointer;
}

.mobile-menu__summary::-webkit-details-marker {
    display: none;
}

.mobile-menu__summary::marker {
    content: "";
}

.mobile-menu__icon {
    position: relative;
    flex: 0 0 18px;

    width: 18px;
    height: 18px;
    margin-left: 20px;

    transition: transform 0.25s ease;
}

.mobile-menu__icon::before,
.mobile-menu__icon::after {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 14px;
    height: 1px;

    background: #363636;
    content: "";

    transform: translate(-50%, -50%);
}

.mobile-menu__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.mobile-menu__group[open] .mobile-menu__icon {
    transform: rotate(45deg);
}

.mobile-menu__featured {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* =========================================================
   13. 회전 별
========================================================= */

.mobile-menu__star {
    display: inline-flex;
    flex: 0 0 16px;
    align-items: center;
    justify-content: center;

    width: 16px;
    height: 16px;
    color: #916046;

    font-size: 13px;
    line-height: 1;

    transform-origin: 50% 50%;
    animation: miplus-star-rotate 1s ease alternate-reverse infinite;
}

@keyframes miplus-star-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   14. 모바일 하위 메뉴
========================================================= */

.mobile-menu__submenu {
    display: grid;
    padding: 2px 0 22px;
}

.mobile-menu__submenu a {
    display: block;
    padding: 7px 0 7px 14px;

    color: #4b4541;

    font-size: 14px;
    line-height: 1.5;

    transition:
        color 0.18s ease,
        padding-left 0.18s ease;
}

.mobile-menu__submenu a:hover,
.mobile-menu__submenu a:focus-visible {
    padding-left: 18px;
    color: #916046;
}

.mobile-menu__submenu a[aria-current="page"] {
    padding-left: 14px;
    color: #4b4541 !important;
}

.mobile-menu__submenu .mega-menu__tag {
    display: inline-block;
    margin-left: 7px;

    color: #9a8f87;

    font-family: var(--font-english, sans-serif);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.mobile-menu__consultation {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    min-height: 56px;
    margin: 0 22px 24px;

    background: #916046;
    color: #fff;

    font-size: 15px;
    font-weight: 500;
}

.mobile-menu__consultation:hover,
.mobile-menu__consultation:focus-visible {
    background: #76513e;
}

/* =========================================================
   15. 공통 보조
========================================================= */

.menu-label {
    display: inline-flex;
    align-items: center;
}

.menu-label__separator {
    margin: 0 0.1em;
}

body.is-menu-open,
body.menu-open {
    overflow: hidden;
}

/* =========================================================
   16. 반응형
========================================================= */

@media (max-width: 1280px) {
    :root {
        --header-height: 70px;
    }

    body .site-header #mega-menu {
        display: none;
    }

    .site-header__inner {
        grid-template-columns: 1fr auto;
        width: calc(
            100% - var(--page-padding-tablet, 24px) * 2
        );
    }

    .site-nav,
    .header-consultation {
        display: none;
    }

    .menu-toggle {
        display: block;
    }
}

@media (min-width: 1281px) {
    .site-header,
    .site-header.is-scrolled,
    .site-header.is-mega-open {
        background: #f6f3ee !important;

        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    .mobile-menu,
    .mobile-menu-overlay {
        display: none;
    }
}

@media (max-width: 767px) {
    .site-header__inner {
        width: calc(
            100% - var(--page-padding-mobile, 20px) * 2
        );
    }

    .site-header .site-logo__image,
    .mobile-menu__logo-image {
        width: 116px;
    }
}

@media (max-width: 360px) {
    .mobile-menu__panel {
        width: 86vw;
    }

    .mobile-menu__header,
    .mobile-menu__accordion {
        padding-right: 18px;
        padding-left: 18px;
    }

    .mobile-menu__consultation {
        margin-right: 18px;
        margin-left: 18px;
    }
}

/* =========================================================
   17. 키보드 포커스
========================================================= */

.site-logo:focus-visible,
.header-consultation:focus-visible,
.menu-toggle:focus-visible,
.mobile-menu a:focus-visible,
.mobile-menu button:focus-visible,
.mobile-menu summary:focus-visible {
    outline: 2px solid #916046;
    outline-offset: 3px;
}

body .site-header .site-nav .site-nav__link:focus-visible {
    outline: 2px solid #79513e;
    outline-offset: 3px;
}

body .site-header #mega-menu a:focus-visible {
    outline: 1px solid #876b57;
    outline-offset: -2px;
}

/* =========================================================
   18. 모션 최소화
========================================================= */

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .mobile-menu,
    .mobile-menu__panel,
    .mobile-menu-overlay,
    .menu-toggle__line,
    .mobile-menu__icon,
    .mobile-menu__submenu a,
    body .site-header #mega-menu,
    body .site-header .site-nav .site-nav__link,
    body .site-header .site-nav .site-nav__link::after,
    body .site-header #mega-menu .mega-menu__list > li > a,
    body .site-header #mega-menu .mega-menu__list > li > a::before {
        transition: none !important;
        animation: none !important;
    }

    .mobile-menu__star {
        animation: none !important;
    }
}

/* PC 드롭다운 전체 대비 보정 */
@media (min-width: 1281px) {
    body .site-header #mega-menu {
        filter: contrast(1.10);
    }
}

/* PC 최상단 메뉴 — 항목 사이 간격 소폭 확대 */
@media (min-width: 1281px) {
    body .site-header .site-nav .site-nav__link {
        padding-inline: 19px;
    }

    body .site-header .site-nav .site-nav__link::after {
        right: 19px;
        left: 19px;
    }
}

/* 모바일 — 상위 메뉴명 크기 축소 */
@media (max-width: 767px) {
    html body #mobile-menu .mobile-menu__summary {
        font-size: 15px !important;
    }
}

/* PC — 우측 회원 메뉴를 상단 메뉴와 동일하게 */
@media (min-width: 1024px) {
    html body .site-header .site-header__actions :is(
        .site-account-link,
        .mp-hybrid-account a
    ) {
        font-family: "Miplus A2Z", sans-serif !important;
        font-size: 14px !important;
        font-weight: 300 !important;
        line-height: 1.5 !important;
        letter-spacing: -0.02em !important;
        color: #2f2a27 !important;
    }
}

/* PC — 회원 메뉴 밑줄을 상단 메뉴와 같은 높이로 통일 */
@media (min-width: 1024px) {
    html body .site-header .site-header__actions :is(
        .site-account-link,
        .mp-hybrid-account a
    ) {
        position: relative;
        text-decoration: none !important;
        border-bottom: 0 !important;
    }

    html body .site-header .site-header__actions :is(
        .site-account-link,
        .mp-hybrid-account a
    )::after {
        position: absolute;
        top: calc(50% + 12px);
        right: 0;
        bottom: auto;
        left: 0;

        display: block;
        height: 1px;
        background: #876b57;

        content: "";
        pointer-events: none;
        opacity: 0;

        transform: scaleX(0);
        transform-origin: left center;

        transition:
            opacity 0.32s ease,
            transform 0.32s ease;
    }

    html body .site-header .site-header__actions :is(
        .site-account-link,
        .mp-hybrid-account a
    ):is(:hover, :focus-visible)::after {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* 모바일 하위 메뉴 — 현재 페이지도 같은 위치에 정렬 */
@media (max-width: 1280px) {
    html body #mobile-menu .mobile-menu__submenu > a,
    html body #mobile-menu .mobile-menu__submenu > a[aria-current="page"] {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center;

        box-sizing: border-box;
        width: 100%;
        margin-inline: 0 !important;
        padding: 7px 0 7px 14px !important;

        border-left: 0 !important;
        text-align: left !important;
        text-indent: 0 !important;
        transform: none !important;
        translate: none !important;

        transition: color 0.18s ease !important;
    }

    /* 선택 표시용 가상 요소가 글자를 밀지 않도록 제거 */
    html body #mobile-menu
    .mobile-menu__submenu > a[aria-current="page"]::before,
    html body #mobile-menu
    .mobile-menu__submenu > a[aria-current="page"]::after {
        content: none !important;
        display: none !important;
    }
}
