/* Professional Header Styles */

:root {
    --header-height: 80px;
    --header-bg: #ffffff;
    --header-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    --primary-color: #fbbf24;
    --primary-dark: #f59e0b;
    --text-dark: #1a202c;
    --text-muted: #64748b;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--header-bg);
    box-shadow: var(--header-shadow);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    height: 70px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.navbar > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Brand */
.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.nav-brand a:hover {
    transform: scale(1.02);
}

.nav-brand .logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.navbar.scrolled .nav-brand .logo {
    width: 42px;
    height: 42px;
}

.nav-brand .brand-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.nav-brand .brand-name span {
    color: var(--primary-color);
}

/* Main Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    position: relative;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--text-dark);
    background: rgba(251, 191, 36, 0.1);
}

.nav-link.active {
    color: var(--text-dark);
    background: rgba(251, 191, 36, 0.15);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Icon Buttons */
.nav-icon-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-icon-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    transform: translateY(-2px);
}

.nav-icon-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-dark);
    transition: var(--transition-smooth);
}

.nav-icon-btn:hover svg {
    color: var(--primary-dark);
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(245, 101, 101, 0.4);
    animation: pulse-badge 2s infinite;
}

.cart-badge:empty,
.cart-badge[data-count="0"] {
    display: none;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* User Dropdown */
.nav-user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-smooth);
    overflow: hidden;
    z-index: 1001;
}

.nav-user-menu:hover .user-dropdown,
.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: var(--text-dark);
}

.dropdown-header .user-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.dropdown-header .user-email {
    font-size: 0.8rem;
    opacity: 0.8;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-smooth);
    border: none;
    background: none;
    width: 100%;
    font-size: 0.9rem;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--primary-dark);
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.dropdown-item:hover svg {
    color: var(--primary-dark);
}

.dropdown-item.admin-link {
    background: rgba(251, 191, 36, 0.1);
}

.dropdown-item.logout {
    color: #e53e3e;
}

.dropdown-item.logout svg {
    color: #e53e3e;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem 0;
}

.dropdown-item-form {
    margin: 0;
}

/* Auth Buttons */
.nav-auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.btn-login:hover {
    background: #f8fafc;
    color: var(--primary-dark);
}

.btn-login svg {
    width: 18px;
    height: 18px;
}

.btn-register {
    padding: 0.6rem 1.25rem;
    background: transparent;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.btn-register:hover {
    border-color: var(--primary-color);
    background: rgba(251, 191, 36, 0.1);
}

/* Shop Now Button */
.nav-actions .btn-primary,
.btn-shop-now {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.nav-actions .btn-primary:hover,
.btn-shop-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(251, 191, 36, 0.4);
}

.nav-actions .btn-primary svg,
.btn-shop-now svg {
    width: 18px;
    height: 18px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: #f8fafc;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.mobile-menu-toggle:hover {
    background: rgba(251, 191, 36, 0.15);
}

.mobile-menu-toggle svg {
    width: 22px;
    height: 22px;
    color: var(--text-dark);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 999;
    padding: 1.5rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.mobile-menu .mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.mobile-menu .mobile-nav-link:hover,
.mobile-menu .mobile-nav-link.active {
    background: rgba(251, 191, 36, 0.15);
    color: var(--primary-dark);
}

.mobile-menu .mobile-nav-link svg {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
}

.mobile-menu .mobile-nav-link:hover svg,
.mobile-menu .mobile-nav-link.active svg {
    color: var(--primary-dark);
}

.mobile-menu .mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.mobile-menu .mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.mobile-menu .mobile-btn-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: var(--text-dark);
}

.mobile-menu .mobile-btn-secondary {
    background: #f8fafc;
    color: var(--text-dark);
    border: 2px solid #e2e8f0;
}

/* Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
}

/* Body padding for fixed header */
body {
    padding-top: var(--header-height);
}

/* ===== RESPONSIVE STYLES ===== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --header-height: 72px;
    }
    
    .navbar > .container {
        padding: 0 1.5rem;
    }
    
    .nav-brand .brand-name {
        font-size: 1.2rem;
    }
    
    .nav-brand .logo {
        width: 42px;
        height: 42px;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .nav-auth-buttons .btn-login span {
        display: none;
    }
    
    .nav-actions .btn-primary {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 68px;
    }
    
    .navbar > .container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-auth-buttons {
        display: none;
    }
    
    .nav-actions .btn-primary {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .nav-brand .brand-name {
        font-size: 1.1rem;
    }
    
    .nav-brand .logo {
        width: 38px;
        height: 38px;
    }
    
    .nav-icon-btn {
        width: 40px;
        height: 40px;
    }
    
    .nav-icon-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .user-dropdown {
        position: fixed;
        top: var(--header-height);
        left: 1rem;
        right: 1rem;
        width: auto;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .navbar > .container {
        padding: 0 0.75rem;
    }
    
    .nav-brand .brand-name {
        display: none;
    }
    
    .nav-brand .logo {
        width: 44px;
        height: 44px;
    }
    
    .nav-icon-btn {
        width: 38px;
        height: 38px;
    }
    
    .cart-badge {
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
}

/* Hover effects only on devices that support hover */
@media (hover: hover) {
    .nav-link:hover,
    .nav-icon-btn:hover,
    .btn-login:hover,
    .btn-register:hover,
    .nav-actions .btn-primary:hover {
        transform: translateY(-2px);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
