:root {
    --ota-topbar-bg: #10352e;
    --ota-topbar-text: #e7f3ef;
    --ota-surface: #ffffff;
    --ota-border: rgba(16, 53, 46, 0.1);
    --ota-accent: #1d7f5f;
    --ota-accent-strong: #145944;
    --ota-soft: #edf7f3;
    --ota-muted: #61756f;
    --ota-title: #17352d;
    --ota-shadow: 0 20px 48px rgba(16, 53, 46, 0.1);
}

.header-ota {
    background: var(--ota-surface);
    border-bottom: 1px solid var(--ota-border);
    position: relative;
    z-index: 2000;
}

.ota-header-top {
    background:
        linear-gradient(90deg, rgba(16, 53, 46, 0.98), rgba(24, 72, 62, 0.96)),
        radial-gradient(circle at top left, rgba(84, 174, 128, 0.18), transparent 38%);
    color: var(--ota-topbar-text);
    padding: 3px 0; /* Ultra-slim */
    overflow: visible;
    position: relative;
    z-index: 2001;
}

.ota-tagline {
    margin: 0;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.ota-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    height: 32px; /* Fixed height for perfect alignment */
    overflow: visible;
}

.ota-currency-toggle,
.ota-account-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: inherit;
    border-radius: 6px; /* Squarer for alignment */
    padding: 0 10px;
    height: 26px; /* Exact height */
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.ota-currency-toggle:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.ota-language-switcher {
    display: inline-flex;
    align-items: center;
    height: 26px;
    position: relative;
    z-index: 1000;
    overflow: visible;
}

/* Tighten GTranslate float switcher to top-bar scale */
.ota-language-switcher .gt_container {
    height: 26px !important;
    margin: 0 !important;
}

.ota-language-switcher .gt_float_switcher {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 26px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    color: var(--ota-topbar-text) !important;
    font-size: 11px !important;
    line-height: 1 !important;
}

.ota-language-switcher .gt_float_switcher:hover {
    border-color: rgba(255, 255, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.ota-language-switcher .gt_float_switcher .gt-selected {
    background: transparent !important;
}

.ota-language-switcher .gt_float_switcher .gt-selected .gt-current-lang {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 24px !important;
    padding: 0 10px !important;
    color: var(--ota-topbar-text) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
}

.ota-language-switcher .gt_float_switcher .gt-selected img {
    width: 18px !important;
    height: 13px !important;
    margin: 0 !important;
    border-radius: 2px !important;
    object-fit: cover !important;
}

.ota-language-switcher .gt_float_switcher .gt-selected .gt-lang-code {
    position: static !important;
    top: auto !important;
    font-size: 11px !important;
    line-height: 1 !important;
}

.ota-language-switcher .gt_float_switcher .gt-selected .gt_float_switcher-arrow {
    width: 10px !important;
    height: 10px !important;
    background-size: 8px !important;
    opacity: 0.72 !important;
}

.ota-language-switcher .gt_float_switcher .gt_options {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    margin-top: 6px !important;
    min-width: 160px !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    border: 1px solid rgba(16, 53, 46, 0.1) !important;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18) !important;
    z-index: 9999 !important;
}

.ota-language-switcher .gt_float_switcher .gt_options a {
    padding: 8px 12px !important;
    font-size: 11px !important;
    color: var(--ota-title) !important;
    background: #ffffff !important;
}

.ota-language-switcher .gt_float_switcher .gt_options img {
    width: 18px !important;
    height: 13px !important;
    margin-right: 6px !important;
    border-radius: 2px !important;
}

.ota-language-switcher .gt_float_switcher .gt_options a:hover {
    background: var(--ota-soft) !important;
    color: var(--ota-accent-strong) !important;
}

.ota-language-switcher .gt_selector {
    height: 26px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: transparent !important;
    color: var(--ota-topbar-text) !important;
    border-radius: 6px !important;
    line-height: 24px !important;
}

.ota-language-switcher .gt_selector:after {
    border-color: rgba(255, 255, 255, 0.5) transparent transparent transparent !important;
}

.ota-top-menu ul {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 26px;
}

.ota-top-menu li {
    display: flex;
    align-items: center;
    height: 100%;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.ota-top-menu li:first-child {
    border-left: 0;
    padding-left: 0;
}

.ota-top-menu a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
}

.ota-top-menu a:hover {
    color: #ffffff;
}

.header-ota .menu-area {
    background: linear-gradient(180deg, #ffffff, #fbfdfc);
    box-shadow: 0 10px 26px rgba(16, 53, 46, 0.06);
}

.ota-mainbar {
    padding: 12px 0 10px;
}

.ota-search-form {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    min-width: min(500px, 38vw);
    padding: 9px 10px 9px 14px;
    border: 1px solid var(--ota-border);
    border-radius: 14px;
    background: var(--ota-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.ota-search-form i {
    color: var(--ota-accent);
    font-size: 17px;
}

.ota-search-form input {
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--ota-title);
    font-size: 14px;
}

.ota-search-form input:focus {
    outline: none;
}

.ota-search-form input::placeholder {
    color: var(--ota-muted);
}

.ota-search-form button {
    border: 0;
    border-radius: 10px;
    background: var(--ota-accent);
    color: #fff;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
}

.ota-brandmark .logo img {
    max-height: 52px;
    width: auto;
}

.ota-nav-row {
    border-top: 1px solid var(--ota-border);
}

.ota-main-menu {
    width: 100%;
    display: flex;
    justify-content: center;
}

.ota-main-menu > ul,
.ota-main-menu > div > ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.ota-main-menu ul li {
    margin: 0;
    padding: 0;
    position: relative;
}

.ota-main-menu ul li::before,
.ota-main-menu ul li::after,
.ota-main-menu ul li a::before {
    display: none !important;
    content: none !important;
}

.ota-main-menu > ul > li > a,
.ota-main-menu > div > ul > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 50px;
    padding: 0 4px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--ota-title);
    white-space: nowrap;
    position: relative; /* anchor for the underline pseudo-element below */
}

/* Suppress header-layout1's growing underline on OTA nav links */
.header-ota .main-menu > ul > li > a::before,
.header-ota .main-menu > div > ul > li > a::before {
    display: none !important;
    content: none !important;
}

/* Override header-layout1 hover colour — use OTA accent instead of --black-color2 */
.header-ota .main-menu > ul > li > a:hover,
.header-ota .main-menu > ul > li > a.active,
.header-ota .main-menu > div > ul > li > a:hover,
.header-ota .main-menu > div > ul > li > a.active {
    color: var(--ota-accent);
}

.ota-main-menu > ul > li.menu-item-has-children > a:after,
.ota-main-menu > div > ul > li.menu-item-has-children > a:after,
.ota-main-menu > ul > li:has(.sub-menu) > a:after,
.ota-main-menu > div > ul > li:has(.sub-menu) > a:after {
    position: static;
    margin-left: 6px;
    border: 0;
    width: auto;
    height: auto;
    color: var(--ota-accent);
    font-size: 11px;
    transform: none;
}

.ota-main-menu > ul > li.ota-no-caret > a:after,
.ota-main-menu > div > ul > li.ota-no-caret > a:after {
    display: none !important;
    content: none !important;
}

/* Hide dropdown caret on items that have no sub-menu */
.header-ota .main-menu .menu-item-type-custom:not(.menu-item-has-children) > a:after {
    display: none !important;
    content: none !important;
}

.ota-main-menu ul.sub-menu,
.ota-main-menu ul.mega-menu {
    border: 1px solid var(--ota-border);
    border-radius: 16px;
    box-shadow: var(--ota-shadow);
    overflow: hidden;
    background: #ffffff;
    padding: 10px;
    left: 50%;
    /*
     * BUG FIX: Combine centering with the theme's scaleY(0) initial state.
     * Previously only translateX(-50%) was set here, which replaced the theme's
     * scaleY(0) — making the sub-menu fully open. Then on hover the theme sets
     * scaleY(1) alone, dropping the translateX and causing a position jump.
     */
    transform: translateX(-50%) scaleY(0);
    z-index: 100; /* Theme default is -1, which causes flicker behind elements */
}

/* Hover visible state — must repeat translateX so it is not lost */
.header-ota .main-menu ul li:hover > ul.sub-menu,
.header-ota .main-menu ul li:hover > ul.mega-menu {
    transform: translateX(-50%) scaleY(1);
    z-index: 100;
}

.ota-main-menu ul.sub-menu li a,
.ota-main-menu ul.mega-menu li a {
    min-width: 240px;
    padding: 10px 42px 10px 14px;
    border-radius: 10px;
    color: var(--ota-title);
    font-size: 13px;
    font-weight: 600;
}

/* Cancel the theme's 23px padding-left slide on sub-menu link hover
   (the arrow bullet is hidden in the OTA menu, but the padding shift remained) */
.header-ota .main-menu ul.sub-menu li a:hover {
    padding-left: 14px !important;
}

/* Right-edge items: right-aligned, no translateX — but still need scaleY animation */
.ota-main-menu > ul > li:last-child > ul.sub-menu,
.ota-main-menu > ul > li:last-child > ul.mega-menu,
.ota-main-menu > div > ul > li:last-child > ul.sub-menu,
.ota-main-menu > div > ul > li:last-child > ul.mega-menu,
.ota-main-menu > ul > li:nth-last-child(2) > ul.sub-menu,
.ota-main-menu > ul > li:nth-last-child(2) > ul.mega-menu,
.ota-main-menu > div > ul > li:nth-last-child(2) > ul.sub-menu,
.ota-main-menu > div > ul > li:nth-last-child(2) > ul.mega-menu {
    left: auto;
    right: 0;
    transform: scaleY(0); /* was `none`, which bypassed the animation */
}

/* Right-edge hover: scaleY(1) only, no translateX */
.header-ota .ota-main-menu > ul > li:last-child:hover > ul.sub-menu,
.header-ota .ota-main-menu > ul > li:last-child:hover > ul.mega-menu,
.header-ota .ota-main-menu > div > ul > li:last-child:hover > ul.sub-menu,
.header-ota .ota-main-menu > div > ul > li:last-child:hover > ul.mega-menu,
.header-ota .ota-main-menu > ul > li:nth-last-child(2):hover > ul.sub-menu,
.header-ota .ota-main-menu > ul > li:nth-last-child(2):hover > ul.mega-menu,
.header-ota .ota-main-menu > div > ul > li:nth-last-child(2):hover > ul.sub-menu,
.header-ota .ota-main-menu > div > ul > li:nth-last-child(2):hover > ul.mega-menu {
    transform: scaleY(1);
    z-index: 100;
}

.ota-coming-soon > a,
.ota-coming-soon > span {
    position: relative;
    padding-right: 58px !important;
}

.ota-coming-soon > a::before,
.ota-coming-soon > span::before {
    content: "Soon";
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: rgba(29, 127, 95, 0.1);
    color: var(--ota-accent-strong);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 8px;
}

.ota-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ota-search-toggle {
    flex: 0 0 auto;
}

.header-ota .icon-btn.ota-search-toggle {
    border: 1px solid var(--ota-border);
    background: var(--ota-soft);
    color: var(--ota-accent-strong);
}

.ota-action-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--ota-soft);
    color: var(--ota-accent-strong);
    font-size: 13px;
    font-weight: 700;
}

.ota-action-link:hover {
    background: #dff0e8;
    color: var(--ota-accent-strong);
}

.ota-account-toggle {
    border-color: var(--ota-border);
    background: #ffffff;
    color: var(--ota-title);
    min-height: 40px;
    padding: 8px 14px;
}

.ota-account-toggle:hover,
.ota-account-toggle:focus {
    color: var(--ota-title);
    border-color: rgba(29, 127, 95, 0.22);
    background: var(--ota-soft);
}

.ota-account-dropdown .dropdown-menu,
.ota-currency-menu {
    border: 1px solid var(--ota-border);
    border-radius: 16px;
    box-shadow: var(--ota-shadow);
    padding: 10px;
}

.ota-account-menu .dropdown-item,
.ota-currency-menu .dropdown-item {
    border-radius: 12px;
    font-size: 13px;
    padding: 9px 11px;
}

.ota-account-menu .dropdown-item:hover,
.ota-currency-menu .dropdown-item:hover {
    background: var(--ota-soft);
    color: var(--ota-accent-strong);
}

.ota-login-cta.th-btn {
    min-height: 40px;
    line-height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ota-accent), #2b9c74);
    border: 0;
}

.ota-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 320px;
    border-radius: 16px;
    background: #102a43;
    color: #fff;
    box-shadow: var(--ota-shadow);
    padding: 14px 16px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ota-toast.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ota-toast i {
    color: #5eead4;
}

@media (max-width: 1399px) {
    .ota-search-form {
        min-width: min(390px, 34vw);
    }

    .ota-main-menu > ul,
    .ota-main-menu > div > ul {
        gap: 24px;
    }

    .ota-main-menu > ul > li > a {
        font-size: 13px;
    }
}

@media (max-width: 1199px) {
    .ota-mainbar {
        padding: 10px 0;
    }

    .ota-header-actions {
        gap: 8px;
    }

    .ota-action-link,
    .ota-account-toggle,
    .ota-login-cta.th-btn {
        display: none;
    }

    .ota-brandmark .logo img {
        max-height: 46px;
    }
}

@media (max-width: 767px) {
    .ota-header-top {
        padding: 8px 0;
    }

    .ota-top-actions {
        justify-content: center;
        gap: 10px;
    }

    .ota-currency-toggle {
        padding: 8px 12px;
    }

    .ota-brandmark .logo img {
        max-height: 42px;
    }

    .ota-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}
