/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    transition: filter 0.25s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary-dark);
}

.brand-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.brand-text .brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.1;
    display: block;
    color: var(--primary-color);
}

.brand-text .brand-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

/* Search Bar */
.search-container {
    flex: 1;
    max-width: 640px;
    margin: 0 12px;
    display: flex;
    align-items: stretch;
    height: 44px;
}

.search-bar {
    position: relative;
    flex: 1;
    display: flex;
}

.search-bar input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 44px;
    background: var(--bg-input);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px 0 0 6px;
    border-right: none;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.search-bar input:focus {
    background: var(--bg-card);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44,95,45,0.1);
}

.search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-btn {
    height: 44px;
    padding: 0 22px;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 0 6px 6px 0;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: none;
}

.search-btn:hover {
    background-position: 100% 0;
    box-shadow: 0 4px 12px rgba(44, 95, 45, 0.3);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-main);
    font-size: 1.2rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--bg-input);
    color: var(--primary-color);
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    height: 20px;
    min-width: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

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

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
    overflow: hidden;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: var(--bg-input);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

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

.dropdown-item.logout {
    color: var(--danger);
}

.dropdown-item.logout i {
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--bg-input);
    margin: 4px 0;
}

/* Navbar Bottom (Categories) */
.navbar-bottom {
    position: relative; /* Part of scrollable content */
    margin-top: var(--header-height); /* Offset for fixed navbar */
    width: 100%;
    height: var(--subheader-height);
    background: white;
    border-bottom: 1px solid #e8e8e8;
    z-index: 998;
    display: flex;
    align-items: center;
    transition: filter 0.25s ease;
}

.category-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    margin: 0;
    padding: 0;
    height: 100%;
}

.menu-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu-link {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    height: 100%;
}

.menu-link:hover {
    color: var(--primary-color);
}

.menu-link i.fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.menu-item:hover .menu-link i.fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-radius: 0 0 12px 12px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    border-top: 2px solid var(--primary-color);
}

.menu-item:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-content a:hover {
    background: var(--bg-input);
    color: var(--primary-color);
}

body.blur-active .navbar-bottom {
    filter: blur(6px);
}

/* Hero */
.hero {
    padding: 60px 0 40px;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Footer */
.footer {
    margin-top: 80px;
    padding: 40px 0;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    font-size: 0.9rem;
    transition: filter 0.25s ease;
}

#mainContent {
    transition: filter 0.25s ease;
}

body.blur-active .navbar,
body.blur-active .navbar-bottom,
body.blur-active #mainContent,
body.blur-active .hero-slider,
body.blur-active .footer {
    filter: blur(6px);
}

/* Search icon button - hidden on desktop */
.search-icon-btn {
    display: none;
}

/* Mobile search expansion */
@media (max-width: 900px) {
    .brand {
        transition: all 0.3s ease;
        overflow: hidden;
        flex-shrink: 0;
    }

    .search-container {
        display: none;
        flex: 1;
        max-width: none;
        margin: 0;
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
    }

    .search-icon-btn {
        display: flex;
        transition: all 0.3s ease;
    }

    /* When search is expanded */
    .navbar.search-expanded .brand {
        width: 0;
        opacity: 0;
        margin-right: 0;
        pointer-events: none;
    }

    .navbar.search-expanded .search-container {
        display: flex;
        opacity: 1;
        transform: translateX(0);
    }

    .navbar.search-expanded .search-icon-btn {
        display: none;
    }

    .navbar.search-expanded .search-bar {
        flex: 1;
    }

    .navbar.search-expanded .search-btn {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .brand-text .brand-name {
        font-size: 1rem;
    }
    
    .brand-text .brand-subtitle {
        font-size: 0.7rem;
    }
}

