/* ===================================
   MODERN RESPONSIVE NAVBAR STYLES
   =================================== */

/* Reset and override old navbar styles */
.navbar .container {
    all: unset;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-links {
    all: unset !important;
}

:root {
    --navbar-height: 70px;
    --brew-primary: #C67C4E;
    --brew-primary-dark: #A66438;
    --brew-black: #2C2C2C;
    --brew-gray: #6B7280;
    --brew-surface: #F9F2ED;
    --brew-white: #FFFFFF;
    --sidebar-width: 280px;
}

/* ===================================
   MAIN NAVBAR
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--brew-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

/* ===================================
   HAMBURGER MENU (Mobile Only)
   =================================== */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    order: -1; /* Ensures it's on the left */
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--brew-primary);
    border-radius: 3px;
    transition: background 0.3s ease;
}

/* Remove X animation - keep hamburger as is */
.hamburger-menu.active .hamburger-line {
    background: var(--brew-primary);
}

/* ===================================
   LOGO
   =================================== */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--brew-black);
    font-weight: 700;
    font-size: 1.25rem;
    font-family: 'Playfair Display', serif;
    transition: transform 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 1.75rem;
    color: var(--brew-primary);
}

.logo-text {
    white-space: nowrap;
}

/* ===================================
   DESKTOP NAVIGATION LINKS
   =================================== */
.desktop-nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.desktop-nav-links .nav-link {
    color: var(--brew-black);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.desktop-nav-links .nav-link:hover {
    color: var(--brew-primary);
    background: var(--brew-surface);
}

.desktop-nav-links .nav-link.active {
    color: var(--brew-primary);
    background: var(--brew-surface);
}

.desktop-nav-links .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    height: 3px;
    background: var(--brew-primary);
    border-radius: 3px 3px 0 0;
}

/* ===================================
   NAVBAR ACTIONS (Right Side)
   =================================== */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Cart Button */
.action-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--brew-surface);
    border: none;
    border-radius: 12px;
    color: var(--brew-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.1rem;
}

.action-btn:hover {
    background: var(--brew-primary);
    color: var(--brew-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 124, 78, 0.3);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: badgePulse 2s infinite;
}

/* Login Button */
.login-btn {
    width: auto;
    padding: 0 1.25rem;
    gap: 0.5rem;
}

.login-text {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===================================
   USER DROPDOWN (Desktop)
   =================================== */
.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.user-btn:hover {
    background: var(--brew-surface);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brew-primary) 0%, var(--brew-primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    box-shadow: 0 2px 8px rgba(198, 124, 78, 0.3);
}

.notification-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #EF4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    border: 2px solid white;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 2px 12px rgba(239, 68, 68, 0.8);
    }
}

.dropdown-icon {
    font-size: 0.75rem;
    color: var(--brew-gray);
    transition: transform 0.3s ease;
}

.user-btn:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 250px;
    background: var(--brew-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
}

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

.dropdown-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--brew-primary) 0%, var(--brew-primary-dark) 100%);
    color: white;
}

.user-info .user-name {
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
}

.user-info .user-email {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
}

.dropdown-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--brew-black);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: var(--brew-surface);
    color: var(--brew-primary);
}

.dropdown-item i {
    width: 18px;
    font-size: 1rem;
}

.logout-item {
    color: #EF4444;
}

.logout-item:hover {
    background: #FEE2E2;
    color: #DC2626;
}

/* ===================================
   NOTIFICATION DROPDOWN (Desktop)
   =================================== */
.notification-dropdown {
    position: relative;
}

.notification-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--brew-surface);
    border: none;
    border-radius: 12px;
    color: var(--brew-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.notification-btn:hover {
    background: var(--brew-primary);
    color: var(--brew-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 124, 78, 0.3);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: badgePulse 2s infinite;
}

.notification-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    background: var(--brew-white);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid #E5E7EB;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    max-height: 500px;
    overflow: hidden;
}

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

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    background: var(--brew-surface);
}

.notification-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brew-black);
}

.mark-all-read-btn {
    background: transparent;
    border: none;
    color: var(--brew-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mark-all-read-btn:hover {
    background: var(--brew-primary);
    color: white;
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    color: var(--brew-gray);
    text-align: center;
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.notification-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Notification Items */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #F3F4F6;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.notification-item:hover {
    background: var(--brew-surface);
}

.notification-item.unread {
    background: linear-gradient(90deg, rgba(198, 124, 78, 0.03) 0%, rgba(198, 124, 78, 0.08) 100%);
    border-left: 3px solid var(--brew-primary);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--brew-primary);
}

.notification-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--brew-primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.25rem;
    box-shadow: 0 0 0 2px rgba(198, 124, 78, 0.2);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brew-black);
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--brew-gray);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--brew-gray);
    opacity: 0.7;
    margin: 0;
}

.notification-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #E5E7EB;
    background: var(--brew-surface);
    text-align: center;
}

.view-all-link {
    color: var(--brew-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: var(--brew-primary-dark);
    text-decoration: underline;
}

/* ===================================
   MOBILE SIDEBAR
   =================================== */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--brew-white);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1100;
    overflow-y: auto;
}

.mobile-sidebar.active {
    transform: translateX(0);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Sidebar Header */
.sidebar-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--brew-primary) 0%, var(--brew-primary-dark) 100%);
    color: white;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.mobile-notification-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #EF4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

.sidebar-user-info {
    flex: 1;
}

.sidebar-user-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.sidebar-user-email {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
}

/* Guest Section */
.sidebar-guest {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-guest-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.sidebar-guest-info {
    flex: 1;
}

.sidebar-guest-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.sidebar-login-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sidebar-login-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--brew-black);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
    background: var(--brew-surface);
    color: var(--brew-primary);
    border-left-color: var(--brew-primary);
}

.sidebar-nav-item.active {
    background: var(--brew-surface);
    color: var(--brew-primary);
    border-left-color: var(--brew-primary);
    font-weight: 600;
}

.sidebar-nav-item i {
    width: 20px;
    font-size: 1.1rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
}

.sidebar-footer-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--brew-black);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    position: relative;
}

.sidebar-footer-item:hover {
    background: white;
    color: var(--brew-primary);
}

.sidebar-footer-item.logout {
    color: #EF4444;
}

.sidebar-footer-item.logout:hover {
    background: #FEE2E2;
    color: #DC2626;
}

.sidebar-footer-item i {
    width: 18px;
    font-size: 1rem;
}

.sidebar-cart-badge {
    position: absolute;
    right: 1rem;
    background: #EF4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-notification-badge {
    position: absolute;
    right: 1rem;
    background: #EF4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1050;
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   MOBILE NOTIFICATION DROPDOWN
   =================================== */
.mobile-notification-dropdown {
    position: fixed;
    top: var(--navbar-height);
    right: 0;
    width: 100%;
    max-width: 400px;
    height: calc(100vh - var(--navbar-height));
    background: var(--brew-white);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1100;
    overflow-y: auto;
    border-left: 1px solid #E5E7EB;
}

.mobile-notification-dropdown.active {
    transform: translateX(0);
}

.mobile-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    background: var(--brew-surface);
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-notification-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brew-black);
}

.mobile-mark-all-read-btn {
    background: transparent;
    border: none;
    color: var(--brew-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mobile-mark-all-read-btn:hover {
    background: var(--brew-primary);
    color: white;
}

.mobile-notification-list {
    padding: 0.5rem 0;
    min-height: calc(100vh - 200px);
}

.mobile-notification-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #E5E7EB;
    background: var(--brew-surface);
    text-align: center;
    position: sticky;
    bottom: 0;
}

.mobile-view-all-link {
    color: var(--brew-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.mobile-view-all-link:hover {
    color: var(--brew-primary-dark);
    text-decoration: underline;
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */
@media (max-width: 1024px) {
    .desktop-nav-links {
        gap: 1.5rem;
    }
    
    .desktop-nav-links .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    .desktop-nav-links {
        display: none;
    }
    
    .navbar-container {
        padding: 0 1rem;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .action-btn {
        width: 40px;
        height: 40px;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .login-text {
        display: none;
    }
    
    /* Hide desktop notification on mobile */
    .notification-dropdown {
        display: none;
    }
}

@media (max-width: 480px) {
    .mobile-sidebar {
        width: 85vw;
        max-width: 300px;
    }
    
    .navbar-container {
        padding: 0 0.75rem;
    }
    
    .navbar-logo {
        font-size: 1rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }

    /* Notification Dropdown Responsive */
    .notification-dropdown-menu {
        width: 320px;
        right: -10px;
    }

    .mobile-notification-dropdown {
        max-width: 350px;
    }
}
