/* ================================================================
   SPNB STORE - NAVBAR PROFESSIONAL
   Version: 2.0 - November 2025
   ================================================================ */

:root {
    --navbar-height: 70px;
    --navbar-bg: rgba(15, 23, 42, 0.95);
    --navbar-border: rgba(255, 255, 255, 0.1);
    --primary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --search-bg: rgba(30, 41, 59, 0.8);
    --search-border: rgba(255, 255, 255, 0.15);
    --nav-icon-hover: rgba(99, 102, 241, 0.2);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================================
   MAIN NAVBAR STRUCTURE
   ================================================================ */

.navbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--navbar-border);
    z-index: 1000;
    padding: 0 clamp(1rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ================================================================
   NAVBAR BRAND
   ================================================================ */

.navbar-brand {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.navbar-brand span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

/* ================================================================
   SEARCH BAR
   ================================================================ */

.navbar-search {
    flex: 1;
    max-width: 600px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    height: 45px;
    padding: 0.75rem 3rem 0.75rem 3rem;
    background: var(--search-bg);
    border: 1px solid var(--search-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(30, 41, 59, 1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.search-shortcut {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    font-family: monospace;
}

/* ================================================================
   NAVBAR ACTIONS
   ================================================================ */

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    font-size: 1.1rem;
}

.nav-icon:hover {
    background: var(--nav-icon-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    color: var(--primary-color);
}

.nav-icon:active {
    transform: scale(0.95);
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0 0.35rem;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* ================================================================
   AVATAR BUTTON
   ================================================================ */

.avatar-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition-smooth);
    cursor: pointer;
    background: var(--primary-gradient);
    padding: 2px;
}

.avatar-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* ================================================================
   PRIMARY BUTTON
   ================================================================ */

.navbar .btn-primary {
    padding: 0.625rem 1.5rem;
    font-size: 0.95rem;
    height: 45px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.navbar .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

/* ================================================================
   MOBILE MENU
   ================================================================ */

.mobile-menu-toggle {
    display: none;
    width: 45px;
    height: 45px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--search-border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0;
}

.mobile-menu-toggle:hover {
    background: var(--nav-icon-hover);
    border-color: var(--primary-color);
}

.mobile-menu-toggle span {
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    padding: 2rem;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu-search {
    margin-bottom: 2rem;
    position: relative;
}

.mobile-menu-search .search-input {
    width: 100%;
    height: 50px;
    font-size: 1rem;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    font-weight: 500;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
    transform: translateX(8px);
}

.mobile-menu-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 991px) {
    .navbar {
        padding: 0 1.5rem;
    }
    
    .navbar-search {
        max-width: 400px;
    }
    
    .search-shortcut {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .navbar-search {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    :root {
        --navbar-height: 60px;
    }
    
    .navbar {
        padding: 0 0.75rem;
    }
    
    .nav-icon,
    .avatar-btn {
        width: 40px;
        height: 40px;
    }
}