/* ===== NAVIGATION STYLES ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* High z-index to stay on top */
    padding: 1.5rem 5%;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    /* Ensure it stays on top of all other elements */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform; /* Optimize for animations */
}

/* Header content layout */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Header left section (hamburger and cart) */
.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 1002;
}

/* Ensure header stays on top of all other elements */
.site-header {
    z-index: 1000;
    position: relative;
}

.site-header * {
    position: relative;
    z-index: inherit;
}

/* Header text (BROKE DAD, DADS CLUB) */
.header-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: 'Morgan', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    margin: 0;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; /* Adjust based on your design needs */
}

/* Hamburger menu styles */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1003;
    background: none;
    border: none;
    padding: 0;
    position: relative;
}

.hamburger-line {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 3px;
    transform-origin: center;
}

/* Active state for hamburger when menu is open */
.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Cart icon styles */
#cart-icon {
    position: relative;
    cursor: pointer;
    color: white;
    font-size: 1.4rem;
    transition: transform 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

#cart-icon:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #ff3366;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    font-family: 'Archivo', sans-serif;
}

/* Mobile menu styles */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: #111;
    z-index: 10000 !important; /* Ensure it stays on top of everything */
    transition: all 0.4s ease-in-out;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    transform: translateZ(0); /* Force hardware acceleration */
    will-change: transform; /* Optimize for animations */
}

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

.mobile-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.mobile-logo img {
    max-width: 100%;
    height: auto;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li {
    margin-bottom: 0.5rem;
}

.mobile-nav-links a {
    display: block;
    color: white;
    text-decoration: none;
    font-family: 'Archivo', sans-serif;
    font-size: 1.1rem;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ff3366;
    padding-left: 1.2rem;
}

/* Mobile Auth Buttons */
.mobile-auth-buttons {
    display: flex !important;
    gap: 10px;
    padding: 15px 0;
    margin: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-checkout {
    padding: 10px 0;
}

.mobile-checkout .btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background-color: #ff3366;
    color: white;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.mobile-checkout .btn-checkout:hover {
    background-color: #e62e5c;
}

.mobile-auth-buttons .btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.mobile-auth-buttons .btn-outline {
    border: 1px solid #ff3366;
    color: #ff3366;
    background: transparent;
}

.mobile-auth-buttons .btn-primary {
    background-color: #ff3366;
    color: white;
    border: none;
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: #ff3366;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.scroll-top:hover {
    background-color: #000000;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* Responsive styles */
@media (max-width: 1024px) {
    .header-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 5%;
    }
    
    .header-text {
        display: none; /* Hide header text on mobile */
    }
    
    .header-left {
        position: relative;
        z-index: 1002;
    }
    
    nav {
        justify-content: space-between;
    }
    
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-text {
        font-size: 0.8rem;
        width: 50%;
    }
    
    .mobile-menu {
        width: 85%;
    }
    
    .cart-icon {
        font-size: 1.2rem;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }
}
