/* ============================================
   UNIVERSAL NAVIGATION BAR
   Responsive for Mobile & Desktop
   ============================================ */

.nav-universal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999999;
    padding: clamp(8px, 1vw, 12px) clamp(16px, 2.5vw, 32px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.nav-universal-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(6px, 0.8vw, 10px) clamp(12px, 2vw, 24px);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: clamp(8px, 1vw, 12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: clamp(40px, 5vw, 50px);
    gap: clamp(12px, 1.5vw, 20px);
}

.nav-universal-wrapper:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
                0 4px 12px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.nav-universal-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    z-index: 2;
    pointer-events: all;
}

.nav-universal-logo {
    height: clamp(28px, 3.5vw, 36px);
    width: auto;
    object-fit: contain;
    filter: invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.nav-universal-brand:hover .nav-universal-logo {
    transform: scale(1.05);
}

.nav-universal-actions {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 12px);
    flex-shrink: 0;
    z-index: 2;
    pointer-events: all;
}

.nav-universal-extra {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 12px);
}

/* Filter button for shop page */
.top-nav-filters-toggle-shop {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: clamp(6px, 0.8vw, 8px) clamp(10px, 1.2vw, 14px);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: clamp(9px, 1.1vw, 11px);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-black);
    border-radius: clamp(4px, 0.5vw, 6px);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.top-nav-filters-toggle-shop:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.3);
}

.top-nav-filters-icon-shop {
    display: inline-block;
}

/* Back button for product page - only visible on mobile */
.top-nav-back-button {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: clamp(6px, 0.8vw, 8px) clamp(10px, 1.2vw, 14px);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: clamp(9px, 1.1vw, 11px);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-black);
    border-radius: clamp(4px, 0.5vw, 6px);
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    display: none; /* Hidden by default */
}

.top-nav-back-button:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.3);
}

.top-nav-back-button span {
    display: inline-block;
}

/* Show back button only on mobile */
@media screen and (max-width: 900px) {
    .top-nav-back-button {
        display: inline-block;
    }
}

.nav-universal-menu-toggle {
    background: transparent;
    border: none;
    padding: clamp(6px, 0.8vw, 8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: clamp(4px, 0.5vw, 6px);
    width: clamp(32px, 4vw, 40px);
    height: clamp(32px, 4vw, 40px);
}

.nav-universal-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.nav-universal-menu-toggle:active {
    transform: scale(0.95);
}

.nav-universal-menu-icon {
    width: clamp(18px, 2.2vw, 22px);
    height: clamp(18px, 2.2vw, 22px);
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    pointer-events: none;
}

.nav-universal-shadow {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 0, 0, 0.1) 20%, 
        rgba(0, 0, 0, 0.1) 80%, 
        transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .nav-universal {
        padding: clamp(6px, 0.8vw, 10px) clamp(12px, 2vw, 20px);
    }
    
    .nav-universal-wrapper {
        padding: clamp(6px, 0.8vw, 8px) clamp(10px, 1.5vw, 16px);
        min-height: clamp(44px, 5.5vw, 48px);
        gap: clamp(10px, 1.2vw, 14px);
    }
    
    .nav-universal-logo {
        height: clamp(24px, 3vw, 28px);
    }
    
    .nav-universal-menu-toggle {
        width: clamp(36px, 4.5vw, 40px);
        height: clamp(36px, 4.5vw, 40px);
    }
    
    .nav-universal-menu-icon {
        width: clamp(20px, 2.5vw, 22px);
        height: clamp(20px, 2.5vw, 22px);
    }
}

@media screen and (max-width: 480px) {
    .nav-universal {
        padding: clamp(4px, 0.6vw, 8px) clamp(10px, 1.5vw, 16px);
    }
    
    .nav-universal-wrapper {
        padding: clamp(4px, 0.6vw, 6px) clamp(8px, 1.2vw, 12px);
        min-height: clamp(40px, 5vw, 44px);
        gap: clamp(8px, 1vw, 12px);
    }
}

/* Ensure navigation is always on top (but not higher than menu overlay) */
.nav-universal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999 !important; /* Lower than menu overlay (1000) */
}

/* Shop page - navigation NOT fixed */
body.shop-page .nav-universal,
.nav-universal-shop {
    position: static !important;
    z-index: 100 !important;
    padding: clamp(8px, 1vw, 12px) clamp(16px, 2.5vw, 32px) !important;
    background: transparent !important;
}

/* Ensure wrapper still has styles when static */
body.shop-page .nav-universal-wrapper,
.nav-universal-shop .nav-universal-wrapper {
    position: relative !important;
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-radius: clamp(8px, 1vw, 12px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* Filter button - only visible on mobile */
.top-nav-filters-toggle-shop {
    display: none;
}

@media screen and (max-width: 900px) {
    .top-nav-filters-toggle-shop {
        display: inline-block;
    }
}

