
/* Mobile header and burger menu fix */
.ap-mobile-menu-toggle,
.ap-mobile-menu {
    display: none;
}

@media (max-width: 1100px) {
    :root {
        --ap-mobile-header-height: 72px;
    }

    .ap-header-contact-topbar {
        display: none !important;
    }

    .hg-header,
    .rts-header-area-five.header--sticky.hg-header,
    header.hg-header {
        height: var(--ap-mobile-header-height) !important;
        min-height: var(--ap-mobile-header-height) !important;
        max-height: var(--ap-mobile-header-height) !important;
        overflow: visible !important;
    }

    .hg-header .header-five-wrapper,
    .rts-header-area-five.header--sticky.hg-header .header-five-wrapper {
        width: calc(100% - 28px) !important;
        max-width: calc(100% - 28px) !important;
        height: var(--ap-mobile-header-height) !important;
        min-height: var(--ap-mobile-header-height) !important;
        max-height: var(--ap-mobile-header-height) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
    }

    .hg-header .hg-logo {
        max-width: min(54vw, 250px) !important;
        flex: 0 1 auto !important;
        min-width: 0 !important;
        height: var(--ap-mobile-header-height) !important;
        min-height: var(--ap-mobile-header-height) !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 10px !important;
        line-height: 1.1 !important;
        white-space: normal !important;
        font-size: 18px !important;
    }

    .hg-header .hg-logo-mark {
        flex: 0 0 42px !important;
        width: 42px !important;
        height: 42px !important;
    }

    .hg-header .hg-nav {
        display: none !important;
    }

    .hg-header .hg-actions,
    .hg-header .hg-actions-with-cart {
        flex: 0 0 auto !important;
        height: var(--ap-mobile-header-height) !important;
        min-height: var(--ap-mobile-header-height) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;
    }

    .hg-header .hg-actions > .hg-btn {
        display: none !important;
    }

    .hg-header .hg-cart-action {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        flex: 0 0 44px !important;
    }

    .ap-mobile-menu-toggle {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        display: inline-grid;
        place-items: center;
        gap: 4px;
        padding: 11px;
        border: 1px solid rgba(255,255,255,.13);
        border-radius: 16px;
        background: rgba(255,255,255,.075);
        color: #fff;
        cursor: pointer;
    }

    .ap-mobile-menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #fff;
        transition: transform .18s ease, opacity .18s ease;
    }

    .ap-mobile-menu-toggle.is-active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .ap-mobile-menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .ap-mobile-menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .ap-mobile-menu {
        position: fixed;
        inset: 0;
        z-index: 10020;
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .18s ease, visibility .18s ease;
    }

    .ap-mobile-menu.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .ap-mobile-menu-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,.58);
        backdrop-filter: blur(10px);
    }

    .ap-mobile-menu-panel {
        position: absolute;
        top: 12px;
        right: 12px;
        bottom: 12px;
        width: min(390px, calc(100vw - 24px));
        display: flex;
        flex-direction: column;
        gap: 18px;
        padding: 18px;
        border-radius: 26px;
        border: 1px solid rgba(255,255,255,.13);
        background:
            radial-gradient(circle at 18% 0%, rgba(124,92,255,.22), transparent 32%),
            radial-gradient(circle at 100% 100%, rgba(35,224,184,.12), transparent 34%),
            rgba(13,15,31,.96);
        box-shadow: 0 30px 100px rgba(0,0,0,.55);
        transform: translateX(22px);
        transition: transform .2s ease;
        overflow-y: auto;
    }

    .ap-mobile-menu.is-open .ap-mobile-menu-panel {
        transform: translateX(0);
    }

    .ap-mobile-menu-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255,255,255,.09);
    }

    .ap-mobile-menu-head .hg-logo {
        color: #fff;
        text-decoration: none;
        font-weight: 900;
        display: inline-flex;
        align-items: center;
        gap: 10px;
    }

    .ap-mobile-menu-head .hg-logo-mark {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .ap-mobile-menu-close {
        width: 42px;
        height: 42px;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 15px;
        display: grid;
        place-items: center;
        color: #fff;
        background: rgba(255,255,255,.075);
        cursor: pointer;
    }

    .ap-mobile-menu-nav {
        display: grid;
        gap: 8px;
    }

    .ap-mobile-menu-nav a {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        min-height: 54px;
        padding: 10px 12px;
        border-radius: 18px;
        color: #dfe4ff;
        text-decoration: none;
        background: rgba(255,255,255,.04);
        border: 1px solid rgba(255,255,255,.07);
        font-weight: 900;
    }

    .ap-mobile-menu-nav a i {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 13px;
        color: var(--hg-accent-2);
        background: rgba(255,255,255,.07);
    }

    .ap-mobile-menu-nav a:hover {
        background: rgba(255,255,255,.08);
        color: #fff;
    }

    .ap-mobile-menu-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: auto;
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,.09);
    }

    .ap-mobile-menu-actions .hg-btn {
        width: 100%;
        justify-content: center;
    }

    body.ap-mobile-menu-open {
        overflow: hidden;
    }

    body.ap-mobile-menu-open .hg-header {
        z-index: 10030 !important;
    }

    .ap-home-hero,
    .ap-home-section,
    .hg-hero {
        padding-top: max(84px, var(--ap-mobile-header-height)) !important;
    }
}

@media (max-width: 420px) {
    .hg-header .hg-logo {
        font-size: 16px !important;
        max-width: 50vw !important;
    }

    .hg-header .hg-logo-mark {
        width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
    }

    .hg-header .hg-cart-action,
    .ap-mobile-menu-toggle {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        flex-basis: 40px !important;
    }
}


/* Mobile menu click/open reliability fix */
@media (max-width: 1100px) {
    .ap-mobile-menu-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        position: relative !important;
        z-index: 10060 !important;
        pointer-events: auto !important;
        touch-action: manipulation;
    }
    .ap-mobile-menu {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 10050 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    .ap-mobile-menu.is-open {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    .ap-mobile-menu.is-open .ap-mobile-menu-panel {
        transform: translateX(0) !important;
    }
    .ap-mobile-menu-backdrop,
    .ap-mobile-menu-panel,
    .ap-mobile-menu-close,
    .ap-mobile-menu-nav a {
        pointer-events: auto !important;
    }
    html.ap-mobile-menu-open,
    body.ap-mobile-menu-open {
        overflow: hidden !important;
    }
}


/* aes(7) mobile drawer missing/fallback fix */
@media (max-width: 1100px) {
    .ap-mobile-menu-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        position: relative !important;
        z-index: 10060 !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    .ap-mobile-menu {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 10050 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .ap-mobile-menu.is-open {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .ap-mobile-menu.is-open .ap-mobile-menu-panel {
        transform: translateX(0) !important;
    }

    .ap-mobile-menu-backdrop,
    .ap-mobile-menu-panel,
    .ap-mobile-menu-close,
    .ap-mobile-menu-nav a {
        pointer-events: auto !important;
    }

    html.ap-mobile-menu-open,
    body.ap-mobile-menu-open {
        overflow: hidden !important;
    }
}


/* Mobile menu contact info */
.ap-mobile-menu-contact {
    margin-top: 4px;
}
.ap-mobile-contact-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(35,224,184,.055);
    border: 1px solid rgba(35,224,184,.14);
}
.ap-mobile-contact-title {
    color: #fff;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 900;
    margin-bottom: 2px;
}
.ap-mobile-contact-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    color: #cfd6ff !important;
    text-decoration: none !important;
    font-size: 12px;
    line-height: 1.45;
    min-width: 0;
}
.ap-mobile-contact-item i {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--hg-accent-2);
    background: rgba(255,255,255,.07);
    font-size: 12px;
}
.ap-mobile-contact-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.ap-mobile-contact-item:hover {
    color: #fff !important;
}
.ap-mobile-contact-address span {
    line-height: 1.5;
}
@media (max-width: 420px) {
    .ap-mobile-contact-card {
        padding: 12px;
    }
}
