/* Navigation Bar Styles */

/* Base Navigation */
.nav-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Logo and Brand */
.nav-logo {
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

/* Search Bar */
.nav-search {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-search:focus {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Navigation Links */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover {
    color: #3b82f6;
    transform: translateY(-1px);
}

/* Dropdown Menus */
.nav-dropdown {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown-item {
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    margin: 0.125rem;
}

.nav-dropdown-item:hover {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    transform: translateX(4px);
}

/* User Avatar */
.user-avatar {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Cart Icon */
.cart-icon {
    transition: all 0.3s ease;
}

.cart-icon:hover {
    transform: scale(1.1);
    color: #3b82f6;
}

.cart-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Mobile Menu */
.mobile-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-item {
    transition: all 0.2s ease;
    border-radius: 0.375rem;
}

.mobile-menu-item:hover {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    transform: translateX(4px);
}

/* Notification Badge */
.notification-badge {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* Hover Effects for Interactive Elements */
.nav-interactive {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-interactive:hover {
    transform: translateY(-2px);
}

.nav-interactive:active {
    transform: translateY(0);
}

/* Focus States for Accessibility */
.nav-focus:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 0.375rem;
}

/* Loading States */
.nav-loading {
    position: relative;
    overflow: hidden;
}

.nav-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-link:hover::before {
        width: 0;
    }
    
    .nav-link:hover {
        transform: none;
    }
    
    .nav-dropdown {
        position: static;
        box-shadow: none;
        background: transparent;
        border: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .nav-dropdown {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .nav-dropdown-item:hover {
        background: linear-gradient(135deg, #374151, #4b5563);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .nav-link::before {
        background: #000;
    }
    
    .nav-dropdown {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .nav-dropdown,
    .user-avatar,
    .cart-icon,
    .mobile-menu,
    .notification-badge,
    .nav-interactive {
        transition: none;
        animation: none;
    }
    
    .nav-link:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .nav-container {
        background: #fff !important;
        box-shadow: none !important;
    }
    
    .nav-dropdown,
    .mobile-menu {
        display: none !important;
}

/* Custom Scrollbar for Dropdowns */
.nav-dropdown::-webkit-scrollbar {
    width: 6px;
}

.nav-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.nav-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.nav-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Sticky Navigation Enhancement */
.sticky-nav {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Navigation Bar Base Styles */
nav {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

/* Enhanced Dropdown Styling */
.nav-dropdown {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: dropdownSlideIn 0.2s ease-out;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Hover Effects */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* User Avatar Enhancement */
.user-avatar {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.user-avatar:hover::before {
    left: 100%;
}

/* Cart Icon Enhancement */
.cart-icon {
    position: relative;
    transition: all 0.3s ease;
}

.cart-icon:hover {
    transform: scale(1.1) rotate(5deg);
    color: #3b82f6;
}

/* Mobile Menu Enhancements */
.mobile-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    animation: mobileMenuSlide 0.3s ease-out;
}

@keyframes mobileMenuSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Bar Enhancement */
.nav-search {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.nav-search:focus {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Notification Badge Enhancement */
.notification-badge {
    animation: notificationPulse 2s infinite;
}

@keyframes notificationPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .nav-dropdown {
        position: static;
        box-shadow: none;
        background: transparent;
        border: none;
        animation: none;
    }
    
    .nav-link:hover::after {
        width: 0;
    }
    
    .nav-link:hover {
        transform: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .nav-dropdown {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .nav-dropdown-item:hover {
        background: linear-gradient(135deg, #374151, #4b5563);
    }
    
    .mobile-menu {
        background: rgba(31, 41, 55, 0.98);
        border-top-color: rgba(75, 85, 99, 0.3);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .nav-link::after {
        background: #000;
    }
    
    .nav-dropdown {
        border: 2px solid #000;
    }
    
    .user-avatar {
        background: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .nav-dropdown,
    .user-avatar,
    .cart-icon,
    .mobile-menu,
    .notification-badge,
    .nav-interactive {
        transition: none;
        animation: none;
    }
    
    .nav-link:hover {
        transform: none;
    }
    
    .user-avatar::before {
        display: none;
    }
}

/* Search Enhancement */
.search-enhanced {
    position: relative;
}

.search-enhanced::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 16px;
    height: 16px;
    border: 2px solid #9ca3af;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    transform: translateY(-50%);
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-enhanced.loading::after {
    opacity: 1;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}
