/* Search Bar Styles */
.search-container {
    position: relative;
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    padding: 5px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-form:focus-within {
    border-color: #ff9900;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.2);
}

.search-input {
    border: none;
    outline: none;
    flex: 1;
    padding: 10px 0;
    background: transparent;
    font-size: 0.9rem;
    width: 100%;
}

.search-button {
    background: none;
    border: none;
    color: #ff9900;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.search-button:hover {
    color: #333;
}

/* Mobile Search Toggle Button */
.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    padding: 8px;
    margin-left: 10px;
}

.mobile-search-toggle:hover {
    color: #ff9900;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    flex-direction: column;
    padding: 20px;
}

.mobile-search-overlay.active {
    display: flex;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.mobile-search-input {
    flex: 1;
    background: white;
    border: 2px solid #ff9900;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 1rem;
    color: #333;
}

.close-mobile-search {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    margin-left: 15px;
}

/* Mobile search results */
.mobile-search-results {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 15px;
    overflow-y: auto;
}

.search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-top: 10px;
    z-index: 1000;
    display: none;
    max-height: 500px;
    overflow-y: auto;
}

.search-results {
    padding: 10px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    transition: background 0.3s ease;
}

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

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.search-result-price {
    font-size: 0.85rem;
    color: #ff9900;
    font-weight: bold;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.loading-search {
    padding: 20px;
    text-align: center;
    color: #ff9900;
}

.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* Search suggestions */
.search-suggestions {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.suggestion-title {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-item {
    display: block;
    padding: 8px 10px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.suggestion-item:hover {
    background: #f8f9fa;
    color: #ff9900;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .brand-name {
        font-size: 1.5rem;
        margin-right: 15px;
    }
    
    .nav-link .material-icons {
        font-size: 24px;
    }
    
    .search-container {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-wrap: wrap;
        padding: 10px 15px;
    }
    
    .brand-name {
        font-size: 1.3rem;
        margin-right: auto;
        order: 1;
    }
    
    .search-container {
        order: 3;
        flex: 0 0 100%;
        max-width: 100%;
        margin: 10px 0 0 0;
        display: none;
    }
    
    .search-container.active {
        display: block;
    }
    
    .mobile-search-toggle {
        display: block;
        order: 2;
    }
    
    .search-form {
        border-radius: 8px;
    }
}

@media (max-width: 576px) {
    .brand-name {
        font-size: 1.2rem;
    }
    
    .nav-link .material-icons {
        font-size: 22px;
    }
    
    .search-input {
        font-size: 0.85rem;
    }
    
    .search-form {
        padding: 5px 15px;
    }
    
    /* Hide desktop search on very small screens */
    .search-container {
        display: none !important;
    }
    
    /* Show only mobile search toggle */
    .mobile-search-toggle {
        display: block;
    }
    
    /* Mobile overlay adjustments */
    .mobile-search-overlay {
        padding: 15px;
    }
    
    .mobile-search-input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}