/* ============================================
   HEADER — V-KOREA Theme
   ============================================ */

/* === TOPBAR === */
.hdr__topbar {
    background-color: var(--header-bg-topbar);
    color: var(--header-color-topbar);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hdr__topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
}

.hdr__topbar-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.hdr__topbar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--header-color-topbar);
    text-decoration: none;
    transition: opacity 0.25s;
    font-weight: 500;
}

.hdr__topbar-item:hover {
    opacity: 0.8;
    color: var(--header-color-topbar);
    text-decoration: none;
}

.hdr__topbar-icon {
    flex-shrink: 0;
}

.hdr__topbar-right {
    display: flex;
    align-items: center;
}

/* === LANGUAGE SWITCHER === */
.hdr__language-wrap {
    position: relative;
}

/* -- Topbar view (inline labels + dropdown) -- */
.hdr__language-topbar {
    position: relative;
}

.hdr__language-current {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
    color: var(--header-color-topbar);
    -webkit-user-select: none;
    user-select: none;
}

.hdr__language-globe {
    flex-shrink: 0;
}

.hdr__language-label {
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 400;
    opacity: 0.65;
    transition: opacity 0.2s;
}

.hdr__language-label.is-active {
    font-weight: 700;
    opacity: 1;
}

.hdr__language-sep {
    font-size: 12px;
    opacity: 0.35;
    margin: 0 2px;
}

.hdr__language-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
    min-width: 170px;
    padding: 6px 0;
    z-index: 1000;
}

.hdr__language-wrap.open .hdr__language-dropdown {
    display: block;
}

.hdr__language-dd-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    text-align: left;
    transition: background 0.2s, color 0.2s;
    font-weight: 400;
}

.hdr__language-dd-btn:hover {
    background: #f5f5f5;
}

.hdr__language-dd-btn.is-active {
    font-weight: 700;
    color: var(--shop-color-main);
}

.hdr__language-dd-btn img {
    flex-shrink: 0;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* -- Mobile view (button list) -- */
.hdr__language-mobile-list {
    display: none;
}

.hdr__language-mobile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    color: #555;
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}

.hdr__language-mobile-btn:hover {
    border-color: #ccc;
    background: #fafafa;
}

.hdr__language-mobile-btn.is-active {
    font-weight: 600;
    color: var(--shop-color-main);
    border-color: var(--shop-color-main);
    background: rgba(26, 46, 90, 0.04);
}

.hdr__language-mobile-btn img {
    flex-shrink: 0;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* -- Context: topbar shows topbar view, hides mobile view -- */
.hdr__topbar .hdr__language-topbar {
    display: block;
}

.hdr__topbar .hdr__language-mobile-list {
    display: none;
}

/* -- Context: mobile drawer shows mobile view, hides topbar view -- */
.hdr__mobile-language .hdr__language-topbar {
    display: none;
}

.hdr__mobile-language .hdr__language-mobile-list {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === MAIN HEADER === */
.hdr__main {
    background-color: var(--header-bg-main);
    border-bottom: 1px solid #e8e8e8;
}

.hdr__main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 32px;
}

/* === LOGO === */
.hdr__logo {
    flex-shrink: 0;
}

.hdr__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.hdr__logo-img {
    max-height: 52px;
    width: auto;
}

.hdr__logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--shop-color-main);
    letter-spacing: -0.5px;
}

/* === DESKTOP NAVIGATION === */
.hdr__nav {
    flex: 1;
    display: none;
    justify-content: center;
}

.hdr__menu {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hdr__menu-item {
    position: relative;
}

.hdr__menu-link {
    display: block;
    padding: 8px 20px;
    color: var(--header-color-menu);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: color 0.25s;
    white-space: nowrap;
    position: relative;
}

.hdr__menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: var(--shop-color-main);
    transform: scaleX(0);
    transition: transform 0.25s;
}

.hdr__menu-item:hover > .hdr__menu-link,
.hdr__menu-item.active > .hdr__menu-link {
    color: var(--shop-color-main);
}

.hdr__menu-item:hover > .hdr__menu-link::after,
.hdr__menu-item.active > .hdr__menu-link::after {
    transform: scaleX(1);
}

/* === DESKTOP SUBMENU (Level 2) === */
.hdr__submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    padding: 8px 0;
    z-index: 999;
    list-style: none;
    margin: 0;
}

.hdr__menu-item:hover > .hdr__submenu {
    display: block;
}

.hdr__submenu-item {
    position: relative;
}

.hdr__submenu-link {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

.hdr__submenu-link:hover {
    color: var(--shop-color-main);
    background: #f8f8f8;
    text-decoration: none;
}

/* Arrow for submenu items with children */
.hdr__submenu-item.has-children > .hdr__submenu-link {
    padding-right: 36px;
    position: relative;
}

.hdr__submenu-item.has-children > .hdr__submenu-link::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #999;
    border-bottom: 1.5px solid #999;
    transform: translateY(-50%) rotate(-45deg);
}

.hdr__submenu-item.has-children:hover > .hdr__submenu-link::after {
    border-color: var(--shop-color-main);
}

/* === DESKTOP SUBMENU (Level 3) === */
.hdr__submenu-lv3 {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background: #fff;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 8px 0;
    z-index: 999;
    list-style: none;
    margin: 0;
}

.hdr__submenu-item:hover > .hdr__submenu-lv3 {
    display: block;
}

.hdr__submenu-lv3-link {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

.hdr__submenu-lv3-link:hover {
    color: var(--shop-color-main);
    background: #f8f8f8;
    text-decoration: none;
}

/* === CTA BUTTON === */
.hdr__cta {
    display: none;
    flex-shrink: 0;
}

.hdr__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    background-color: var(--btn-bg);
    color: var(--btn-color);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid var(--btn-bg);
    transition: all 0.3s;
    white-space: nowrap;
}

.hdr__cta-btn:hover {
    background-color: var(--btn-color);
    color: var(--btn-bg);
    border-color: var(--btn-bg);
    text-decoration: none;
}

.hdr__cta-btn--full {
    width: 100%;
    text-align: center;
}

/* === MOBILE TOGGLE === */
.hdr__mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.hdr__mobile-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--header-color-menu);
    border-radius: 2px;
    transition: all 0.3s;
}

/* === MOBILE OVERLAY === */
.hdr__mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s;
}

.hdr__mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* === MOBILE DRAWER === */
.hdr__mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 380px;
    height: 100%;
    background: #fff;
    z-index: 9999;
    transition: right 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hdr__mobile-drawer.active {
    right: 0;
}

.hdr__mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.hdr__mobile-drawer-logo .hdr__logo-img {
    max-height: 40px;
}

.hdr__mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #333;
    transition: color 0.2s;
}

.hdr__mobile-close:hover {
    color: var(--shop-color-main);
}

/* === MOBILE NAVIGATION === */
.hdr__mobile-nav {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hdr__mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hdr__mobile-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.hdr__mobile-menu-row {
    display: flex;
    align-items: center;
}

.hdr__mobile-menu-link {
    flex: 1;
    display: block;
    padding: 18px 20px;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.hdr__mobile-menu-link:hover {
    color: var(--shop-color-main);
    text-decoration: none;
}

.hdr__mobile-expand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 56px;
    padding: 0;
    border: none;
    border-left: 1px solid #f0f0f0;
    background: none;
    cursor: pointer;
    color: var(--shop-color-accent);
    flex-shrink: 0;
    transition: background 0.2s;
}

.hdr__mobile-expand:hover {
    background: #f8f8f8;
}

.hdr__mobile-expand svg {
    transition: transform 0.3s;
}

.hdr__mobile-menu-item.expanded > .hdr__mobile-menu-row .hdr__mobile-expand svg,
.hdr__mobile-submenu-item.expanded > .hdr__mobile-menu-row .hdr__mobile-expand svg {
    transform: rotate(90deg);
}

/* === MOBILE SUBMENU (Level 2) === */
.hdr__mobile-submenu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fafafa;
}

.hdr__mobile-menu-item.expanded > .hdr__mobile-submenu {
    display: block;
}

.hdr__mobile-submenu-item {
    border-bottom: 1px solid #eee;
}

.hdr__mobile-submenu-item:last-child {
    border-bottom: none;
}

.hdr__mobile-submenu-link {
    flex: 1;
    display: block;
    padding: 14px 20px 14px 36px;
    color: #444;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.hdr__mobile-submenu-link:hover {
    color: var(--shop-color-main);
    text-decoration: none;
}

/* === MOBILE SUBMENU (Level 3) === */
.hdr__mobile-submenu-lv3 {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f2f2f2;
}

.hdr__mobile-submenu-item.expanded > .hdr__mobile-submenu-lv3 {
    display: block;
}

.hdr__mobile-submenu-lv3-link {
    display: block;
    padding: 12px 20px 12px 52px;
    color: #555;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.hdr__mobile-submenu-lv3-link:hover {
    color: var(--shop-color-main);
    text-decoration: none;
}

/* === MOBILE DRAWER FOOTER (Language + CTA) === */
.hdr__mobile-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* === TOPBAR MOBILE HIDE === */
@media (max-width: 767px) {
    .hdr__topbar {
        display: none;
    }

    .hdr__main-inner {
        height: 60px;
    }

    .hdr__logo-img {
        max-height: 40px;
    }
}

/* === TABLET === */
@media (min-width: 768px) {
    .hdr__topbar-inner {
        height: 36px;
    }
}

/* === DESKTOP === */
@media (min-width: 1024px) {
    .hdr__nav {
        display: flex;
    }

    .hdr__cta {
        display: block;
    }

    .hdr__mobile-toggle {
        display: none;
    }

    .hdr__main-inner {
        height: 80px;
    }

    .hdr__logo-img {
        max-height: 56px;
    }
}

@media (min-width: 1200px) {
    .hdr__menu-link {
        padding: 8px 24px;
    }
}
