/* Navbar Styles */
* {
    font-family: 'Poppins', sans-serif;
}

.navbar-custom {
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: #2c3e50 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #3498db !important;
}

.navbar-nav .nav-link {
    color: #2c3e50 !important;
    font-weight: 500;
    font-size: 1rem;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #3498db !important;
    background-color: #f8f9fa;
}

.search-container {
    position: relative;
    max-width: 300px;
    width: 100%;
}

.search-input {
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    background-color: #ffffff;
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-icon:hover {
    color: #3498db;
}

.navbar-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-icon {
    color: #2c3e50;
    font-size: 1.2rem;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    background-color: transparent;
    border: none;
}

.nav-icon:hover {
    color: #3498db;
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    min-width: 20px;
    padding: 0;
    box-sizing: border-box;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2844, 62, 80, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        margin: 0.2rem 0;
        padding: 0.8rem 1rem !important;
    }
    
    .search-container {
        max-width: 100%;
        margin: 1rem 0;
    }
    
    .navbar-icons {
        justify-content: center;
        margin-top: 1rem;
        gap: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .navbar-custom {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .nav-icon {
        font-size: 1.1rem;
        padding: 0.4rem;
    }
    
    .search-input {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem 0.4rem 2.2rem;
    }
}

/* Smooth animations */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #3498db;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Enhanced Search Styles - Global for all pages */
.search-container {
    position: relative;
    max-width: 400px;
    width: 100%;
    z-index: 1050; /* Ensure it's above other elements */
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1051; /* Higher than container */
    display: none;
    margin-top: 0.5rem;
    overflow: hidden;
}

.suggestions-header {
    padding: 1rem 1.5rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.suggestions-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestions-list {
    padding: 0.5rem 0;
}

.suggestion-item {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #f5f5f5;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Removed suggestion-icon styling for clean design */

.suggestion-text {
    flex: 1;
    font-weight: 500;
}

.suggestion-category {
    font-size: 0.8rem;
    color: #666;
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 400;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: #f8f9fa;
    color: #000000;
}

/* Removed icons for clean design */

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1051; /* Higher than container */
    display: none;
    margin-top: 0.5rem;
    max-height: 500px;
    overflow-y: auto;
}

/* Search loading indicator */
.search-loading {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1051;
    display: none;
    margin-top: 0.5rem;
    padding: 1rem;
    text-align: center;
    color: #666;
}

.search-loading i {
    margin-right: 0.5rem;
    color: #007bff;
}

.search-results-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.results-count {
    font-size: 0.9rem;
    color: #666666;
    font-weight: 500;
}

.view-all-link {
    color: #111111;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: #333333;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-result-item:hover,
.search-result-item.active {
    background: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #111111;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.result-title mark {
    background: #fff3cd;
    color: #111111;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

.result-brand {
    font-size: 0.8rem;
    color: #666666;
    margin-bottom: 0.25rem;
}

.result-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111111;
    margin-bottom: 0.25rem;
}

.result-category {
    font-size: 0.75rem;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-more-results {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.more-results-link {
    color: #111111;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.more-results-link:hover {
    color: #333333;
}

.search-loading,
.search-no-results,
.search-error {
    padding: 2rem 1.5rem;
    text-align: center;
    color: #666666;
}

.search-loading i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #111111;
}

.search-no-results i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #e5e5e5;
}

.search-error i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #dc3545;
}

.search-loading span,
.search-no-results p,
.search-error p {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.search-no-results small,
.search-error small {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Mobile Responsive for Search */
@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
        margin: 1rem 0;
    }
    
    .search-suggestions,
    .search-results {
        left: -1rem;
        right: -1rem;
        border-radius: 8px;
    }
    
    .search-result-item {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .result-image {
        width: 40px;
        height: 40px;
    }
    
    .result-title {
        font-size: 0.9rem;
    }
    
    .result-brand,
    .result-price,
    .result-category {
        font-size: 0.8rem;
    }
}

/* Body margin for fixed navbar */
.navbar-spacer {
    margin-top: 80px;
}
