/* =========================================================
   ANKIT CONNECT — MODERN ELEGANT HEADER CSS
   ========================================================= */

:root {
    --ac-navy-dark: #0a192f;
    --ac-navy: #132a4a;
    --ac-blue: #1d68d8;
    --ac-blue-light: #eff6ff;
    --ac-orange: #f25a1b;
    --ac-orange-hover: #dc4809;
    --ac-orange-soft: #fff3ec;
    --ac-text: #1e293b;
    --ac-muted: #64748b;
    --ac-border: #e2e8f0;
    --ac-border-subtle: #edf2f7;
    --ac-bg-subtle: #f8fafc;
    --ac-white: #ffffff;
    --ac-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --ac-shadow-dropdown: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.04);
}

.ac-topbar,
.ac-header {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.ac-topbar *,
.ac-header * {
    box-sizing: border-box;
}

/* ---------------- TOP BAR ---------------- */

.ac-topbar {
    width: 100%;
    background: linear-gradient(90deg, #0a192f 0%, #132a4a 100%);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 500;
}

.ac-topbar-inner {
    width: min(100% - 40px, 1440px);
    min-height: 38px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ac-topbar-left,
.ac-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ac-topbar-left > span,
.ac-topbar-right > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ac-topbar-left i {
    color: #38bdf8;
    font-size: 13px;
}

.ac-topbar-city {
    color: #ffffff !important;
    font-weight: 700;
}

.ac-topbar-divider {
    height: 14px;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.ac-topbar-right a:hover {
    color: #ffffff;
}

.ac-topbar-right a i {
    color: #fb923c;
}

/* ---------------- MAIN HEADER CONTAINER ---------------- */

.ac-header {
    position: relative;
    z-index: 1050;
    width: 100%;
    background: var(--ac-white);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.ac-header-main {
    background: var(--ac-white);
    border-bottom: 1px solid var(--ac-border-subtle);
}

.ac-header-inner {
    width: min(100% - 40px, 1440px);
    min-height: 84px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Brand */
.ac-header-brand {
    display: flex;
    flex: 0 0 215px;
    min-width: 0;
    align-items: center;
    text-decoration: none;
}

.ac-header-brand img {
    display: block;
    max-width: 215px;
    height: 60px;
    object-fit: contain;
    object-position: left center;
}

.ac-header-brand-fallback {
    display: none;
    color: var(--ac-navy);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.ac-header-brand-fallback b {
    color: var(--ac-orange);
}

.ac-header-brand-fallback small {
    display: block;
    margin-top: 4px;
    color: var(--ac-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Search Bar */
.ac-header-search {
    display: flex;
    align-items: center;
    flex: 1 1 360px;
    max-width: 540px;
    height: 48px;
    background: var(--ac-bg-subtle);
    border: 1.5px solid #dce4ee;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ac-header-search:focus-within {
    background: #ffffff;
    border-color: var(--ac-blue);
    box-shadow: 0 0 0 4px rgba(29, 104, 216, 0.12);
}

.ac-search-category {
    flex: 0 0 auto;
    height: 100%;
    border-right: 1.5px solid #e2e8f0;
}

.ac-search-category select {
    width: 90px;
    height: 100%;
    padding: 0 10px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ac-navy);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ac-header-search input {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ac-text);
    font: inherit;
    font-size: 13.5px;
}

.ac-header-search input::placeholder {
    color: #94a3b8;
}

.ac-header-search > button {
    flex: 0 0 46px;
    height: 100%;
    border: 0;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(135deg, var(--ac-blue), #1754af);
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ac-header-search > button:hover {
    background: linear-gradient(135deg, #1754af, #113f82);
}

/* Location Selector */
.ac-header-location {
    position: relative;
    display: flex;
    align-items: center;
}

.ac-location-wrap {
    position: relative;
}

.ac-location-button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 6px 14px;
    border: 1px solid var(--ac-border);
    border-radius: 11px;
    background: #ffffff;
    color: var(--ac-navy);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ac-location-button > i.fa-location-dot {
    color: var(--ac-blue);
    font-size: 15px;
}

.ac-location-button small {
    display: block;
    color: var(--ac-muted);
    font-size: 10.5px;
    font-weight: 500;
    text-align: left;
}

.ac-location-button .ac-loc-chevron {
    color: #94a3b8;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.ac-location-wrap.is-open .ac-location-button {
    border-color: var(--ac-blue);
}

.ac-location-wrap.is-open .ac-loc-chevron {
    transform: rotate(180deg);
}

.ac-location-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1300;
    min-width: 200px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--ac-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--ac-shadow-dropdown);
}

.ac-location-wrap.is-open .ac-location-menu {
    display: block;
    animation: acFadeIn 0.15s ease-out;
}

.ac-location-menu button {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ac-text);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.ac-location-menu button:hover {
    background: var(--ac-blue-light);
    color: var(--ac-blue);
}

/* Quick User Login */
.ac-header-quick {
    display: flex;
    align-items: center;
}

.ac-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--ac-navy);
    font-size: 13.5px;
    font-weight: 650;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ac-quick-link i {
    color: var(--ac-blue);
    font-size: 16px;
}

.ac-quick-link:hover {
    background: var(--ac-bg-subtle);
    color: var(--ac-blue);
}

/* Header CTAs */
.ac-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ac-provider-cta {
    border: 1.5px solid #fed7aa;
    background: var(--ac-orange-soft);
    color: var(--ac-orange-hover) !important;
}

.ac-provider-cta:hover {
    background: #ffedd5;
    border-color: #fdba74;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(242, 90, 27, 0.15);
}

.ac-shop-cta {
    border: 1.5px solid transparent;
    background: linear-gradient(135deg, #f25a1b 0%, #dc4809 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(242, 90, 27, 0.25);
}

.ac-shop-cta:hover {
    background: linear-gradient(135deg, #e44d0e 0%, #c43c04 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(242, 90, 27, 0.35);
}

/* ---------------- NAVIGATION ROW ---------------- */

.ac-header-nav-wrap {
    background: #ffffff;
    border-top: 1px solid var(--ac-border-subtle);
}

.ac-header-nav-inner {
    width: min(100% - 40px, 1440px);
    margin: 0 auto;
}

.ac-header-nav {
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.8vw, 28px);
    min-height: 52px;
}

.ac-header-nav > a,
.ac-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: var(--ac-navy);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
}

.ac-header-nav > a i,
.ac-dropdown-toggle > i:first-child {
    color: var(--ac-blue);
    font-size: 13.5px;
}

.ac-header-nav > a:hover,
.ac-dropdown-toggle:hover,
.ac-header-nav > a.is-active,
.ac-nav-dropdown.is-active > .ac-dropdown-toggle {
    color: var(--ac-orange);
}

.ac-header-nav > a.is-active::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2.5px;
    border-radius: 3px 3px 0 0;
    background: var(--ac-orange);
    content: "";
}

.ac-chevron {
    color: #94a3b8;
    font-size: 10px !important;
    transition: transform 0.2s ease;
}

.ac-nav-dropdown.is-open > .ac-dropdown-toggle .ac-chevron {
    transform: rotate(180deg);
    color: var(--ac-orange);
}

/* Dropdown Menus */
.ac-nav-dropdown {
    position: relative;
}

.ac-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1250;
    min-width: 230px;
    padding: 8px;
    border: 1px solid var(--ac-border);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--ac-shadow-dropdown);
}

.ac-nav-dropdown.is-open > .ac-dropdown-menu {
    display: block;
    animation: acFadeIn 0.18s ease-out;
}

.ac-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--ac-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    transition: all 0.15s ease;
}

.ac-dropdown-menu a:hover {
    background: var(--ac-orange-soft);
    color: var(--ac-orange-hover);
    padding-left: 17px;
}

/* Mega Menu */
.ac-dropdown-menu.ac-mega-menu {
    display: none;
    grid-template-columns: repeat(2, minmax(170px, 1fr));
    gap: 16px;
    width: 460px;
    max-width: min(460px, calc(100vw - 30px));
    padding: 18px;
}

.ac-nav-dropdown.is-open > .ac-dropdown-menu.ac-mega-menu {
    display: grid;
    animation: acFadeIn 0.18s ease-out;
}

.ac-mega-column {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ac-mega-column strong {
    padding: 6px 12px 10px;
    color: var(--ac-navy);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px dashed #e2e8f0;
    margin-bottom: 4px;
}

.ac-mega-column a {
    padding: 8px 12px;
}

/* Mobile registration links inside navigation */
.ac-header-nav > .ac-mobile-partner-link {
    display: none;
}

/* ---------------- ANIMATION & HELPERS ---------------- */
@keyframes acFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ac-header .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------- TABLET / DESKTOP RESPONSIVE ---------------- */

.ac-menu-toggle {
    display: none;
}

@media (max-width: 1200px) {
    .ac-header-inner {
        gap: 12px;
    }
    .ac-header-brand {
        flex-basis: 180px;
    }
    .ac-header-cta {
        padding: 0 12px;
        font-size: 12px;
    }
    .ac-header-nav {
        gap: 16px;
    }
}

/* ---------------- MOBILE NAVIGATION (<= 991px) ---------------- */

@media (max-width: 991px) {
    .ac-topbar-inner {
        width: calc(100% - 24px);
    }
    .ac-topbar-trust,
    .ac-topbar-right span:not(:last-child) {
        display: none;
    }

    .ac-header-inner {
        width: calc(100% - 24px);
        min-height: 72px;
        gap: 10px;
    }

    .ac-header-brand {
        flex: 1 1 auto;
    }

    .ac-header-location,
    .ac-header-quick,
    .ac-provider-cta,
    .ac-shop-cta {
        display: none !important;
    }

    /* Mobile Hamburger */
    .ac-menu-toggle {
        display: flex;
        flex: 0 0 42px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 42px;
        height: 42px;
        border: 1.5px solid var(--ac-border);
        border-radius: 10px;
        background: #ffffff;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .ac-menu-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: var(--ac-navy);
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .ac-menu-toggle.is-active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .ac-menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }
    .ac-menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Drawer Menu */
    .ac-header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1350;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        padding: 16px 20px 24px;
        background: #ffffff;
        border-top: 1px solid var(--ac-border);
        box-shadow: 0 20px 30px rgba(15, 23, 42, 0.14);
        flex-direction: column;
        gap: 0;
    }

    .ac-header-nav.is-open {
        display: flex;
    }

    .ac-header-nav > a,
    .ac-header-nav .ac-dropdown-toggle {
        width: 100%;
        min-height: 48px;
        justify-content: space-between;
        padding: 12px 6px;
        border-bottom: 1px solid var(--ac-border-subtle);
        font-size: 14.5px;
    }

    .ac-header-nav > a.is-active::after {
        display: none;
    }

    .ac-nav-dropdown {
        width: 100%;
    }

    .ac-dropdown-menu,
    .ac-dropdown-menu.ac-mega-menu {
        position: static;
        width: 100%;
        max-width: none;
        box-shadow: none;
        border: 0;
        background: var(--ac-bg-subtle);
        margin: 6px 0 10px;
        padding: 10px;
        border-radius: 10px;
    }

    .ac-dropdown-menu.ac-mega-menu {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ac-header-nav > .ac-mobile-partner-link {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 46px;
        margin-top: 12px;
        padding: 10px;
        border-radius: 10px;
        font-weight: 700;
        font-size: 14px;
        text-decoration: none;
    }

    .ac-mobile-partner-link:first-of-type {
        background: var(--ac-orange-soft);
        color: var(--ac-orange-hover);
        border: 1.5px solid #fed7aa;
    }

    .ac-mobile-partner-link:last-child {
        background: linear-gradient(135deg, #f25a1b 0%, #dc4809 100%);
        color: #ffffff;
    }
}

@media (max-width: 650px) {
    .ac-header-inner {
        flex-wrap: wrap;
        padding: 10px 0;
    }
    .ac-header-search {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
        margin-top: 4px;
    }
}