/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    background-color: white;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
    margin: 0;
    z-index: 1000;
    transition: none;
}

/* Desktop header with centered logo */
@media screen and (min-width: 769px) {
    .header {
        justify-content: space-between; /* Space between logo and right nav */
        gap: 2rem;
    }
    
    .logo {
        margin: 0;
        justify-content: center; /* Center logo on desktop */
    }
}

.logo {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.logo a {
    font-family: 'Work Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #324848;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.logo-link {
    font-family: 'Work Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #324848;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.header-nav-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    grid-column: 1;
}

.nav-links {
    display: none; /* Hide nav links, use hamburger menu instead */
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    vertical-align : middle;
}

.nav-link:hover {
    color: #324848; /* Consistent green color matching share wishlist button */
}

.nav-link i {
    margin-right: 6px;
}

/* Hamburger menu - always visible on desktop for toggling */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 40px; /* Fixed width to prevent growth */
    height: 40px; /* Fixed height to prevent growth */
}

/* Always show hamburger on desktop */
@media screen and (min-width: 769px) {
    .hamburger-menu {
        display: flex;
    }
}

.hamburger-menu span {
    width: 24px;
    height: 2px;
    background-color: #324848;
    transition: none;
}

/* Hamburger icon - positioned absolutely to overlap hamburger lines */
.hamburger-menu i {
    display: none;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
    min-width: 260px;
    margin-top: 0;
    z-index: 1000;
    padding: 10px 0;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.header-nav-left {
    position: relative;
}

.mobile-menu.show {
    display: block;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background-color 0.2s;
}

.mobile-menu-item:hover {
    background-color: #f5f5f5;
}

.mobile-menu-item i {
    width: 18px;
    color: #324848;
}

.header-nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    grid-column: 3;
    gap: 1rem;
    margin-left: auto; /* Push to the right end */
}

.nav-user-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-badge {
    background-color: #324848;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

/* Account Dropdown */
.account-dropdown-wrapper {
    position: relative;
    margin-left: 12px;
}

.account-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 20px;
    transition: background-color 0.2s;
}

.account-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.account-trigger .fa-chevron-down {
    font-size: 12px;
    color: #262e2e;
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 1000;
}

.account-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
}

.account-dropdown-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.account-dropdown-name {
    font-size: 15px;
    font-weight: 500;
    color: #262e2e;
    text-align: left;
}

.account-dropdown-email {
    font-size: 10px;
    font-weight: 500;
    color: #262e2e;
    text-align: left;
}

.account-dropdown-separator {
    height: 1px;
    background-color: #e3dcd6;
    margin: 0 8px;
}

.account-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #262e2e;
    font-size: 14px;
    transition: background-color 0.2s;
}

.account-dropdown-item:hover {
    background-color: #f5f1eb;
}

.account-dropdown-item i {
    width: 18px;
    font-size: 14px;
    color: #6b7280;
}

.account-dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.logout-link:hover {
    text-decoration: underline;
}

/* ============================================
   CURRENCY SELECTOR
   ============================================ */

.currency-selector {
    position: relative;
    display: inline-block;
}

.currency-selector select {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 2px;
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    color: #324848;
    cursor: pointer;
    transition: all 0.3s;
}

.currency-selector select:hover {
    background-color: #f0f0f0;
    border-color: #324848;
}

.currency-selector select:focus {
    outline: none;
    border-color: #324848;
    box-shadow: 0 0 0 2px rgba(50, 72, 72, 0.2);
}

.currency-display {
    display: none;
}

/* Mobile currency selector and user badge styles */
@media screen and (max-width: 768px) {
    .currency-selector {
        margin-right: 10px;
        position: relative;
        display: inline-flex;
        align-items: center;
    }

    /* Hide the select dropdown visually on mobile, but keep it functional */
    .currency-selector select {
        position: absolute;
        opacity: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
        z-index: 2;
        padding: 0;
        margin: 0;
        border: none;
        background: transparent;
    }

    /* Show the currency display on mobile */
    .currency-display {
        display: inline-block;
        background-color: #f9f9f9;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 8px 12px;
        font-size: 18px;
        font-weight: 500;
        color: #324848;
        min-width: 45px;
        text-align: center;
        pointer-events: none;
        z-index: 1;
    }

    /* Add dropdown arrow indicator */
    .currency-selector::after {
        content: '';
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid #324848;
        z-index: 1;
    }

    .user-badge {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

/* Mobile Header Adjustments */
@media screen and (max-width: 768px) {
    /* Header adjustments */
    .header {
        padding: 12px 20px;
        position: fixed;
        z-index: 1000;
        left: 0 !important;
        width: 100% !important;
        justify-content: flex-start; /* Align items to the left on mobile */
        gap: 1rem; /* Add gap between logo and right nav */
    }
    
    .logo {
        order: 2;
        flex: 0 0 auto; /* Don't grow or shrink, stay at natural size */
        justify-content: flex-start; /* Left-align logo on mobile */
        margin: 0;
    }
    
    .header-nav-left {
        order: 1;
    }
    
    .header-nav-right {
        order: 3;
    }
    
    /* Hide hamburger menu on mobile - using bottom menu instead */
    .hamburger-menu {
        display: none !important;
    }
    
    .hamburger-menu span {
        width: 24px;
        height: 2px;
        background-color: #324848;
        transition: all 0.3s ease;
    }
    
    .header-nav-left .nav-links {
        display: none;
    }
    
    .header-nav-right {
        grid-column: 3;
        justify-content: flex-end;
    }

    /* Reduce gap between nav elements on mobile */
    .nav-links {
        gap: 15px;
    }

    .logo a {
        font-size: 1.5rem;
    }

    .logo-link {
        font-size: 1.5rem;
    }
}
