/* ================================================================
   Hi-Operator — Navigation (PC + Mobile)
   Header, Logo, Nav links, Language switch, Account dropdown,
   Cart badge, Hamburger, Mobile slide-out nav
   ================================================================ */

/* ====================== PC Header ====================== */
.ho-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #eee;
    transition: var(--ho-transition);
}
.ho-header.ho-header-scrolled {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.ho-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.ho-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ho-text);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.5px;
}
.ho-logo:hover { color: var(--ho-text); }
.ho-logo-icon svg { width: 36px; height: 36px; display: block; }
.ho-logo strong { font-weight: 800; }
.ho-logo-img { height: 36px; width: auto; display: block; }

/* PC Nav links */
.ho-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ho-nav-link {
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #444;
    border-radius: var(--ho-radius-sm);
    transition: var(--ho-transition-fast);
}
.ho-nav-link:hover {
    color: var(--ho-secondary);
    background: rgba(229,62,62,0.06);
}
.ho-nav-link.ho-nav-active {
    color: var(--ho-secondary);
    background: rgba(229,62,62,0.08);
    font-weight: 600;
}

/* PC Header Actions */
.ho-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ho-login-icon,
.ho-cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #444;
    font-size: 17px;
    transition: background .2s, color .2s;
    text-decoration: none;
}
.ho-login-icon:hover,
.ho-cart-icon:hover {
    background: rgba(229,62,62,.08);
    color: var(--ho-secondary);
}
.ho-cart-badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #e53e3e;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* PC Language Switch */
.ho-lang-switch { position: relative; }
.ho-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--ho-radius-sm);
    transition: var(--ho-transition-fast);
}
.ho-lang-btn:hover {
    color: var(--ho-secondary);
    background: rgba(229,62,62,.06);
}
.ho-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--ho-bg-white);
    border-radius: var(--ho-radius-md);
    box-shadow: var(--ho-shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--ho-transition-fast);
    min-width: 120px;
}
.ho-lang-switch.open .ho-lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ho-lang-option {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--ho-text);
    transition: var(--ho-transition-fast);
}
.ho-lang-option:hover {
    background: var(--ho-bg);
    color: var(--ho-secondary);
}
.ho-lang-option.active {
    color: var(--ho-secondary);
    font-weight: 600;
}
.ho-header-cta { margin-left: 4px; }

/* PC Account Dropdown */
.ho-account-dropdown { position: relative; }
.ho-account-btn {
    display: flex; align-items: center; gap: 8px;
    width: 168px; min-width: 168px; max-width: 168px;
    background: none; border: 1px solid #E2E8F0; border-radius: 12px;
    padding: 5px 14px 5px 5px; cursor: pointer; font-size: 13px;
    font-weight: 500; color: inherit; transition: all .2s;
}
.ho-account-btn span:not(.ho-acc-avatar) {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ho-account-btn:hover { border-color: #E53E3E; }
.ho-acc-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: #FEF2F2; color: #E53E3E;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    overflow: hidden; flex-shrink: 0;
}
.ho-acc-avatar img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.ho-account-menu {
    position: absolute; right: 0; top: calc(100% + 8px);
    width: 168px; background: #fff; border: 1px solid #E2E8F0; border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    padding: 6px; display: none; z-index: 1000;
}
.ho-account-dropdown.is-open .ho-account-menu { display: block; }
.ho-account-menu a {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    font-size: 14px; color: #4A5568; text-decoration: none;
    border-radius: 6px; transition: all .15s;
}
.ho-account-menu a:hover { background: #F7FAFC; color: #1A202C; }
.ho-account-menu a.logout { color: #E53E3E; }
.ho-account-menu a.logout:hover { background: #FEF2F2; }
.ho-account-menu-divider { height: 1px; background: #E2E8F0; margin: 4px 8px; }

/* ====================== Mobile Header ====================== */
.hom-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.hom-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
}
.hom-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ho-text);
    font-size: 18px;
}
.hom-logo:hover { color: var(--ho-text); }
.hom-logo-icon svg { width: 28px; height: 28px; display: block; }
.hom-logo strong { font-weight: 800; }
.hom-logo-img { height: 28px; width: auto; display: block; }
.hom-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hom-login-icon,
.hom-cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #444;
    font-size: 16px;
    text-decoration: none;
}
.hom-cart-icon .ho-cart-badge {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 8px;
    background: #e53e3e;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.hom-lang-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    border: 1px solid #ddd;
    border-radius: var(--ho-radius-sm);
    display: inline-block;
}
.hom-lang-btn:hover {
    color: var(--ho-secondary);
    border-color: var(--ho-secondary);
}

/* Mobile Hamburger */
.hom-hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.hom-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 1px;
    transition: var(--ho-transition);
}
.hom-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.hom-hamburger.active span:nth-child(2) { opacity: 0; }
.hom-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Slide-out Nav */
.hom-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--ho-transition);
}
.hom-nav-overlay.open {
    opacity: 1;
    visibility: visible;
}
.hom-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--ho-bg-white);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none;
}
.hom-nav.open { right: 0; box-shadow: -4px 0 20px rgba(0,0,0,0.2); }
.hom-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--ho-border);
}
.hom-nav-header .hom-logo { color: var(--ho-text); }
.hom-nav-close {
    color: var(--ho-text-light);
    padding: 4px;
}
.hom-nav-links {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.hom-nav-link {
    display: block;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--ho-text);
    border-bottom: 1px solid var(--ho-border-light);
    transition: var(--ho-transition-fast);
}
.hom-nav-link:hover,
.hom-nav-link.hom-nav-active {
    color: var(--ho-secondary);
    background: rgba(229,62,62,0.05);
}
.hom-nav-footer {
    padding: 16px;
    border-top: 1px solid var(--ho-border);
}
