/* Modern Navigation Bar Styles */
:root {
    --primary-color: #FF4E8E;
    --primary-hover: #E63E7A;
    --secondary-color: #6366f1;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background-white: #ffffff;
    --background-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --navbar-height: 80px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Modern Navbar Container */
.modern-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 99999;
    transition: var(--transition);
    height: var(--navbar-height);
}

.modern-navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 2rem;
}

/* Brand Section */
.navbar-brand {
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem;
    transition: var(--transition);
}

.brand-link:hover {
    transform: scale(1.02);
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.025em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Navigation Menu */
.navbar-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 78, 142, 0.1), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(255, 78, 142, 0.05);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(255, 78, 142, 0.1);
    font-weight: 600;
}

.nav-link i {
    font-size: 1.1rem;
    transition: var(--transition);
}

.nav-link:hover i {
    transform: scale(1.1);
}

/* Search Bar */
.navbar-search {
    flex: 0 1 400px;
    max-width: 400px;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    background: var(--background-white);
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 78, 142, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-50%) scale(1.05);
}

/* User Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.action-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 0;
    transition: var(--transition);
    background: transparent;
    border: 2px solid transparent;
}

.action-item:hover {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
    border-color: transparent;
}

.action-item i {
    font-size: 1.2rem;
    transition: var(--transition);
}

.action-item:hover i {
    transform: scale(1.1);
}

/* Wishlist and Cart specific hover effects */
.wishlist-btn:hover,
.cart-btn:hover {
    background: transparent !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(255, 78, 142, 0.3) !important;
    border: 2px solid rgba(255, 78, 142, 0.5) !important;
}

.cart-btn:hover {
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3) !important;
    border: 2px solid rgba(33, 150, 243, 0.5) !important;
}

/* Badges */
.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.wishlist-badge {
    background: #ef4444;
}

.cart-badge {
    background: var(--primary-color);
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-btn:hover {
    border-color: var(--primary-color);
    background: rgba(255, 78, 142, 0.05);
    transform: translateY(-1px);
}

.user-avatar i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.user-name {
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: var(--transition);
}

.user-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 99998;
}

.user-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.user-info {
    text-align: left;
}

.user-full-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.user-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(255, 78, 142, 0.05);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 16px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dropdown-item:hover i {
    color: var(--primary-color);
}

/* Login Button */
.login-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.login-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.login-btn i {
    font-size: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 4px;
    margin-left: 1rem;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

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

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99997;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--background-white);
    transform: translateX(100%);
    transition: var(--transition);
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.mobile-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: rgba(255, 78, 142, 0.1);
    color: var(--primary-color);
}

/* Mobile Search */
.mobile-search-container {
    position: relative;
    width: 100%;
}

.mobile-search-input {
    width: 100%;
    padding: 1rem;
    padding-right: 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--background-white);
    outline: none;
    transition: var(--transition);
}

.mobile-search-input:focus {
    border-color: var(--primary-color);
}

.mobile-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-search-btn:hover {
    background: var(--primary-hover);
}

/* Mobile Navigation Links */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(255, 78, 142, 0.1);
    color: var(--primary-color);
}

.mobile-nav-link i {
    font-size: 1.2rem;
    width: 24px;
}

/* Mobile User Actions */
.mobile-user-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.mobile-action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-action-item:hover {
    background: rgba(255, 78, 142, 0.1);
    color: var(--primary-color);
}

.mobile-action-item i {
    font-size: 1.2rem;
    width: 24px;
}

.mobile-badge {
    position: absolute;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile User Section */
.mobile-user-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
    
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 78, 142, 0.05);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    width: 100%;
    text-align: center;
    margin-left: 1rem;
}

.mobile-user-details {
    text-align: center;
}

.mobile-user-avatar i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.mobile-user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    text-align: center;
}

.mobile-user-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.mobile-login-btn {
    background: var(--primary-color) !important;
    color: white !important;
    justify-content: center;
    font-weight: 600;
}

.mobile-login-btn:hover {
    background: var(--primary-hover) !important;
    color: white !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar-container {
        padding: 0 1.5rem;
        gap: 1.5rem;
    }
    
    .navbar-search {
        max-width: 300px;
    }
    
    .user-name {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 0 1rem;
        gap: 1rem;
        justify-content: space-between;
        position: relative;
    }
    
    .navbar-brand {
        position: static;
        transform: none;
        order: 1;
    }
    
    .navbar-menu,
    .navbar-search {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
    }
    
    /* Hide user icon/login button on mobile */
    .navbar-actions {
        display: none;
    }
    
    /* Add left margin to mobile user section */
    .mobile-user-section {
        margin-left: 2rem !important;
    }
    
    /* Add left margin to mobile user info box */
    .mobile-user-info {
        margin-left: 2rem !important;
    }
    
    /* More specific targeting for mobile user info */
    .mobile-menu-content .mobile-user-section .mobile-user-info {
        margin-left: 2rem !important;
    }
    
    .action-item {
        width: 40px;
        height: 40px;
    }
    
    .user-btn {
        padding: 0.5rem;
        border: none;
        background: transparent;
    }
    
    .user-btn:hover {
        background: rgba(255, 78, 142, 0.1);
        border: none;
    }
    
    .brand-text {
        font-size: 1.25rem;
    }
    
    .brand-logo {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 0.75rem;
        justify-content: space-between;
        position: relative;
    }
    
    .navbar-brand {
        position: static;
        transform: none;
        order: 1;
    }
    
    .mobile-menu-toggle {
        order: 2;
    }
    
    /* Hide user icon/login button on smaller mobile screens */
    .navbar-actions {
        display: none !important;
    }
    
    /* Add left margin to mobile user section for smaller screens */
    .mobile-user-section {
        margin-left: 1.5rem !important;
    }
    
    /* Add left margin to mobile user info box for smaller screens */
    .mobile-user-info {
        margin-left: 1.5rem !important;
    }
    
    /* More specific targeting for smaller screens */
    .mobile-menu-content .mobile-user-section .mobile-user-info {
        margin-left: 1.5rem !important;
    }
    
    .action-item {
        width: 36px;
        height: 36px;
    }
    
    .action-item i {
        font-size: 1.1rem;
    }
    
    .brand-text {
        display: none;
    }
    
    .mobile-menu-content {
        width: 100%;
        max-width: none;
        padding: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-down {
    animation: slideDown 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Body padding for fixed navbar */
body {
    padding-top: var(--navbar-height);
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Override any existing body padding */
body.has-modern-navbar {
    padding-top: var(--navbar-height) !important;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}
