/*
 * Nova Theme - Header Styles
 * Version: 2.0.0
 */

/* ============================================
   MAIN HEADER
   ============================================ */
.nova-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: all var(--nova-transition-normal);
}

.nova-header.scrolled {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--nova-border);
    padding: 10px 0;
    box-shadow: var(--nova-shadow-lg);
}

.nova-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo */
.nova-logo {
    flex-shrink: 0;
}

.nova-logo img {
    height: 45px;
    width: auto;
    transition: all 0.3s ease;
}

.nova-logo:hover img {
    transform: scale(1.05);
}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */
.nova-nav-desktop {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nova-nav-item {
    position: relative;
}

.nova-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    color: var(--nova-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--nova-radius-sm);
    transition: all 0.3s ease;
}

.nova-nav-link:hover {
    color: var(--nova-text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nova-nav-link i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.nova-nav-item:hover .nova-nav-link i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.nova-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--nova-bg-card);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-md);
    box-shadow: var(--nova-shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    padding: 8px;
    z-index: 100;
}

.nova-nav-item:hover .nova-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.nova-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--nova-text-secondary);
    text-decoration: none;
    font-size: 14px;
    border-radius: var(--nova-radius-sm);
    transition: all 0.2s ease;
}

.nova-dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--nova-text-primary);
}

.nova-dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--nova-primary);
    font-size: 14px;
}

.nova-dropdown-divider {
    height: 1px;
    background: var(--nova-border);
    margin: 8px 0;
}

/* ============================================
   HEADER ACTIONS
   ============================================ */
.nova-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nova-action-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--nova-radius-sm);
    color: var(--nova-text-secondary);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nova-action-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
    color: var(--nova-text-primary);
}

/* Cart & Notification Badges */
.nova-cart-badge,
.nova-notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    background: var(--nova-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Theme Toggle */
.nova-theme-toggle {
    position: relative;
    overflow: hidden;
}

.nova-theme-toggle .nova-icon-light,
.nova-theme-toggle .nova-icon-dark {
    position: absolute;
    transition: all 0.3s ease;
}

[data-theme="dark"] .nova-icon-light {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="dark"] .nova-icon-dark {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="light"] .nova-icon-light {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="light"] .nova-icon-dark {
    opacity: 1;
    transform: rotate(0deg);
}

/* ============================================
   USER DROPDOWN
   ============================================ */
.nova-user-wrapper {
    position: relative;
}

.nova-user-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nova-user-toggle:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.nova-user-avatar {
    width: 32px;
    height: 32px;
    background: var(--nova-gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.nova-user-name {
    color: var(--nova-text-primary);
    font-size: 14px;
    font-weight: 500;
}

.nova-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: var(--nova-bg-card);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-md);
    box-shadow: var(--nova-shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    padding: 8px;
    z-index: 100;
}

.nova-user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */
.nova-notification-wrapper {
    position: relative;
}

.nova-notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--nova-bg-card);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    box-shadow: var(--nova-shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    overflow: hidden;
}

.nova-notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nova-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--nova-border);
    background: rgba(102, 126, 234, 0.05);
}

.nova-notif-header h4 {
    margin: 0;
    font-size: 14px;
    color: var(--nova-text-primary);
}

.nova-notif-list {
    max-height: 300px;
    overflow-y: auto;
}

.nova-notif-item {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--nova-border);
    transition: background 0.2s ease;
}

.nova-notif-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.nova-notif-item:last-child {
    border-bottom: none;
}

.nova-notif-icon {
    width: 40px;
    height: 40px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nova-primary);
    flex-shrink: 0;
}

.nova-notif-content h5 {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--nova-text-primary);
}

.nova-notif-content p {
    margin: 0;
    font-size: 12px;
    color: var(--nova-text-muted);
}

/* Notification List Container */
.nova-notif-content {
    max-height: 300px;
    overflow-y: auto;
}

.nova-notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--nova-text-muted);
}

.nova-notif-empty i {
    font-size: 48px;
    color: var(--nova-success);
    margin-bottom: 15px;
    display: block;
}

.nova-notif-empty p {
    margin: 0;
    font-size: 14px;
}

.nova-notif-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--nova-border);
    text-align: center;
}

.nova-notif-footer a {
    color: var(--nova-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.nova-notif-footer a:hover {
    text-decoration: underline;
}

/* User Menu Container */
.nova-user-menu {
    position: relative;
}

.nova-user-btn {
    border-radius: 50%;
}

.nova-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: var(--nova-bg-card);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-md);
    box-shadow: var(--nova-shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    padding: 8px;
    z-index: 100;
}

.nova-user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Chevron Animation */
.nova-chevron {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.nova-nav-item.has-dropdown:hover .nova-chevron {
    transform: rotate(180deg);
}

/* ============================================
   MOBILE MENU
   ============================================ */
.nova-mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--nova-radius-sm);
    color: var(--nova-text-primary);
    font-size: 20px;
    cursor: pointer;
}

.nova-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.nova-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nova-mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--nova-bg-card);
    border-left: 1px solid var(--nova-border);
    z-index: 1002;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.nova-mobile-nav.active {
    right: 0;
}

.nova-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--nova-border);
}

.nova-mobile-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    color: var(--nova-text-primary);
    font-size: 16px;
    cursor: pointer;
}

.nova-mobile-menu {
    padding: 15px;
}

.nova-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    color: var(--nova-text-secondary);
    text-decoration: none;
    font-size: 15px;
    border-radius: var(--nova-radius-sm);
    transition: all 0.2s ease;
}

.nova-mobile-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--nova-text-primary);
}

.nova-mobile-submenu {
    display: none;
    padding-left: 15px;
}

.nova-mobile-submenu.active {
    display: block;
}

.nova-mobile-sublink {
    display: block;
    padding: 12px 16px;
    color: var(--nova-text-muted);
    text-decoration: none;
    font-size: 14px;
    border-radius: var(--nova-radius-sm);
    transition: all 0.2s ease;
}

.nova-mobile-sublink:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--nova-text-primary);
}

/* ============================================
   LIGHT MODE HEADER
   ============================================ */
[data-theme="light"] .nova-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nova-action-btn,
[data-theme="light"] .nova-user-toggle,
[data-theme="light"] .nova-mobile-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nova-action-btn:hover,
[data-theme="light"] .nova-user-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

[data-theme="light"] .nova-dropdown,
[data-theme="light"] .nova-user-dropdown,
[data-theme="light"] .nova-notification-dropdown,
[data-theme="light"] .nova-mobile-nav {
    background: white;
    box-shadow: var(--nova-shadow-lg);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .nova-nav-desktop {
        display: none;
    }

    .nova-mobile-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .nova-header-inner {
        padding: 0 15px;
    }

    .nova-logo img {
        height: 35px;
    }

    .nova-action-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .nova-notification-dropdown {
        width: 280px;
        right: -50px;
    }

    .nova-user-name {
        display: none;
    }
}