:root {
    --primary-color: #1e5631; /* Deep Green */
    --secondary-color: #fdfcf5; /* Cream */
    --text-color: #333;
    --light-text: #666;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.elegant-fixed-top {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition:
        transform 0.3s ease,
        background 0.3s ease;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    transform: translate3d(0, 0, 0);
}

.elegant-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 10px 0;
    transition: padding 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

.elegant-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.elegant-logo img {
    height: 80px;
    width: auto;
    transition: var(--transition);
}

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

.elegant-search-form {
    flex: 1;
    max-width: 500px;
    position: relative;
    display: flex;
    align-items: center;
}

.elegant-search-input {
    width: 100%;
    padding: 10px 20px;
    padding-right: 20px;
    padding-left: 50px;
    border: 1px solid #eee;
    border-radius: 50px;
    background: #fdfdfd;
    font-size: 13px;
    transition: var(--transition);
    outline: none;
    text-align: right;
}

.elegant-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(14, 90, 167, 0.1);
    background: #fff;
}

.elegant-search-btn {
    position: absolute;
    left: 4px;
    top: 4px;
    bottom: 4px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 14px;
}

.elegant-search-btn:hover {
    background: #0a4a8a;
    transform: rotate(90deg) scale(1.1);
}

.elegant-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.elegant-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-size: 11px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding: 5px;
    border-radius: 8px;
}

.elegant-action-item:hover {
    color: var(--primary-color);
    background: rgba(14, 90, 167, 0.05);
}

.elegant-action-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
    transition: var(--transition);
}

.elegant-action-item:hover svg {
    transform: translateY(-2px);
    fill: var(--primary-color); /* Assuming SVGs use currentColor or fill */
}

.elegant-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff4d4d;
    color: #fff;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
    border: 2px solid #fff;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(255, 77, 77, 0.3);
}

/* Nav Bar Improvements */
.elegant-nav-bar {
    background: #447a55;
    border-bottom: 1px solid #eee;
    padding: 0;
    transition: padding 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    position: relative;
    z-index: 5;
}

.elegant-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.elegant-nav-link {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
    position: relative;
    padding: 15px 15px;
    border-bottom: 2px solid transparent;
}

.elegant-nav-link i {
    font-size: 16px;
    color: #fff;
    transition: var(--transition);
}

.elegant-nav-link:hover {
    color: #c5a059;
    font-weight: bold;
    background: linear-gradient(to top, rgba(14, 90, 167, 0.03), transparent);
}

.elegant-nav-link:hover i {
    color: #c5a059;
    transform: translateY(-2px);
}

.elegant-nav-link::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.elegant-nav-link:hover::after {
    width: 80%;
}

/* Sticky State */
.elegant-fixed-top.is-sticky .elegant-header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
}

.elegant-search-input::placeholder {
    color: #bbb;
    opacity: 0.7;
}

.elegant-action-item span:not(.elegant-badge) {
    font-size: 11px;
    margin-top: 2px;
    opacity: 0.8;
}

/* Responseive Improvements */
@media (max-width: 991px) {
    .elegant-header .container {
        flex-wrap: wrap;
        padding-bottom: 15px;
    }

    .elegant-logo {
        order: 1;
    }

    .elegant-actions {
        order: 2;
    }

    .elegant-search-form {
        order: 3;
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 15px;
    }

    .elegant-nav-bar .container {
        padding: 0; /* Full width scroll */
    }

    .elegant-nav-list {
        justify-content: flex-start; /* Align left/right for scroll */
        padding: 0 15px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch; /* Smooth scroll iOS */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .elegant-nav-list::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .elegant-nav-link {
        font-size: 13px;
        padding: 12px 10px;
        white-space: nowrap;
    }

    .elegant-nav-link i {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .elegant-header .container {
        gap: 15px;
    }

    .elegant-logo img {
        height: 60px;
    }

    .elegant-actions {
        gap: 15px;
    }

    .elegant-action-item span:not(.elegant-badge) {
        display: none; /* Hide labels on mobile */
    }

    .elegant-action-item svg {
        width: 22px;
        height: 22px;
    }

    .elegant-nav-link {
        flex-direction: column;
        gap: 4px;
        font-size: 10px;
        padding: 10px 12px;
    }

    .elegant-nav-link i {
        font-size: 18px;
    }

    .elegant-nav-link::after {
        display: none;
    }
}

/* Live Search Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    max-height: 450px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    border: 1px solid #f0f0f0;
}

.search-results-dropdown.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

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

.result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: 0.2s;
    border-bottom: 1px solid #f9f9f9;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background: #f8fafc;
}

.result-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: contain;
    background: #fdfdfd;
    margin-left: 15px;
    border: 1px solid #eee;
}

.result-info {
    flex: 1;
    text-align: right;
}

.result-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.result-price {
    font-size: 13px;
    color: #6366f1;
    font-weight: 600;
}

.search-results-dropdown .no-results {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.search-results-dropdown .view-all {
    display: block;
    padding: 12px;
    text-align: center;
    background: #f8fafc;
    color: #6366f1;
    font-weight: 700;
    font-size: 13px;
    border-top: 1px solid #f0f0f0;
}

/* Mobile Header Styles */
.elegant-mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px 10px;
    margin-right: -10px; /* Align with container edge */
}

/* Mobile Menu Drawer */
.elegant-mobile-menu {
    position: fixed;
    top: 0;
    right: -300px; /* Hidden by default */
    width: 280px;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.elegant-mobile-menu.active {
    right: 0;
}

.elegant-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

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

.elegant-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fdfdfd;
}

.mobile-logo-text {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 18px;
}

.elegant-mobile-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.elegant-mobile-close:hover {
    background: #ffecec;
    color: #ff4d4d;
}

.elegant-mobile-body {
    padding: 20px;
}

.elegant-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f9f9f9;
    color: var(--primary-color);
    font-weight: 700;
}

.mobile-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
    background: #fdfdfd;
    border: 1px solid #f5f5f5;
}

.mobile-action-item:hover {
    background: #f0f7f2;
    color: var(--primary-color);
    border-color: #dbece0;
}

.mobile-action-item i {
    width: 20px;
    text-align: center;
}

.mobile-badge {
    position: absolute;
    left: 10px;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 20px;
}

.mobile-divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 0 0 20px 0;
}

.elegant-mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elegant-mobile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

.elegant-mobile-nav a i {
    color: var(--primary-color);
    font-size: 16px;
    width: 24px;
}

.elegant-mobile-nav a:hover {
    background: #f8fafc;
    color: var(--primary-color);
    padding-right: 20px; /* Slight slide effect */
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .elegant-header .container {
        padding-bottom: 10px;
        gap: 10px;
    }

    /* Hide Desktop Elements */
    .elegant-actions {
        display: none;
    }

    .elegant-nav-bar {
        display: none;
    }

    /* Show Mobile Elements */
    .elegant-mobile-toggle {
        display: block;
        order: 2; /* After logo */
    }

    .elegant-logo {
        order: 1;
    }

    .elegant-search-form {
        order: 3;
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 10px;
    }

    .elegant-logo img {
        height: 60px; /* Smaller Logo */
    }
}
