/* ============ Search Dropdown ============ */
.search-wrapper {
    position: relative;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 9998;
    display: none;
    padding: 15px;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.search-result-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.search-result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #0f8a5f;
}

.search-result-image {
    display: block;
    width: 100%;
    height: 140px;
    background: #f8f9fa;
    overflow: hidden;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.3s;
}

.search-result-item:hover .search-result-image img {
    transform: scale(1.05);
}

.search-result-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.search-result-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    min-height: 40px;
    text-decoration: none;
    transition: color 0.2s;
}

.search-result-name:hover {
    color: #0f8a5f;
}

.search-result-description {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 36px;
}

.search-result-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 8px;
}

.search-result-name mark {
    background: #fef08a;
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-price {
    font-size: 14px;
    color: #0f8a5f;
    font-weight: 700;
}

.search-result-button {
    padding: 6px 12px;
    background: #0f8a5f;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-result-button:hover {
    background: #04623f;
}

.search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
    grid-column: 1 / -1;
}

.search-no-results i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.search-no-results p {
    margin: 0;
    font-size: 14px;
}

@media (max-width: 768px) {
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .search-dropdown {
        max-height: 400px;
        padding: 10px;
    }
}