/* ==================================================
   OMODA & JAECOO TÂN PHÚ — HEADER
================================================== */

.oj-site-header {
    position: relative;
    z-index: 999;
    width: 100%;
    background: var(--oj-white);
    font-family: "Inter", Arial, sans-serif;
}

.oj-topbar {
    background: var(--oj-black);
    color: var(--oj-white);
    font-size: 13px;
}

.oj-topbar__inner {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.oj-topbar__brand {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.oj-topbar__contact {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.76);
}

.oj-topbar__contact a {
    color: var(--oj-white);
    font-weight: 700;
    text-decoration: none;
}

.oj-topbar__contact a:hover {
    color: var(--oj-blue);
}

/* Thanh menu chính */

.oj-navbar {
    background: var(--oj-white);
    border-bottom: 1px solid var(--oj-border);
    box-shadow: 0 3px 16px rgba(17, 17, 17, 0.05);
}

.oj-navbar__inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.oj-logo {
    flex: 0 0 auto;
}

.oj-logo > a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--oj-black);
    text-decoration: none;
}

.oj-logo__image {
    display: block;
    width: auto;
    max-width: 190px;
    max-height: 54px;
    object-fit: contain;
}

.oj-logo__text {
    font-size: 18px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.oj-logo__location {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--oj-muted);
}

/* Menu desktop */

.oj-desktop-nav {
    flex: 1;
    min-width: 0;
}

.oj-menu,
.oj-menu ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.oj-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.oj-menu > li {
    position: relative;
}

.oj-menu > li > a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 76px;
    padding: 0 11px;
    color: var(--oj-text);
    font-size: 13px;
    line-height: 1.3;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.oj-menu > li > a::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 0;
    height: 3px;
    background: var(--oj-blue);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.oj-menu > li:hover > a,
.oj-menu > li.current-menu-item > a,
.oj-menu > li.current-menu-ancestor > a {
    color: var(--oj-blue-dark);
}

.oj-menu > li:hover > a::after,
.oj-menu > li.current-menu-item > a::after,
.oj-menu > li.current-menu-ancestor > a::after {
    transform: scaleX(1);
}

/* Mũi tên menu có submenu */

.oj-menu .menu-item-has-children > a {
    padding-right: 25px;
}

.oj-menu .menu-item-has-children > a::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 10px;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
}

/* Dropdown */

.oj-menu .sub-menu {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    z-index: 1000;
    width: 245px;
    padding: 10px;
    background: var(--oj-white);
    border: 1px solid var(--oj-border);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 18px 45px rgba(17, 17, 17, 0.13);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}

.oj-menu li:hover > .sub-menu,
.oj-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.oj-menu .sub-menu li {
    position: relative;
}

.oj-menu .sub-menu a {
    display: block;
    padding: 11px 13px;
    border-radius: 7px;
    color: var(--oj-text);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 550;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        padding 0.2s ease;
}

.oj-menu .sub-menu a:hover {
    padding-left: 17px;
    color: var(--oj-blue-dark);
    background: var(--oj-light);
}

/* Nút lái thử */

.oj-header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.oj-test-drive-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 8px;
    background: var(--oj-cta);
    color: var(--oj-white);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 7px 18px rgba(255, 77, 0, 0.18);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.oj-test-drive-btn:hover {
    color: var(--oj-white);
    background: #e94600;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(255, 77, 0, 0.25);
}

/* Nút hamburger */

.oj-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--oj-border);
    border-radius: 8px;
    background: var(--oj-white);
    cursor: pointer;
}

.oj-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--oj-black);
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.oj-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.oj-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.oj-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile panel */

.oj-mobile-panel {
    display: none;
    overflow: hidden;
    max-height: 0;
    background: var(--oj-white);
    border-bottom: 1px solid var(--oj-border);
    transition: max-height 0.35s ease;
}

.oj-mobile-panel.is-open {
    max-height: 1000px;
}

.oj-mobile-panel__inner {
    padding: 12px 20px 24px;
}

.oj-mobile-menu,
.oj-mobile-menu ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.oj-mobile-menu > li {
    border-bottom: 1px solid var(--oj-border);
}

.oj-mobile-menu a {
    display: block;
    padding: 14px 4px;
    color: var(--oj-text);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 650;
    text-decoration: none;
}

.oj-mobile-menu .sub-menu {
    padding: 0 0 8px 14px;
    border-left: 2px solid var(--oj-blue);
}

.oj-mobile-menu .sub-menu a {
    padding: 9px 12px;
    color: var(--oj-muted);
    font-size: 13px;
    font-weight: 500;
}

.oj-mobile-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.oj-mobile-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.oj-mobile-actions__primary {
    background: var(--oj-cta);
    color: var(--oj-white);
}

.oj-mobile-actions__phone {
    border: 1px solid var(--oj-blue-dark);
    color: var(--oj-blue-dark);
    background: var(--oj-white);
}

/* Tablet và mobile */

@media (max-width: 1180px) {
    .oj-desktop-nav,
    .oj-test-drive-btn {
        display: none;
    }

    .oj-menu-toggle {
        display: block;
    }

    .oj-navbar__inner {
        justify-content: space-between;
    }

    .oj-mobile-panel {
        display: block;
    }
}

@media (max-width: 767px) {
    .oj-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .oj-topbar__inner {
        min-height: 34px;
        justify-content: center;
    }

    .oj-topbar__brand {
        display: none;
    }

    .oj-topbar__contact {
        font-size: 12px;
    }

    .oj-navbar__inner {
        min-height: 66px;
    }

    .oj-logo__image {
        max-width: 155px;
        max-height: 44px;
    }

    .oj-logo__text {
        font-size: 15px;
    }
}

/* Khóa cuộn khi mở menu mobile */

body.oj-menu-open {
    overflow: hidden;
}