/* -------------------------
   Header (top navigation bar)
------------------------- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #2f3136;
    background-color: #1b1c1f;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2002;
}

/* Logo text */
.header-left .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    line-height: 1;
}

.brand-logo-image {
    height: 42px;
    width: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.brand-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg,
        #cfa53a 0%,
        #d8b55a 24%,
        #cbb986 48%,
        #a7aeb5 72%,
        #8d969d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* Desktop nav links */
.header-center {
    display: flex;
    gap: 20px;
}

.header-center a {
    font-size: 16px;
    color: #ececec;
    font-weight: 600;
    transition: color 0.3s ease;
}

.header-center a:hover {
    color: #ffffff;
    text-shadow: #ffffff 0px 0px 0.2px;
}

/* Right side (profile, cart, menu) */
.header-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* Cart + Wishlist icons */
.header-right .cart-icon,
.header-right .wishlist-icon {
    font-size: 1.5rem;
    margin: 0 10px;
    color: #ececec;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.header-right .cart-icon:hover,
.header-right .wishlist-icon:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.header-right .wishlist-icon i {
    color: #ececec;
}

.header-right .wishlist-icon.active i {
    color: #ffffff;
}

/* Profile dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-icon {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #ececec;
}

.profile-icon:hover {
    color: #ffffff;
}

.dropdown-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 12px;
    text-align: left;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.dropdown-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu p {
    margin: 6px 0;
    font-size: 15px;
    color: #333;
    width: 100%;
    text-align: center;
}

.logout {
    width: 100%;
    display: block;
    margin-top: 10px;
    color: rgb(197, 11, 11);
    font-weight: bold;
    text-align: center;
    font-size: 18px;
    border-radius: 4px;
}

.dropdown-menu a:hover {
    background-color: #b3b3b3a6;
}

/* Buttons (signup/login/logout) */
.signup-button {
    background-color: #ffffff;
    color: #111111;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.signup-button:hover,
.logout:hover {
    background-color: #e8e8e8;
}

.mobile-logout {
    color: rgb(197, 11, 11) !important;
    font-weight: bold;
    font-size: 18px;
}

/* Hamburger menu (hidden on desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ffffff;
}

/* -------------------------
   Mobile menu
------------------------- */
.mobile-menu {
    position: fixed;
    top: var(--header-height, 84px);
    right: -100%;
    left: auto;
    width: 50%;
    height: calc(100dvh - var(--header-height, 84px));
    background: #1f2023;
    flex-direction: column;
    padding: 20px;
    transition: right 0.3s ease-in-out;
    z-index: 2001;
    display: flex;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu a {
    font-size: 1rem;
    color: #f0f0f0;
    padding: 6px 0;
    border-bottom: 1px;
}

.mobile-menu .close-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    align-self: flex-end;
    cursor: pointer;
    color: white;
}

.mobile-profile-dropdown {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 18px;
    font-weight: bold;
}

.mobile-dropdown-menu {
    display: none;
    flex-direction: column;
    padding-left: 15px;
    margin-top: 5px;
    gap: 5px;
}

.mobile-dropdown-menu.active {
    display: flex;
    align-items: center;
}

/* -------------------------
   Responsive (tablet & mobile)
------------------------- */
@media (max-width: 768px) {

    .header-center,
    .signup-button,
    .logout,
    .profile-icon,
    .dropdown-menu {
        display: none;
    }

    .cart-icon,
    .wishlist-icon {
        display: none !important;
    }

    .header-right {
        flex-direction: column-reverse;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-menu {
        display: flex;
        right: -100%;
        top: var(--header-height, 84px);
        height: auto;
        max-height: calc(100dvh - var(--header-height, 84px));
        border-radius: 8px;
        box-shadow: #555 0px 0px 20px;
        margin-top: 0;
        overflow-y: auto;
    }

    .mobile-menu.active {
        right: 0;
    }

    .brand-logo-image {
        height: 34px;
    }

    .brand-title {
        font-size: 24px;
    }
}
