/* ===== NAVIGATION ===== */
:root {
    --nav-bg: #ffffff;
    --nav-text: #1a1a1a;
    --nav-accent: #ff3366;
    --nav-hover: #f0f0f0;
    --nav-border: #e0e0e0;
    --nav-dropdown-bg: #ffffff;
    --nav-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --mobile-nav-width: 280px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--nav-shadow);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    font-family: 'Morgan', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--nav-text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-logo:hover {
    color: var(--nav-accent);
}

/* Use Marbley for header text and nav links */
.header-text {
    font-family: 'Marbley', 'Archivo Black', 'Archivo', sans-serif;
}

.desktop-nav-links a,
.mobile-nav-links a {
    font-family: 'Marbley', 'Archivo Black', 'Archivo', sans-serif;
}

.nav-links {
    display: flex;
    gap: 3rem; /* larger spacing for bold links */
}

.nav-links a {
    color: var(--nav-text);
    font-family: 'Marbley', 'Archivo Black', 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 1.25rem; /* bigger, bolder links */
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px; /* thicker accent underline */
    background-color: var(--nav-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem; /* tighten since links got larger */
}

.cart-icon {
    position: relative;
    color: var(--nav-text);
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

.cart-icon:hover {
    color: var(--nav-accent);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--nav-accent);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    font-family: 'Archivo', sans-serif;
}

.mobile-auth-buttons { display: none; }

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--nav-text);
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    
    .nav-actions {
        display: none;
    }
    
    .mobile-auth-buttons { display: block; }
    
    .hamburger-menu {
        display: flex;
    }
    
    .mobile-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--nav-bg);
        box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        padding: 5rem 1.5rem 2rem;
        overflow-y: auto;
        gap: 0.75rem;
        transform: translateX(100%);
        will-change: transform;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-nav.active {
        transform: translateX(0);
    }
    
    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        width: 100%;
    }
    
    .mobile-nav-links a {
        color: var(--nav-text);
        font-family: 'Marbley', 'Archivo Black', 'Archivo', sans-serif;
        font-weight: 800;
        font-size: 1.1rem;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        text-decoration: none;
        padding: 0.85rem 1rem;
        position: relative;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        display: block;
        width: 100%;
        text-align: left;
        border-radius: 6px;
        opacity: 0.9;
    }
    
    .mobile-nav-links a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 3px; /* thicker accent underline */
        background-color: var(--nav-accent);
        transition: width 0.3s ease;
    }
    
    .mobile-nav-links a:hover::after,
    .mobile-nav-links a.active::after {
        width: 100%;
    }
    
    .mobile-nav-links a:hover,
    .mobile-nav-links a:focus,
    .mobile-nav-links a.active {
        color: var(--nav-accent);
        background-color: rgba(0, 0, 0, 0.03);
        transform: translateX(4px);
        opacity: 1;
    }
    
    .mobile-nav-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: auto;
        padding-top: 1.5rem;
        border-top: 1px solid var(--nav-border);
        width: 100%;
    }
    
    .mobile-nav-actions {
        margin-top: 1rem;
        padding-top: 1.25rem;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .mobile-nav-actions .btn {
        width: 100%;
        text-align: center;
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
        font-weight: 700;
        border-radius: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: all 0.2s ease;
        margin: 0.25rem 0;
    }
    
    .mobile-nav-actions .btn-ghost {
        background-color: transparent;
        border: 2px solid var(--nav-text);
        color: var(--nav-text);
    }
    
    .mobile-nav-actions .btn-primary {
        background-color: var(--nav-accent);
        border: 2px solid var(--nav-accent);
        color: white;
    }
    
    .mobile-nav-actions .btn:active {
        transform: scale(0.98);
    }
}

/* Mobile Menu Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(2px);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--nav-accent);
    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 15px rgba(0, 0, 0, 0.2);
}

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

.scroll-top:hover {
    background-color: var(--nav-text);
    transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .main-nav {
        padding: 1rem;
    }
    
    .nav-logo {
        font-size: 1.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --nav-bg: #1a1a1a;
        --nav-text: #ffffff;
        --nav-hover: #2a2a2a;
        --nav-border: #333333;
        --nav-dropdown-bg: #1a1a1a;
        --nav-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
}

/* Scroll behavior */
.scroll-lock {
    overflow: hidden;
}

/* Animation for mobile menu overlay */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 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;
    }
}
