/* Search styles */
.search-container {
    position: relative;
    height: 40px;
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2;
}

.search-btn svg {
    color: black;
    transition: transform 0.3s ease;
}

.search-btn svg:hover {
    color: #4CAF50;
}

.search-input {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 20px;
    padding: 0 20px;
    font-size: 16px;
    color: #2d3748;
    background: #edf2f7;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    z-index: 1;
}

.search-input::placeholder {
    color: #a0aec0;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* Active states */
.search-container.active .search-btn {
    transform: translateX(2px);
    background: #3182ce;
}

.search-container.active .search-btn svg {
    transform: rotate(90deg);
}

.search-container.active .search-input {
    width: 300px;
    opacity: 1;
    padding-right: 40px;
}

/* Search results */
.search-results {
    position: absolute;
    top: 45px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.search-results.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #edf2f7;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f7fafc;
}

.search-result-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 12px;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 2px;
}

.search-result-category {
    font-size: 12px;
    color: #718096;
}

.search-result-price {
    font-weight: 600;
    color: #2d3748;
}

.no-results {
    padding: 16px;
    text-align: center;
    color: #718096;
}

/* Responsive design */
@media (max-width: 640px) {
    .search-container.active .search-input {
        width: calc(100vw - 80px);
    }
    
    .search-results {
        width: calc(100vw - 80px);
    }
}