/* =============================================
   AM Mobile Drawer v1.3
   File: am-mobile-drawer.css
   ============================================= */

/* ── Sticky wrapper (Elementor section pe lagao) ── */
.am-sticky-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    background: #fff;
    width: 100%;
}

/* ── Hamburger Button ──────────────────────── */
.am-hamburger {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 4px;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.am-hamburger:hover {
    background: rgba(0,0,0,0.05);
}

/* 3-bar icon */
.am-hamburger span {
    display: block;
    height: 2px;
    width: 22px;
    background: #222;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* X animation when drawer is open */
.am-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.am-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.am-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Drawer ────────────────────────────────── */
.am-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;            /* FULL WIDTH */
    max-width: 100%;
    height: 100%;
    background: #fff;
    z-index: 999999;
    transform: translateX(-100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.am-drawer.active {
    transform: translateX(0);
}

/* ── Overlay ───────────────────────────────── */
.am-drawer-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 999998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.am-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Header ────────────────────────────────── */
.am-drawer-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.am-drawer-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    letter-spacing: 0.02em;
}

.am-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 24px;
    cursor: pointer;
    color: #444;
    border-radius: 50%;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.am-close-btn:hover { background: #f0f0f0; }

/* ── Menu Container ────────────────────────── */
.am-menu-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.am-main-nav,
.am-main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
}

.am-main-nav > li {
    border-bottom: 1px solid #f1f1f1;
}

.am-main-nav li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.am-main-nav li a:active { background: #f5f5f5; }

/* Submenu arrow */
.am-main-nav li.menu-item-has-children > a::after {
    content: '›';
    font-size: 22px;
    color: #aaa;
    line-height: 1;
}

/* Submenu slide panel */
.am-main-nav li.menu-item-has-children > ul {
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    min-height: 100%;
    z-index: 10;
    background: #fff;
    transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.am-main-nav li.submenu-open > ul {
    left: 0;
}

/* Back Button */
.am-back-btn {
    list-style: none;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
}

.am-back-btn span {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    font-weight: 600;
    cursor: pointer;
    color: #222;
    font-size: 14px;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
}

.am-back-btn span::before {
    content: '‹';
    font-size: 22px;
    line-height: 1;
    color: #555;
}

/* ── Account Link ──────────────────────────── */
.am-extra-links {
    padding: 6px 0;
    border-top: 1px solid #f1f1f1;
    flex-shrink: 0;
}

.am-account-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.15s;
}

.am-account-link:hover { background: #fafafa; }

.am-account-icon {
    display: flex;
    align-items: center;
    opacity: 0.7;
}

.am-account-icon svg {
    width: 20px;
    height: 20px;
}

/* ── Social Footer ─────────────────────────── */
.am-social-footer {
    padding: 18px 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.am-social-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #333;
    text-decoration: none;
    border-radius: 50%;
    border: 1px solid #e8e8e8;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.am-social-footer a:hover {
    background: #222;
    color: #fff;
    border-color: #222;
}

.am-social-footer a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ── Scroll Hide / Show ────────────────────── */
/* 
   JS body pe class lagata hai.
   Apne hamburger ke parent container pe
   .am-hamburger-wrap class lagao Elementor me.
*/
.am-hamburger-wrap {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

body.am-scroll-hidden .am-hamburger-wrap {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

body.am-scroll-visible .am-hamburger-wrap {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ── Body scroll lock ──────────────────────── */
body.am-no-scroll {
    overflow: hidden !important;
    touch-action: none;
    position: fixed;
    width: 100%;
}
