.main-header {
    display: none;
}

.header-inner {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    position: relative;
}

.header-logo {
    width: fit-content;
    height: auto;
}

.header-logo img {
    width: 180px;
}

.sub-menu-open-btn {
    position: absolute;
    top: 16px;
    right: 24px;
    border: none;
    background: none;
}

.sub-menu-open-btn img {
    width: 60px;
    height: 60px;
}

.header-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    height: 100px;
    margin-left: var(--spacing-6);
}

.header-nav::before {
    content: '';
    display: none;
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    height: 355px;
    background: #fff;
    z-index: 998;
    border-top: 1px solid #ddd;
}

.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 호버 시 밑줄 */
.nav-item:has(.main-menu-item.active) .sub-menu-item:first-child::before {
    content: '';
    position: absolute;
    top: -37px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px; 
    background-color: var(--hover-color);
}

.main-menu-item {
    display: block;
    position: relative;
    line-height: 100px;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%); 
    width: auto;
    min-width: 120px; /* 소메뉴 열 너비 */
    background: transparent; /* 배경은 아래 ::before에서 처리 */
    padding: 36px 0;
    z-index: 999;
    flex-direction: column;
    gap: var(--spacing-4);
    text-align: center;
}


/* 호버 시 전체 동시 노출 */
.header-nav:hover::before,
.header-nav:hover .nav-dropdown {
    display: flex;
}

/* .header-nav::before,
.nav-dropdown {
    display: flex !important;
} */

/* 소메뉴 글자 스타일 */
.sub-menu-item {
    display: block; /* padding이나 정렬이 잘 먹도록 block 권장 */
    position: relative;
    white-space: nowrap;
}

.sub-menu-item.active-sub {
    color: var(--hover-color) !important;
    font-weight: 700;
}

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover; 
    background-position: center;
    aspect-ratio: 375 / 300;
}

.hero.hero-about  { background-image: url('../img/hero01-bg.jpg'); }
.hero.hero-pain   { background-image: url('../img/hero02-bg.jpg'); }
.hero.hero-herbal { background-image: url('../img/hero03-bg.jpg'); }
.hero.hero-diet   { background-image: url('../img/hero04-bg.jpg'); }

.bc-bar {
    background: #1c1b2d;
    display: flex;
    width: 100%;
    height: 48px;
    padding: 0;
}

.bc-home {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.bc-home img {
    width: 24px;
    height: auto;
}

.bc-chevron {
    width: 8px;
}

.bc-item {
    flex: 1; 
    min-width: 0; 
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,0.1);
    position: relative;
    white-space: nowrap;
}

.bc-item:last-child {
    border-right: none;
}

.bc-dropdown {
    display: none;
    position: absolute;
    top: 48px;
    left: 0;
    width: 100%; 
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 100;
}

.bc-item.open .bc-dropdown {
    display: flex;
    flex-direction: column;
}
 
.bc-dropdown-item {
    display: block;
    width: 100%;
    padding: var(--spacing-4);
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.12s, color 0.12s;
}
.bc-dropdown-item:hover { font-weight: 600; }

.m-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-4);
}

.m-header-logo img {
    width: 136px;
}

.m-sub-menu-open-btn {
    border: none;
    background: none;
}

.m-sub-menu-open-btn img {
    width: 35px;
}

@media (min-width: 768px) {
    .m-header-inner {
        padding: var(--spacing-8);
    }

    .m-header-logo img {
        width: 100%;
    }

    .m-sub-menu-open-btn img {
        width: 100%;
    }

    .hero {
        aspect-ratio: 768 / 550;
    }

    .bc-bar {
        padding: var(--spacing-4) 0;
        height: 60px;
    }

    .bc-home {
        flex: 0 0 60px;
    }

    .bc-item {
        font-size: 1.5rem;
        padding: 0 var(--spacing-4);
    }

    .bc-dropdown {
        top: 44px;
    }

    .bc-dropdown-item {
        font-size: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .m-header {
        display: none !important;
    }

    .main-header {
        display: block;
    }

    .hero {
        aspect-ratio: 1920 / 550;
    }

    .bc-item {
        flex: unset;
        min-width: 217px;
        font-size: 1.125rem;
    }

    .bc-dropdown-item {
        font-size: 1rem;
    }
}

@media (min-width: 1280px) {
    .header-inner {
        justify-content: space-between;
    }

    .header-nav {
        gap: 80px;
        margin: 0 auto;
    }
}

@media (min-width: 1440px) {
    .header-inner {
        justify-content: space-between;
    }

    .header-logo img {
        width: unset;
    }

    .header-nav {
        gap: 80px;
        margin: 0 auto;
    }

    .bc-home {
        margin-left: 260px; 
    }

    .bc-item {
        flex: unset;
        min-width: 217px;
    }
}