
/* =========================================
   AM DIGITAL STUDIO - PROFILE MENU
========================================= */

.profile-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 15px;
    z-index: 10001;
    flex-shrink: 0;
}

.profile-avatar {
    width: 43px;
    height: 43px;
    min-width: 43px;
    border-radius: 50%;
    border: 2px solid #1677ff;
    background: linear-gradient(135deg, #1677ff, #00bfff, #7047ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

.profile-avatar:hover {
    transform: scale(1.06);
    box-shadow: 0 5px 18px rgba(22,119,255,.3);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 13px);
    right: 0;
    width: 270px;
    padding: 15px;
    background: var(--card-bg, #fff);
    color: var(--text-color, #111827);
    border: 1px solid rgba(128,128,128,.25);
    border-radius: 15px;
    box-shadow: 0 12px 35px rgba(0,0,0,.18);
    z-index: 10002;
}

.profile-dropdown[hidden] {
    display: none !important;
}

.profile-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar-large {
    width: 46px;
    height: 46px;
    min-width: 46px;
    pointer-events: none;
}

.profile-user-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-name {
    font-size: 14px;
    overflow-wrap: anywhere;
}

.profile-email {
    font-size: 11px;
    opacity: .7;
    overflow-wrap: anywhere;
}

.profile-divider {
    height: 1px;
    background: rgba(128,128,128,.2);
    margin: 13px 0;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px;
    border-radius: 9px;
    color: inherit;
    text-decoration: none;
    font-size: 14px;
}

.profile-action:hover {
    background: rgba(22,119,255,.1);
    color: #1677ff;
}

.profile-mobile-links,
.profile-mobile-logout {
    display: none;
}

/* =========================================
   MOBILE NAVIGATION
========================================= */

@media (max-width: 900px) {

    .navbar {
        position: relative;
    }

    .profile-wrapper {
        margin-left: auto;
        margin-right: 8px;
    }

    .profile-dropdown {
        position: fixed;
        top: 85px;
        right: 12px;
        width: min(270px, calc(100vw - 24px));
    }

    .profile-mobile-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 5px;
        padding: 12px 0;
        border-top: 1px solid rgba(128,128,128,.2);
    }

    .profile-mobile-links a,
    .profile-mobile-logout button {
        display: block;
        width: 100%;
        padding: 12px 14px;
        color: inherit;
        text-decoration: none;
        text-align: left;
        font: inherit;
        background: transparent;
        border: 0;
        cursor: pointer;
    }

    .profile-mobile-links a:hover,
    .profile-mobile-logout button:hover {
        background: rgba(22,119,255,.1);
        border-radius: 8px;
    }

    .profile-mobile-logout {
        display: block;
        width: 100%;
        border-top: 1px solid rgba(128,128,128,.2);
    }
}

/* Small screens */
@media (max-width: 600px) {

    .profile-avatar {
        width: 39px;
        height: 39px;
        min-width: 39px;
    }

    .profile-dropdown {
        top: 75px;
    }
}








/* =========================================
   INDEX MOBILE MENU - CENTER ALIGNMENT
========================================= */

@media (max-width: 768px) {

    /* Center all navigation items */
    .navbar .nav-links {
        align-items: center !important;
        text-align: center !important;
    }

    .navbar .nav-links > a {
        width: 100%;
        text-align: center !important;
    }

    /* Center My Orders and Track Order */
    .navbar .profile-mobile-links {
        display: flex;
        flex-direction: column;
        align-items: center !important;
        justify-content: center;
        width: 100%;
        text-align: center !important;
    }

    .navbar .profile-mobile-links a {
        width: 100%;
        text-align: center !important;
        padding: 14px 10px !important;
    }

    /* Center Logout */
    .navbar .profile-mobile-logout {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        text-align: center !important;
    }

    .navbar .profile-mobile-logout button {
        width: 100%;
        text-align: center !important;
        padding: 14px 10px !important;
    }
}



/* Profile photo display */
.profile-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
